@wildo-ai/saas-specifications 1.1.2 → 1.1.3
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/_core/brand/brand-asset.schemas.d.ts +4 -6
- package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-asset.schemas.js +4 -12
- package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-generation.schemas.d.ts +5 -3
- package/dist/esm/_core/brand/brand-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-generation.schemas.js +5 -2
- package/dist/esm/_core/brand/brand-generation.schemas.js.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +10 -3
- package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
- package/dist/esm/_core/brand/brand-snapshot.schemas.js +10 -2
- package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
- 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 +15 -5
- 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 +40 -3
- 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 +85 -6
- package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
- 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 +10 -4
- 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 +15 -0
- 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.map +1 -1
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +10 -0
- 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 +17 -0
- package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +6 -7
- 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 +6 -13
- 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 +0 -11
- package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts.map +1 -1
- package/dist/esm/_core/expert-personas/expert-persona-validation.js +0 -19
- package/dist/esm/_core/expert-personas/expert-persona-validation.js.map +1 -1
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +1 -2
- 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 +1 -2
- package/dist/esm/_core/expert-personas/expert-role-template.schemas.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 +17 -4
- package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js.map +1 -1
- package/dist/esm/_core/index.d.ts +1 -0
- package/dist/esm/_core/index.d.ts.map +1 -1
- package/dist/esm/_core/index.js +1 -0
- package/dist/esm/_core/index.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot-generation.schemas.js +5 -40
- package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/market/market-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/market/market-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
- 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 +11 -5
- 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 +66 -9
- package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan-validation.js +62 -20
- package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +4 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js +4 -1
- package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
- package/dist/esm/_core/provider-specification.schemas.d.ts +82 -0
- package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -0
- package/dist/esm/_core/provider-specification.schemas.js +144 -0
- package/dist/esm/_core/provider-specification.schemas.js.map +1 -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 +13 -8
- package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +15 -0
- package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
- package/dist/esm/_core/requirements/requirements-snapshot-validation.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 +7 -2
- package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +15 -0
- 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/utils/family-ref-stamping.d.ts +64 -0
- package/dist/esm/_core/utils/family-ref-stamping.d.ts.map +1 -0
- package/dist/esm/_core/utils/family-ref-stamping.js +73 -0
- package/dist/esm/_core/utils/family-ref-stamping.js.map +1 -0
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.d.ts.map +1 -1
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js +23 -9
- package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts +0 -4
- package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +7 -7
- 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 +6 -7
- 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 +3 -3
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +3 -3
- package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +2 -2
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +2 -2
- package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +18 -6
- package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/journey.application-creation.schemas.js +18 -6
- package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +8 -23
- package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js +57 -27
- package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
- package/dist/esm/assurance/application-document-publication.schemas.d.ts +20 -6
- package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/application-document-publication.schemas.js +26 -10
- package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +72 -49
- package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.definitions.js +161 -60
- package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +25 -0
- package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts +36 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +859 -0
- package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -0
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts +43 -0
- package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-foundation.schemas.js +56 -0
- package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +14 -7
- package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js +24 -7
- package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +8 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program-generation.schemas.js +10 -2
- package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.d.ts +447 -11
- package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
- package/dist/esm/assurance/assurance-program.schemas.js +293 -5
- package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts +35 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +999 -0
- package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -0
- package/dist/esm/companion-exports.d.ts +7 -6
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/engine/_bootstrap.js +3 -1
- package/dist/esm/engine/_bootstrap.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 +13 -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.js +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 +2 -0
- 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 +14 -2
- 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.js +9 -9
- package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js +1 -1
- package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +3 -3
- package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +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 +13 -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 +2 -0
- 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 +14 -2
- package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +32 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +308 -0
- package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -0
- package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +4 -4
- 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.js +2 -2
- 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.js +6 -6
- 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.js +9 -9
- package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
- package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +2 -2
- 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 +9 -25
- 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 +104 -10
- 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 +0 -6
- package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +32 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +297 -0
- package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -0
- 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 +4 -3
- package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -2
- package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +3 -3
- package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/prices.resource.specification.js +7 -7
- package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/products.resource.specification.js +7 -7
- 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 +14 -12
- package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
- package/dist/esm/engine/billing/resources/referrals.resource.specification.js +7 -7
- 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 +6 -3
- 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 +7 -3
- 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 +28 -11
- package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +8 -8
- package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts +2 -2
- package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-specifications.registry.js +6 -2
- package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
- package/dist/esm/engine/engine-resource-sub-domain.d.ts +20 -0
- package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -1
- package/dist/esm/engine/engine-resource-sub-domain.js +66 -0
- 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 +14 -0
- package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
- package/dist/esm/engine/features/audit-logs.feature.specification.js +4 -4
- package/dist/esm/engine/features/audit-logs.feature.specification.js.map +1 -1
- package/dist/esm/engine/features/core-limits.feature.specifications.js +7 -7
- package/dist/esm/engine/features/core-limits.feature.specifications.js.map +1 -1
- package/dist/esm/engine/features/resources/application-features.resource.specification.js +3 -3
- package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js +3 -3
- package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/features/resources/user-features.resource.specification.js +3 -3
- package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
- package/dist/esm/engine/files/resources/files.resource.specification.js +10 -10
- package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +11 -11
- 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.js +4 -4
- package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -2
- package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts +5 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +81 -0
- package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts +4 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts.map +1 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js +22 -0
- package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js.map +1 -0
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +0 -4
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +0 -21
- package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -4
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -1
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -21
- package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -1
- package/dist/esm/engine/frontend-components/index.d.ts +0 -2
- package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
- package/dist/esm/engine/frontend-components/index.js +4 -6
- package/dist/esm/engine/frontend-components/index.js.map +1 -1
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +12 -12
- package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +9 -9
- 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 +8 -0
- 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 +6 -6
- package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
- package/dist/esm/engine/index.d.ts +1 -0
- package/dist/esm/engine/index.d.ts.map +1 -1
- package/dist/esm/engine/index.js +1 -0
- package/dist/esm/engine/index.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +17 -17
- package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +7 -7
- package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
- package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +8 -8
- 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 +7 -2
- 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 +10 -5
- package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.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 +20 -15
- 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 +11 -10
- 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 +29 -6
- package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +9 -9
- package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +3 -3
- package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +4 -4
- package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -2
- 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.js +1 -1
- package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +7 -7
- package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
- package/dist/esm/engine/providers/_engine-provider-shared.d.ts +9 -0
- package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -0
- package/dist/esm/engine/providers/_engine-provider-shared.js +19 -0
- package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.js +33 -0
- package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/apple.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/apple.provider.specification.js +35 -0
- package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.js +31 -0
- package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/github.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/github.provider.specification.js +30 -0
- package/dist/esm/engine/providers/github.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/google.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/google.provider.specification.js +34 -0
- package/dist/esm/engine/providers/google.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/grok.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/grok.provider.specification.js +30 -0
- package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/index.d.ts +23 -0
- package/dist/esm/engine/providers/index.d.ts.map +1 -0
- package/dist/esm/engine/providers/index.js +37 -0
- package/dist/esm/engine/providers/index.js.map +1 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.js +30 -0
- package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/mistral.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/mistral.provider.specification.js +33 -0
- package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/openai.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/openai.provider.specification.js +43 -0
- package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/opencode.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/opencode.provider.specification.js +50 -0
- package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.js +30 -0
- package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/resend.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/resend.provider.specification.js +33 -0
- package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/stripe.provider.specification.js +35 -0
- package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -0
- package/dist/esm/engine/providers/twilio.provider.specification.d.ts +7 -0
- package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -0
- package/dist/esm/engine/providers/twilio.provider.specification.js +33 -0
- package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -0
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +7 -7
- package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +9 -9
- package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -2
- 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.js +8 -8
- package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +4 -4
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +4 -4
- package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
- package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -2
- 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 +4 -4
- 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 +13 -11
- 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.js +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.js +8 -8
- package/dist/esm/engine/users/resources/user-self.resource.specification.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 +93 -0
- package/dist/esm/engine/users/resources/users.resource.specification.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 +95 -45
- package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +37 -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 +36 -0
- package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/dist/assurance/external-framework-mapping.json +0 -980
|
@@ -48,11 +48,10 @@ import { z } from 'zod';
|
|
|
48
48
|
* fact and `purpose` is a CONSUMPTION fact: they coincide for `MASTER` in
|
|
49
49
|
* the normal pipeline, but a brand whose derivation degraded ships its
|
|
50
50
|
* generated primary AT `PRIMARY`, so the two must not be conflated.
|
|
51
|
-
* - **`generatedAt`**
|
|
52
|
-
*
|
|
53
|
-
* regeneration
|
|
54
|
-
*
|
|
55
|
-
* the i18n-labelling step).
|
|
51
|
+
* - **`generatedAt`** — when it was produced. The validator flags assets
|
|
52
|
+
* older than a re-authored direction from this timestamp (`STALE_ASSETS`).
|
|
53
|
+
* Skipping regeneration is the companion's own throwaway-staging concern
|
|
54
|
+
* and records nothing on the committed asset.
|
|
56
55
|
*/
|
|
57
56
|
export declare enum BrandAssetComposition {
|
|
58
57
|
/** The symbol/icon alone — square-ish; favicons, app icons, sidebar rail. */
|
|
@@ -129,7 +128,6 @@ export declare const BrandAssetConfigSchema: z.ZodObject<{
|
|
|
129
128
|
height: z.ZodOptional<z.ZodNumber>;
|
|
130
129
|
derivedFrom: z.ZodOptional<z.ZodString>;
|
|
131
130
|
generatedAt: z.ZodISODateTime;
|
|
132
|
-
promptDigest: z.ZodOptional<z.ZodString>;
|
|
133
131
|
}, z.core.$strip>;
|
|
134
132
|
export type BrandAssetConfig = z.infer<typeof BrandAssetConfigSchema>;
|
|
135
133
|
/** @wildo_source:part:end brand.asset.config */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-asset.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-asset.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB
|
|
1
|
+
{"version":3,"file":"brand-asset.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-asset.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,oBAAY,qBAAqB;IAC/B,6EAA6E;IAC7E,MAAM,WAAW;IACjB,4EAA4E;IAC5E,QAAQ,aAAa;IACrB,yEAAyE;IACzE,MAAM,WAAW;CAClB;AAED,oBAAY,eAAe;IACzB,8DAA8D;IAC9D,OAAO,YAAY;IACnB,0CAA0C;IAC1C,IAAI,SAAS;IACb,2CAA2C;IAC3C,KAAK,UAAU;IACf,qDAAqD;IACrD,UAAU,eAAe;CAC1B;AAED,oBAAY,iBAAiB;IAC3B;;;;;;;;;;;;;;;OAeG;IACH,MAAM,WAAW;IACjB;;;;;;;;;OASG;IACH,OAAO,YAAY;IACnB,oDAAoD;IACpD,OAAO,YAAY;IACnB,kDAAkD;IAClD,gBAAgB,qBAAqB;IACrC,gEAAgE;IAChE,aAAa,kBAAkB;IAC/B,kDAAkD;IAClD,QAAQ,aAAa;IACrB,wEAAwE;IACxE,KAAK,UAAU;CAChB;AAED,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;iBAyBjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,gDAAgD"}
|
|
@@ -49,11 +49,10 @@ import { NonEmptyStringSchema } from '../market/market-references.schemas.js';
|
|
|
49
49
|
* fact and `purpose` is a CONSUMPTION fact: they coincide for `MASTER` in
|
|
50
50
|
* the normal pipeline, but a brand whose derivation degraded ships its
|
|
51
51
|
* generated primary AT `PRIMARY`, so the two must not be conflated.
|
|
52
|
-
* - **`generatedAt`**
|
|
53
|
-
*
|
|
54
|
-
* regeneration
|
|
55
|
-
*
|
|
56
|
-
* the i18n-labelling step).
|
|
52
|
+
* - **`generatedAt`** — when it was produced. The validator flags assets
|
|
53
|
+
* older than a re-authored direction from this timestamp (`STALE_ASSETS`).
|
|
54
|
+
* Skipping regeneration is the companion's own throwaway-staging concern
|
|
55
|
+
* and records nothing on the committed asset.
|
|
57
56
|
*/
|
|
58
57
|
export var BrandAssetComposition;
|
|
59
58
|
(function (BrandAssetComposition) {
|
|
@@ -148,13 +147,6 @@ export const BrandAssetConfigSchema = z.object({
|
|
|
148
147
|
derivedFrom: NonEmptyStringSchema.optional(),
|
|
149
148
|
/** ISO-8601 timestamp the asset was produced. */
|
|
150
149
|
generatedAt: z.iso.datetime(),
|
|
151
|
-
/**
|
|
152
|
-
* Stable digest of the generation inputs (brand direction + tone +
|
|
153
|
-
* enrichment). Lets the companion skip regeneration when nothing
|
|
154
|
-
* upstream changed, and lets the validator flag assets older than a
|
|
155
|
-
* re-authored direction — freshness-lock parity with i18n-labelling.
|
|
156
|
-
*/
|
|
157
|
-
promptDigest: NonEmptyStringSchema.optional(),
|
|
158
150
|
});
|
|
159
151
|
/** @wildo_source:part:end brand.asset.config */
|
|
160
152
|
//# sourceMappingURL=brand-asset.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-asset.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-asset.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAq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C;IAC1C,wEAAwE;IACxE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC;IAC/D,oGAAoG;IACpG,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACrE,0EAA0E;IAC1E,UAAU,EAAE,oBAAoB;IAChC,4BAA4B;IAC5B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;IAChC,gDAAgD;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,iDAAiD;IACjD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC9C;;;;OAIG;IACH,WAAW,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC5C,iDAAiD;IACjD,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC7B;;;;;OAKG;IACH,YAAY,EAAE,oBAAoB,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAEH,gDAAgD","sourcesContent":["import { z } from 'zod';\n\nimport { NonEmptyStringSchema } from '../market/market-references.schemas';\n\n/**\n * @wildo_source:part:start brand.asset.config facet:layer:specification facet:family:brand\n *\n * A single **resolved brand asset** — one concrete image file, described\n * by THREE ORTHOGONAL AXES rather than a single flat role. The collection\n * of these on `BrandSnapshot.resolvedAssets` is THE single source of truth\n * for the application's visual identity: the historically-fragmented logo\n * strings (org branding, app config, email brand tokens, email context,\n * auth DTO, loose favicon files) all resolve to a `BrandAsset` by axis\n * instead of carrying their own free-form URL.\n *\n * **Why three axes, not one flat role** (framework mindset — preserve the\n * distinctions, do not fold them for a shorter enum): a logo varies\n * independently along composition, theme, and technical purpose. A single\n * flat enum would multiply combinatorially (SYMBOL_DARK_FAVICON, …) and\n * conflate three unrelated concerns. Consumers resolve by the axes they\n * care about — the collapsed sidebar rail asks for `(SYMBOL, DARK)`, the\n * app-shell header asks for `(LOCKUP, DEFAULT)` — and never touch a\n * favicon slot for an in-app UI mark.\n *\n * - **`composition`** — the FORM (`BrandAssetComposition`): the symbol\n * alone, the wordmark alone, or the two locked together. Distinct from\n * `logoDirection.markType` (the brand's chosen archetype, an INPUT to\n * generation) — a `COMBINATION_MARK` brand produces both a `LOCKUP` and\n * a `SYMBOL` asset; a `WORDMARK` brand produces only a `WORDMARK` asset.\n * - **`theme`** — the color context (`BrandAssetTheme`): the default mark,\n * or a variant tuned for dark/light backgrounds, or a single-color\n * knockout.\n * - **`purpose`** — the technical consumption slot (`BrandAssetPurpose`):\n * `MASTER` is the full-resolution source; `PRIMARY` is the base\n * DISPLAY form a UI surface renders; the rest (`FAVICON`,\n * `APPLE_TOUCH_ICON`, `MASKABLE_ICON`, `OG_IMAGE`, `EMAIL`) are\n * size/format-constrained targets. Everything except `MASTER` is derived.\n *\n * Provenance is first-class so a regeneration is idempotent and auditable:\n * - **`ref`** — stable kebab-case identity (the `_core` \"ref is identity\"\n * convention), unique within `resolvedAssets`. `derivedFrom` addresses it.\n * - **`storageRef`** — the `APPLICATION`-scoped storage locator the file\n * lives at (a stored-file reference, NOT a loose CDN URL). Consumers\n * resolve a servable URL from this ref through the file store.\n * - **`derivedFrom`** — the `ref` of the asset this one was deterministically\n * derived from (Layer-4 pipeline). `undefined` marks a **generated\n * primary** — an asset the image model produced directly, which in a\n * fully-derived brand is the `MASTER`. Every derived asset must trace,\n * through a `derivedFrom` chain, back to a generated primary (the snapshot\n * validator enforces reachability + no cycles). Note this is a PROVENANCE\n * fact and `purpose` is a CONSUMPTION fact: they coincide for `MASTER` in\n * the normal pipeline, but a brand whose derivation degraded ships its\n * generated primary AT `PRIMARY`, so the two must not be conflated.\n * - **`generatedAt`** / **`promptDigest`** — when it was produced and a\n * stable digest of the generation inputs, so the companion can skip\n * regeneration when nothing upstream changed, and the validator can flag\n * assets older than a re-authored direction (freshness-lock parity with\n * the i18n-labelling step).\n */\nexport enum BrandAssetComposition {\n /** The symbol/icon alone — square-ish; favicons, app icons, sidebar rail. */\n SYMBOL = 'SYMBOL',\n /** The styled name alone (text-only) — a brand with no separable symbol. */\n WORDMARK = 'WORDMARK',\n /** Symbol + wordmark locked together (horizontal) — headers, OG, PDF. */\n LOCKUP = 'LOCKUP',\n}\n\nexport enum BrandAssetTheme {\n /** The default full-color mark on its intended background. */\n DEFAULT = 'DEFAULT',\n /** Variant tuned for dark backgrounds. */\n DARK = 'DARK',\n /** Variant tuned for light backgrounds. */\n LIGHT = 'LIGHT',\n /** Single-color knockout for monochrome contexts. */\n MONOCHROME = 'MONOCHROME',\n}\n\nexport enum BrandAssetPurpose {\n /**\n * The full-resolution generated source for a (composition, theme) — what the\n * image model produced, before any size constraint. Its consumers are print,\n * high-DPI/retina export, and re-derivation; a UI surface must NOT render it.\n *\n * SEPARATE FROM `PRIMARY` DELIBERATELY. The two were one slot until 2026-08-19,\n * and the merge was expensive rather than merely untidy: `resolveBrandAsset`'s\n * fallback ladder ends at `(DEFAULT, PRIMARY)` for ANY composition, so PRIMARY\n * is the universal last-resort every unresolved query in the system degrades\n * to. With the master sitting there, the cheapest-to-reach slot held the most\n * expensive file — Wonder Todos' app-shell sidebar downloaded a 1,043,409-byte\n * master to draw a ~32px mark, while the DARK and MONOCHROME siblings of that\n * same PRIMARY slot were 512x512 derivations two orders of magnitude smaller.\n * `MASTER` is reachable ONLY by an exact query, so full resolution is something\n * a consumer asks for rather than something it is handed by a fallback.\n */\n MASTER = 'MASTER',\n /**\n * The base DISPLAY form of a (composition, theme) — the mark a UI surface\n * renders when it wants \"the logo\" and has no size-constrained slot in mind\n * (app-shell header, sidebar rail, docs navbar). Derived from `MASTER` at a\n * display-sensible size; not pixel-pinned by a platform contract the way the\n * icon purposes below are, but never the unbounded source either.\n *\n * This is also the fallback target of every rung of `resolveBrandAsset` that is\n * not an exact match, so a brand that ships anything at all should ship this.\n */\n PRIMARY = 'PRIMARY',\n /** Browser-chrome favicon (square; ICO/PNG/SVG). */\n FAVICON = 'FAVICON',\n /** iOS home-screen icon (square PNG, 180×180). */\n APPLE_TOUCH_ICON = 'APPLE_TOUCH_ICON',\n /** Android/PWA maskable icon (square PNG, safe-zone padded). */\n MASKABLE_ICON = 'MASKABLE_ICON',\n /** Open-Graph / social share image (1200×630). */\n OG_IMAGE = 'OG_IMAGE',\n /** Email-safe raster (flattened, fixed background for dark clients). */\n EMAIL = 'EMAIL',\n}\n\nexport enum BrandAssetFormat {\n PNG = 'PNG',\n SVG = 'SVG',\n ICO = 'ICO',\n WEBP = 'WEBP',\n}\n\nexport const BrandAssetConfigSchema = z.object({\n /** Stable kebab-case identity, unique within `resolvedAssets`. `derivedFrom` addresses it. */\n ref: NonEmptyStringSchema,\n /** The FORM axis — symbol, wordmark, or locked-up. */\n composition: z.enum(BrandAssetComposition),\n /** The color-context axis. Defaults to the intended full-color mark. */\n theme: z.enum(BrandAssetTheme).default(BrandAssetTheme.DEFAULT),\n /** The technical consumption axis. Defaults to the base DISPLAY form, never the `MASTER` source. */\n purpose: z.enum(BrandAssetPurpose).default(BrandAssetPurpose.PRIMARY),\n /** `APPLICATION`-scoped stored-file reference (never a loose CDN URL). */\n storageRef: NonEmptyStringSchema,\n /** Concrete file format. */\n format: z.enum(BrandAssetFormat),\n /** Pixel width (undefined for scalable SVG). */\n width: z.number().int().positive().optional(),\n /** Pixel height (undefined for scalable SVG). */\n height: z.number().int().positive().optional(),\n /**\n * The `ref` of the asset this one was derived from. `undefined` marks a\n * generated primary (image-model output). Every derived asset must trace\n * back to a generated primary — enforced by the snapshot validator.\n */\n derivedFrom: NonEmptyStringSchema.optional(),\n /** ISO-8601 timestamp the asset was produced. */\n generatedAt: z.iso.datetime(),\n /**\n * Stable digest of the generation inputs (brand direction + tone +\n * enrichment). Lets the companion skip regeneration when nothing\n * upstream changed, and lets the validator flag assets older than a\n * re-authored direction — freshness-lock parity with i18n-labelling.\n */\n promptDigest: NonEmptyStringSchema.optional(),\n});\nexport type BrandAssetConfig = z.infer<typeof BrandAssetConfigSchema>;\n/** @wildo_source:part:end brand.asset.config */\n"]}
|
|
1
|
+
{"version":3,"file":"brand-asset.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-asset.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,6EAA6E;IAC7E,0CAAiB,CAAA;IACjB,4EAA4E;IAC5E,8CAAqB,CAAA;IACrB,yEAAyE;IACzE,0CAAiB,CAAA;AACnB,CAAC,EAPW,qBAAqB,KAArB,qBAAqB,QAOhC;AAED,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,8DAA8D;IAC9D,sCAAmB,CAAA;IACnB,0CAA0C;IAC1C,gCAAa,CAAA;IACb,2CAA2C;IAC3C,kCAAe,CAAA;IACf,qDAAqD;IACrD,4CAAyB,CAAA;AAC3B,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B;AAED,MAAM,CAAN,IAAY,iBAuCX;AAvCD,WAAY,iBAAiB;IAC3B;;;;;;;;;;;;;;;OAeG;IACH,sCAAiB,CAAA;IACjB;;;;;;;;;OASG;IACH,wCAAmB,CAAA;IACnB,oDAAoD;IACpD,wCAAmB,CAAA;IACnB,kDAAkD;IAClD,0DAAqC,CAAA;IACrC,gEAAgE;IAChE,oDAA+B,CAAA;IAC/B,kDAAkD;IAClD,0CAAqB,CAAA;IACrB,wEAAwE;IACxE,oCAAe,CAAA;AACjB,CAAC,EAvCW,iBAAiB,KAAjB,iBAAiB,QAuC5B;AAED,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,iCAAa,CAAA;AACf,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,8FAA8F;IAC9F,GAAG,EAAE,oBAAoB;IACzB,sDAAsD;IACtD,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC;IAC1C,wEAAwE;IACxE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC;IAC/D,oGAAoG;IACpG,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC;IACrE,0EAA0E;IAC1E,UAAU,EAAE,oBAAoB;IAChC,4BAA4B;IAC5B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;IAChC,gDAAgD;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,iDAAiD;IACjD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC9C;;;;OAIG;IACH,WAAW,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC5C,iDAAiD;IACjD,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,gDAAgD","sourcesContent":["import { z } from 'zod';\n\nimport { NonEmptyStringSchema } from '../market/market-references.schemas';\n\n/**\n * @wildo_source:part:start brand.asset.config facet:layer:specification facet:family:brand\n *\n * A single **resolved brand asset** — one concrete image file, described\n * by THREE ORTHOGONAL AXES rather than a single flat role. The collection\n * of these on `BrandSnapshot.resolvedAssets` is THE single source of truth\n * for the application's visual identity: the historically-fragmented logo\n * strings (org branding, app config, email brand tokens, email context,\n * auth DTO, loose favicon files) all resolve to a `BrandAsset` by axis\n * instead of carrying their own free-form URL.\n *\n * **Why three axes, not one flat role** (framework mindset — preserve the\n * distinctions, do not fold them for a shorter enum): a logo varies\n * independently along composition, theme, and technical purpose. A single\n * flat enum would multiply combinatorially (SYMBOL_DARK_FAVICON, …) and\n * conflate three unrelated concerns. Consumers resolve by the axes they\n * care about — the collapsed sidebar rail asks for `(SYMBOL, DARK)`, the\n * app-shell header asks for `(LOCKUP, DEFAULT)` — and never touch a\n * favicon slot for an in-app UI mark.\n *\n * - **`composition`** — the FORM (`BrandAssetComposition`): the symbol\n * alone, the wordmark alone, or the two locked together. Distinct from\n * `logoDirection.markType` (the brand's chosen archetype, an INPUT to\n * generation) — a `COMBINATION_MARK` brand produces both a `LOCKUP` and\n * a `SYMBOL` asset; a `WORDMARK` brand produces only a `WORDMARK` asset.\n * - **`theme`** — the color context (`BrandAssetTheme`): the default mark,\n * or a variant tuned for dark/light backgrounds, or a single-color\n * knockout.\n * - **`purpose`** — the technical consumption slot (`BrandAssetPurpose`):\n * `MASTER` is the full-resolution source; `PRIMARY` is the base\n * DISPLAY form a UI surface renders; the rest (`FAVICON`,\n * `APPLE_TOUCH_ICON`, `MASKABLE_ICON`, `OG_IMAGE`, `EMAIL`) are\n * size/format-constrained targets. Everything except `MASTER` is derived.\n *\n * Provenance is first-class so a regeneration is idempotent and auditable:\n * - **`ref`** — stable kebab-case identity (the `_core` \"ref is identity\"\n * convention), unique within `resolvedAssets`. `derivedFrom` addresses it.\n * - **`storageRef`** — the `APPLICATION`-scoped storage locator the file\n * lives at (a stored-file reference, NOT a loose CDN URL). Consumers\n * resolve a servable URL from this ref through the file store.\n * - **`derivedFrom`** — the `ref` of the asset this one was deterministically\n * derived from (Layer-4 pipeline). `undefined` marks a **generated\n * primary** — an asset the image model produced directly, which in a\n * fully-derived brand is the `MASTER`. Every derived asset must trace,\n * through a `derivedFrom` chain, back to a generated primary (the snapshot\n * validator enforces reachability + no cycles). Note this is a PROVENANCE\n * fact and `purpose` is a CONSUMPTION fact: they coincide for `MASTER` in\n * the normal pipeline, but a brand whose derivation degraded ships its\n * generated primary AT `PRIMARY`, so the two must not be conflated.\n * - **`generatedAt`** — when it was produced. The validator flags assets\n * older than a re-authored direction from this timestamp (`STALE_ASSETS`).\n * Skipping regeneration is the companion's own throwaway-staging concern\n * and records nothing on the committed asset.\n */\nexport enum BrandAssetComposition {\n /** The symbol/icon alone — square-ish; favicons, app icons, sidebar rail. */\n SYMBOL = 'SYMBOL',\n /** The styled name alone (text-only) — a brand with no separable symbol. */\n WORDMARK = 'WORDMARK',\n /** Symbol + wordmark locked together (horizontal) — headers, OG, PDF. */\n LOCKUP = 'LOCKUP',\n}\n\nexport enum BrandAssetTheme {\n /** The default full-color mark on its intended background. */\n DEFAULT = 'DEFAULT',\n /** Variant tuned for dark backgrounds. */\n DARK = 'DARK',\n /** Variant tuned for light backgrounds. */\n LIGHT = 'LIGHT',\n /** Single-color knockout for monochrome contexts. */\n MONOCHROME = 'MONOCHROME',\n}\n\nexport enum BrandAssetPurpose {\n /**\n * The full-resolution generated source for a (composition, theme) — what the\n * image model produced, before any size constraint. Its consumers are print,\n * high-DPI/retina export, and re-derivation; a UI surface must NOT render it.\n *\n * SEPARATE FROM `PRIMARY` DELIBERATELY. The two were one slot until 2026-08-19,\n * and the merge was expensive rather than merely untidy: `resolveBrandAsset`'s\n * fallback ladder ends at `(DEFAULT, PRIMARY)` for ANY composition, so PRIMARY\n * is the universal last-resort every unresolved query in the system degrades\n * to. With the master sitting there, the cheapest-to-reach slot held the most\n * expensive file — Wonder Todos' app-shell sidebar downloaded a 1,043,409-byte\n * master to draw a ~32px mark, while the DARK and MONOCHROME siblings of that\n * same PRIMARY slot were 512x512 derivations two orders of magnitude smaller.\n * `MASTER` is reachable ONLY by an exact query, so full resolution is something\n * a consumer asks for rather than something it is handed by a fallback.\n */\n MASTER = 'MASTER',\n /**\n * The base DISPLAY form of a (composition, theme) — the mark a UI surface\n * renders when it wants \"the logo\" and has no size-constrained slot in mind\n * (app-shell header, sidebar rail, docs navbar). Derived from `MASTER` at a\n * display-sensible size; not pixel-pinned by a platform contract the way the\n * icon purposes below are, but never the unbounded source either.\n *\n * This is also the fallback target of every rung of `resolveBrandAsset` that is\n * not an exact match, so a brand that ships anything at all should ship this.\n */\n PRIMARY = 'PRIMARY',\n /** Browser-chrome favicon (square; ICO/PNG/SVG). */\n FAVICON = 'FAVICON',\n /** iOS home-screen icon (square PNG, 180×180). */\n APPLE_TOUCH_ICON = 'APPLE_TOUCH_ICON',\n /** Android/PWA maskable icon (square PNG, safe-zone padded). */\n MASKABLE_ICON = 'MASKABLE_ICON',\n /** Open-Graph / social share image (1200×630). */\n OG_IMAGE = 'OG_IMAGE',\n /** Email-safe raster (flattened, fixed background for dark clients). */\n EMAIL = 'EMAIL',\n}\n\nexport enum BrandAssetFormat {\n PNG = 'PNG',\n SVG = 'SVG',\n ICO = 'ICO',\n WEBP = 'WEBP',\n}\n\nexport const BrandAssetConfigSchema = z.object({\n /** Stable kebab-case identity, unique within `resolvedAssets`. `derivedFrom` addresses it. */\n ref: NonEmptyStringSchema,\n /** The FORM axis — symbol, wordmark, or locked-up. */\n composition: z.enum(BrandAssetComposition),\n /** The color-context axis. Defaults to the intended full-color mark. */\n theme: z.enum(BrandAssetTheme).default(BrandAssetTheme.DEFAULT),\n /** The technical consumption axis. Defaults to the base DISPLAY form, never the `MASTER` source. */\n purpose: z.enum(BrandAssetPurpose).default(BrandAssetPurpose.PRIMARY),\n /** `APPLICATION`-scoped stored-file reference (never a loose CDN URL). */\n storageRef: NonEmptyStringSchema,\n /** Concrete file format. */\n format: z.enum(BrandAssetFormat),\n /** Pixel width (undefined for scalable SVG). */\n width: z.number().int().positive().optional(),\n /** Pixel height (undefined for scalable SVG). */\n height: z.number().int().positive().optional(),\n /**\n * The `ref` of the asset this one was derived from. `undefined` marks a\n * generated primary (image-model output). Every derived asset must trace\n * back to a generated primary — enforced by the snapshot validator.\n */\n derivedFrom: NonEmptyStringSchema.optional(),\n /** ISO-8601 timestamp the asset was produced. */\n generatedAt: z.iso.datetime(),\n});\nexport type BrandAssetConfig = z.infer<typeof BrandAssetConfigSchema>;\n/** @wildo_source:part:end brand.asset.config */\n"]}
|
|
@@ -39,8 +39,11 @@ export declare const BrandRenderPromptResponseSchema: z.ZodObject<{
|
|
|
39
39
|
export type BrandRenderPromptResponse = z.infer<typeof BrandRenderPromptResponseSchema>;
|
|
40
40
|
/**
|
|
41
41
|
* Parent-process (`LogoGenerationCompanionService.generate`) response — the
|
|
42
|
-
* prompt, the agent used, and the generated + persisted assets
|
|
43
|
-
*
|
|
42
|
+
* prompt, the agent used, and the generated + persisted assets: the master plus
|
|
43
|
+
* the derived variant set (favicon / OG / mono / dark-light), which the staging
|
|
44
|
+
* helper derives from the cleaned master. A run whose derive step is unavailable
|
|
45
|
+
* degrades to master-only rather than failing, so a caller must not assume the
|
|
46
|
+
* derived variants are present.
|
|
44
47
|
* Each asset is a `BrandAssetConfig` with its `storageRef` pointing at the
|
|
45
48
|
* persisted file — the same shape `BrandSnapshot.resolvedAssets` carries.
|
|
46
49
|
*/
|
|
@@ -58,7 +61,6 @@ export declare const LogoGenerationResponseSchema: z.ZodObject<{
|
|
|
58
61
|
height: z.ZodOptional<z.ZodNumber>;
|
|
59
62
|
derivedFrom: z.ZodOptional<z.ZodString>;
|
|
60
63
|
generatedAt: z.ZodISODateTime;
|
|
61
|
-
promptDigest: z.ZodOptional<z.ZodString>;
|
|
62
64
|
}, z.core.$strip>>;
|
|
63
65
|
trace: z.ZodObject<{
|
|
64
66
|
brandName: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;GAaG;AAEH,oFAAoF;AACpF,eAAO,MAAM,0BAA0B;;;;;;iBAUrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;iBAG1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF
|
|
1
|
+
{"version":3,"file":"brand-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;GAaG;AAEH,oFAAoF;AACpF,eAAO,MAAM,0BAA0B;;;;;;iBAUrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;iBAG1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;iBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -36,8 +36,11 @@ export const BrandRenderPromptResponseSchema = z.object({
|
|
|
36
36
|
});
|
|
37
37
|
/**
|
|
38
38
|
* Parent-process (`LogoGenerationCompanionService.generate`) response — the
|
|
39
|
-
* prompt, the agent used, and the generated + persisted assets
|
|
40
|
-
*
|
|
39
|
+
* prompt, the agent used, and the generated + persisted assets: the master plus
|
|
40
|
+
* the derived variant set (favicon / OG / mono / dark-light), which the staging
|
|
41
|
+
* helper derives from the cleaned master. A run whose derive step is unavailable
|
|
42
|
+
* degrades to master-only rather than failing, so a caller must not assume the
|
|
43
|
+
* derived variants are present.
|
|
41
44
|
* Each asset is a `BrandAssetConfig` with its `storageRef` pointing at the
|
|
42
45
|
* persisted file — the same shape `BrandSnapshot.resolvedAssets` carries.
|
|
43
46
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-generation.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtC,8DAA8D;IAC9D,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;IAC1B,6EAA6E;IAC7E,uBAAuB,EAAE,CAAC,CAAC,OAAO,EAAE;IACpC,mFAAmF;IACnF,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,KAAK,EAAE,0BAA0B;C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0BAA0B;CAClC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { BrandAssetConfigSchema } from './brand-asset.schemas';\n\n/**\n * Contract surface for the result returned by the logo generation pipeline.\n * Anything that crosses a process boundary MUST be Zod-policed on at least one\n * side (same posture as `market-generation.schemas.ts`); the single source of\n * truth lives here so the introspection-subprocess boundary and the parent\n * companion service `parse()` against one schema and cannot drift.\n *\n * - **Subprocess** (`brand-render-prompt` introspection behavior) produces\n * `BrandRenderPromptResponse` — pure image-prompt assembly from the authored\n * `BrandSnapshot` (+ optional market-voice enrichment), NO image call.\n * - **Parent process** (`LogoGenerationCompanionService`) consumes the\n * subprocess response, invokes the image agent, persists the generated\n * asset(s), and produces `LogoGenerationResponse`.\n */\n\n/** Trace shared by both response shapes (the parent passes it through verbatim). */\nexport const BrandGenerationTraceSchema = z.object({\n brandName: z.string().min(1),\n /** The chosen `markType`, or null when no logo direction was authored. */\n markType: z.string().min(1).nullable(),\n /** Whether a `visualTone` was present to shape the prompt. */\n hasVisualTone: z.boolean(),\n /** Whether the market `tonesOfVoice` was folded into the visual register. */\n enrichedFromMarketVoice: z.boolean(),\n /** Non-fatal authoring signals surfaced to the caller (e.g. missing direction). */\n warnings: z.array(z.string()),\n});\nexport type BrandGenerationTrace = z.infer<typeof BrandGenerationTraceSchema>;\n\n/**\n * Subprocess (`brand-render-prompt`) response — the assembled text-to-image\n * prompt plus the trace. No image is generated at this boundary.\n */\nexport const BrandRenderPromptResponseSchema = z.object({\n prompt: z.string().min(1),\n trace: BrandGenerationTraceSchema,\n});\nexport type BrandRenderPromptResponse = z.infer<typeof BrandRenderPromptResponseSchema>;\n\n/**\n * Parent-process (`LogoGenerationCompanionService.generate`) response — the\n * prompt, the agent used, and the generated + persisted assets: the master plus\n * the derived variant set (favicon / OG / mono / dark-light), which the staging\n * helper derives from the cleaned master. A run whose derive step is unavailable\n * degrades to master-only rather than failing, so a caller must not assume the\n * derived variants are present.\n * Each asset is a `BrandAssetConfig` with its `storageRef` pointing at the\n * persisted file — the same shape `BrandSnapshot.resolvedAssets` carries.\n */\nexport const LogoGenerationResponseSchema = z.object({\n prompt: z.string().min(1),\n agentRef: z.string().min(1),\n generatedAssets: z.array(BrandAssetConfigSchema),\n trace: BrandGenerationTraceSchema,\n});\nexport type LogoGenerationResponse = z.infer<typeof LogoGenerationResponseSchema>;\n"]}
|
|
@@ -16,8 +16,16 @@ export declare enum BrandSnapshotVersion {
|
|
|
16
16
|
* exactly one brand identity per application. It is the visual-identity
|
|
17
17
|
* definition artifact the app-creation top-down catalog reads/writes,
|
|
18
18
|
* and — via `resolvedAssets` — the **single source of truth for every
|
|
19
|
-
* logo/favicon/brand-image consumer in the app**
|
|
20
|
-
*
|
|
19
|
+
* logo/favicon/brand-image consumer in the app** that is actually wired:
|
|
20
|
+
* the app shell, the website, the docs site, the website OG image, and the
|
|
21
|
+
* backend runtime configuration that transactional email resolves its logo
|
|
22
|
+
* from.
|
|
23
|
+
*
|
|
24
|
+
* PDF templates and schema.org are NOT among them. The pdf-templates tree
|
|
25
|
+
* contains no brand or logo reference at all, and the website's structured-data
|
|
26
|
+
* payloads are authored by each section's `getStructuredData()` hook rather than
|
|
27
|
+
* resolved from here. Both would arrive as new propagation destinations; until
|
|
28
|
+
* they do, a PDF or a JSON-LD payload that needs the mark carries it by hand.
|
|
21
29
|
*
|
|
22
30
|
* **Artifact-family id: `brand-brief`.** This schema is the shape of the
|
|
23
31
|
* journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===
|
|
@@ -99,7 +107,6 @@ export declare const BrandSnapshotSchema: z.ZodObject<{
|
|
|
99
107
|
height: z.ZodOptional<z.ZodNumber>;
|
|
100
108
|
derivedFrom: z.ZodOptional<z.ZodString>;
|
|
101
109
|
generatedAt: z.ZodISODateTime;
|
|
102
|
-
promptDigest: z.ZodOptional<z.ZodString>;
|
|
103
110
|
}, z.core.$strip>>>;
|
|
104
111
|
}, z.core.$strip>;
|
|
105
112
|
export type BrandSnapshot = z.infer<typeof BrandSnapshotSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-snapshot.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-snapshot.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;GAOG;AACH,oBAAY,oBAAoB;IAC9B,EAAE,OAAO;CACV;AAED
|
|
1
|
+
{"version":3,"file":"brand-snapshot.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-snapshot.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;GAOG;AACH,oBAAY,oBAAoB;IAC9B,EAAE,OAAO;CACV;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,mDAAmD"}
|
|
@@ -21,8 +21,16 @@ export var BrandSnapshotVersion;
|
|
|
21
21
|
* exactly one brand identity per application. It is the visual-identity
|
|
22
22
|
* definition artifact the app-creation top-down catalog reads/writes,
|
|
23
23
|
* and — via `resolvedAssets` — the **single source of truth for every
|
|
24
|
-
* logo/favicon/brand-image consumer in the app**
|
|
25
|
-
*
|
|
24
|
+
* logo/favicon/brand-image consumer in the app** that is actually wired:
|
|
25
|
+
* the app shell, the website, the docs site, the website OG image, and the
|
|
26
|
+
* backend runtime configuration that transactional email resolves its logo
|
|
27
|
+
* from.
|
|
28
|
+
*
|
|
29
|
+
* PDF templates and schema.org are NOT among them. The pdf-templates tree
|
|
30
|
+
* contains no brand or logo reference at all, and the website's structured-data
|
|
31
|
+
* payloads are authored by each section's `getStructuredData()` hook rather than
|
|
32
|
+
* resolved from here. Both would arrive as new propagation destinations; until
|
|
33
|
+
* they do, a PDF or a JSON-LD payload that needs the mark carries it by hand.
|
|
26
34
|
*
|
|
27
35
|
* **Artifact-family id: `brand-brief`.** This schema is the shape of the
|
|
28
36
|
* journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-snapshot.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-snapshot.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;AACX,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAED
|
|
1
|
+
{"version":3,"file":"brand-snapshot.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-snapshot.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;AACX,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;IACtE,oEAAoE;IACpE,IAAI,EAAE,qBAAqB;IAC3B,4EAA4E;IAC5E,aAAa,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IACxD,kFAAkF;IAClF,UAAU,EAAE,2BAA2B,CAAC,QAAQ,EAAE;IAClD;;;;;OAKG;IACH,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,mDAAmD","sourcesContent":["import { z } from 'zod';\n\nimport { BrandAssetConfigSchema } from './brand-asset.schemas';\nimport { BrandLogoDirectionConfigSchema } from './brand-logo-direction.schemas';\nimport { BrandNameConfigSchema } from './brand-name.schemas';\nimport { BrandVisualToneConfigSchema } from './brand-visual-tone.schemas';\n\n/**\n * @wildo_source:part:start brand.snapshot.config facet:layer:specification facet:family:brand\n *\n * Versioning for the brand-snapshot payload format itself. `V1` — initial\n * shape (name + logo direction + visual tone + resolved assets). The\n * shape grows additively across versions; the `version` field is the\n * explicit marker for consumers that need to branch on era.\n */\nexport enum BrandSnapshotVersion {\n V1 = 'v1',\n}\n\n/**\n * THE brand-snapshot payload — a **single aggregate per product**\n * (vision/market-snapshot style, NOT a keyed entries map): there is\n * exactly one brand identity per application. It is the visual-identity\n * definition artifact the app-creation top-down catalog reads/writes,\n * and — via `resolvedAssets` — the **single source of truth for every\n * logo/favicon/brand-image consumer in the app** that is actually wired:\n * the app shell, the website, the docs site, the website OG image, and the\n * backend runtime configuration that transactional email resolves its logo\n * from.\n *\n * PDF templates and schema.org are NOT among them. The pdf-templates tree\n * contains no brand or logo reference at all, and the website's structured-data\n * payloads are authored by each section's `getStructuredData()` hook rather than\n * resolved from here. Both would arrive as new propagation destinations; until\n * they do, a PDF or a JSON-LD payload that needs the mark carries it by hand.\n *\n * **Artifact-family id: `brand-brief`.** This schema is the shape of the\n * journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===\n * 'brand-brief'`. As with `vision-brief`, the `family` vocabulary is an\n * OPEN string (owned by the assertion surface, not a frozen enum), so it\n * is intentionally NOT re-declared as a constant here; this note is the\n * single place that ties the `BrandSnapshot` SHAPE to the `brand-brief`\n * family NAME so the brand-identity playbook and the companion logo step\n * select it consistently.\n *\n * Shape decision (framework mindset — each member carries its own\n * semantic weight):\n * - **`name`** — REQUIRED. A brand without a name has nothing for a mark\n * to render.\n * - **`logoDirection`** / **`visualTone`** — OPTIONAL singletons, elicited\n * progressively (the brand-identity playbook fills them after the name).\n * Absence is a first-class \"not yet directed\" state surfaced as a WARN\n * by `validateBrandSnapshot`, never a parse failure.\n * - **`resolvedAssets`** — the collection the COMPANION logo step\n * populates (empty until generation runs), each entry described by the\n * three orthogonal axes (composition × theme × purpose) rather than a\n * flat role. This is the SSOT half: authored direction in the\n * singletons, produced assets here.\n *\n * The direction singletons are the INPUT to logo generation (enriched by\n * vision idea/mission + market `tonesOfVoice` in the companion\n * introspection subprocess); `resolvedAssets` is its OUTPUT. Authored in\n * English (like the vision + market families).\n */\nexport const BrandSnapshotSchema = z.object({\n version: z.enum(BrandSnapshotVersion).default(BrandSnapshotVersion.V1),\n /** The brand name — the anchor lexical identity. Always present. */\n name: BrandNameConfigSchema,\n /** The logo creative brief — elicited progressively; WARNed when absent. */\n logoDirection: BrandLogoDirectionConfigSchema.optional(),\n /** The visual aesthetic register — elicited progressively; WARNed when absent. */\n visualTone: BrandVisualToneConfigSchema.optional(),\n /**\n * The generated + derived assets, each described by the three\n * orthogonal axes (composition × theme × purpose). Populated by the\n * companion logo-generation step; empty until it runs. THE source of\n * truth every brand-image consumer resolves against.\n */\n resolvedAssets: z.array(BrandAssetConfigSchema).default([]),\n});\nexport type BrandSnapshot = z.infer<typeof BrandSnapshotSchema>;\n/** @wildo_source:part:end brand.snapshot.config */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-plan-task-graph-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;
|
|
1
|
+
{"version":3,"file":"build-plan-task-graph-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AAEjH,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAYzC;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;IAMxC,qEAAqE;;;kBAGrE,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,+FAA+F;AAC/F,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;QAP7C,qEAAqE;;;;kBAqBrE,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,8FAA8F;AAC9F,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAiBpF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MetaWorkflow_FunctionalTopic } from '../../application-creation/playbooks.application-creation.schemas.js';
|
|
3
|
+
import { applyFamilyRefPrefix } from '../utils/family-ref-stamping.js';
|
|
3
4
|
import { BUILD_PLAN_TASK_REF_PREFIX, BuildPlanTaskGraphSchema, BuildPlanTaskGraphVersion, BuildPlanTaskTargetSchema, } from './build-plan-task-graph.schemas.js';
|
|
4
5
|
const SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
5
6
|
/**
|
|
@@ -30,11 +31,17 @@ export const BuildPlanTaskGenerationSchema = z.strictObject({
|
|
|
30
31
|
export const BuildPlanTaskGraphGenerationSchema = z.strictObject({
|
|
31
32
|
tasks: z.array(BuildPlanTaskGenerationSchema).min(1),
|
|
32
33
|
}).superRefine((generated, context) => {
|
|
34
|
+
// Keyed on the STAMPED form, not on the authored slug, because `applyFamilyRefPrefix` is deliberately
|
|
35
|
+
// not injective: `todo-schema` and `build-task-todo-schema` are two distinct slugs that both become
|
|
36
|
+
// `build-task-todo-schema`. Checking the slug would let that pair through and produce two tasks sharing
|
|
37
|
+
// one ref, which makes every `prerequisiteTaskRefs` edge naming it ambiguous -- and the prerequisite
|
|
38
|
+
// graph is what decides execution order, so an ambiguous node is not a cosmetic problem.
|
|
33
39
|
const seen = new Set();
|
|
34
40
|
generated.tasks.forEach((task, index) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
const taskRef = applyFamilyRefPrefix(task.slug, BUILD_PLAN_TASK_REF_PREFIX);
|
|
42
|
+
if (seen.has(taskRef))
|
|
43
|
+
context.addIssue({ code: 'custom', message: `duplicate build task slug "${task.slug}" (normalizes to "${taskRef}")`, path: ['tasks', index, 'slug'] });
|
|
44
|
+
seen.add(taskRef);
|
|
38
45
|
});
|
|
39
46
|
});
|
|
40
47
|
/** Normalize strict provider output into the persisted family (stamping refs and version). */
|
|
@@ -43,12 +50,15 @@ export function parseBuildPlanTaskGraphGeneration(input) {
|
|
|
43
50
|
return BuildPlanTaskGraphSchema.parse({
|
|
44
51
|
version: BuildPlanTaskGraphVersion.V1,
|
|
45
52
|
tasks: generated.tasks.map((task) => ({
|
|
46
|
-
taskRef:
|
|
53
|
+
taskRef: applyFamilyRefPrefix(task.slug, BUILD_PLAN_TASK_REF_PREFIX),
|
|
47
54
|
objective: task.objective,
|
|
48
55
|
target: task.target,
|
|
49
56
|
functionalTopic: task.functionalTopic,
|
|
50
57
|
skillRefs: task.skillRefs,
|
|
51
|
-
|
|
58
|
+
// Stamped through the SAME normalizer as `taskRef` above, and that is the point rather than a
|
|
59
|
+
// tidiness: a node and the edges naming it are stamped by two separate expressions, so a model that
|
|
60
|
+
// prefixes one and not the other produces two different strings for one task and orphans the edge.
|
|
61
|
+
prerequisiteTaskRefs: task.prerequisiteSlugs.map((slug) => applyFamilyRefPrefix(slug, BUILD_PLAN_TASK_REF_PREFIX)),
|
|
52
62
|
servesRefs: task.servesRefs,
|
|
53
63
|
})),
|
|
54
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-plan-task-graph-generation.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AACjH,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,GAE1B,MAAM,iCAAiC,CAAC;AAEzC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAClE;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AACtE,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC1D,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,oBAAoB;IAC/B,MAAM,EAAE,yBAAyB;IACjC,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC;IACrD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,qEAAqE;IACrE,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IACtC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;CAC1C,CAAC,CAAC;AAGH,+FAA+F;AAC/F,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC/D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACrD,CAAC,CAAC,WAAW,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE;IACpC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACtC,
|
|
1
|
+
{"version":3,"file":"build-plan-task-graph-generation.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AACjH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,GAE1B,MAAM,iCAAiC,CAAC;AAEzC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAA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OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,8BAA8B,IAAI,CAAC,IAAI,qBAAqB,OAAO,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QAC9K,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAGH,8FAA8F;AAC9F,MAAM,UAAU,iCAAiC,CAAC,KAAc;IAC9D,MAAM,SAAS,GAAG,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAClE,OAAO,wBAAwB,CAAC,KAAK,CAAC;QACpC,OAAO,EAAE,yBAAyB,CAAC,EAAE;QACrC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACpC,OAAO,EAAE,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,0BAA0B,CAAC;YACpE,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,8FAA8F;YAC9F,oGAAoG;YACpG,mGAAmG;YACnG,oBAAoB,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC;YAClH,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;KACJ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { MetaWorkflow_FunctionalTopic } from '../../application-creation/playbooks.application-creation.schemas';\nimport { applyFamilyRefPrefix } from '../utils/family-ref-stamping';\nimport {\n BUILD_PLAN_TASK_REF_PREFIX,\n BuildPlanTaskGraphSchema,\n BuildPlanTaskGraphVersion,\n BuildPlanTaskTargetSchema,\n type BuildPlanTaskGraph,\n} from './build-plan-task-graph.schemas';\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\n/**\n * A skill ref is the skill's FOLDER id in the app-knowledge catalog, which is\n * also its `SKILL.md` frontmatter `name` — one id, kebab-case. The host refuses\n * any skill name outside `[a-z0-9-]+`, so a ref that does not match this shape\n * can never resolve to an installed skill.\n */\nconst SkillRefSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/**\n * Strict provider-facing build task. The provider supplies stable semantic\n * slugs; the trusted runtime stamps the canonical task-ref prefix and the\n * payload version. No path, command, prompt or runtime control is\n * representable here — by construction, not by instruction.\n */\nexport const BuildPlanTaskGenerationSchema = z.strictObject({\n slug: SlugSchema,\n objective: NonEmptyStringSchema,\n target: BuildPlanTaskTargetSchema,\n functionalTopic: z.enum(MetaWorkflow_FunctionalTopic),\n skillRefs: z.array(SkillRefSchema).min(1),\n /** Slugs (not refs) of prerequisite tasks in the same generation. */\n prerequisiteSlugs: z.array(SlugSchema),\n servesRefs: z.array(NonEmptyStringSchema),\n});\nexport type BuildPlanTaskGeneration = z.infer<typeof BuildPlanTaskGenerationSchema>;\n\n/** One complete provider response for the build-plan family: a non-empty ordered task list. */\nexport const BuildPlanTaskGraphGenerationSchema = z.strictObject({\n tasks: z.array(BuildPlanTaskGenerationSchema).min(1),\n}).superRefine((generated, context) => {\n // Keyed on the STAMPED form, not on the authored slug, because `applyFamilyRefPrefix` is deliberately\n // not injective: `todo-schema` and `build-task-todo-schema` are two distinct slugs that both become\n // `build-task-todo-schema`. Checking the slug would let that pair through and produce two tasks sharing\n // one ref, which makes every `prerequisiteTaskRefs` edge naming it ambiguous -- and the prerequisite\n // graph is what decides execution order, so an ambiguous node is not a cosmetic problem.\n const seen = new Set<string>();\n generated.tasks.forEach((task, index) => {\n const taskRef = applyFamilyRefPrefix(task.slug, BUILD_PLAN_TASK_REF_PREFIX);\n if (seen.has(taskRef)) context.addIssue({ code: 'custom', message: `duplicate build task slug \"${task.slug}\" (normalizes to \"${taskRef}\")`, path: ['tasks', index, 'slug'] });\n seen.add(taskRef);\n });\n});\nexport type BuildPlanTaskGraphGeneration = z.infer<typeof BuildPlanTaskGraphGenerationSchema>;\n\n/** Normalize strict provider output into the persisted family (stamping refs and version). */\nexport function parseBuildPlanTaskGraphGeneration(input: unknown): BuildPlanTaskGraph {\n const generated = BuildPlanTaskGraphGenerationSchema.parse(input);\n return BuildPlanTaskGraphSchema.parse({\n version: BuildPlanTaskGraphVersion.V1,\n tasks: generated.tasks.map((task) => ({\n taskRef: applyFamilyRefPrefix(task.slug, BUILD_PLAN_TASK_REF_PREFIX),\n objective: task.objective,\n target: task.target,\n functionalTopic: task.functionalTopic,\n skillRefs: task.skillRefs,\n // Stamped through the SAME normalizer as `taskRef` above, and that is the point rather than a\n // tidiness: a node and the edges naming it are stamped by two separate expressions, so a model that\n // prefixes one and not the other produces two different strings for one task and orphans the edge.\n prerequisiteTaskRefs: task.prerequisiteSlugs.map((slug) => applyFamilyRefPrefix(slug, BUILD_PLAN_TASK_REF_PREFIX)),\n servesRefs: task.servesRefs,\n })),\n });\n}\n"]}
|
|
@@ -3,18 +3,55 @@ import { type BuildPlanTaskGraph } from './build-plan-task-graph.schemas';
|
|
|
3
3
|
export declare enum BuildPlanTaskGraphFindingCode {
|
|
4
4
|
/** A prerequisite chain returns to its own task: no valid dispatch order exists. */
|
|
5
5
|
PREREQUISITE_CYCLE = "PREREQUISITE_CYCLE",
|
|
6
|
-
/** A resource stage is declared without the stage that must precede it (schema → config → ui-behavior → spec)
|
|
7
|
-
RESOURCE_STAGE_WITHOUT_PREDECESSOR = "RESOURCE_STAGE_WITHOUT_PREDECESSOR"
|
|
6
|
+
/** A resource stage is declared without the stage that must precede it (schema → config → ui-behavior → spec) anywhere in the graph. */
|
|
7
|
+
RESOURCE_STAGE_WITHOUT_PREDECESSOR = "RESOURCE_STAGE_WITHOUT_PREDECESSOR",
|
|
8
|
+
/**
|
|
9
|
+
* The predecessor stage IS in the graph, and this task does not depend on it —
|
|
10
|
+
* so a dispatch order exists that runs this stage FIRST.
|
|
11
|
+
*
|
|
12
|
+
* Distinct from {@link RESOURCE_STAGE_WITHOUT_PREDECESSOR}, and the distinction decides the
|
|
13
|
+
* severity. A missing predecessor can be legitimate: a plan may author only the CONFIG stage of a
|
|
14
|
+
* resource whose schema already stands in the tree and needs no task, which is why that finding is
|
|
15
|
+
* an authoring warning. This one cannot be legitimate — the plan ITSELF says the schema is being
|
|
16
|
+
* (re)authored by a task in this same graph, and then permits the config to be written first.
|
|
17
|
+
*
|
|
18
|
+
* It is invisible without this check because the two mechanisms that decide ordering and the one
|
|
19
|
+
* that reports on it were reading different things: dispatch order comes SOLELY from
|
|
20
|
+
* `prerequisiteTaskRefs` (`selectReadyBuildPlanTasks`), while the stage-sequence check asked only
|
|
21
|
+
* that a predecessor task EXIST somewhere in the graph. A CONFIG task with no prerequisites was
|
|
22
|
+
* therefore simultaneously finding-free and immediately ready, and a coding agent could be
|
|
23
|
+
* dispatched to author `*.resources-config.ts` for a schema that does not exist yet.
|
|
24
|
+
*/
|
|
25
|
+
RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR = "RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR"
|
|
8
26
|
}
|
|
9
27
|
export interface BuildPlanTaskGraphFinding {
|
|
10
28
|
readonly code: BuildPlanTaskGraphFindingCode;
|
|
11
29
|
readonly taskRef: string | null;
|
|
12
30
|
readonly message: string;
|
|
13
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The finding codes that must block a landing; everything else is an authoring warning.
|
|
34
|
+
*
|
|
35
|
+
* Mirrors `PLACEMENT_PLAN_HARD_FLOOR_CODES` on the sibling family, deliberately: the severity
|
|
36
|
+
* decision belongs beside the codes it classifies, not re-derived at each caller. It used to be
|
|
37
|
+
* re-derived — the semantic authority hard-coded `=== PREREQUISITE_CYCLE` in two expressions — which
|
|
38
|
+
* is how a new floor code would have landed as a warning at one gate while the dispatch gate refused
|
|
39
|
+
* it, with nothing naming the disagreement.
|
|
40
|
+
*
|
|
41
|
+
* Both members share one property: the graph admits a dispatch order that is WRONG (a cycle admits
|
|
42
|
+
* none at all; an undeclared stage edge admits one that builds config before schema). Everything
|
|
43
|
+
* else here is a judgement about authoring taste, which the creator's review owns.
|
|
44
|
+
*/
|
|
45
|
+
export declare const BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES: readonly BuildPlanTaskGraphFindingCode[];
|
|
14
46
|
/**
|
|
15
47
|
* Validate what Zod cannot: prerequisite cycles and the per-resource stage
|
|
16
48
|
* sequence. Returns findings rather than throwing so a caller can treat a
|
|
17
|
-
* cycle as a hard floor and a missing predecessor as an authoring warning
|
|
49
|
+
* cycle as a hard floor and a missing predecessor as an authoring warning;
|
|
50
|
+
* `BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES` is the classification.
|
|
51
|
+
*
|
|
52
|
+
* The stage-sequence check asks TWO questions, because "the predecessor exists"
|
|
53
|
+
* and "this task waits for it" are different claims and only the second one
|
|
54
|
+
* constrains what the host may dispatch.
|
|
18
55
|
*/
|
|
19
56
|
export declare function validateBuildPlanTaskGraph(graph: BuildPlanTaskGraph): readonly BuildPlanTaskGraphFinding[];
|
|
20
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-plan-task-graph-validation.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE3H,4GAA4G;AAC5G,oBAAY,6BAA6B;IACvC,oFAAoF;IACpF,kBAAkB,uBAAuB;IACzC,
|
|
1
|
+
{"version":3,"file":"build-plan-task-graph-validation.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE3H,4GAA4G;AAC5G,oBAAY,6BAA6B;IACvC,oFAAoF;IACpF,kBAAkB,uBAAuB;IACzC,wIAAwI;IACxI,kCAAkC,uCAAuC;IACzE;;;;;;;;;;;;;;;;OAgBG;IACH,uCAAuC,4CAA4C;CACpF;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sCAAsC,EAAE,SAAS,6BAA6B,EAG1F,CAAC;AASF;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,yBAAyB,EAAE,CAgF1G;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,CAExJ"}
|
|
@@ -4,9 +4,44 @@ export var BuildPlanTaskGraphFindingCode;
|
|
|
4
4
|
(function (BuildPlanTaskGraphFindingCode) {
|
|
5
5
|
/** A prerequisite chain returns to its own task: no valid dispatch order exists. */
|
|
6
6
|
BuildPlanTaskGraphFindingCode["PREREQUISITE_CYCLE"] = "PREREQUISITE_CYCLE";
|
|
7
|
-
/** A resource stage is declared without the stage that must precede it (schema → config → ui-behavior → spec)
|
|
7
|
+
/** A resource stage is declared without the stage that must precede it (schema → config → ui-behavior → spec) anywhere in the graph. */
|
|
8
8
|
BuildPlanTaskGraphFindingCode["RESOURCE_STAGE_WITHOUT_PREDECESSOR"] = "RESOURCE_STAGE_WITHOUT_PREDECESSOR";
|
|
9
|
+
/**
|
|
10
|
+
* The predecessor stage IS in the graph, and this task does not depend on it —
|
|
11
|
+
* so a dispatch order exists that runs this stage FIRST.
|
|
12
|
+
*
|
|
13
|
+
* Distinct from {@link RESOURCE_STAGE_WITHOUT_PREDECESSOR}, and the distinction decides the
|
|
14
|
+
* severity. A missing predecessor can be legitimate: a plan may author only the CONFIG stage of a
|
|
15
|
+
* resource whose schema already stands in the tree and needs no task, which is why that finding is
|
|
16
|
+
* an authoring warning. This one cannot be legitimate — the plan ITSELF says the schema is being
|
|
17
|
+
* (re)authored by a task in this same graph, and then permits the config to be written first.
|
|
18
|
+
*
|
|
19
|
+
* It is invisible without this check because the two mechanisms that decide ordering and the one
|
|
20
|
+
* that reports on it were reading different things: dispatch order comes SOLELY from
|
|
21
|
+
* `prerequisiteTaskRefs` (`selectReadyBuildPlanTasks`), while the stage-sequence check asked only
|
|
22
|
+
* that a predecessor task EXIST somewhere in the graph. A CONFIG task with no prerequisites was
|
|
23
|
+
* therefore simultaneously finding-free and immediately ready, and a coding agent could be
|
|
24
|
+
* dispatched to author `*.resources-config.ts` for a schema that does not exist yet.
|
|
25
|
+
*/
|
|
26
|
+
BuildPlanTaskGraphFindingCode["RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR"] = "RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR";
|
|
9
27
|
})(BuildPlanTaskGraphFindingCode || (BuildPlanTaskGraphFindingCode = {}));
|
|
28
|
+
/**
|
|
29
|
+
* The finding codes that must block a landing; everything else is an authoring warning.
|
|
30
|
+
*
|
|
31
|
+
* Mirrors `PLACEMENT_PLAN_HARD_FLOOR_CODES` on the sibling family, deliberately: the severity
|
|
32
|
+
* decision belongs beside the codes it classifies, not re-derived at each caller. It used to be
|
|
33
|
+
* re-derived — the semantic authority hard-coded `=== PREREQUISITE_CYCLE` in two expressions — which
|
|
34
|
+
* is how a new floor code would have landed as a warning at one gate while the dispatch gate refused
|
|
35
|
+
* it, with nothing naming the disagreement.
|
|
36
|
+
*
|
|
37
|
+
* Both members share one property: the graph admits a dispatch order that is WRONG (a cycle admits
|
|
38
|
+
* none at all; an undeclared stage edge admits one that builds config before schema). Everything
|
|
39
|
+
* else here is a judgement about authoring taste, which the creator's review owns.
|
|
40
|
+
*/
|
|
41
|
+
export const BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES = [
|
|
42
|
+
BuildPlanTaskGraphFindingCode.PREREQUISITE_CYCLE,
|
|
43
|
+
BuildPlanTaskGraphFindingCode.RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR,
|
|
44
|
+
];
|
|
10
45
|
const STAGE_ORDER = [
|
|
11
46
|
BuildPlanResourceStage.SCHEMA,
|
|
12
47
|
BuildPlanResourceStage.CONFIG,
|
|
@@ -16,7 +51,12 @@ const STAGE_ORDER = [
|
|
|
16
51
|
/**
|
|
17
52
|
* Validate what Zod cannot: prerequisite cycles and the per-resource stage
|
|
18
53
|
* sequence. Returns findings rather than throwing so a caller can treat a
|
|
19
|
-
* cycle as a hard floor and a missing predecessor as an authoring warning
|
|
54
|
+
* cycle as a hard floor and a missing predecessor as an authoring warning;
|
|
55
|
+
* `BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES` is the classification.
|
|
56
|
+
*
|
|
57
|
+
* The stage-sequence check asks TWO questions, because "the predecessor exists"
|
|
58
|
+
* and "this task waits for it" are different claims and only the second one
|
|
59
|
+
* constrains what the host may dispatch.
|
|
20
60
|
*/
|
|
21
61
|
export function validateBuildPlanTaskGraph(graph) {
|
|
22
62
|
// An empty graph is unrepresentable: the schema requires min(1) tasks (a zero-task decomposition is
|
|
@@ -40,7 +80,37 @@ export function validateBuildPlanTaskGraph(graph) {
|
|
|
40
80
|
};
|
|
41
81
|
for (const task of graph.tasks)
|
|
42
82
|
visit(task.taskRef, []);
|
|
43
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Every task that must have landed before `taskRef` may be dispatched — the TRANSITIVE closure of
|
|
85
|
+
* declared prerequisites, memoized, and cycle-safe by construction (the `seen` set terminates).
|
|
86
|
+
*
|
|
87
|
+
* Transitive rather than direct, because transitive reachability is exactly the property that
|
|
88
|
+
* matters: it is the statement "no dispatch order the host can produce puts this task before that
|
|
89
|
+
* one". A direct-edge requirement would refuse the legitimate authoring a live decomposition
|
|
90
|
+
* actually produces — `config` depending on `module`, which depends on `schema` — which would make
|
|
91
|
+
* the check a style rule rather than an ordering guarantee.
|
|
92
|
+
*/
|
|
93
|
+
const closures = new Map();
|
|
94
|
+
const prerequisiteClosure = (taskRef) => {
|
|
95
|
+
const memoized = closures.get(taskRef);
|
|
96
|
+
if (memoized !== undefined)
|
|
97
|
+
return memoized;
|
|
98
|
+
const reached = new Set();
|
|
99
|
+
// Seed the memo BEFORE walking so a cyclic graph resolves to the partial set rather than recursing.
|
|
100
|
+
closures.set(taskRef, reached);
|
|
101
|
+
const walk = (current) => {
|
|
102
|
+
for (const prerequisite of byRef.get(current)?.prerequisiteTaskRefs ?? []) {
|
|
103
|
+
if (reached.has(prerequisite))
|
|
104
|
+
continue;
|
|
105
|
+
reached.add(prerequisite);
|
|
106
|
+
walk(prerequisite);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
walk(taskRef);
|
|
110
|
+
return reached;
|
|
111
|
+
};
|
|
112
|
+
// Per-resource stage sequence: each stage after SCHEMA needs its predecessor DECLARED for the same
|
|
113
|
+
// resource, and needs to WAIT for it.
|
|
44
114
|
for (const task of graph.tasks) {
|
|
45
115
|
if (task.target.kind !== BuildPlanTaskTargetKind.RESOURCE_STAGE)
|
|
46
116
|
continue;
|
|
@@ -49,16 +119,25 @@ export function validateBuildPlanTaskGraph(graph) {
|
|
|
49
119
|
continue;
|
|
50
120
|
const predecessorStage = STAGE_ORDER[stageIndex - 1];
|
|
51
121
|
const target = task.target;
|
|
52
|
-
const
|
|
122
|
+
const isPredecessor = (candidate) => candidate !== undefined
|
|
123
|
+
&& candidate.target.kind === BuildPlanTaskTargetKind.RESOURCE_STAGE
|
|
53
124
|
&& candidate.target.moduleRef === target.moduleRef
|
|
54
125
|
&& candidate.target.resourceRef === target.resourceRef
|
|
55
|
-
&& candidate.target.stage === predecessorStage
|
|
56
|
-
if (!
|
|
126
|
+
&& candidate.target.stage === predecessorStage;
|
|
127
|
+
if (!graph.tasks.some(isPredecessor)) {
|
|
57
128
|
findings.push({
|
|
58
129
|
code: BuildPlanTaskGraphFindingCode.RESOURCE_STAGE_WITHOUT_PREDECESSOR,
|
|
59
130
|
taskRef: task.taskRef,
|
|
60
131
|
message: `Resource ${target.moduleRef}/${target.resourceRef} declares stage ${target.stage} without its ${predecessorStage} stage.`,
|
|
61
132
|
});
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (![...prerequisiteClosure(task.taskRef)].some((prerequisite) => isPredecessor(byRef.get(prerequisite)))) {
|
|
136
|
+
findings.push({
|
|
137
|
+
code: BuildPlanTaskGraphFindingCode.RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR,
|
|
138
|
+
taskRef: task.taskRef,
|
|
139
|
+
message: `Resource ${target.moduleRef}/${target.resourceRef} declares stage ${target.stage} and its ${predecessorStage} stage, but ${task.taskRef} does not depend on it — the host may dispatch ${target.stage} first.`,
|
|
140
|
+
});
|
|
62
141
|
}
|
|
63
142
|
}
|
|
64
143
|
return findings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-plan-task-graph-validation.js","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAA2B,MAAM,iCAAiC,CAAC;AAE3H,4GAA4G;AAC5G,MAAM,CAAN,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACvC,oFAAoF;IACpF,0EAAyC,CAAA;IACzC,yIAAyI;IACzI,0GAAyE,CAAA;AAC3E,CAAC,EALW,6BAA6B,KAA7B,6BAA6B,QAK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MAAM,UAAU,yBAAyB,CAAC,KAAyB,EAAE,cAAmC;IACtG,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAChK,CAAC","sourcesContent":["import { BuildPlanResourceStage, BuildPlanTaskTargetKind, type BuildPlanTaskGraph } from './build-plan-task-graph.schemas';\n\n/** Deterministic finding over a build-plan task graph; authoring consistency beyond structural validity. */\nexport enum BuildPlanTaskGraphFindingCode {\n /** A prerequisite chain returns to its own task: no valid dispatch order exists. */\n PREREQUISITE_CYCLE = 'PREREQUISITE_CYCLE',\n /** A resource stage is declared without the stage that must precede it (schema → config → ui-behavior → spec) somewhere in the graph. */\n RESOURCE_STAGE_WITHOUT_PREDECESSOR = 'RESOURCE_STAGE_WITHOUT_PREDECESSOR',\n}\n\nexport interface BuildPlanTaskGraphFinding {\n readonly code: BuildPlanTaskGraphFindingCode;\n readonly taskRef: string | null;\n readonly message: string;\n}\n\nconst STAGE_ORDER: readonly BuildPlanResourceStage[] = [\n BuildPlanResourceStage.SCHEMA,\n BuildPlanResourceStage.CONFIG,\n BuildPlanResourceStage.UI_BEHAVIOR,\n BuildPlanResourceStage.SPEC,\n];\n\n/**\n * Validate what Zod cannot: prerequisite cycles and the per-resource stage\n * sequence. Returns findings rather than throwing so a caller can treat a\n * cycle as a hard floor and a missing predecessor as an authoring warning.\n */\nexport function validateBuildPlanTaskGraph(graph: BuildPlanTaskGraph): readonly BuildPlanTaskGraphFinding[] {\n // An empty graph is unrepresentable: the schema requires min(1) tasks (a zero-task decomposition is\n // a refusal at generation, never an artifact — proven necessary by the first live loop run).\n const findings: BuildPlanTaskGraphFinding[] = [];\n const byRef = new Map(graph.tasks.map((task) => [task.taskRef, task]));\n // Cycle detection over declared prerequisites (depth-first with colours).\n const state = new Map<string, 'visiting' | 'done'>();\n const visit = (taskRef: string, trail: string[]): void => {\n const current = state.get(taskRef);\n if (current === 'done') return;\n if (current === 'visiting') {\n findings.push({ code: BuildPlanTaskGraphFindingCode.PREREQUISITE_CYCLE, taskRef, message: `Prerequisite cycle: ${[...trail, taskRef].join(' → ')}` });\n return;\n }\n state.set(taskRef, 'visiting');\n for (const prerequisite of byRef.get(taskRef)?.prerequisiteTaskRefs ?? []) visit(prerequisite, [...trail, taskRef]);\n state.set(taskRef, 'done');\n };\n for (const task of graph.tasks) visit(task.taskRef, []);\n // Per-resource stage sequence: each stage after SCHEMA needs its predecessor declared for the same resource.\n for (const task of graph.tasks) {\n if (task.target.kind !== BuildPlanTaskTargetKind.RESOURCE_STAGE) continue;\n const stageIndex = STAGE_ORDER.indexOf(task.target.stage);\n if (stageIndex <= 0) continue;\n const predecessorStage = STAGE_ORDER[stageIndex - 1]!;\n const target = task.target;\n const hasPredecessor = graph.tasks.some((candidate) =>\n candidate.target.kind === BuildPlanTaskTargetKind.RESOURCE_STAGE\n && candidate.target.moduleRef === target.moduleRef\n && candidate.target.resourceRef === target.resourceRef\n && candidate.target.stage === predecessorStage,\n );\n if (!hasPredecessor) {\n findings.push({\n code: BuildPlanTaskGraphFindingCode.RESOURCE_STAGE_WITHOUT_PREDECESSOR,\n taskRef: task.taskRef,\n message: `Resource ${target.moduleRef}/${target.resourceRef} declares stage ${target.stage} without its ${predecessorStage} stage.`,\n });\n }\n }\n return findings;\n}\n\n/**\n * The tasks whose declared prerequisites are all in `landedTaskRefs`; the\n * host's dependency-readiness resolution, in graph order. Pure and total.\n */\nexport function selectReadyBuildPlanTasks(graph: BuildPlanTaskGraph, landedTaskRefs: ReadonlySet<string>): readonly BuildPlanTaskGraph['tasks'][number][] {\n return graph.tasks.filter((task) => !landedTaskRefs.has(task.taskRef) && task.prerequisiteTaskRefs.every((prerequisite) => landedTaskRefs.has(prerequisite)));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"build-plan-task-graph-validation.js","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAA2B,MAAM,iCAAiC,CAAC;AAE3H,4GAA4G;AAC5G,MAAM,CAAN,IAAY,6BAuBX;AAvBD,WAAY,6BAA6B;IACvC,oFAAoF;IACpF,0EAAyC,CAAA;IACzC,wIAAwI;IACxI,0GAAyE,CAAA;IACzE;;;;;;;;;;;;;;;;OAgBG;IACH,oHAAmF,CAAA;AACrF,CAAC,EAvBW,6BAA6B,KAA7B,6BAA6B,QAuBxC;AAQD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAA6C;IAC9F,6BAA6B,CAAC,kBAAkB;IAChD,6BAA6B,CAAC,uCAAuC;CACtE,CAAC;AAEF,MAAM,WAAW,GAAsC;IACrD,sBAAsB,CAAC,MAAM;IAC7B,sBAAsB,CAAC,MAAM;IAC7B,sBAAsB,CAAC,WAAW;IAClC,sBAAsB,CAAC,IAAI;CAC5B,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAyB;IAClE,oGAAoG;IACpG,6FAA6F;IAC7F,MAAM,QAAQ,GAAgC,EAAE,CAAC;IACjD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACvE,0EAA0E;IAC1E,MAAM,KAAK,GAAG,IAAI,GAAG,EAA+B,CAAC;IACrD,MAAM,KAAK,GAAG,CAAC,OAAe,EAAE,KAAe,EAAQ,EAAE;QACvD,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACnC,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AM,CAAC,SAAS,IAAI,MAAM,CAAC,WAAW,mBAAmB,MAAM,CAAC,KAAK,gBAAgB,gBAAgB,SAAS;aACpI,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QACD,IAAI,CAAC,CAAC,GAAG,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3G,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,6BAA6B,CAAC,uCAAuC;gBAC3E,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,OAAO,EAAE,YAAY,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,WAAW,mBAAmB,MAAM,CAAC,KAAK,YAAY,gBAAgB,eAAe,IAAI,CAAC,OAAO,kDAAkD,MAAM,CAAC,KAAK,SAAS;aACzN,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAyB,EAAE,cAAmC;IACtG,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;AAChK,CAAC","sourcesContent":["import { BuildPlanResourceStage, BuildPlanTaskTargetKind, type BuildPlanTaskGraph } from './build-plan-task-graph.schemas';\n\n/** Deterministic finding over a build-plan task graph; authoring consistency beyond structural validity. */\nexport enum BuildPlanTaskGraphFindingCode {\n /** A prerequisite chain returns to its own task: no valid dispatch order exists. */\n PREREQUISITE_CYCLE = 'PREREQUISITE_CYCLE',\n /** A resource stage is declared without the stage that must precede it (schema → config → ui-behavior → spec) anywhere in the graph. */\n RESOURCE_STAGE_WITHOUT_PREDECESSOR = 'RESOURCE_STAGE_WITHOUT_PREDECESSOR',\n /**\n * The predecessor stage IS in the graph, and this task does not depend on it —\n * so a dispatch order exists that runs this stage FIRST.\n *\n * Distinct from {@link RESOURCE_STAGE_WITHOUT_PREDECESSOR}, and the distinction decides the\n * severity. A missing predecessor can be legitimate: a plan may author only the CONFIG stage of a\n * resource whose schema already stands in the tree and needs no task, which is why that finding is\n * an authoring warning. This one cannot be legitimate — the plan ITSELF says the schema is being\n * (re)authored by a task in this same graph, and then permits the config to be written first.\n *\n * It is invisible without this check because the two mechanisms that decide ordering and the one\n * that reports on it were reading different things: dispatch order comes SOLELY from\n * `prerequisiteTaskRefs` (`selectReadyBuildPlanTasks`), while the stage-sequence check asked only\n * that a predecessor task EXIST somewhere in the graph. A CONFIG task with no prerequisites was\n * therefore simultaneously finding-free and immediately ready, and a coding agent could be\n * dispatched to author `*.resources-config.ts` for a schema that does not exist yet.\n */\n RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR = 'RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR',\n}\n\nexport interface BuildPlanTaskGraphFinding {\n readonly code: BuildPlanTaskGraphFindingCode;\n readonly taskRef: string | null;\n readonly message: string;\n}\n\n/**\n * The finding codes that must block a landing; everything else is an authoring warning.\n *\n * Mirrors `PLACEMENT_PLAN_HARD_FLOOR_CODES` on the sibling family, deliberately: the severity\n * decision belongs beside the codes it classifies, not re-derived at each caller. It used to be\n * re-derived — the semantic authority hard-coded `=== PREREQUISITE_CYCLE` in two expressions — which\n * is how a new floor code would have landed as a warning at one gate while the dispatch gate refused\n * it, with nothing naming the disagreement.\n *\n * Both members share one property: the graph admits a dispatch order that is WRONG (a cycle admits\n * none at all; an undeclared stage edge admits one that builds config before schema). Everything\n * else here is a judgement about authoring taste, which the creator's review owns.\n */\nexport const BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES: readonly BuildPlanTaskGraphFindingCode[] = [\n BuildPlanTaskGraphFindingCode.PREREQUISITE_CYCLE,\n BuildPlanTaskGraphFindingCode.RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR,\n];\n\nconst STAGE_ORDER: readonly BuildPlanResourceStage[] = [\n BuildPlanResourceStage.SCHEMA,\n BuildPlanResourceStage.CONFIG,\n BuildPlanResourceStage.UI_BEHAVIOR,\n BuildPlanResourceStage.SPEC,\n];\n\n/**\n * Validate what Zod cannot: prerequisite cycles and the per-resource stage\n * sequence. Returns findings rather than throwing so a caller can treat a\n * cycle as a hard floor and a missing predecessor as an authoring warning;\n * `BUILD_PLAN_TASK_GRAPH_HARD_FLOOR_CODES` is the classification.\n *\n * The stage-sequence check asks TWO questions, because \"the predecessor exists\"\n * and \"this task waits for it\" are different claims and only the second one\n * constrains what the host may dispatch.\n */\nexport function validateBuildPlanTaskGraph(graph: BuildPlanTaskGraph): readonly BuildPlanTaskGraphFinding[] {\n // An empty graph is unrepresentable: the schema requires min(1) tasks (a zero-task decomposition is\n // a refusal at generation, never an artifact — proven necessary by the first live loop run).\n const findings: BuildPlanTaskGraphFinding[] = [];\n const byRef = new Map(graph.tasks.map((task) => [task.taskRef, task]));\n // Cycle detection over declared prerequisites (depth-first with colours).\n const state = new Map<string, 'visiting' | 'done'>();\n const visit = (taskRef: string, trail: string[]): void => {\n const current = state.get(taskRef);\n if (current === 'done') return;\n if (current === 'visiting') {\n findings.push({ code: BuildPlanTaskGraphFindingCode.PREREQUISITE_CYCLE, taskRef, message: `Prerequisite cycle: ${[...trail, taskRef].join(' → ')}` });\n return;\n }\n state.set(taskRef, 'visiting');\n for (const prerequisite of byRef.get(taskRef)?.prerequisiteTaskRefs ?? []) visit(prerequisite, [...trail, taskRef]);\n state.set(taskRef, 'done');\n };\n for (const task of graph.tasks) visit(task.taskRef, []);\n\n /**\n * Every task that must have landed before `taskRef` may be dispatched — the TRANSITIVE closure of\n * declared prerequisites, memoized, and cycle-safe by construction (the `seen` set terminates).\n *\n * Transitive rather than direct, because transitive reachability is exactly the property that\n * matters: it is the statement \"no dispatch order the host can produce puts this task before that\n * one\". A direct-edge requirement would refuse the legitimate authoring a live decomposition\n * actually produces — `config` depending on `module`, which depends on `schema` — which would make\n * the check a style rule rather than an ordering guarantee.\n */\n const closures = new Map<string, ReadonlySet<string>>();\n const prerequisiteClosure = (taskRef: string): ReadonlySet<string> => {\n const memoized = closures.get(taskRef);\n if (memoized !== undefined) return memoized;\n const reached = new Set<string>();\n // Seed the memo BEFORE walking so a cyclic graph resolves to the partial set rather than recursing.\n closures.set(taskRef, reached);\n const walk = (current: string): void => {\n for (const prerequisite of byRef.get(current)?.prerequisiteTaskRefs ?? []) {\n if (reached.has(prerequisite)) continue;\n reached.add(prerequisite);\n walk(prerequisite);\n }\n };\n walk(taskRef);\n return reached;\n };\n\n // Per-resource stage sequence: each stage after SCHEMA needs its predecessor DECLARED for the same\n // resource, and needs to WAIT for it.\n for (const task of graph.tasks) {\n if (task.target.kind !== BuildPlanTaskTargetKind.RESOURCE_STAGE) continue;\n const stageIndex = STAGE_ORDER.indexOf(task.target.stage);\n if (stageIndex <= 0) continue;\n const predecessorStage = STAGE_ORDER[stageIndex - 1]!;\n const target = task.target;\n const isPredecessor = (candidate: BuildPlanTaskGraph['tasks'][number] | undefined): boolean =>\n candidate !== undefined\n && candidate.target.kind === BuildPlanTaskTargetKind.RESOURCE_STAGE\n && candidate.target.moduleRef === target.moduleRef\n && candidate.target.resourceRef === target.resourceRef\n && candidate.target.stage === predecessorStage;\n\n if (!graph.tasks.some(isPredecessor)) {\n findings.push({\n code: BuildPlanTaskGraphFindingCode.RESOURCE_STAGE_WITHOUT_PREDECESSOR,\n taskRef: task.taskRef,\n message: `Resource ${target.moduleRef}/${target.resourceRef} declares stage ${target.stage} without its ${predecessorStage} stage.`,\n });\n continue;\n }\n if (![...prerequisiteClosure(task.taskRef)].some((prerequisite) => isPredecessor(byRef.get(prerequisite)))) {\n findings.push({\n code: BuildPlanTaskGraphFindingCode.RESOURCE_STAGE_PRECEDES_ITS_PREDECESSOR,\n taskRef: task.taskRef,\n message: `Resource ${target.moduleRef}/${target.resourceRef} declares stage ${target.stage} and its ${predecessorStage} stage, but ${task.taskRef} does not depend on it — the host may dispatch ${target.stage} first.`,\n });\n }\n }\n return findings;\n}\n\n/**\n * The tasks whose declared prerequisites are all in `landedTaskRefs`; the\n * host's dependency-readiness resolution, in graph order. Pure and total.\n */\nexport function selectReadyBuildPlanTasks(graph: BuildPlanTaskGraph, landedTaskRefs: ReadonlySet<string>): readonly BuildPlanTaskGraph['tasks'][number][] {\n return graph.tasks.filter((task) => !landedTaskRefs.has(task.taskRef) && task.prerequisiteTaskRefs.every((prerequisite) => landedTaskRefs.has(prerequisite)));\n}\n"]}
|