@warpgogol/werkstatt-shared 0.2.0
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/package.json +352 -0
- package/src/checks/index.ts +24 -0
- package/src/checks/lib/astro-site-url.ts +30 -0
- package/src/checks/lib/i18n.ts +30 -0
- package/src/checks/result-helpers.ts +102 -0
- package/src/checks/suppressions-config.ts +195 -0
- package/src/index.ts +14 -0
- package/src/integration/README.md +38 -0
- package/src/integration/adapters.ts +143 -0
- package/src/integration/crm-buffer.ts +491 -0
- package/src/integration/dispatch.ts +106 -0
- package/src/integration/funnel.ts +379 -0
- package/src/integration/index.ts +56 -0
- package/src/integration/lifecycle.ts +155 -0
- package/src/integration/orchestration.ts +439 -0
- package/src/integration/port-barrel.ts +124 -0
- package/src/integration/port.ts +143 -0
- package/src/integration/qstash.ts +134 -0
- package/src/integration/sharding.ts +133 -0
- package/src/integration/tests/deliver-event.test.ts +52 -0
- package/src/integration/tests/dispatch.test.ts +88 -0
- package/src/integration/tests/funnel-bridge.test.ts +46 -0
- package/src/integration/tests/hub-runtime.test.ts +128 -0
- package/src/integration/tests/lifecycle.test.ts +69 -0
- package/src/integration/tests/qstash.test.ts +83 -0
- package/src/integration/tests/sharding.test.ts +64 -0
- package/src/integration/vitest.config.ts +8 -0
- package/src/integration-adapter-supabase-crm/adapter.ts +437 -0
- package/src/integration-adapter-supabase-crm/client.ts +605 -0
- package/src/integration-adapter-supabase-crm/index.ts +28 -0
- package/src/integration-adapter-supabase-crm/pipedrive-sync-target.ts +482 -0
- package/src/integration-adapter-supabase-crm/supabase-rest.ts +89 -0
- package/src/integration-adapter-supabase-crm/tenant-registry.ts +334 -0
- package/src/integration-adapter-supabase-crm/tests/change-balance.pbt.test.ts +83 -0
- package/src/integration-adapter-supabase-crm/tests/funnel-persistence.test.ts +409 -0
- package/src/integration-adapter-supabase-crm/tests/lifecycle-sync.test.ts +288 -0
- package/src/integration-adapter-supabase-crm/tests/stage-map.test.ts +80 -0
- package/src/integration-adapter-supabase-crm/vitest.config.ts +8 -0
- package/src/integration-adapter-supabase-crm/worker.ts +223 -0
- package/src/observability/conventions.ts +93 -0
- package/src/observability/env-resolver.ts +57 -0
- package/src/observability/index.ts +57 -0
- package/src/observability/metric-registry.ts +184 -0
- package/src/observability/otlp-converter.ts +125 -0
- package/src/observability/otlp-json.ts +135 -0
- package/src/observability/otlp-transport.ts +68 -0
- package/src/observability/pusher.ts +142 -0
- package/src/observability/redact.ts +27 -0
- package/src/observability/tests/conventions.test.ts +100 -0
- package/src/observability/tests/metric-registry.test.ts +117 -0
- package/src/observability/tests/otlp-converter.pbt.test.ts +77 -0
- package/src/observability/tests/otlp-converter.test.ts +157 -0
- package/src/observability/tests/otlp-json.test.ts +120 -0
- package/src/observability/tests/pusher.test.ts +75 -0
- package/src/observability/tests/redact.pbt.test.ts +71 -0
- package/src/observability/tests/redact.test.ts +37 -0
- package/src/observability/typed-refs.ts +137 -0
- package/src/observability/vitest.config.ts +8 -0
- package/src/ontology/analytics/matomo-binding.yaml +172 -0
- package/src/ontology/analytics/matomo-fleet.registry.yaml +26 -0
- package/src/ontology/analytics/messkanon.yaml +151 -0
- package/src/ontology/archetype-registry.ts +61 -0
- package/src/ontology/archetypes/components/brand-label.yaml +19 -0
- package/src/ontology/archetypes/components/copyright.yaml +19 -0
- package/src/ontology/archetypes/components/currency-aware-price-display.yaml +19 -0
- package/src/ontology/archetypes/components/currency-selector.yaml +19 -0
- package/src/ontology/archetypes/components/footer-promo.yaml +19 -0
- package/src/ontology/archetypes/components/lang-switcher.yaml +19 -0
- package/src/ontology/archetypes/components/layout.yaml +19 -0
- package/src/ontology/archetypes/components/live-photo.yaml +20 -0
- package/src/ontology/archetypes/components/material-credit.yaml +20 -0
- package/src/ontology/archetypes/components/media.yaml +21 -0
- package/src/ontology/archetypes/components/nachweis-card.yaml +34 -0
- package/src/ontology/archetypes/components/nachweis-detail.yaml +43 -0
- package/src/ontology/archetypes/components/nachweis-list.yaml +37 -0
- package/src/ontology/archetypes/components/nachweis-verify.yaml +31 -0
- package/src/ontology/archetypes/components/not-found.yaml +22 -0
- package/src/ontology/archetypes/components/offer-capacity.yaml +21 -0
- package/src/ontology/archetypes/components/passport-header.yaml +19 -0
- package/src/ontology/archetypes/components/passport-provenance.yaml +20 -0
- package/src/ontology/archetypes/components/passport-score-grid.yaml +20 -0
- package/src/ontology/archetypes/components/passport-star-map.yaml +20 -0
- package/src/ontology/archetypes/components/person-profile.yaml +20 -0
- package/src/ontology/archetypes/components/pulsar.yaml +20 -0
- package/src/ontology/archetypes/components/responsive-image.yaml +19 -0
- package/src/ontology/archetypes/components/scroll-to-top.yaml +22 -0
- package/src/ontology/archetypes/components/social-meta.yaml +20 -0
- package/src/ontology/archetypes/components/structured-data.yaml +19 -0
- package/src/ontology/archetypes/index.json +1003 -0
- package/src/ontology/archetypes/index.yaml +821 -0
- package/src/ontology/archetypes/sections/approach.yaml +23 -0
- package/src/ontology/archetypes/sections/article-list.yaml +30 -0
- package/src/ontology/archetypes/sections/audience-cards.yaml +30 -0
- package/src/ontology/archetypes/sections/breadcrumbs.yaml +21 -0
- package/src/ontology/archetypes/sections/chat-widget.yaml +37 -0
- package/src/ontology/archetypes/sections/comparison-cards.yaml +31 -0
- package/src/ontology/archetypes/sections/controlled-responsibility-block.yaml +34 -0
- package/src/ontology/archetypes/sections/credits.yaml +29 -0
- package/src/ontology/archetypes/sections/donation-card.yaml +53 -0
- package/src/ontology/archetypes/sections/donation-use.yaml +23 -0
- package/src/ontology/archetypes/sections/dynamic-status-block.yaml +35 -0
- package/src/ontology/archetypes/sections/faq-list.yaml +26 -0
- package/src/ontology/archetypes/sections/final-cta.yaml +53 -0
- package/src/ontology/archetypes/sections/hero-decision-card.yaml +65 -0
- package/src/ontology/archetypes/sections/hero.yaml +50 -0
- package/src/ontology/archetypes/sections/impact.yaml +23 -0
- package/src/ontology/archetypes/sections/markdown.yaml +43 -0
- package/src/ontology/archetypes/sections/mountain-journey.yaml +43 -0
- package/src/ontology/archetypes/sections/navigation.yaml +20 -0
- package/src/ontology/archetypes/sections/notausgang-block.yaml +41 -0
- package/src/ontology/archetypes/sections/open-source-registry.yaml +26 -0
- package/src/ontology/archetypes/sections/ownership-block.yaml +57 -0
- package/src/ontology/archetypes/sections/people.yaml +48 -0
- package/src/ontology/archetypes/sections/price-card.yaml +50 -0
- package/src/ontology/archetypes/sections/problem.yaml +23 -0
- package/src/ontology/archetypes/sections/send-message.yaml +63 -0
- package/src/ontology/archetypes/sections/service-metadata-block.yaml +40 -0
- package/src/ontology/archetypes/sections/social-proof.yaml +27 -0
- package/src/ontology/archetypes/sections/transparency.yaml +32 -0
- package/src/ontology/archetypes/sections/trust-strip.yaml +42 -0
- package/src/ontology/archetypes/sections/video-section.yaml +27 -0
- package/src/ontology/archetypes/sections/women.yaml +29 -0
- package/src/ontology/biome-token-projection.ts +229 -0
- package/src/ontology/biomes/check-concrete-blueprint.yaml +118 -0
- package/src/ontology/biomes/handwerk-material-warm.yaml +135 -0
- package/src/ontology/biomes/nonprofit-trust.yaml +123 -0
- package/src/ontology/blueprints/offer.yaml +39 -0
- package/src/ontology/blueprints/prompts/local-market-signal.md +13 -0
- package/src/ontology/blueprints/prompts/website-local-narrative.md +24 -0
- package/src/ontology/blueprints/ratgeber.yaml +62 -0
- package/src/ontology/blueprints/website-local.yaml +309 -0
- package/src/ontology/blueprints/website-service.yaml +84 -0
- package/src/ontology/capabilities/lead.submit.yaml +44 -0
- package/src/ontology/cosmic/index.ts +48 -0
- package/src/ontology/cosmic/moon-catalog.ts +173 -0
- package/src/ontology/cosmic/planet-catalog.ts +82 -0
- package/src/ontology/cosmic/star-catalog.ts +337 -0
- package/src/ontology/enums.ts +159 -0
- package/src/ontology/external-surfaces/index.ts +158 -0
- package/src/ontology/external-surfaces/jsonld-types.yaml +135 -0
- package/src/ontology/external-surfaces/sitemap-shape.yaml +6 -0
- package/src/ontology/external-surfaces/url-schema.yaml +95 -0
- package/src/ontology/growth/events/contact-email-click.yaml +21 -0
- package/src/ontology/growth/events/contact-form-submit.yaml +25 -0
- package/src/ontology/growth/events/contact-phone-click.yaml +21 -0
- package/src/ontology/growth/events/contact-route-click.yaml +21 -0
- package/src/ontology/growth/events/contact-submit.yaml +28 -0
- package/src/ontology/growth/events/contact-whatsapp-click.yaml +21 -0
- package/src/ontology/growth/events/cta-click.yaml +30 -0
- package/src/ontology/growth/events/donation-confirmed.yaml +32 -0
- package/src/ontology/growth/events/donation-form-start.yaml +21 -0
- package/src/ontology/growth/events/donation-form-submit.yaml +29 -0
- package/src/ontology/growth/events/donation-intent.yaml +29 -0
- package/src/ontology/growth/events/form-error.yaml +27 -0
- package/src/ontology/growth/events/form-start.yaml +21 -0
- package/src/ontology/growth/events/form-submit.yaml +21 -0
- package/src/ontology/growth/events/outbound-click.yaml +25 -0
- package/src/ontology/growth/events/page-view.yaml +24 -0
- package/src/ontology/growth/events/passport-view.yaml +28 -0
- package/src/ontology/growth/events/star-map-navigate.yaml +30 -0
- package/src/ontology/index.ts +165 -0
- package/src/ontology/manifest.ts +344 -0
- package/src/ontology/operations/index.ts +1 -0
- package/src/ontology/schemas/biome.ts +303 -0
- package/src/ontology/schemas/capability.ts +104 -0
- package/src/ontology/schemas/constellation.ts +114 -0
- package/src/ontology/schemas/dns-records.ts +53 -0
- package/src/ontology/schemas/index.ts +95 -0
- package/src/ontology/schemas/manifest-resolver.ts +123 -0
- package/src/ontology/schemas/page-entry.ts +213 -0
- package/src/ontology/schemas/section-archetype.ts +109 -0
- package/src/ontology/schemas/site-family.ts +98 -0
- package/src/ontology/schemas/system/growth.ts +80 -0
- package/src/ontology/schemas/system/integrations.ts +143 -0
- package/src/ontology/schemas/system/manifest.ts +492 -0
- package/src/ontology/schemas/system/page-output.ts +99 -0
- package/src/ontology/schemas/system/release.ts +58 -0
- package/src/ontology/schemas/system/text.ts +58 -0
- package/src/ontology/schemas/system.ts +53 -0
- package/src/ontology/shared-section-props/body-fragments.ts +182 -0
- package/src/ontology/shared-section-props/catalog.ts +195 -0
- package/src/ontology/shared-section-props/common.ts +178 -0
- package/src/ontology/shared-section-props/index.ts +34 -0
- package/src/ontology/shared-section-props/visual-header.ts +163 -0
- package/src/ontology/site-families/charity-donation-trust/cultural-rules.yaml +6 -0
- package/src/ontology/site-families/charity-donation-trust/family.yaml +44 -0
- package/src/ontology/site-families/charity-donation-trust/linguistic-rules.yaml +6 -0
- package/src/ontology/site-families/check-quality-operator/cultural-rules.yaml +6 -0
- package/src/ontology/site-families/check-quality-operator/family.yaml +40 -0
- package/src/ontology/site-families/check-quality-operator/linguistic-rules.yaml +6 -0
- package/src/ontology/site-families/handwerk-trust-engineering/cultural-rules.yaml +6 -0
- package/src/ontology/site-families/handwerk-trust-engineering/family.yaml +53 -0
- package/src/ontology/site-families/handwerk-trust-engineering/linguistic-rules.yaml +6 -0
- package/src/ontology/tests/catalogs.pbt.test.ts +89 -0
- package/src/ontology/tests/enums.test.ts +203 -0
- package/src/ontology/tests/sternsystem-owner.test.ts +63 -0
- package/src/ontology/vitest.config.ts +8 -0
- package/src/passport/dht-sign.test.ts +99 -0
- package/src/passport/dht-sign.ts +73 -0
- package/src/passport/identity-sign.test.ts +134 -0
- package/src/passport/identity-sign.ts +85 -0
- package/src/passport/index.ts +53 -0
- package/src/passport/key-rotate.ts +133 -0
- package/src/passport/schema.ts +198 -0
- package/src/passport/sign.ts +225 -0
- package/src/passport/tests/schema.pbt.test.ts +93 -0
- package/src/passport/tests/schema.test.ts +222 -0
- package/src/passport/vitest.config.ts +8 -0
- package/src/share/agent/api-catalog.ts +77 -0
- package/src/share/agent/capability.ts +68 -0
- package/src/share/agent/dns-aid.test.ts +74 -0
- package/src/share/agent/dns-aid.ts +53 -0
- package/src/share/agent/fleet-catalog.ts +149 -0
- package/src/share/agent/index.ts +29 -0
- package/src/share/agent/knowledge.ts +96 -0
- package/src/share/agent/manifest.ts +126 -0
- package/src/share/agent/mcp-card.ts +63 -0
- package/src/share/agent/omit-empty.ts +77 -0
- package/src/share/agent/openapi.ts +157 -0
- package/src/share/agent/proof.ts +61 -0
- package/src/share/attribution-display.ts +86 -0
- package/src/share/check-hints.ts +38 -0
- package/src/share/content/entity-id.ts +65 -0
- package/src/share/content/index.ts +16 -0
- package/src/share/content/merge.ts +86 -0
- package/src/share/content/resolve-field-path.ts +39 -0
- package/src/share/content/substitute-deep.ts +47 -0
- package/src/share/content-discipline/index.ts +14 -0
- package/src/share/content-discipline/parsers.ts +66 -0
- package/src/share/content-discipline/types.ts +118 -0
- package/src/share/content-reference.ts +333 -0
- package/src/share/counter-utils.ts +75 -0
- package/src/share/css-value-normalize.ts +48 -0
- package/src/share/dev-props-validator.ts +131 -0
- package/src/share/entitlement.ts +172 -0
- package/src/share/env.d.ts +73 -0
- package/src/share/feature-policy.ts +367 -0
- package/src/share/formula-eval.ts +364 -0
- package/src/share/fs/index.ts +96 -0
- package/src/share/i18n/localization.ts +57 -0
- package/src/share/image-provider.ts +314 -0
- package/src/share/index.ts +86 -0
- package/src/share/knowledge/claim.ts +129 -0
- package/src/share/knowledge/derivation.ts +55 -0
- package/src/share/knowledge/freshness.ts +127 -0
- package/src/share/knowledge/index.ts +23 -0
- package/src/share/knowledge/ledger.ts +222 -0
- package/src/share/knowledge/plan.ts +122 -0
- package/src/share/knowledge/source.ts +170 -0
- package/src/share/legal/translation-policy.ts +133 -0
- package/src/share/material-credits.ts +181 -0
- package/src/share/middleware/language-redirect.ts +49 -0
- package/src/share/offer-capacity.ts +149 -0
- package/src/share/onboarding-yaml/index.ts +162 -0
- package/src/share/page.ts +351 -0
- package/src/share/redirects.test.ts +62 -0
- package/src/share/redirects.ts +54 -0
- package/src/share/rfc0042-utils.ts +95 -0
- package/src/share/runtime-context.ts +70 -0
- package/src/share/schemas/claim-records.ts +69 -0
- package/src/share/schemas/claims.ts +150 -0
- package/src/share/schemas/effects.ts +212 -0
- package/src/share/schemas/features.ts +147 -0
- package/src/share/schemas/horizontal-align.ts +22 -0
- package/src/share/schemas/icon-color.ts +27 -0
- package/src/share/schemas/index.ts +43 -0
- package/src/share/schemas/live-photo.ts +53 -0
- package/src/share/schemas/material-credit.ts +292 -0
- package/src/share/schemas/media.ts +220 -0
- package/src/share/schemas/navigation.ts +74 -0
- package/src/share/schemas/page-base.ts +33 -0
- package/src/share/schemas/participant.ts +247 -0
- package/src/share/schemas/person.ts +24 -0
- package/src/share/schemas/print.ts +93 -0
- package/src/share/schemas/section-background.ts +106 -0
- package/src/share/schemas/section-body.ts +138 -0
- package/src/share/schemas/section-cards.ts +37 -0
- package/src/share/schemas/section-cta.ts +74 -0
- package/src/share/schemas/section-header.ts +77 -0
- package/src/share/schemas/section-image.ts +77 -0
- package/src/share/schemas/section-motion.ts +52 -0
- package/src/share/schemas/section-shell.ts +63 -0
- package/src/share/schemas/section-stats.ts +37 -0
- package/src/share/schemas/site-background.ts +78 -0
- package/src/share/schemas/standard-list-item.ts +38 -0
- package/src/share/scripts/external-links.ts +45 -0
- package/src/share/scripts/gsap-counter.ts +168 -0
- package/src/share/scripts/gsap-mountain-journey.ts +236 -0
- package/src/share/scripts/gsap-parallax.ts +50 -0
- package/src/share/scripts/gsap-reveal.ts +65 -0
- package/src/share/scripts/gsap-stagger.ts +54 -0
- package/src/share/scripts/index.ts +25 -0
- package/src/share/scripts/inline-number-animation.ts +120 -0
- package/src/share/scripts/lenis.ts +109 -0
- package/src/share/scripts/live-photos.ts +250 -0
- package/src/share/scripts/lordicon.ts +94 -0
- package/src/share/scripts/orchestrator.ts +138 -0
- package/src/share/scripts/scheduler.ts +53 -0
- package/src/share/scripts/video-player.ts +116 -0
- package/src/share/semantic/ai.ts +140 -0
- package/src/share/semantic/block-extraction.ts +52 -0
- package/src/share/semantic/block-extractors/index.ts +502 -0
- package/src/share/semantic/breadcrumbs.ts +120 -0
- package/src/share/semantic/build-page.ts +309 -0
- package/src/share/semantic/business-projection.ts +278 -0
- package/src/share/semantic/derived-prices-loader.ts +36 -0
- package/src/share/semantic/extract.ts +118 -0
- package/src/share/semantic/feed.ts +124 -0
- package/src/share/semantic/ids.ts +76 -0
- package/src/share/semantic/image-sitemap.ts +153 -0
- package/src/share/semantic/index.ts +36 -0
- package/src/share/semantic/jsonld/article.ts +47 -0
- package/src/share/semantic/jsonld/breadcrumb.ts +47 -0
- package/src/share/semantic/jsonld/collection-list.ts +30 -0
- package/src/share/semantic/jsonld/context.ts +46 -0
- package/src/share/semantic/jsonld/faq.ts +49 -0
- package/src/share/semantic/jsonld/initiative.ts +53 -0
- package/src/share/semantic/jsonld/organization.ts +101 -0
- package/src/share/semantic/jsonld/person.ts +71 -0
- package/src/share/semantic/jsonld/service.ts +80 -0
- package/src/share/semantic/jsonld/shared.ts +31 -0
- package/src/share/semantic/jsonld/types.ts +18 -0
- package/src/share/semantic/jsonld/webpage.ts +98 -0
- package/src/share/semantic/jsonld/website.ts +27 -0
- package/src/share/semantic/jsonld.ts +75 -0
- package/src/share/semantic/llms-policy.ts +74 -0
- package/src/share/semantic/llms.ts +394 -0
- package/src/share/semantic/markdown-hygiene.ts +68 -0
- package/src/share/semantic/markdown-twin-provenance.ts +242 -0
- package/src/share/semantic/models.ts +402 -0
- package/src/share/semantic/organization-profile.ts +160 -0
- package/src/share/semantic/output-projection.ts +131 -0
- package/src/share/semantic/page-builders/markdown-page.ts +84 -0
- package/src/share/semantic/page-markdown.ts +234 -0
- package/src/share/semantic/page-utils.ts +125 -0
- package/src/share/semantic/price-marker-resolver.ts +92 -0
- package/src/share/semantic/robots.ts +127 -0
- package/src/share/semantic/update-stamp.ts +136 -0
- package/src/share/shared-context.ts +177 -0
- package/src/share/string-utils.ts +19 -0
- package/src/share/tests/api-catalog.test.ts +97 -0
- package/src/share/tests/breadcrumbs.test.ts +126 -0
- package/src/share/tests/build-page-price-markers.test.ts +160 -0
- package/src/share/tests/capability.test.ts +107 -0
- package/src/share/tests/claim.test.ts +90 -0
- package/src/share/tests/content-ref-index.test.ts +328 -0
- package/src/share/tests/create-dev-props-validator.test.ts +38 -0
- package/src/share/tests/derivation.test.ts +39 -0
- package/src/share/tests/dev-props-validator.test.ts +88 -0
- package/src/share/tests/fleet-catalog.test.ts +134 -0
- package/src/share/tests/formula-eval.test.ts +619 -0
- package/src/share/tests/freshness.test.ts +60 -0
- package/src/share/tests/hero-section-numbering-parity.test.ts +51 -0
- package/src/share/tests/image-sitemap.test.ts +101 -0
- package/src/share/tests/jsonld-service.test.ts +282 -0
- package/src/share/tests/knowledge.test.ts +86 -0
- package/src/share/tests/ledger.test.ts +125 -0
- package/src/share/tests/llms-0789.test.ts +63 -0
- package/src/share/tests/manifest.test.ts +100 -0
- package/src/share/tests/markdown-twin-provenance.test.ts +108 -0
- package/src/share/tests/mcp-card.test.ts +57 -0
- package/src/share/tests/onboarding-yaml.test.ts +111 -0
- package/src/share/tests/ontology-role-by-cosmic-name.test.ts +28 -0
- package/src/share/tests/openapi.test.ts +116 -0
- package/src/share/tests/organization-jsonld.test.ts +74 -0
- package/src/share/tests/output-projection.test.ts +61 -0
- package/src/share/tests/plan.test.ts +97 -0
- package/src/share/tests/price-marker-resolver.test.ts +141 -0
- package/src/share/tests/proof.test.ts +72 -0
- package/src/share/tests/resolve-field-path.test.ts +52 -0
- package/src/share/tests/source.test.ts +81 -0
- package/src/share/tests/substitute-deep.test.ts +65 -0
- package/src/share/tests/text-normalize.pbt.test.ts +143 -0
- package/src/share/tests/text-normalize.test.ts +285 -0
- package/src/share/tests/twin-path.test.ts +43 -0
- package/src/share/text-normalize.ts +548 -0
- package/src/share/text-position.ts +19 -0
- package/src/share/types/hls-js-light.d.ts +16 -0
- package/src/share/visibility.ts +167 -0
- package/src/share/vitest.config.ts +8 -0
- package/src/share/wrap-inline-numbers.ts +139 -0
- package/src/surface/blueprint-schema.ts +314 -0
- package/src/surface/blueprint-types.ts +256 -0
- package/src/surface/blueprint.ts +300 -0
- package/src/surface/breaker.ts +57 -0
- package/src/surface/decision-composer.ts +156 -0
- package/src/surface/eligibility.ts +372 -0
- package/src/surface/evidence-records.ts +97 -0
- package/src/surface/fleet.ts +60 -0
- package/src/surface/geo.ts +170 -0
- package/src/surface/governance.ts +146 -0
- package/src/surface/index.ts +216 -0
- package/src/surface/io/index.ts +18 -0
- package/src/surface/io/surface-module-context-io.ts +60 -0
- package/src/surface/io/visibility-outcomes-io.ts +46 -0
- package/src/surface/module-context.ts +120 -0
- package/src/surface/substance.ts +161 -0
- package/src/surface/tests/eligibility.pbt.test.ts +137 -0
- package/src/surface/tests/eligibility.test.ts +302 -0
- package/src/surface/types.ts +289 -0
- package/src/surface/visibility.ts +57 -0
- package/src/surface/vitest.config.ts +8 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Top-level system manifest schema (RFC-0025): binds a client application to a cosmic identity, a single Biome, and optional Constellations.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Do not introduce app-specific runtime composition or deployment behavior into this reusable package source file.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-0303 Phase 3: extracted from schemas/system.ts as part of the domain split.</item>
|
|
10
|
+
<item>RFC-0377: added optional `audience` field to the per-page pin schema.</item>
|
|
11
|
+
</CHANGE_SUMMARY>
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
|
|
16
|
+
import { systemSharedContextSchema, systemGrowthSchema } from "./growth.ts";
|
|
17
|
+
import { systemReleaseSchema } from "./release.ts";
|
|
18
|
+
import { systemTextSchema } from "./text.ts";
|
|
19
|
+
import { systemIntegrationsSchema } from "./integrations.ts";
|
|
20
|
+
import { semanticPageTypeSchema, articleMetadataSchema, pageOutputSchema } from "./page-output.ts";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The per-app system.yaml manifest. Binds the client app to its cosmic identity.
|
|
24
|
+
* One file per app — stored at apps/<app-slug>/system.yaml.
|
|
25
|
+
*
|
|
26
|
+
* Constraints enforced here (structural):
|
|
27
|
+
* - identity.biome is a scalar (single biome per app — multi-biome is permanently forbidden)
|
|
28
|
+
* - constellations references are kebab-case slugs matching files in packages/werkstatt-site/src/domain/ontology/constellations/
|
|
29
|
+
*
|
|
30
|
+
* Cross-file constraints (enforced by validators, not this schema):
|
|
31
|
+
* - identity.systemStar must match a StarCatalog entry used in one page manifest
|
|
32
|
+
* - identity.biome must match an existing biome YAML id
|
|
33
|
+
* - constellations[] entries must resolve to existing constellation YAMLs
|
|
34
|
+
*/
|
|
35
|
+
export const systemManifestSchema = z.object({
|
|
36
|
+
/**
|
|
37
|
+
* Stable kebab-case slug for this app — matches the apps/<slug>/ directory name.
|
|
38
|
+
* Example: "my-app"
|
|
39
|
+
*/
|
|
40
|
+
app: z
|
|
41
|
+
.string()
|
|
42
|
+
.regex(/^[a-z][a-z0-9-]*$/, "app must be kebab-case (lowercase letters, digits, hyphens)"),
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Semantic version of this system manifest.
|
|
46
|
+
*/
|
|
47
|
+
version: z.string().regex(/^\d+\.\d+\.\d+(?:-[a-z0-9.-]+)?$/i, "version must be valid semver"),
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Cosmic identity block — assigns this app its place in the cosmic overlay.
|
|
51
|
+
*/
|
|
52
|
+
identity: z.object({
|
|
53
|
+
/**
|
|
54
|
+
* The IAU star name that identifies the "home star" of this system.
|
|
55
|
+
* Must match a StarCatalog entry that is also used as the cosmicName
|
|
56
|
+
* of at least one page manifest in this app.
|
|
57
|
+
* Validated cross-file by system.manifest.validate.
|
|
58
|
+
*/
|
|
59
|
+
systemStar: z.string().min(1),
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The single Biome applied to this app.
|
|
63
|
+
* Must match a biome id from packages/werkstatt-site/src/domain/ontology/biomes/.
|
|
64
|
+
* Multi-biome per app is permanently forbidden (DNA-23, RFC-0025).
|
|
65
|
+
* Validated cross-file by biome.contract.validate.
|
|
66
|
+
*/
|
|
67
|
+
biome: z.string().min(1),
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Human-readable tagline for this system, shown in the Cosmic Passport.
|
|
71
|
+
* Example: "Building a better future for local communities"
|
|
72
|
+
*/
|
|
73
|
+
tagline: z.string().min(1).optional(),
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Canonical FQDN for this app (without protocol or path).
|
|
77
|
+
* Mirrors client.domain from onboarding/.input/00-brief.md so that
|
|
78
|
+
* brief.validate can cross-check the brief against the running app identity.
|
|
79
|
+
*/
|
|
80
|
+
domain: z.string().min(1).optional(),
|
|
81
|
+
}),
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Internationalization configuration (RFC-0038).
|
|
85
|
+
* Declares default language and supported language map.
|
|
86
|
+
*/
|
|
87
|
+
i18n: z
|
|
88
|
+
.object({
|
|
89
|
+
default: z.string().min(1),
|
|
90
|
+
supported: z.record(z.string(), z.any()),
|
|
91
|
+
})
|
|
92
|
+
.optional(),
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Constellations (composition patterns) active in this app.
|
|
96
|
+
* Each entry is a kebab-case slug matching a file in packages/werkstatt-site/src/domain/ontology/constellations/.
|
|
97
|
+
* Validated cross-file by constellation.compose.validate.
|
|
98
|
+
* Empty array = no composition-pattern validation is performed.
|
|
99
|
+
*/
|
|
100
|
+
constellations: z
|
|
101
|
+
.array(z.string().regex(/^[a-z][a-z0-9-]*$/, "constellation slug must be kebab-case"))
|
|
102
|
+
.optional()
|
|
103
|
+
.default([]),
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Client-editable surface declarations — kebab-case keys of content sections
|
|
107
|
+
* that the client may edit without engineering involvement (DNA-22, RFC-0025).
|
|
108
|
+
* Validated by client.edit.validate at deploy time.
|
|
109
|
+
*/
|
|
110
|
+
clientEditable: z.array(z.string().min(1)).optional().default([]),
|
|
111
|
+
|
|
112
|
+
sharedContext: systemSharedContextSchema.optional(),
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Per-page composition pins (RFC-0026, RFC-0048).
|
|
116
|
+
* Each entry pins the section versions active for a given page.
|
|
117
|
+
* Validated by page.block.validate — every blocks[].use in page content must
|
|
118
|
+
* appear in the matching pageId's planets[] list.
|
|
119
|
+
*/
|
|
120
|
+
pages: z
|
|
121
|
+
.array(
|
|
122
|
+
z.object({
|
|
123
|
+
/**
|
|
124
|
+
* RFC-0048: Stable page identifier across languages (e.g., "privacyPolicy").
|
|
125
|
+
* Used as the canonical key for page lookup and route resolution.
|
|
126
|
+
*/
|
|
127
|
+
pageId: z.string().min(1),
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* RFC-0048: Language-keyed route slugs (e.g., { de: "datenschutz", en: "privacy" }).
|
|
131
|
+
* Maps each supported language to its localized URL slug.
|
|
132
|
+
*/
|
|
133
|
+
routes: z.record(z.string(), z.string()).optional(),
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* RFC-0048 (legacy): URL route path for this page (e.g. "/", "/spenden").
|
|
137
|
+
* Kept for backward compatibility during migration; use pageId + routes instead.
|
|
138
|
+
*/
|
|
139
|
+
route: z.string().min(1).optional(),
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* RFC-0097: Explicit locale opt-in. When set, the page exists only in
|
|
143
|
+
* these locales — runtime resolvers, getStaticPaths, and the
|
|
144
|
+
* language-switcher all short-circuit silently for locales outside
|
|
145
|
+
* the set. Use for pages whose existence is locale-dependent
|
|
146
|
+
* (Impressum is DE/AT/CH-only; US-specific privacy pages are en-only).
|
|
147
|
+
* Each entry must be a key of `i18n.supported`; cross-validation lives
|
|
148
|
+
* in `system.contract.validate`.
|
|
149
|
+
*/
|
|
150
|
+
locales: z.array(z.string().min(1)).optional(),
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* RFC-0042/RFC-0050: semantic role of the page. Optional — pages without
|
|
154
|
+
* a semanticType do not enter the semantic model (no JSON-LD / llms output).
|
|
155
|
+
*/
|
|
156
|
+
semanticType: semanticPageTypeSchema.optional(),
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* RFC-0377: optional audience override for this page. When absent, the twin generator
|
|
160
|
+
* falls back to the SemanticPageType derivation map (AUDIENCE_BY_PAGE_TYPE).
|
|
161
|
+
*/
|
|
162
|
+
audience: z.string().min(1).optional(),
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* RFC-0229: optional parent pageId for the breadcrumb hierarchy. When set, the page's
|
|
166
|
+
* breadcrumb trail becomes Home → …parent chain… → self instead of the flat Home → self.
|
|
167
|
+
* The referenced pageId must exist in this `pages[]` list and the chain must be acyclic —
|
|
168
|
+
* `breadcrumb.trail.validate` enforces both. Omit for top-level pages (Home → self).
|
|
169
|
+
*/
|
|
170
|
+
parentPageId: z.string().min(1).optional(),
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Standalone page: exists in the route registry for link/semantic-target
|
|
174
|
+
* resolution but is rendered by a dedicated .astro file (not [...slug].astro).
|
|
175
|
+
* Excluded from getStaticPathsForDefaultLang to avoid route conflicts.
|
|
176
|
+
*/
|
|
177
|
+
standalone: z.boolean().optional(),
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* RFC-0143: per-page output projection container (sitemap, llms, …).
|
|
181
|
+
* Closed object — only known generator keys are accepted.
|
|
182
|
+
*/
|
|
183
|
+
output: pageOutputSchema.optional(),
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* RFC-0803: per-page deployment gating. When production is false,
|
|
187
|
+
* the page is excluded from production builds (no HTML output, no
|
|
188
|
+
* sitemap entry, no navigation links, no llms.txt entry). The page
|
|
189
|
+
* remains visible in astro dev. Defaults to true.
|
|
190
|
+
*/
|
|
191
|
+
deployment: z
|
|
192
|
+
.object({
|
|
193
|
+
production: z.boolean().default(true),
|
|
194
|
+
})
|
|
195
|
+
.optional(),
|
|
196
|
+
|
|
197
|
+
/** RFC-0167: article metadata — when present, the page emits Article JSON-LD. */
|
|
198
|
+
article: articleMetadataSchema.optional(),
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The cosmicName of the page archetype from StarCatalog.
|
|
202
|
+
* Must match the cosmicName of the page's manifest.yaml.
|
|
203
|
+
*/
|
|
204
|
+
cosmicStar: z.string().min(1),
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Optional constellation slug for this page.
|
|
208
|
+
* When present, constellation.compose.validate checks that the page's
|
|
209
|
+
* planets match the constellation's required slots.
|
|
210
|
+
*/
|
|
211
|
+
constellation: z.string().optional(),
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Optional shell block configuration for this page.
|
|
215
|
+
* Controls page-level shell elements like background.
|
|
216
|
+
*/
|
|
217
|
+
shell: z
|
|
218
|
+
.object({
|
|
219
|
+
background: z
|
|
220
|
+
.object({
|
|
221
|
+
enabled: z.boolean(),
|
|
222
|
+
cosmicMoon: z.string().min(1),
|
|
223
|
+
pin: z.string().min(1),
|
|
224
|
+
props: z.record(z.string(), z.any()).optional(),
|
|
225
|
+
})
|
|
226
|
+
.optional(),
|
|
227
|
+
})
|
|
228
|
+
.optional(),
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Ordered list of planet section pins active on this page.
|
|
232
|
+
* Each cosmicPlanet must appear in PlanetCatalog and be used
|
|
233
|
+
* in the page's block-declarative content.
|
|
234
|
+
*/
|
|
235
|
+
planets: z
|
|
236
|
+
.array(
|
|
237
|
+
z.object({
|
|
238
|
+
/** PlanetCatalog name for this section archetype. */
|
|
239
|
+
cosmicPlanet: z.string().min(1),
|
|
240
|
+
/**
|
|
241
|
+
* Semver pin against packages/ui section version.
|
|
242
|
+
* "latest" is accepted at MVP for apps without strict version pins.
|
|
243
|
+
*/
|
|
244
|
+
pin: z.string().min(1),
|
|
245
|
+
}),
|
|
246
|
+
)
|
|
247
|
+
.optional()
|
|
248
|
+
.default([]),
|
|
249
|
+
}),
|
|
250
|
+
)
|
|
251
|
+
.optional()
|
|
252
|
+
.default([]),
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Growth layer binding (RFC-0027).
|
|
256
|
+
* When absent, the growth layer is inactive and <GrowthProvider> is omitted.
|
|
257
|
+
* When present, growth.vendor.adapter determines which adapter is loaded on the client.
|
|
258
|
+
*/
|
|
259
|
+
growth: systemGrowthSchema.optional(),
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Release configuration (RFC-0028).
|
|
263
|
+
* Controls Cosmic Passport, Star Map, and Pulsar heartbeat.
|
|
264
|
+
* When absent, passport page is not rendered but passport.json is still emitted.
|
|
265
|
+
*/
|
|
266
|
+
release: systemReleaseSchema.optional(),
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* RFC-0235: egress text normalization. Strips AI-authorship typographic
|
|
270
|
+
* signals from all public output at build egress. Adapter, not source rewrite.
|
|
271
|
+
* Absent ⇒ all signals on. Client-writable.
|
|
272
|
+
*/
|
|
273
|
+
text: systemTextSchema.optional(),
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* RFC-0169: subscription billing binding. `billing.stripeCustomerId` is the
|
|
277
|
+
* Stripe customer whose active Entitlements gate this site's paid modules.
|
|
278
|
+
*/
|
|
279
|
+
billing: z
|
|
280
|
+
.object({
|
|
281
|
+
stripeCustomerId: z.string().min(1).optional(),
|
|
282
|
+
// RFC-0196: offline/dogfood Programmatic Surface index budget (top-K indexable pages by
|
|
283
|
+
// substance). With Stripe, the budget is derived from the tier lookup-key (PSEO_TIER_BUDGET).
|
|
284
|
+
pseoIndexBudget: z.number().int().min(0).optional(),
|
|
285
|
+
// RFC-0240: offline/dogfood regional-hub-or-higher pseo tier unlock (unlocks d3 region hubs).
|
|
286
|
+
// With Stripe, this is derived from the active tier lookup-key (PSEO_REGIONAL_TIERS).
|
|
287
|
+
pseoRegionalUnlocked: z.boolean().optional(),
|
|
288
|
+
})
|
|
289
|
+
.optional(),
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* RFC-0169: offline entitlement override for dev/CI (deterministic, no network).
|
|
293
|
+
* When present, wins over Stripe resolution.
|
|
294
|
+
*/
|
|
295
|
+
entitlementsOverride: z.array(z.string().min(1)).optional(),
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* RFC-0193: explicit Programmatic Surface adoption. `surface.blueprints` lists the Blueprint ids
|
|
299
|
+
* (in packages/werkstatt-site/src/domain/ontology/blueprints/) this site compiles. When declared, only listed Blueprints
|
|
300
|
+
* apply (and blueprint.validate requires their datasets). When omitted, the engine falls back to
|
|
301
|
+
* implicit opt-in by datasets (a Blueprint applies if the app ships its dataset collection).
|
|
302
|
+
*/
|
|
303
|
+
surface: z.object({ blueprints: z.array(z.string().min(1)).optional() }).optional(),
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* RFC-0211..0218: Content Knowledge Lifecycle policy. `freshness.soonWindowDays`
|
|
307
|
+
* sets the expiring-soon horizon; `freshness.critical` maps subject-address globs
|
|
308
|
+
* to a criticality so the maintenance-plan gate (RFC-0216) can promote selected
|
|
309
|
+
* facts (e.g. price, legal) from advisory amber to blocking red.
|
|
310
|
+
*/
|
|
311
|
+
knowledge: z
|
|
312
|
+
.object({
|
|
313
|
+
freshness: z
|
|
314
|
+
.object({
|
|
315
|
+
soonWindowDays: z.number().int().positive().optional().default(30),
|
|
316
|
+
critical: z
|
|
317
|
+
.array(
|
|
318
|
+
z.object({
|
|
319
|
+
match: z.string().min(1),
|
|
320
|
+
criticality: z.enum(["advisory", "important", "blocking"]),
|
|
321
|
+
}),
|
|
322
|
+
)
|
|
323
|
+
.optional()
|
|
324
|
+
.default([]),
|
|
325
|
+
})
|
|
326
|
+
.optional(),
|
|
327
|
+
derivation: z
|
|
328
|
+
.object({
|
|
329
|
+
critical: z
|
|
330
|
+
.array(
|
|
331
|
+
z.object({
|
|
332
|
+
match: z.string().min(1),
|
|
333
|
+
criticality: z.enum(["advisory", "important", "blocking"]),
|
|
334
|
+
}),
|
|
335
|
+
)
|
|
336
|
+
.optional()
|
|
337
|
+
.default([]),
|
|
338
|
+
})
|
|
339
|
+
.optional(),
|
|
340
|
+
/**
|
|
341
|
+
* RFC-0216: maintenance-plan policy. Controls how the planner schedules and
|
|
342
|
+
* routes tasks: leadTimeDays (how far before validUntil a task is raised),
|
|
343
|
+
* the default owner for tasks the claim does not name, and a glob→criticality
|
|
344
|
+
* map that promotes specific subjects above their trigger's default.
|
|
345
|
+
*/
|
|
346
|
+
plan: z
|
|
347
|
+
.object({
|
|
348
|
+
leadTimeDays: z.number().int().positive().optional().default(30),
|
|
349
|
+
defaultOwner: z.string().min(1).optional(),
|
|
350
|
+
criticalityMap: z
|
|
351
|
+
.array(
|
|
352
|
+
z.object({
|
|
353
|
+
match: z.string().min(1),
|
|
354
|
+
criticality: z.enum(["advisory", "important", "blocking"]),
|
|
355
|
+
}),
|
|
356
|
+
)
|
|
357
|
+
.optional()
|
|
358
|
+
.default([]),
|
|
359
|
+
})
|
|
360
|
+
.optional(),
|
|
361
|
+
})
|
|
362
|
+
.optional(),
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* RFC-0171: content-source adapter selection (Content Source Provider port).
|
|
366
|
+
* Defaults to the filesystem adapter; CMS adapters are opt-in per app.
|
|
367
|
+
*/
|
|
368
|
+
contentSource: z
|
|
369
|
+
.object({
|
|
370
|
+
adapter: z.enum(["fs", "cms-git", "cms-api"]).default("fs"),
|
|
371
|
+
options: z.record(z.string(), z.string()).optional(),
|
|
372
|
+
})
|
|
373
|
+
.optional(),
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* RFC-0168: Integration Port configuration (outbound channels + optional CRM).
|
|
377
|
+
* When absent, channels self-enable by secret presence and the integration
|
|
378
|
+
* validators are a no-op pass.
|
|
379
|
+
*/
|
|
380
|
+
integrations: systemIntegrationsSchema.optional(),
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* RFC-0182: Deployment and infrastructure residency configuration.
|
|
384
|
+
* Declares Cloudflare Regional Services policy and allowed execution zones.
|
|
385
|
+
*/
|
|
386
|
+
deployment: z
|
|
387
|
+
.object({
|
|
388
|
+
cloudflare: z
|
|
389
|
+
.object({
|
|
390
|
+
/**
|
|
391
|
+
* Hostnames to validate for Regional Services.
|
|
392
|
+
* Defaults to [identity.domain] when empty.
|
|
393
|
+
*/
|
|
394
|
+
hostnames: z.array(z.string().min(1)).optional().default([]),
|
|
395
|
+
/**
|
|
396
|
+
* Regional Services policy — empty array means all zones acceptable.
|
|
397
|
+
*/
|
|
398
|
+
regionalServices: z
|
|
399
|
+
.object({
|
|
400
|
+
allowedZones: z
|
|
401
|
+
.array(z.enum(["eu", "us"]))
|
|
402
|
+
.optional()
|
|
403
|
+
.default([]),
|
|
404
|
+
})
|
|
405
|
+
.optional(),
|
|
406
|
+
})
|
|
407
|
+
.optional(),
|
|
408
|
+
})
|
|
409
|
+
.optional(),
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* RFC-0257: App-level output projection. Controls build-time artifact generation
|
|
413
|
+
* that applies to the whole app, not individual pages.
|
|
414
|
+
*/
|
|
415
|
+
output: z
|
|
416
|
+
.object({
|
|
417
|
+
/** Enable SSG PDF generation via Playwright during build.post. Default false. */
|
|
418
|
+
printPdf: z.boolean().optional(),
|
|
419
|
+
})
|
|
420
|
+
.optional(),
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* RFC-0286: Agent Surface policy. Absent ⇒ enabled: true — the read tier
|
|
424
|
+
* (knowledge files, discovery, OpenAPI; RFC-0287/0289) is free visibility like
|
|
425
|
+
* llms.txt. Set `enabled: false` to disable the whole agent surface for a site.
|
|
426
|
+
*/
|
|
427
|
+
agent: z
|
|
428
|
+
.object({
|
|
429
|
+
enabled: z.boolean().optional(),
|
|
430
|
+
/** RFC-0287: domains to withhold from the knowledge tier even if content exists. */
|
|
431
|
+
knowledgeDisabled: z.array(z.string().min(1)).optional(),
|
|
432
|
+
/** RFC-0288: capability ids to withhold from the action tier even if otherwise active. */
|
|
433
|
+
actionsDisabled: z.array(z.string().min(1)).optional(),
|
|
434
|
+
})
|
|
435
|
+
.strict()
|
|
436
|
+
.optional(),
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* RFC-0487: Business model declaration. Closed enum — currently only "b2b-only".
|
|
440
|
+
* When declared, b2b.model.validate checks that no B2C-specific page IDs, route
|
|
441
|
+
* slugs, navigation labels, or consumer-law prose references exist.
|
|
442
|
+
* Future RFCs may add values (b2c, marketplace) as needed.
|
|
443
|
+
*/
|
|
444
|
+
businessModel: z.enum(["b2b-only"]).optional(),
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* RFC-0487/RFC-0509: Retired page routes — declarative audit trail of removed page slugs.
|
|
448
|
+
* The _redirects generator reads this and emits HTTP 410 Gone tombstones or 301 redirects.
|
|
449
|
+
* When status is 301, `to` is required and specifies the redirect target URL path.
|
|
450
|
+
* When status is 410, `to` is forbidden (tombstone has no redirect target).
|
|
451
|
+
*/
|
|
452
|
+
retiredRoutes: z
|
|
453
|
+
.array(
|
|
454
|
+
z.union([
|
|
455
|
+
z.object({
|
|
456
|
+
slug: z.string().min(1),
|
|
457
|
+
status: z.literal(410),
|
|
458
|
+
}),
|
|
459
|
+
z.object({
|
|
460
|
+
slug: z.string().min(1),
|
|
461
|
+
status: z.literal(301),
|
|
462
|
+
to: z.string().min(1),
|
|
463
|
+
}),
|
|
464
|
+
]),
|
|
465
|
+
)
|
|
466
|
+
.optional()
|
|
467
|
+
.default([]),
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* UI-level rendering toggles. Currently controls the column order of
|
|
471
|
+
* controlled-responsibility-block sections (split-list body). When
|
|
472
|
+
* `responsibilityBlock.swapOrder` is true, the page handler swaps
|
|
473
|
+
* primaryItems/secondaryItems and labels.primary/labels.secondary at
|
|
474
|
+
* render time. Default false = render as authored in content.
|
|
475
|
+
*/
|
|
476
|
+
ui: z
|
|
477
|
+
.object({
|
|
478
|
+
responsibilityBlock: z
|
|
479
|
+
.object({
|
|
480
|
+
swapOrder: z.boolean().optional().default(false),
|
|
481
|
+
})
|
|
482
|
+
.optional(),
|
|
483
|
+
})
|
|
484
|
+
.optional(),
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
export type SystemManifest = z.infer<typeof systemManifestSchema>;
|
|
488
|
+
|
|
489
|
+
/** A single page route pin entry from system.yaml pages[]. */
|
|
490
|
+
export type SystemPagePin = NonNullable<SystemManifest["pages"]>[number];
|
|
491
|
+
/** A single planet pin within a page-route entry. */
|
|
492
|
+
export type SystemPlanetPin = NonNullable<SystemManifest["pages"][number]["planets"]>[number];
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Page output projection schema for the system manifest: controls per-page output settings like sitemap inclusion and canonical URLs.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Do not introduce app-specific runtime composition or deployment behavior into this reusable package source file.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-0303 Phase 3: extracted from schemas/system.ts as part of the domain split.</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* RFC-0042/RFC-0050: the semantic role of a page. Drives semantic model
|
|
17
|
+
* construction and the default llms inclusion depth. Mirrors
|
|
18
|
+
* SemanticPageType in @warpgogol/werkstatt-shared/share/semantic.
|
|
19
|
+
*/
|
|
20
|
+
// NOTE: This enum is mirrored by the `SemanticPageType` union in
|
|
21
|
+
// `@warpgogol/werkstatt-shared/share/src/semantic/models.ts`. The Zod schema here is the runtime
|
|
22
|
+
// validator for `system.md`; the TypeScript union in `share` is the
|
|
23
|
+
// compile-time contract. They are kept in sync manually to avoid a circular
|
|
24
|
+
// dependency between `ontology` and `share`.
|
|
25
|
+
export const semanticPageTypeSchema = z.enum([
|
|
26
|
+
"home",
|
|
27
|
+
"about",
|
|
28
|
+
"projects",
|
|
29
|
+
"donationContact",
|
|
30
|
+
"openSource",
|
|
31
|
+
"content",
|
|
32
|
+
"article",
|
|
33
|
+
"person",
|
|
34
|
+
"participant",
|
|
35
|
+
"legal",
|
|
36
|
+
"collection",
|
|
37
|
+
]);
|
|
38
|
+
|
|
39
|
+
/** RFC-0167: per-page article metadata (Article/BlogPosting JSON-LD + dates + author). */
|
|
40
|
+
export const articleMetadataSchema = z
|
|
41
|
+
.object({
|
|
42
|
+
publishedAt: z.string().min(1),
|
|
43
|
+
updatedAt: z.string().min(1).optional(),
|
|
44
|
+
author: z.string().min(1).optional(),
|
|
45
|
+
tags: z.array(z.string().min(1)).optional(),
|
|
46
|
+
})
|
|
47
|
+
.strict();
|
|
48
|
+
|
|
49
|
+
/** RFC-0142: per-page llms inclusion depth value (string shorthand or object). */
|
|
50
|
+
const llmsDepthSchema = z.enum(["full", "summary", "index-only", "exclude"]);
|
|
51
|
+
export const llmsPolicySchema = z.union([
|
|
52
|
+
llmsDepthSchema,
|
|
53
|
+
z
|
|
54
|
+
.object({
|
|
55
|
+
depth: llmsDepthSchema.optional(),
|
|
56
|
+
sections: z.object({ exclude: z.array(z.string()).optional() }).optional(),
|
|
57
|
+
})
|
|
58
|
+
.strict(),
|
|
59
|
+
]);
|
|
60
|
+
|
|
61
|
+
/** RFC-0143: per-page sitemap projection value (boolean shorthand or object). */
|
|
62
|
+
export const sitemapProjectionSchema = z.union([
|
|
63
|
+
z.boolean(),
|
|
64
|
+
z
|
|
65
|
+
.object({
|
|
66
|
+
include: z.boolean().optional(),
|
|
67
|
+
category: z.string().min(1).optional(),
|
|
68
|
+
lastmod: z.string().min(1).optional(),
|
|
69
|
+
includeLastmod: z.boolean().optional(),
|
|
70
|
+
})
|
|
71
|
+
.strict(),
|
|
72
|
+
]);
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* RFC-0143: the per-page `output` block — a CLOSED container of per-page
|
|
76
|
+
* projection generators. Each known generator owns exactly one key; unknown
|
|
77
|
+
* keys are a validation error. A new per-page generator extends this schema
|
|
78
|
+
* in the same change that adds the generator.
|
|
79
|
+
*/
|
|
80
|
+
/** RFC-0165: per-page robots/indexability (boolean shorthand or object). */
|
|
81
|
+
export const robotsProjectionSchema = z.union([
|
|
82
|
+
z.boolean(),
|
|
83
|
+
z
|
|
84
|
+
.object({
|
|
85
|
+
index: z.boolean().optional(),
|
|
86
|
+
follow: z.boolean().optional(),
|
|
87
|
+
})
|
|
88
|
+
.strict(),
|
|
89
|
+
]);
|
|
90
|
+
|
|
91
|
+
export const pageOutputSchema = z
|
|
92
|
+
.object({
|
|
93
|
+
sitemap: sitemapProjectionSchema.optional(),
|
|
94
|
+
llms: llmsPolicySchema.optional(),
|
|
95
|
+
robots: robotsProjectionSchema.optional(),
|
|
96
|
+
/** RFC-0257: enable SSG PDF generation for this app. Default false. */
|
|
97
|
+
printPdf: z.boolean().optional(),
|
|
98
|
+
})
|
|
99
|
+
.strict();
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Release schema for the system manifest: versioning and release channel configuration.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Do not introduce app-specific runtime composition or deployment behavior into this reusable package source file.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-0303 Phase 3: extracted from schemas/system.ts as part of the domain split.</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The `release.passport` sub-tree in system.yaml.
|
|
17
|
+
* Controls Cosmic Passport rendering and signing key management.
|
|
18
|
+
*
|
|
19
|
+
* Client-writable: enabled, indexable
|
|
20
|
+
* Engineering-only: keyVersion, heartbeatUrl
|
|
21
|
+
*
|
|
22
|
+
* Enforced by client.edit.validate: partial-YAML rules.
|
|
23
|
+
*/
|
|
24
|
+
export const systemPassportSchema = z.object({
|
|
25
|
+
/**
|
|
26
|
+
* When true, /cosmic/passport page is rendered at build time.
|
|
27
|
+
* The passport JSON is always emitted regardless of this toggle.
|
|
28
|
+
* CLIENT-WRITABLE.
|
|
29
|
+
*/
|
|
30
|
+
enabled: z.boolean().optional().default(true),
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* When true (default), /cosmic/passport is indexable by search engines.
|
|
34
|
+
* Set to false for stealth/pre-launch deployments.
|
|
35
|
+
* CLIENT-WRITABLE.
|
|
36
|
+
*/
|
|
37
|
+
indexable: z.boolean().optional().default(true),
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Active signing key version (e.g. "v1", "v2").
|
|
41
|
+
* Updated by passport.key.rotate. ENGINEERING-ONLY.
|
|
42
|
+
*/
|
|
43
|
+
keyVersion: z.string().min(1).optional().default("v1"),
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Optional Healthchecks.io-style URL to ping on every build.
|
|
47
|
+
* pulsar.heartbeat fires a GET to this URL; never fails the build.
|
|
48
|
+
* ENGINEERING-ONLY.
|
|
49
|
+
*/
|
|
50
|
+
heartbeatUrl: z.url().optional(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const systemReleaseSchema = z.object({
|
|
54
|
+
passport: systemPassportSchema.optional(),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export type SystemPassport = z.infer<typeof systemPassportSchema>;
|
|
58
|
+
export type SystemRelease = z.infer<typeof systemReleaseSchema>;
|