@tryvitris/website-harness 0.0.0-stage → 0.1.0-beta.6
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/CONTRIBUTING.md +7 -0
- package/LICENSE +21 -0
- package/NOTICE +17 -0
- package/README.md +141 -2
- package/agent/EVALUATION.md +23 -0
- package/agent/PROMPT.md +13 -0
- package/agent/STATE.json +109 -0
- package/agent/WORKFLOW.md +108 -0
- package/agent/evals/preview.md +5 -0
- package/agent/graph.yaml +752 -0
- package/agent/guardrails.md +10 -0
- package/agent/refs/accessibility.md +9 -0
- package/agent/refs/art-direction.md +15 -0
- package/agent/refs/brand.md +3 -0
- package/agent/refs/browser.md +15 -0
- package/agent/refs/business.md +9 -0
- package/agent/refs/components.md +42 -0
- package/agent/refs/compose.md +10 -0
- package/agent/refs/contracts.md +32 -0
- package/agent/refs/copy.md +14 -0
- package/agent/refs/counterpoint.md +3 -0
- package/agent/refs/critic.md +29 -0
- package/agent/refs/design-calibration.md +31 -0
- package/agent/refs/design-feedback.md +13 -0
- package/agent/refs/design-quality.md +33 -0
- package/agent/refs/design-synthesis.md +9 -0
- package/agent/refs/direction.md +29 -0
- package/agent/refs/feedback-fulfillment.md +7 -0
- package/agent/refs/geo.md +7 -0
- package/agent/refs/harvest.md +7 -0
- package/agent/refs/icons.md +102 -0
- package/agent/refs/images.md +3 -0
- package/agent/refs/implement.md +24 -0
- package/agent/refs/industry-reference-shortlist.md +64 -0
- package/agent/refs/inspiration.md +17 -0
- package/agent/refs/interpret.md +3 -0
- package/agent/refs/jev.md +166 -0
- package/agent/refs/launch.md +11 -0
- package/agent/refs/layout.md +7 -0
- package/agent/refs/media.md +35 -0
- package/agent/refs/motif.md +3 -0
- package/agent/refs/motion-count.md +13 -0
- package/agent/refs/motion-image.md +12 -0
- package/agent/refs/motion-numeric.md +14 -0
- package/agent/refs/motion-page.md +23 -0
- package/agent/refs/motion-process.md +12 -0
- package/agent/refs/motion-sequence.md +7 -0
- package/agent/refs/motion-text.md +12 -0
- package/agent/refs/motion.md +11 -0
- package/agent/refs/narrative.md +9 -0
- package/agent/refs/performance.md +36 -0
- package/agent/refs/preview.md +3 -0
- package/agent/refs/production-quality.md +33 -0
- package/agent/refs/psychology.md +3 -0
- package/agent/refs/refine.md +14 -0
- package/agent/refs/research.md +7 -0
- package/agent/refs/sections.md +6 -0
- package/agent/refs/seo.md +9 -0
- package/agent/refs/storyboard.md +27 -0
- package/agent/refs/template-adaptation.md +42 -0
- package/agent/refs/template-from-url.md +91 -0
- package/agent/refs/template-library.md +32 -0
- package/agent/refs/template-motion.md +44 -0
- package/agent/refs/theme-selection.md +13 -0
- package/agent/refs/ui-ux.md +7 -0
- package/agent/refs/usability.md +5 -0
- package/agent/refs/variant-directions.md +20 -0
- package/agent/refs/write.md +6 -0
- package/agent/request.json +11 -0
- package/agent/workflow.json +4 -0
- package/bin/api/agent/artifacts.js +38 -0
- package/bin/api/agent/evaluate.js +55 -0
- package/bin/api/agent/grade.js +51 -0
- package/bin/api/agent/graph.js +16 -0
- package/bin/api/cli/api.js +104 -0
- package/bin/api/cli.js +48 -0
- package/bin/api/contracts.js +22 -0
- package/bin/api/engine.js +53 -0
- package/bin/api/hosting.js +40 -0
- package/bin/api/icons.js +57 -0
- package/bin/api/index.js +20 -0
- package/bin/api/references.js +45 -0
- package/bin/api/render.js +61 -0
- package/bin/api/schema.js +68 -0
- package/bin/api/theme.js +9 -0
- package/bin/api/types.js +8 -0
- package/bin/chunks/chunk-2NW7KSPA.js +17 -0
- package/bin/chunks/chunk-34H54KEY.js +45 -0
- package/bin/chunks/chunk-3CTBXY5K.js +22313 -0
- package/bin/chunks/chunk-42IXFXUD.js +1141 -0
- package/bin/chunks/chunk-4DM5TTLG.js +219 -0
- package/bin/chunks/chunk-4GZCAWWK.js +327 -0
- package/bin/chunks/chunk-54JC5L35.js +493 -0
- package/bin/chunks/chunk-5OOPJNGN.js +511 -0
- package/bin/chunks/chunk-6A3VWYMF.js +28 -0
- package/bin/chunks/chunk-6H3T46F5.js +25 -0
- package/bin/chunks/chunk-7FS67SRF.js +12 -0
- package/bin/chunks/chunk-7VLBEAFW.js +56 -0
- package/bin/chunks/chunk-ANMJRJQ5.js +31 -0
- package/bin/chunks/chunk-AUO5I56E.js +118774 -0
- package/bin/chunks/chunk-B5I45LFD.js +619 -0
- package/bin/chunks/chunk-BBV7PMFC.js +185 -0
- package/bin/chunks/chunk-BIEDSEL2.js +8 -0
- package/bin/chunks/chunk-CBEJZO4L.js +67 -0
- package/bin/chunks/chunk-DRJQ4OOU.js +514 -0
- package/bin/chunks/chunk-DSS2U2OM.js +115 -0
- package/bin/chunks/chunk-E5Y46VBX.js +678 -0
- package/bin/chunks/chunk-FOXUQXTV.js +278 -0
- package/bin/chunks/chunk-FYN4T4SV.js +4900 -0
- package/bin/chunks/chunk-G7MNMULR.js +192 -0
- package/bin/chunks/chunk-GVNIL34R.js +78 -0
- package/bin/chunks/chunk-GZDLXYZV.js +3425 -0
- package/bin/chunks/chunk-HNORQ74T.js +40 -0
- package/bin/chunks/chunk-IKNMBGGD.js +217 -0
- package/bin/chunks/chunk-JCRGE6AL.js +14 -0
- package/bin/chunks/chunk-LKN75JGA.js +63 -0
- package/bin/chunks/chunk-M2ETYSVJ.js +176 -0
- package/bin/chunks/chunk-M4LNHYYR.js +177 -0
- package/bin/chunks/chunk-PRLL7B63.js +113 -0
- package/bin/chunks/chunk-R7YELY3C.js +923 -0
- package/bin/chunks/chunk-T6PE4KN4.js +277 -0
- package/bin/chunks/chunk-T7DGRVTP.js +458 -0
- package/bin/chunks/chunk-TY33XMHW.js +239 -0
- package/bin/chunks/chunk-VH7PM7KJ.js +179 -0
- package/bin/chunks/chunk-WEFDVXFX.js +65 -0
- package/bin/chunks/chunk-XGTHGWPW.js +90 -0
- package/bin/chunks/chunk-XL2DRAYI.js +39 -0
- package/bin/chunks/chunk-YCVGD2CG.js +2751 -0
- package/bin/chunks/chunk-YQYHROLZ.js +1023 -0
- package/bin/chunks/chunk-YYPYYOEV.js +34 -0
- package/bin/chunks/chunk-Z2UNY47A.js +2418 -0
- package/bin/chunks/design-context-store-IAT2P2OC.js +39 -0
- package/bin/chunks/packets-VBMY4SQJ.js +53 -0
- package/bin/chunks/policy-2I37JUU3.js +18 -0
- package/bin/chunks/preparation-S4MG3RPL.js +93 -0
- package/bin/chunks/questions-HKELBDFL.js +120 -0
- package/bin/chunks/state-GDL6CCJI.js +20 -0
- package/bin/chunks/template-gallery-ET76ERZQ.js +140 -0
- package/bin/cloudflare/backend.js +24421 -0
- package/bin/cloudflare/blake3.wasm +0 -0
- package/bin/cloudflare/forms-test.js +429 -0
- package/bin/cloudflare/templates.js +100 -0
- package/bin/types/scripts/lib/r2.d.ts +7 -0
- package/bin/types/scripts/onboard/browser.d.ts +9 -0
- package/bin/types/scripts/onboard/crawl.d.ts +35 -0
- package/bin/types/scripts/onboard/images.d.ts +19 -0
- package/bin/types/scripts/onboard/prompt.d.ts +10 -0
- package/bin/types/scripts/onboard/run.d.ts +47 -0
- package/bin/types/src/agent/adaptation-checkpoint.d.ts +70 -0
- package/bin/types/src/agent/added-media.d.ts +31 -0
- package/bin/types/src/agent/api-contracts.d.ts +2 -0
- package/bin/types/src/agent/art-direction-policy.d.ts +9 -0
- package/bin/types/src/agent/art-direction.d.ts +253 -0
- package/bin/types/src/agent/artifacts.d.ts +602 -0
- package/bin/types/src/agent/browser-motion-journey.d.ts +59 -0
- package/bin/types/src/agent/browser-motion.d.ts +40 -0
- package/bin/types/src/agent/browser-timeout.d.ts +4 -0
- package/bin/types/src/agent/composition-authoring.d.ts +12 -0
- package/bin/types/src/agent/composition-context.d.ts +63 -0
- package/bin/types/src/agent/composition-contract.d.ts +4 -0
- package/bin/types/src/agent/composition-decisions.d.ts +43 -0
- package/bin/types/src/agent/composition-preflight.d.ts +16 -0
- package/bin/types/src/agent/creative-change-context.d.ts +21 -0
- package/bin/types/src/agent/creative-context.d.ts +56 -0
- package/bin/types/src/agent/creative-contract.d.ts +123 -0
- package/bin/types/src/agent/creative-efficiency.d.ts +18 -0
- package/bin/types/src/agent/creative-evidence.d.ts +57 -0
- package/bin/types/src/agent/creative-objective.d.ts +33 -0
- package/bin/types/src/agent/creative-profile.d.ts +81 -0
- package/bin/types/src/agent/creative-prompts.d.ts +7 -0
- package/bin/types/src/agent/creative-render-bindings.d.ts +13 -0
- package/bin/types/src/agent/creative-revision.d.ts +33 -0
- package/bin/types/src/agent/creative-skills.d.ts +25 -0
- package/bin/types/src/agent/cursor-hook.d.ts +182 -0
- package/bin/types/src/agent/design-bundle.d.ts +24 -0
- package/bin/types/src/agent/design-calibration.d.ts +43 -0
- package/bin/types/src/agent/design-cli.d.ts +5 -0
- package/bin/types/src/agent/design-comparison.d.ts +63 -0
- package/bin/types/src/agent/design-context-packet.d.ts +82 -0
- package/bin/types/src/agent/design-context-store.d.ts +14 -0
- package/bin/types/src/agent/design-context.d.ts +85 -0
- package/bin/types/src/agent/design-contracts.d.ts +35 -0
- package/bin/types/src/agent/design-copy.d.ts +29 -0
- package/bin/types/src/agent/design-feedback.d.ts +91 -0
- package/bin/types/src/agent/design-knowledge.d.ts +124 -0
- package/bin/types/src/agent/design-quality.d.ts +143 -0
- package/bin/types/src/agent/design-review-server.d.ts +13 -0
- package/bin/types/src/agent/design-run.d.ts +174 -0
- package/bin/types/src/agent/design-synthesis.d.ts +76 -0
- package/bin/types/src/agent/design-usage.d.ts +38 -0
- package/bin/types/src/agent/editorial.d.ts +11 -0
- package/bin/types/src/agent/evaluate.d.ts +28 -0
- package/bin/types/src/agent/grade.d.ts +16 -0
- package/bin/types/src/agent/graph.d.ts +82 -0
- package/bin/types/src/agent/industry/document.d.ts +10 -0
- package/bin/types/src/agent/industry/interactions.d.ts +2 -0
- package/bin/types/src/agent/industry/markup.d.ts +14 -0
- package/bin/types/src/agent/industry/registry.d.ts +2 -0
- package/bin/types/src/agent/industry/render-style.d.ts +3 -0
- package/bin/types/src/agent/industry/ridgeline/browse.d.ts +2 -0
- package/bin/types/src/agent/industry/ridgeline/diagrams.d.ts +9 -0
- package/bin/types/src/agent/industry/ridgeline/facts.d.ts +61 -0
- package/bin/types/src/agent/industry/ridgeline/pages/company.d.ts +5 -0
- package/bin/types/src/agent/industry/ridgeline/pages/home.d.ts +1 -0
- package/bin/types/src/agent/industry/ridgeline/pages/journal.d.ts +24 -0
- package/bin/types/src/agent/industry/ridgeline/pages/services.d.ts +6 -0
- package/bin/types/src/agent/industry/ridgeline/photo.d.ts +18 -0
- package/bin/types/src/agent/industry/ridgeline/script.d.ts +1 -0
- package/bin/types/src/agent/industry/ridgeline/site.d.ts +2 -0
- package/bin/types/src/agent/industry/ridgeline/style.d.ts +1 -0
- package/bin/types/src/agent/industry/ridgeline/theme.d.ts +4 -0
- package/bin/types/src/agent/industry/seven/barber-club.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/barber-corner.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/barber-form.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/browse.d.ts +4 -0
- package/bin/types/src/agent/industry/seven/construction-built.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/construction-craft.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/construction-siteworks.d.ts +3 -0
- package/bin/types/src/agent/industry/seven/electrical-circuit.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/electrical-light.d.ts +3 -0
- package/bin/types/src/agent/industry/seven/electrical-power.d.ts +3 -0
- package/bin/types/src/agent/industry/seven/hvac-climate.d.ts +3 -0
- package/bin/types/src/agent/industry/seven/hvac-dispatch.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/hvac-seasonal.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/interactions.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/landscape-atlas.d.ts +4 -0
- package/bin/types/src/agent/industry/seven/landscape-courtyard.d.ts +3 -0
- package/bin/types/src/agent/industry/seven/landscape-seasons.d.ts +3 -0
- package/bin/types/src/agent/industry/seven/legal-casework.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/legal-counsel.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/legal-table.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/medical-continuum.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/medical-movement.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/medical-neighborhood.d.ts +2 -0
- package/bin/types/src/agent/industry/seven/primitives.d.ts +31 -0
- package/bin/types/src/agent/industry/seven/registry.d.ts +4 -0
- package/bin/types/src/agent/industry/seven/theme.d.ts +3 -0
- package/bin/types/src/agent/industry/sites/common-ground.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/coordination.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/everyday.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/independent.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/mainstage.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/neighborhood.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/next-chapter.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/practice-notes.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/property-desk.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/residence.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/risk-office.d.ts +2 -0
- package/bin/types/src/agent/industry/sites/workshop.d.ts +2 -0
- package/bin/types/src/agent/industry/types.d.ts +48 -0
- package/bin/types/src/agent/invocation-budget.d.ts +32 -0
- package/bin/types/src/agent/jev/agent-usage.d.ts +165 -0
- package/bin/types/src/agent/jev/batching.d.ts +101 -0
- package/bin/types/src/agent/jev/block-catalog.d.ts +95 -0
- package/bin/types/src/agent/jev/bounds.d.ts +30 -0
- package/bin/types/src/agent/jev/budget.d.ts +76 -0
- package/bin/types/src/agent/jev/business-draft.d.ts +103 -0
- package/bin/types/src/agent/jev/calibration.d.ts +131 -0
- package/bin/types/src/agent/jev/client.d.ts +52 -0
- package/bin/types/src/agent/jev/component-select.d.ts +102 -0
- package/bin/types/src/agent/jev/config.d.ts +52 -0
- package/bin/types/src/agent/jev/consistency.d.ts +105 -0
- package/bin/types/src/agent/jev/content-checks.d.ts +121 -0
- package/bin/types/src/agent/jev/creative.d.ts +81 -0
- package/bin/types/src/agent/jev/critic-report.d.ts +132 -0
- package/bin/types/src/agent/jev/extraction.d.ts +84 -0
- package/bin/types/src/agent/jev/goals.d.ts +43 -0
- package/bin/types/src/agent/jev/html-tree.d.ts +28 -0
- package/bin/types/src/agent/jev/indexing.d.ts +51 -0
- package/bin/types/src/agent/jev/ledger.d.ts +154 -0
- package/bin/types/src/agent/jev/media.d.ts +62 -0
- package/bin/types/src/agent/jev/observations.d.ts +26 -0
- package/bin/types/src/agent/jev/ownership.d.ts +74 -0
- package/bin/types/src/agent/jev/packets.d.ts +124 -0
- package/bin/types/src/agent/jev/policy.d.ts +83 -0
- package/bin/types/src/agent/jev/questions.d.ts +244 -0
- package/bin/types/src/agent/jev/ranking.d.ts +129 -0
- package/bin/types/src/agent/jev/repair.d.ts +73 -0
- package/bin/types/src/agent/jev/review.d.ts +37 -0
- package/bin/types/src/agent/jev/security.d.ts +28 -0
- package/bin/types/src/agent/jev/semantic-lifecycle.d.ts +19 -0
- package/bin/types/src/agent/jev/semantic-tasks.d.ts +89 -0
- package/bin/types/src/agent/jev/service-registry.d.ts +98 -0
- package/bin/types/src/agent/jev/state.d.ts +104 -0
- package/bin/types/src/agent/jev/types.d.ts +190 -0
- package/bin/types/src/agent/jev/visible-assertions.d.ts +84 -0
- package/bin/types/src/agent/kernel-commands.d.ts +2 -0
- package/bin/types/src/agent/kit-runtime.d.ts +12 -0
- package/bin/types/src/agent/legacy-definitions/theme-art.d.ts +5 -0
- package/bin/types/src/agent/legacy-definitions/theme-commissions.d.ts +1 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-extremes.d.ts +7 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-graphic.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-reading.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-service-extremes.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-service-people.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-service-programme.d.ts +3 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-service-project.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-service-season.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions-tactile.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-compositions.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-legacy-specimens.d.ts +8 -0
- package/bin/types/src/agent/legacy-definitions/theme-library-legacy.d.ts +20 -0
- package/bin/types/src/agent/legacy-definitions/theme-library-release2.d.ts +3 -0
- package/bin/types/src/agent/legacy-definitions/theme-service-art.d.ts +7 -0
- package/bin/types/src/agent/legacy-definitions/theme-service-commissions.d.ts +1 -0
- package/bin/types/src/agent/legacy-definitions/theme-specimen-base.d.ts +1 -0
- package/bin/types/src/agent/legacy-definitions/theme-specimens.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-suite-data.d.ts +25 -0
- package/bin/types/src/agent/legacy-definitions/theme-suite-style.d.ts +1 -0
- package/bin/types/src/agent/legacy-definitions/theme-suites-checkpoint.d.ts +14 -0
- package/bin/types/src/agent/legacy-definitions/theme-suites-graphic.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-suites-information.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-suites-local.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-suites-material.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-suites-practice.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-suites-spatial.d.ts +2 -0
- package/bin/types/src/agent/legacy-definitions/theme-suites.d.ts +3 -0
- package/bin/types/src/agent/lifecycle.d.ts +136 -0
- package/bin/types/src/agent/lighthouse-browser.d.ts +5 -0
- package/bin/types/src/agent/media-format.d.ts +5 -0
- package/bin/types/src/agent/migration-links.d.ts +4 -0
- package/bin/types/src/agent/motion-composition.d.ts +22 -0
- package/bin/types/src/agent/motion-knowledge.d.ts +3 -0
- package/bin/types/src/agent/motion-plan.d.ts +6 -0
- package/bin/types/src/agent/performance.d.ts +52 -0
- package/bin/types/src/agent/playwright-runtime.d.ts +8 -0
- package/bin/types/src/agent/preparation.d.ts +193 -0
- package/bin/types/src/agent/preview.d.ts +1 -0
- package/bin/types/src/agent/production-quality.d.ts +72 -0
- package/bin/types/src/agent/reference-contract.d.ts +3 -0
- package/bin/types/src/agent/reference-fit.d.ts +50 -0
- package/bin/types/src/agent/reference-library.d.ts +313 -0
- package/bin/types/src/agent/reference-studies.d.ts +110 -0
- package/bin/types/src/agent/refine.d.ts +348 -0
- package/bin/types/src/agent/result-manifest.d.ts +38 -0
- package/bin/types/src/agent/runner.d.ts +10 -0
- package/bin/types/src/agent/site-inputs.d.ts +26 -0
- package/bin/types/src/agent/source-manifest.d.ts +9 -0
- package/bin/types/src/agent/state-transition.d.ts +16 -0
- package/bin/types/src/agent/storyboard-media.d.ts +11 -0
- package/bin/types/src/agent/study-render.d.ts +27 -0
- package/bin/types/src/agent/template-adaptation.d.ts +69 -0
- package/bin/types/src/agent/template-motion.d.ts +59 -0
- package/bin/types/src/agent/theme-art-direction.d.ts +2 -0
- package/bin/types/src/agent/theme-art.d.ts +1 -0
- package/bin/types/src/agent/theme-assets.d.ts +36 -0
- package/bin/types/src/agent/theme-browse.d.ts +67 -0
- package/bin/types/src/agent/theme-cloud-resources.d.ts +7 -0
- package/bin/types/src/agent/theme-cloud.d.ts +41 -0
- package/bin/types/src/agent/theme-commissions.d.ts +1 -0
- package/bin/types/src/agent/theme-compositions-extremes.d.ts +1 -0
- package/bin/types/src/agent/theme-compositions.d.ts +1 -0
- package/bin/types/src/agent/theme-identity.d.ts +23 -0
- package/bin/types/src/agent/theme-layout-roles.d.ts +7 -0
- package/bin/types/src/agent/theme-legacy-specimens.d.ts +1 -0
- package/bin/types/src/agent/theme-library-legacy.d.ts +1 -0
- package/bin/types/src/agent/theme-library-release2.d.ts +1 -0
- package/bin/types/src/agent/theme-library.d.ts +60 -0
- package/bin/types/src/agent/theme-page-manifest.d.ts +26 -0
- package/bin/types/src/agent/theme-picker-model.d.ts +51 -0
- package/bin/types/src/agent/theme-picker-runtime.d.ts +1 -0
- package/bin/types/src/agent/theme-picker-selection-runtime.d.ts +1 -0
- package/bin/types/src/agent/theme-picker-shell.d.ts +7 -0
- package/bin/types/src/agent/theme-picker-styles.d.ts +1 -0
- package/bin/types/src/agent/theme-picker.d.ts +20 -0
- package/bin/types/src/agent/theme-preview.d.ts +26 -0
- package/bin/types/src/agent/theme-release2/assets.d.ts +22 -0
- package/bin/types/src/agent/theme-release2/specimens.d.ts +2 -0
- package/bin/types/src/agent/theme-release2/theme-art.d.ts +5 -0
- package/bin/types/src/agent/theme-release2/theme-compositions-extremes.d.ts +7 -0
- package/bin/types/src/agent/theme-release2/theme-compositions-graphic.d.ts +2 -0
- package/bin/types/src/agent/theme-release2/theme-compositions-reading.d.ts +2 -0
- package/bin/types/src/agent/theme-release2/theme-compositions-tactile.d.ts +2 -0
- package/bin/types/src/agent/theme-release2/theme-compositions.d.ts +3 -0
- package/bin/types/src/agent/theme-release2/theme-specimen-base.d.ts +1 -0
- package/bin/types/src/agent/theme-release3/theme-art-direction.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-art.d.ts +5 -0
- package/bin/types/src/agent/theme-release3/theme-assets.d.ts +121 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-extremes.d.ts +7 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-graphic.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-reading.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-service-extremes.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-service-people.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-service-programme.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-service-project.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-service-season.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-compositions-tactile.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-compositions.d.ts +2 -0
- package/bin/types/src/agent/theme-release3/theme-identity.d.ts +23 -0
- package/bin/types/src/agent/theme-release3/theme-library.d.ts +4 -0
- package/bin/types/src/agent/theme-release3/theme-service-art.d.ts +7 -0
- package/bin/types/src/agent/theme-release3/theme-specimen-base.d.ts +1 -0
- package/bin/types/src/agent/theme-release3/theme-specimens.d.ts +2 -0
- package/bin/types/src/agent/theme-selection.d.ts +75 -0
- package/bin/types/src/agent/theme-service-art.d.ts +1 -0
- package/bin/types/src/agent/theme-specimen-base.d.ts +1 -0
- package/bin/types/src/agent/theme-specimens.d.ts +1 -0
- package/bin/types/src/agent/theme-suite-data.d.ts +1 -0
- package/bin/types/src/agent/theme-suite-identity.d.ts +42 -0
- package/bin/types/src/agent/theme-suite-primitives.d.ts +14 -0
- package/bin/types/src/agent/theme-suite-renderer.d.ts +8 -0
- package/bin/types/src/agent/theme-suite-style.d.ts +1 -0
- package/bin/types/src/agent/theme-suites.d.ts +1 -0
- package/bin/types/src/agent/theme-thumbnails.d.ts +8 -0
- package/bin/types/src/agent/trace.d.ts +337 -0
- package/bin/types/src/agent/workflow-config.d.ts +25 -0
- package/bin/types/src/agent/workflow.d.ts +104 -0
- package/bin/types/src/blocks/library-profile.d.ts +9 -0
- package/bin/types/src/blocks/metadata.d.ts +65 -0
- package/bin/types/src/build/index.d.ts +29 -0
- package/bin/types/src/build/responsive-media.d.ts +19 -0
- package/bin/types/src/build/serve.d.ts +4 -0
- package/bin/types/src/build/static-output.d.ts +2 -0
- package/bin/types/src/build/verified.d.ts +1 -0
- package/bin/types/src/cli/api.d.ts +17 -0
- package/bin/types/src/cli/deploy.d.ts +21 -0
- package/bin/types/src/cli/doctor.d.ts +16 -0
- package/bin/types/src/cli/events.d.ts +16 -0
- package/bin/types/src/cli/feedback.d.ts +21 -0
- package/bin/types/src/cli/forms.d.ts +16 -0
- package/bin/types/src/cli/index.d.ts +1 -0
- package/bin/types/src/cli/lifecycle.d.ts +18 -0
- package/bin/types/src/cli/preserve.d.ts +8 -0
- package/bin/types/src/cli/preview.d.ts +14 -0
- package/bin/types/src/cli/refine.d.ts +41 -0
- package/bin/types/src/cli/root.d.ts +3 -0
- package/bin/types/src/cli/run.d.ts +30 -0
- package/bin/types/src/cli/share.d.ts +17 -0
- package/bin/types/src/cli/site-create.d.ts +24 -0
- package/bin/types/src/cli/site-migrate.d.ts +11 -0
- package/bin/types/src/cli/status.d.ts +8 -0
- package/bin/types/src/cli/types.d.ts +34 -0
- package/bin/types/src/cli/upgrade.d.ts +11 -0
- package/bin/types/src/cli/verify.d.ts +17 -0
- package/bin/types/src/cli/workflow-argv.d.ts +2 -0
- package/bin/types/src/compile/flatten.d.ts +23 -0
- package/bin/types/src/compile/frontmatter.d.ts +10 -0
- package/bin/types/src/compile/icons.d.ts +2 -0
- package/bin/types/src/compile/paths.d.ts +4 -0
- package/bin/types/src/compile/primitives.d.ts +2 -0
- package/bin/types/src/compile/scroll-motion.d.ts +14 -0
- package/bin/types/src/compile/site.d.ts +40 -0
- package/bin/types/src/editing/identity.d.ts +7 -0
- package/bin/types/src/editing/manifest.d.ts +38 -0
- package/bin/types/src/engine/checks.d.ts +2 -0
- package/bin/types/src/engine/contracts.d.ts +104 -0
- package/bin/types/src/engine/impact.d.ts +3 -0
- package/bin/types/src/engine/index.d.ts +70 -0
- package/bin/types/src/engine/revision.d.ts +5 -0
- package/bin/types/src/forms/cloudflare.d.ts +24 -0
- package/bin/types/src/forms/config.d.ts +34 -0
- package/bin/types/src/forms/frontend.d.ts +9 -0
- package/bin/types/src/html.d.ts +3 -0
- package/bin/types/src/icons/catalog.d.ts +28 -0
- package/bin/types/src/icons/coverage.d.ts +12 -0
- package/bin/types/src/icons/drawing.d.ts +7 -0
- package/bin/types/src/icons/duotone.d.ts +4 -0
- package/bin/types/src/icons/index.d.ts +37 -0
- package/bin/types/src/icons/industry-refinements-v4.d.ts +4 -0
- package/bin/types/src/icons/industry-review.d.ts +11 -0
- package/bin/types/src/icons/industry.d.ts +2 -0
- package/bin/types/src/icons/refinements.d.ts +5 -0
- package/bin/types/src/icons/studio-industry-review.d.ts +9 -0
- package/bin/types/src/icons/studio-industry.d.ts +5 -0
- package/bin/types/src/icons/studio.d.ts +34 -0
- package/bin/types/src/integrations/cloudflare-pages.d.ts +10 -0
- package/bin/types/src/integrations/deployment-smoke.d.ts +11 -0
- package/bin/types/src/integrations/hosting.d.ts +33 -0
- package/bin/types/src/integrations/wrangler-command.d.ts +5 -0
- package/bin/types/src/knowledge/artifact-order.d.ts +1 -0
- package/bin/types/src/knowledge/artifact.d.ts +11 -0
- package/bin/types/src/knowledge/composition.d.ts +54 -0
- package/bin/types/src/knowledge/contracts.d.ts +111 -0
- package/bin/types/src/knowledge/explain.d.ts +6 -0
- package/bin/types/src/knowledge/pack.d.ts +32 -0
- package/bin/types/src/knowledge/selection.d.ts +18 -0
- package/bin/types/src/knowledge/site-widgets.d.ts +6 -0
- package/bin/types/src/onboard/brief.d.ts +182 -0
- package/bin/types/src/onboard/classify.d.ts +31 -0
- package/bin/types/src/onboard/crawl-order.d.ts +7 -0
- package/bin/types/src/onboard/extract.d.ts +102 -0
- package/bin/types/src/onboard/harvest-inventory.d.ts +84 -0
- package/bin/types/src/onboard/outline.d.ts +13 -0
- package/bin/types/src/onboard/quality.d.ts +6 -0
- package/bin/types/src/onboard/shortlist.d.ts +11 -0
- package/bin/types/src/onboard/social.d.ts +15 -0
- package/bin/types/src/onboard/visual-hints.d.ts +12 -0
- package/bin/types/src/preserve/build.d.ts +1 -0
- package/bin/types/src/preserve/capture.d.ts +21 -0
- package/bin/types/src/preserve/components.d.ts +10 -0
- package/bin/types/src/preserve/config.d.ts +53 -0
- package/bin/types/src/preserve/embeds.d.ts +15 -0
- package/bin/types/src/preserve/hovers.d.ts +10 -0
- package/bin/types/src/preserve/react-capabilities.d.ts +2 -0
- package/bin/types/src/preserve/runtime.d.ts +2 -0
- package/bin/types/src/preserve/source-defects.d.ts +4 -0
- package/bin/types/src/preserve/supplement.d.ts +3 -0
- package/bin/types/src/preserve/verify.d.ts +29 -0
- package/bin/types/src/render.d.ts +10 -0
- package/bin/types/src/runtime/beacon.d.ts +2 -0
- package/bin/types/src/runtime/before-after.d.ts +2 -0
- package/bin/types/src/runtime/carousel.d.ts +2 -0
- package/bin/types/src/runtime/cookie-compliance.d.ts +14 -0
- package/bin/types/src/runtime/experience.d.ts +4 -0
- package/bin/types/src/runtime/header.d.ts +2 -0
- package/bin/types/src/runtime/leads.d.ts +2 -0
- package/bin/types/src/runtime/lightbox.d.ts +2 -0
- package/bin/types/src/runtime/scroll-motion.generated.d.ts +4 -0
- package/bin/types/src/runtime/tabs.d.ts +2 -0
- package/bin/types/src/schema.d.ts +27 -0
- package/bin/types/src/stock/library.d.ts +14 -0
- package/bin/types/src/stock/search.d.ts +30 -0
- package/bin/types/src/stock/selection.d.ts +30 -0
- package/bin/types/src/stock/types.d.ts +54 -0
- package/bin/types/src/theme.d.ts +3 -0
- package/bin/types/src/types.d.ts +115 -0
- package/bin/types/src/upgrade/kit.d.ts +48 -0
- package/bin/vitris-art.js +192 -0
- package/bin/vitris-blocks.js +238 -0
- package/bin/vitris-build.js +24 -0
- package/bin/vitris-catalog.js +49 -0
- package/bin/vitris-content-coverage.js +21 -0
- package/bin/vitris-create-site.js +86 -0
- package/bin/vitris-cursor-hook.js +61 -0
- package/bin/vitris-eval.js +76 -0
- package/bin/vitris-go.js +99 -0
- package/bin/vitris-harvest.js +184 -0
- package/bin/vitris-icons.js +168 -0
- package/bin/vitris-knowledge.js +43 -0
- package/bin/vitris-launch-preflight.js +964 -0
- package/bin/vitris-media-serve.js +50 -0
- package/bin/vitris-migrate-site.js +20 -0
- package/bin/vitris-motion-view.js +80 -0
- package/bin/vitris-prepare-media.js +64 -0
- package/bin/vitris-preview.js +36 -0
- package/bin/vitris-references.js +173 -0
- package/bin/vitris-refresh.js +50 -0
- package/bin/vitris-sign-publish-bundle.js +64 -0
- package/bin/vitris-stock.js +161 -0
- package/bin/vitris-templates.js +261 -0
- package/bin/vitris-themes.js +321 -0
- package/bin/vitris-upgrade.js +50 -0
- package/bin/vitris-verify-browser.js +662 -0
- package/bin/vitris-verify-performance.js +44 -0
- package/bin/vitris.js +50 -0
- package/blocks/CONVENTIONS.md +121 -0
- package/blocks/INDEX.md +130 -0
- package/blocks/about/about-awards/README.md +36 -0
- package/blocks/about/about-awards/styles.css +13 -0
- package/blocks/about/about-awards/template.html +1 -0
- package/blocks/about/about-credentials/README.md +33 -0
- package/blocks/about/about-credentials/block.meta.json +85 -0
- package/blocks/about/about-credentials/styles.css +4 -0
- package/blocks/about/about-credentials/template.html +1 -0
- package/blocks/about/about-founder/README.md +35 -0
- package/blocks/about/about-founder/styles.css +9 -0
- package/blocks/about/about-founder/template.html +1 -0
- package/blocks/about/about-mission/README.md +31 -0
- package/blocks/about/about-mission/styles.css +5 -0
- package/blocks/about/about-mission/template.html +1 -0
- package/blocks/about/about-statement/README.md +28 -0
- package/blocks/about/about-statement/styles.css +7 -0
- package/blocks/about/about-statement/template.html +1 -0
- package/blocks/about/about-story/README.md +35 -0
- package/blocks/about/about-story/styles.css +5 -0
- package/blocks/about/about-story/template.html +1 -0
- package/blocks/about/about-timeline/README.md +33 -0
- package/blocks/about/about-timeline/styles.css +8 -0
- package/blocks/about/about-timeline/template.html +1 -0
- package/blocks/about/about-values/README.md +31 -0
- package/blocks/about/about-values/styles.css +3 -0
- package/blocks/about/about-values/template.html +1 -0
- package/blocks/blog/blog-featured/README.md +39 -0
- package/blocks/blog/blog-featured/styles.css +12 -0
- package/blocks/blog/blog-featured/template.html +1 -0
- package/blocks/blog/blog-index/README.md +34 -0
- package/blocks/blog/blog-index/styles.css +6 -0
- package/blocks/blog/blog-index/template.html +1 -0
- package/blocks/blog/blog-post-header/README.md +31 -0
- package/blocks/blog/blog-post-header/styles.css +8 -0
- package/blocks/blog/blog-post-header/template.html +1 -0
- package/blocks/contact/contact-cards/README.md +32 -0
- package/blocks/contact/contact-cards/styles.css +7 -0
- package/blocks/contact/contact-cards/template.html +1 -0
- package/blocks/contact/contact-chips/README.md +41 -0
- package/blocks/contact/contact-chips/styles.css +13 -0
- package/blocks/contact/contact-chips/template.html +1 -0
- package/blocks/contact/contact-hours/README.md +41 -0
- package/blocks/contact/contact-hours/block.meta.json +87 -0
- package/blocks/contact/contact-hours/styles.css +8 -0
- package/blocks/contact/contact-hours/template.html +1 -0
- package/blocks/contact/contact-map/README.md +39 -0
- package/blocks/contact/contact-map/styles.css +10 -0
- package/blocks/contact/contact-map/template.html +1 -0
- package/blocks/contact/contact-offices/README.md +32 -0
- package/blocks/contact/contact-offices/styles.css +8 -0
- package/blocks/contact/contact-offices/template.html +1 -0
- package/blocks/contact/contact-phone-first/README.md +33 -0
- package/blocks/contact/contact-phone-first/block.meta.json +86 -0
- package/blocks/contact/contact-phone-first/styles.css +11 -0
- package/blocks/contact/contact-phone-first/template.html +1 -0
- package/blocks/contact/contact-split/README.md +43 -0
- package/blocks/contact/contact-split/styles.css +12 -0
- package/blocks/contact/contact-split/template.html +1 -0
- package/blocks/contact/contact-visit/README.md +36 -0
- package/blocks/contact/contact-visit/block.meta.json +88 -0
- package/blocks/contact/contact-visit/styles.css +13 -0
- package/blocks/contact/contact-visit/template.html +1 -0
- package/blocks/contact/service-areas/README.md +32 -0
- package/blocks/contact/service-areas/styles.css +9 -0
- package/blocks/contact/service-areas/template.html +1 -0
- package/blocks/content/glossary/README.md +35 -0
- package/blocks/content/glossary/styles.css +6 -0
- package/blocks/content/glossary/template.html +1 -0
- package/blocks/content/list-split/README.md +33 -0
- package/blocks/content/list-split/styles.css +13 -0
- package/blocks/content/list-split/template.html +1 -0
- package/blocks/content/prose-split/README.md +32 -0
- package/blocks/content/prose-split/styles.css +12 -0
- package/blocks/content/prose-split/template.html +1 -0
- package/blocks/content/specification-ledger/README.md +32 -0
- package/blocks/content/specification-ledger/block.meta.json +85 -0
- package/blocks/content/specification-ledger/styles.css +10 -0
- package/blocks/content/specification-ledger/template.html +1 -0
- package/blocks/cta/cta-band/README.md +33 -0
- package/blocks/cta/cta-band/styles.css +11 -0
- package/blocks/cta/cta-band/template.html +1 -0
- package/blocks/cta/cta-card/README.md +35 -0
- package/blocks/cta/cta-card/styles.css +8 -0
- package/blocks/cta/cta-card/template.html +1 -0
- package/blocks/cta/cta-floating-bar/README.md +28 -0
- package/blocks/cta/cta-floating-bar/styles.css +8 -0
- package/blocks/cta/cta-floating-bar/template.html +1 -0
- package/blocks/cta/cta-inline/README.md +30 -0
- package/blocks/cta/cta-inline/styles.css +9 -0
- package/blocks/cta/cta-inline/template.html +1 -0
- package/blocks/cta/cta-newsletter/README.md +34 -0
- package/blocks/cta/cta-newsletter/styles.css +8 -0
- package/blocks/cta/cta-newsletter/template.html +1 -0
- package/blocks/cta/cta-photo-fan/README.md +36 -0
- package/blocks/cta/cta-photo-fan/styles.css +14 -0
- package/blocks/cta/cta-photo-fan/template.html +1 -0
- package/blocks/cta/cta-split/README.md +38 -0
- package/blocks/cta/cta-split/styles.css +10 -0
- package/blocks/cta/cta-split/template.html +1 -0
- package/blocks/faq/faq-accordion/README.md +36 -0
- package/blocks/faq/faq-accordion/styles.css +6 -0
- package/blocks/faq/faq-accordion/template.html +1 -0
- package/blocks/faq/faq-grouped/README.md +40 -0
- package/blocks/faq/faq-grouped/styles.css +20 -0
- package/blocks/faq/faq-grouped/template.html +1 -0
- package/blocks/faq/faq-split/README.md +37 -0
- package/blocks/faq/faq-split/styles.css +5 -0
- package/blocks/faq/faq-split/template.html +1 -0
- package/blocks/faq/faq-tabs/README.md +36 -0
- package/blocks/faq/faq-tabs/styles.css +3 -0
- package/blocks/faq/faq-tabs/template.html +1 -0
- package/blocks/feature/feature-bento/README.md +33 -0
- package/blocks/feature/feature-bento/styles.css +7 -0
- package/blocks/feature/feature-bento/template.html +1 -0
- package/blocks/feature/feature-compare-table/README.md +44 -0
- package/blocks/feature/feature-compare-table/styles.css +15 -0
- package/blocks/feature/feature-compare-table/template.html +1 -0
- package/blocks/feature/feature-comparison/README.md +34 -0
- package/blocks/feature/feature-comparison/styles.css +6 -0
- package/blocks/feature/feature-comparison/template.html +1 -0
- package/blocks/feature/feature-grid-3/README.md +34 -0
- package/blocks/feature/feature-grid-3/styles.css +8 -0
- package/blocks/feature/feature-grid-3/template.html +1 -0
- package/blocks/feature/feature-icon-list/README.md +39 -0
- package/blocks/feature/feature-icon-list/styles.css +9 -0
- package/blocks/feature/feature-icon-list/template.html +1 -0
- package/blocks/feature/feature-spotlight/README.md +39 -0
- package/blocks/feature/feature-spotlight/styles.css +5 -0
- package/blocks/feature/feature-spotlight/template.html +1 -0
- package/blocks/feature/feature-stats-band/README.md +33 -0
- package/blocks/feature/feature-stats-band/styles.css +8 -0
- package/blocks/feature/feature-stats-band/template.html +1 -0
- package/blocks/feature/feature-tabs/README.md +38 -0
- package/blocks/feature/feature-tabs/styles.css +7 -0
- package/blocks/feature/feature-tabs/template.html +1 -0
- package/blocks/feature/feature-thumb-list/README.md +38 -0
- package/blocks/feature/feature-thumb-list/styles.css +13 -0
- package/blocks/feature/feature-thumb-list/template.html +1 -0
- package/blocks/feature/feature-zigzag/README.md +31 -0
- package/blocks/feature/feature-zigzag/styles.css +6 -0
- package/blocks/feature/feature-zigzag/template.html +1 -0
- package/blocks/footer/footer-columns/README.md +39 -0
- package/blocks/footer/footer-columns/styles.css +16 -0
- package/blocks/footer/footer-columns/template.html +1 -0
- package/blocks/footer/footer-compact/README.md +33 -0
- package/blocks/footer/footer-compact/styles.css +12 -0
- package/blocks/footer/footer-compact/template.html +1 -0
- package/blocks/footer/footer-cta/README.md +37 -0
- package/blocks/footer/footer-cta/styles.css +18 -0
- package/blocks/footer/footer-cta/template.html +1 -0
- package/blocks/footer/footer-social/README.md +37 -0
- package/blocks/footer/footer-social/styles.css +17 -0
- package/blocks/footer/footer-social/template.html +1 -0
- package/blocks/footer/footer-wordmark/README.md +40 -0
- package/blocks/footer/footer-wordmark/styles.css +19 -0
- package/blocks/footer/footer-wordmark/template.html +1 -0
- package/blocks/gallery/gallery-before-after/README.md +31 -0
- package/blocks/gallery/gallery-before-after/styles.css +6 -0
- package/blocks/gallery/gallery-before-after/template.html +1 -0
- package/blocks/gallery/gallery-carousel/README.md +32 -0
- package/blocks/gallery/gallery-carousel/styles.css +7 -0
- package/blocks/gallery/gallery-carousel/template.html +1 -0
- package/blocks/gallery/gallery-grid/README.md +39 -0
- package/blocks/gallery/gallery-grid/styles.css +13 -0
- package/blocks/gallery/gallery-grid/template.html +1 -0
- package/blocks/gallery/gallery-masonry/README.md +33 -0
- package/blocks/gallery/gallery-masonry/styles.css +4 -0
- package/blocks/gallery/gallery-masonry/template.html +1 -0
- package/blocks/gallery/gallery-mosaic-split/README.md +40 -0
- package/blocks/gallery/gallery-mosaic-split/styles.css +15 -0
- package/blocks/gallery/gallery-mosaic-split/template.html +1 -0
- package/blocks/hero/hero-asymmetric/README.md +34 -0
- package/blocks/hero/hero-asymmetric/styles.css +13 -0
- package/blocks/hero/hero-asymmetric/template.html +10 -0
- package/blocks/hero/hero-before-after/README.md +38 -0
- package/blocks/hero/hero-before-after/styles.css +8 -0
- package/blocks/hero/hero-before-after/template.html +19 -0
- package/blocks/hero/hero-editorial/README.md +34 -0
- package/blocks/hero/hero-editorial/block.meta.json +85 -0
- package/blocks/hero/hero-editorial/styles.css +6 -0
- package/blocks/hero/hero-editorial/template.html +10 -0
- package/blocks/hero/hero-evidence/README.md +32 -0
- package/blocks/hero/hero-evidence/block.meta.json +85 -0
- package/blocks/hero/hero-evidence/styles.css +13 -0
- package/blocks/hero/hero-evidence/template.html +1 -0
- package/blocks/hero/hero-form/README.md +46 -0
- package/blocks/hero/hero-form/styles.css +11 -0
- package/blocks/hero/hero-form/template.html +15 -0
- package/blocks/hero/hero-menu/README.md +36 -0
- package/blocks/hero/hero-menu/styles.css +7 -0
- package/blocks/hero/hero-menu/template.html +10 -0
- package/blocks/hero/hero-overlay/README.md +35 -0
- package/blocks/hero/hero-overlay/styles.css +14 -0
- package/blocks/hero/hero-overlay/template.html +10 -0
- package/blocks/hero/hero-page/README.md +35 -0
- package/blocks/hero/hero-page/styles.css +19 -0
- package/blocks/hero/hero-page/template.html +1 -0
- package/blocks/hero/hero-product/README.md +41 -0
- package/blocks/hero/hero-product/styles.css +11 -0
- package/blocks/hero/hero-product/template.html +14 -0
- package/blocks/hero/hero-service/README.md +37 -0
- package/blocks/hero/hero-service/block.meta.json +85 -0
- package/blocks/hero/hero-service/styles.css +17 -0
- package/blocks/hero/hero-service/template.html +1 -0
- package/blocks/hero/hero-split/README.md +36 -0
- package/blocks/hero/hero-split/styles.css +7 -0
- package/blocks/hero/hero-split/template.html +11 -0
- package/blocks/hero/hero-statement/README.md +33 -0
- package/blocks/hero/hero-statement/styles.css +8 -0
- package/blocks/hero/hero-statement/template.html +1 -0
- package/blocks/hero/hero-stats/README.md +37 -0
- package/blocks/hero/hero-stats/styles.css +10 -0
- package/blocks/hero/hero-stats/template.html +10 -0
- package/blocks/hero/hero-video-still/README.md +36 -0
- package/blocks/hero/hero-video-still/styles.css +9 -0
- package/blocks/hero/hero-video-still/template.html +13 -0
- package/blocks/icons.md +44 -0
- package/blocks/incentives/incentive-banner/README.md +28 -0
- package/blocks/incentives/incentive-banner/styles.css +7 -0
- package/blocks/incentives/incentive-banner/template.html +1 -0
- package/blocks/incentives/incentive-cards/README.md +31 -0
- package/blocks/incentives/incentive-cards/styles.css +4 -0
- package/blocks/incentives/incentive-cards/template.html +1 -0
- package/blocks/navbar/nav-announcement/README.md +35 -0
- package/blocks/navbar/nav-announcement/styles.css +10 -0
- package/blocks/navbar/nav-announcement/template.html +14 -0
- package/blocks/navbar/nav-centered/README.md +35 -0
- package/blocks/navbar/nav-centered/styles.css +11 -0
- package/blocks/navbar/nav-centered/template.html +12 -0
- package/blocks/navbar/nav-minimal/README.md +29 -0
- package/blocks/navbar/nav-minimal/styles.css +5 -0
- package/blocks/navbar/nav-minimal/template.html +6 -0
- package/blocks/navbar/nav-split/README.md +34 -0
- package/blocks/navbar/nav-split/styles.css +11 -0
- package/blocks/navbar/nav-split/template.html +11 -0
- package/blocks/navbar/nav-utility/README.md +37 -0
- package/blocks/navbar/nav-utility/styles.css +17 -0
- package/blocks/navbar/nav-utility/template.html +12 -0
- package/blocks/pricing/menu-featured/README.md +34 -0
- package/blocks/pricing/menu-featured/styles.css +4 -0
- package/blocks/pricing/menu-featured/template.html +1 -0
- package/blocks/pricing/menu-sections/README.md +33 -0
- package/blocks/pricing/menu-sections/styles.css +9 -0
- package/blocks/pricing/menu-sections/template.html +1 -0
- package/blocks/pricing/pricing-table/README.md +40 -0
- package/blocks/pricing/pricing-table/styles.css +9 -0
- package/blocks/pricing/pricing-table/template.html +1 -0
- package/blocks/pricing/pricing-tiers/README.md +34 -0
- package/blocks/pricing/pricing-tiers/styles.css +7 -0
- package/blocks/pricing/pricing-tiers/template.html +1 -0
- package/blocks/pricing/pricing-toggle/README.md +34 -0
- package/blocks/pricing/pricing-toggle/styles.css +10 -0
- package/blocks/pricing/pricing-toggle/template.html +1 -0
- package/blocks/process/process-carousel/README.md +33 -0
- package/blocks/process/process-carousel/styles.css +5 -0
- package/blocks/process/process-carousel/template.html +1 -0
- package/blocks/process/process-split/README.md +35 -0
- package/blocks/process/process-split/styles.css +6 -0
- package/blocks/process/process-split/template.html +1 -0
- package/blocks/process/process-stepper/README.md +40 -0
- package/blocks/process/process-stepper/styles.css +11 -0
- package/blocks/process/process-stepper/template.html +1 -0
- package/blocks/process/process-steps/README.md +35 -0
- package/blocks/process/process-steps/styles.css +6 -0
- package/blocks/process/process-steps/template.html +1 -0
- package/blocks/process/process-sticky/README.md +38 -0
- package/blocks/process/process-sticky/styles.css +12 -0
- package/blocks/process/process-sticky/template.html +1 -0
- package/blocks/process/process-timeline/README.md +35 -0
- package/blocks/process/process-timeline/styles.css +10 -0
- package/blocks/process/process-timeline/template.html +1 -0
- package/blocks/services/services-cards/README.md +34 -0
- package/blocks/services/services-cards/styles.css +3 -0
- package/blocks/services/services-cards/template.html +1 -0
- package/blocks/services/services-carousel/README.md +34 -0
- package/blocks/services/services-carousel/styles.css +6 -0
- package/blocks/services/services-carousel/template.html +1 -0
- package/blocks/services/services-list/README.md +32 -0
- package/blocks/services/services-list/block.meta.json +85 -0
- package/blocks/services/services-list/styles.css +10 -0
- package/blocks/services/services-list/template.html +1 -0
- package/blocks/services/services-menu/README.md +39 -0
- package/blocks/services/services-menu/styles.css +6 -0
- package/blocks/services/services-menu/template.html +1 -0
- package/blocks/services/services-packages/README.md +34 -0
- package/blocks/services/services-packages/styles.css +6 -0
- package/blocks/services/services-packages/template.html +1 -0
- package/blocks/services/services-panels/README.md +36 -0
- package/blocks/services/services-panels/styles.css +15 -0
- package/blocks/services/services-panels/template.html +1 -0
- package/blocks/services/services-photo-grid/README.md +39 -0
- package/blocks/services/services-photo-grid/styles.css +10 -0
- package/blocks/services/services-photo-grid/template.html +1 -0
- package/blocks/services/services-priority/README.md +33 -0
- package/blocks/services/services-priority/block.meta.json +86 -0
- package/blocks/services/services-priority/styles.css +16 -0
- package/blocks/services/services-priority/template.html +1 -0
- package/blocks/stats/stats-cards/README.md +31 -0
- package/blocks/stats/stats-cards/styles.css +4 -0
- package/blocks/stats/stats-cards/template.html +1 -0
- package/blocks/stats/stats-mosaic/README.md +27 -0
- package/blocks/stats/stats-mosaic/styles.css +9 -0
- package/blocks/stats/stats-mosaic/template.html +1 -0
- package/blocks/stats/stats-row/README.md +29 -0
- package/blocks/stats/stats-row/styles.css +8 -0
- package/blocks/stats/stats-row/template.html +1 -0
- package/blocks/stats/stats-split/README.md +35 -0
- package/blocks/stats/stats-split/styles.css +3 -0
- package/blocks/stats/stats-split/template.html +1 -0
- package/blocks/team/team-featured/README.md +42 -0
- package/blocks/team/team-featured/styles.css +9 -0
- package/blocks/team/team-featured/template.html +1 -0
- package/blocks/team/team-grid/README.md +35 -0
- package/blocks/team/team-grid/styles.css +8 -0
- package/blocks/team/team-grid/template.html +1 -0
- package/blocks/team/team-list/README.md +32 -0
- package/blocks/team/team-list/styles.css +7 -0
- package/blocks/team/team-list/template.html +1 -0
- package/blocks/testimonial/testimonial-carousel/README.md +32 -0
- package/blocks/testimonial/testimonial-carousel/styles.css +7 -0
- package/blocks/testimonial/testimonial-carousel/template.html +1 -0
- package/blocks/testimonial/testimonial-grid/README.md +32 -0
- package/blocks/testimonial/testimonial-grid/styles.css +5 -0
- package/blocks/testimonial/testimonial-grid/template.html +1 -0
- package/blocks/testimonial/testimonial-mosaic/README.md +38 -0
- package/blocks/testimonial/testimonial-mosaic/styles.css +14 -0
- package/blocks/testimonial/testimonial-mosaic/template.html +1 -0
- package/blocks/testimonial/testimonial-platform/README.md +34 -0
- package/blocks/testimonial/testimonial-platform/styles.css +17 -0
- package/blocks/testimonial/testimonial-platform/template.html +1 -0
- package/blocks/testimonial/testimonial-rating/README.md +28 -0
- package/blocks/testimonial/testimonial-rating/styles.css +6 -0
- package/blocks/testimonial/testimonial-rating/template.html +1 -0
- package/blocks/testimonial/testimonial-spotlight/README.md +31 -0
- package/blocks/testimonial/testimonial-spotlight/styles.css +9 -0
- package/blocks/testimonial/testimonial-spotlight/template.html +1 -0
- package/blocks/testimonial/testimonial-switcher/README.md +39 -0
- package/blocks/testimonial/testimonial-switcher/styles.css +23 -0
- package/blocks/testimonial/testimonial-switcher/template.html +1 -0
- package/blocks/testimonial/testimonial-wall/README.md +34 -0
- package/blocks/testimonial/testimonial-wall/styles.css +7 -0
- package/blocks/testimonial/testimonial-wall/template.html +1 -0
- package/blocks/trust-strip/trust-badges/README.md +30 -0
- package/blocks/trust-strip/trust-badges/styles.css +5 -0
- package/blocks/trust-strip/trust-badges/template.html +1 -0
- package/blocks/trust-strip/trust-certs/README.md +31 -0
- package/blocks/trust-strip/trust-certs/styles.css +12 -0
- package/blocks/trust-strip/trust-certs/template.html +1 -0
- package/blocks/trust-strip/trust-logos/README.md +32 -0
- package/blocks/trust-strip/trust-logos/styles.css +5 -0
- package/blocks/trust-strip/trust-logos/template.html +1 -0
- package/blocks/trust-strip/trust-quote/README.md +29 -0
- package/blocks/trust-strip/trust-quote/styles.css +5 -0
- package/blocks/trust-strip/trust-quote/template.html +1 -0
- package/blocks/trust-strip/trust-reviews/README.md +35 -0
- package/blocks/trust-strip/trust-reviews/styles.css +9 -0
- package/blocks/trust-strip/trust-reviews/template.html +1 -0
- package/blocks/work/case-alternating/README.md +34 -0
- package/blocks/work/case-alternating/block.meta.json +86 -0
- package/blocks/work/case-alternating/styles.css +7 -0
- package/blocks/work/case-alternating/template.html +1 -0
- package/blocks/work/case-carousel/README.md +26 -0
- package/blocks/work/case-carousel/styles.css +7 -0
- package/blocks/work/case-carousel/template.html +1 -0
- package/blocks/work/case-header/README.md +38 -0
- package/blocks/work/case-header/styles.css +18 -0
- package/blocks/work/case-header/template.html +1 -0
- package/blocks/work/project-evidence/README.md +35 -0
- package/blocks/work/project-evidence/block.meta.json +87 -0
- package/blocks/work/project-evidence/styles.css +12 -0
- package/blocks/work/project-evidence/template.html +1 -0
- package/blocks/work/project-grid/README.md +38 -0
- package/blocks/work/project-grid/styles.css +9 -0
- package/blocks/work/project-grid/template.html +1 -0
- package/cloudflare/wrangler.forms-test.jsonc +19 -0
- package/cloudflare/wrangler.jsonc +14 -0
- package/cloudflare/wrangler.templates.jsonc +6 -0
- package/design-system/MASTER.md +76 -0
- package/design-system/calibration/v2/accuracy.html +1 -0
- package/design-system/calibration/v2/accuracy.png +0 -0
- package/design-system/calibration/v2/manifest.json +88 -0
- package/design-system/calibration/v2/probe.png +0 -0
- package/design-system/calibration/v2/vitris-northline-counsel-home-1280-viewport.png +0 -0
- package/design-system/calibration/v2/vitris-northline-counsel-home-375-viewport.png +0 -0
- package/design-system/calibration/v2/vitris-northline-counsel-planning-1280-viewport.png +0 -0
- package/design-system/calibration/v2/vitris-northline-counsel-planning-375-viewport.png +0 -0
- package/design-system/calibration/v2/vitris-tide-and-slate-home-1280-viewport.png +0 -0
- package/design-system/calibration/v2/vitris-tide-and-slate-home-375-viewport.png +0 -0
- package/design-system/calibration/v2/vitris-tide-and-slate-project-1280-viewport.png +0 -0
- package/design-system/calibration/v2/vitris-tide-and-slate-project-375-viewport.png +0 -0
- package/design-system/compositions/v1/README.md +13 -0
- package/design-system/compositions/v1/northline-counsel/components/contact-phone-first/styles.css +11 -0
- package/design-system/compositions/v1/northline-counsel/components/contact-phone-first/template.html +1 -0
- package/design-system/compositions/v1/northline-counsel/components/contact-visit/styles.css +13 -0
- package/design-system/compositions/v1/northline-counsel/components/contact-visit/template.html +1 -0
- package/design-system/compositions/v1/northline-counsel/components/footer-compact/styles.css +12 -0
- package/design-system/compositions/v1/northline-counsel/components/footer-compact/template.html +1 -0
- package/design-system/compositions/v1/northline-counsel/components/hero-evidence/styles.css +13 -0
- package/design-system/compositions/v1/northline-counsel/components/hero-evidence/template.html +1 -0
- package/design-system/compositions/v1/northline-counsel/components/hero-page/styles.css +19 -0
- package/design-system/compositions/v1/northline-counsel/components/hero-page/template.html +1 -0
- package/design-system/compositions/v1/northline-counsel/components/nav-split/styles.css +11 -0
- package/design-system/compositions/v1/northline-counsel/components/nav-split/template.html +11 -0
- package/design-system/compositions/v1/northline-counsel/components/services-priority/styles.css +16 -0
- package/design-system/compositions/v1/northline-counsel/components/services-priority/template.html +1 -0
- package/design-system/compositions/v1/northline-counsel/components/specification-ledger/styles.css +10 -0
- package/design-system/compositions/v1/northline-counsel/components/specification-ledger/template.html +1 -0
- package/design-system/compositions/v1/northline-counsel/direction.md +5 -0
- package/design-system/compositions/v1/northline-counsel/fixture-brief.json +10 -0
- package/design-system/compositions/v1/northline-counsel/media-inventory.json +1 -0
- package/design-system/compositions/v1/northline-counsel/pages/index.html +11 -0
- package/design-system/compositions/v1/northline-counsel/pages/planning.html +11 -0
- package/design-system/compositions/v1/northline-counsel/selection-receipt.json +36 -0
- package/design-system/compositions/v1/northline-counsel/site.json +1 -0
- package/design-system/compositions/v1/northline-counsel/storyboard.md +12 -0
- package/design-system/compositions/v1/northline-counsel/theme/defaults.json +1 -0
- package/design-system/compositions/v1/source-ledger.json +18 -0
- package/design-system/compositions/v1/tide-and-slate/components/contact-phone-first/styles.css +11 -0
- package/design-system/compositions/v1/tide-and-slate/components/contact-phone-first/template.html +1 -0
- package/design-system/compositions/v1/tide-and-slate/components/footer-compact/styles.css +12 -0
- package/design-system/compositions/v1/tide-and-slate/components/footer-compact/template.html +1 -0
- package/design-system/compositions/v1/tide-and-slate/components/hero-page/styles.css +19 -0
- package/design-system/compositions/v1/tide-and-slate/components/hero-page/template.html +1 -0
- package/design-system/compositions/v1/tide-and-slate/components/hero-split/styles.css +7 -0
- package/design-system/compositions/v1/tide-and-slate/components/hero-split/template.html +11 -0
- package/design-system/compositions/v1/tide-and-slate/components/nav-split/styles.css +11 -0
- package/design-system/compositions/v1/tide-and-slate/components/nav-split/template.html +11 -0
- package/design-system/compositions/v1/tide-and-slate/components/project-evidence/styles.css +12 -0
- package/design-system/compositions/v1/tide-and-slate/components/project-evidence/template.html +1 -0
- package/design-system/compositions/v1/tide-and-slate/components/services-priority/styles.css +16 -0
- package/design-system/compositions/v1/tide-and-slate/components/services-priority/template.html +1 -0
- package/design-system/compositions/v1/tide-and-slate/components/specification-ledger/styles.css +10 -0
- package/design-system/compositions/v1/tide-and-slate/components/specification-ledger/template.html +1 -0
- package/design-system/compositions/v1/tide-and-slate/direction.md +5 -0
- package/design-system/compositions/v1/tide-and-slate/fixture-brief.json +10 -0
- package/design-system/compositions/v1/tide-and-slate/media/teaching/slate-roof-finished.webp +0 -0
- package/design-system/compositions/v1/tide-and-slate/media/teaching/slate-roof-finished.webp.provenance.json +9 -0
- package/design-system/compositions/v1/tide-and-slate/media/teaching/slate-roof-work.webp +0 -0
- package/design-system/compositions/v1/tide-and-slate/media/teaching/slate-roof-work.webp.provenance.json +9 -0
- package/design-system/compositions/v1/tide-and-slate/media-inventory.json +7 -0
- package/design-system/compositions/v1/tide-and-slate/pages/index.html +10 -0
- package/design-system/compositions/v1/tide-and-slate/pages/project.html +10 -0
- package/design-system/compositions/v1/tide-and-slate/site.json +1 -0
- package/design-system/compositions/v1/tide-and-slate/storyboard.md +12 -0
- package/design-system/compositions/v1/tide-and-slate/theme/defaults.json +1 -0
- package/design-system/compositions/v2/catalog.json +4018 -0
- package/design-system/compositions/v2/clearwell-directory/components/study-clearwell-directory/styles.css +3 -0
- package/design-system/compositions/v2/clearwell-directory/components/study-clearwell-directory/template.html +1 -0
- package/design-system/compositions/v2/clearwell-directory/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/clearwell-directory/pages/index.html +5 -0
- package/design-system/compositions/v2/clearwell-directory/site.json +7 -0
- package/design-system/compositions/v2/clearwell-directory/study.json +244 -0
- package/design-system/compositions/v2/clearwell-directory/theme/defaults.json +16 -0
- package/design-system/compositions/v2/clearwell-letter/components/study-clearwell-letter/styles.css +2 -0
- package/design-system/compositions/v2/clearwell-letter/components/study-clearwell-letter/template.html +1 -0
- package/design-system/compositions/v2/clearwell-letter/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/clearwell-letter/pages/index.html +5 -0
- package/design-system/compositions/v2/clearwell-letter/site.json +7 -0
- package/design-system/compositions/v2/clearwell-letter/study.json +236 -0
- package/design-system/compositions/v2/clearwell-letter/theme/defaults.json +16 -0
- package/design-system/compositions/v2/dock-radio/components/study-dock-radio/styles.css +2 -0
- package/design-system/compositions/v2/dock-radio/components/study-dock-radio/template.html +1 -0
- package/design-system/compositions/v2/dock-radio/media/teaching/original-tone-study.wav +0 -0
- package/design-system/compositions/v2/dock-radio/media/teaching/original-tone-study.wav.provenance.json +6 -0
- package/design-system/compositions/v2/dock-radio/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/dock-radio/pages/index.html +5 -0
- package/design-system/compositions/v2/dock-radio/site.json +7 -0
- package/design-system/compositions/v2/dock-radio/study.json +288 -0
- package/design-system/compositions/v2/dock-radio/theme/defaults.json +16 -0
- package/design-system/compositions/v2/fen-repair/components/study-fen-repair/styles.css +2 -0
- package/design-system/compositions/v2/fen-repair/components/study-fen-repair/template.html +1 -0
- package/design-system/compositions/v2/fen-repair/media/teaching/slate-roof-finished.webp +0 -0
- package/design-system/compositions/v2/fen-repair/media/teaching/slate-roof-finished.webp.provenance.json +9 -0
- package/design-system/compositions/v2/fen-repair/media/teaching/slate-roof-work.webp +0 -0
- package/design-system/compositions/v2/fen-repair/media/teaching/slate-roof-work.webp.provenance.json +9 -0
- package/design-system/compositions/v2/fen-repair/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/fen-repair/pages/index.html +5 -0
- package/design-system/compositions/v2/fen-repair/site.json +7 -0
- package/design-system/compositions/v2/fen-repair/study.json +236 -0
- package/design-system/compositions/v2/fen-repair/theme/defaults.json +16 -0
- package/design-system/compositions/v2/hearth-plane/components/study-hearth-plane/styles.css +2 -0
- package/design-system/compositions/v2/hearth-plane/components/study-hearth-plane/template.html +1 -0
- package/design-system/compositions/v2/hearth-plane/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/hearth-plane/pages/index.html +5 -0
- package/design-system/compositions/v2/hearth-plane/site.json +7 -0
- package/design-system/compositions/v2/hearth-plane/study.json +238 -0
- package/design-system/compositions/v2/hearth-plane/theme/defaults.json +16 -0
- package/design-system/compositions/v2/lacuna-objects/components/study-lacuna-objects/styles.css +2 -0
- package/design-system/compositions/v2/lacuna-objects/components/study-lacuna-objects/template.html +1 -0
- package/design-system/compositions/v2/lacuna-objects/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/lacuna-objects/pages/index.html +5 -0
- package/design-system/compositions/v2/lacuna-objects/site.json +7 -0
- package/design-system/compositions/v2/lacuna-objects/study.json +242 -0
- package/design-system/compositions/v2/lacuna-objects/theme/defaults.json +16 -0
- package/design-system/compositions/v2/loop-room/components/study-loop-room/styles.css +2 -0
- package/design-system/compositions/v2/loop-room/components/study-loop-room/template.html +1 -0
- package/design-system/compositions/v2/loop-room/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/loop-room/pages/index.html +5 -0
- package/design-system/compositions/v2/loop-room/site.json +7 -0
- package/design-system/compositions/v2/loop-room/study.json +253 -0
- package/design-system/compositions/v2/loop-room/theme/defaults.json +16 -0
- package/design-system/compositions/v2/manifest.json +740 -0
- package/design-system/compositions/v2/mara-reading-room/components/study-mara-reading-room/styles.css +2 -0
- package/design-system/compositions/v2/mara-reading-room/components/study-mara-reading-room/template.html +1 -0
- package/design-system/compositions/v2/mara-reading-room/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/mara-reading-room/pages/index.html +5 -0
- package/design-system/compositions/v2/mara-reading-room/site.json +7 -0
- package/design-system/compositions/v2/mara-reading-room/study.json +246 -0
- package/design-system/compositions/v2/mara-reading-room/theme/defaults.json +16 -0
- package/design-system/compositions/v2/mara-specimen/components/study-mara-specimen/styles.css +3 -0
- package/design-system/compositions/v2/mara-specimen/components/study-mara-specimen/template.html +1 -0
- package/design-system/compositions/v2/mara-specimen/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/mara-specimen/pages/index.html +5 -0
- package/design-system/compositions/v2/mara-specimen/site.json +7 -0
- package/design-system/compositions/v2/mara-specimen/study.json +244 -0
- package/design-system/compositions/v2/mara-specimen/theme/defaults.json +16 -0
- package/design-system/compositions/v2/margin-journal/components/study-margin-journal/styles.css +2 -0
- package/design-system/compositions/v2/margin-journal/components/study-margin-journal/template.html +1 -0
- package/design-system/compositions/v2/margin-journal/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/margin-journal/pages/index.html +5 -0
- package/design-system/compositions/v2/margin-journal/site.json +7 -0
- package/design-system/compositions/v2/margin-journal/study.json +242 -0
- package/design-system/compositions/v2/margin-journal/theme/defaults.json +16 -0
- package/design-system/compositions/v2/night-orchard/components/study-night-orchard/styles.css +2 -0
- package/design-system/compositions/v2/night-orchard/components/study-night-orchard/template.html +1 -0
- package/design-system/compositions/v2/night-orchard/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/night-orchard/pages/index.html +5 -0
- package/design-system/compositions/v2/night-orchard/site.json +7 -0
- package/design-system/compositions/v2/night-orchard/study.json +247 -0
- package/design-system/compositions/v2/night-orchard/theme/defaults.json +16 -0
- package/design-system/compositions/v2/previews/clearwell-directory-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/clearwell-directory-home-390.png +0 -0
- package/design-system/compositions/v2/previews/clearwell-directory-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/clearwell-directory-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/clearwell-letter-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/clearwell-letter-home-390.png +0 -0
- package/design-system/compositions/v2/previews/clearwell-letter-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/clearwell-letter-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/dock-radio-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/dock-radio-home-390.png +0 -0
- package/design-system/compositions/v2/previews/dock-radio-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/dock-radio-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/fen-repair-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/fen-repair-home-390.png +0 -0
- package/design-system/compositions/v2/previews/fen-repair-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/fen-repair-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/hearth-plane-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/hearth-plane-home-390.png +0 -0
- package/design-system/compositions/v2/previews/hearth-plane-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/hearth-plane-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/lacuna-objects-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/lacuna-objects-home-390.png +0 -0
- package/design-system/compositions/v2/previews/lacuna-objects-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/lacuna-objects-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/loop-room-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/loop-room-home-390.png +0 -0
- package/design-system/compositions/v2/previews/loop-room-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/loop-room-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/mara-reading-room-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/mara-reading-room-home-390.png +0 -0
- package/design-system/compositions/v2/previews/mara-reading-room-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/mara-reading-room-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/mara-specimen-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/mara-specimen-home-390.png +0 -0
- package/design-system/compositions/v2/previews/mara-specimen-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/mara-specimen-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/margin-journal-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/margin-journal-home-390.png +0 -0
- package/design-system/compositions/v2/previews/margin-journal-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/margin-journal-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/night-orchard-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/night-orchard-home-390.png +0 -0
- package/design-system/compositions/v2/previews/night-orchard-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/night-orchard-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/relay-workflow-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/relay-workflow-home-390.png +0 -0
- package/design-system/compositions/v2/previews/relay-workflow-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/relay-workflow-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/rivet-components-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/rivet-components-home-390.png +0 -0
- package/design-system/compositions/v2/previews/rivet-components-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/rivet-components-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/signal-fair-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/signal-fair-home-390.png +0 -0
- package/design-system/compositions/v2/previews/signal-fair-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/signal-fair-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/sundial-goods-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/sundial-goods-home-390.png +0 -0
- package/design-system/compositions/v2/previews/sundial-goods-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/sundial-goods-interior-390.png +0 -0
- package/design-system/compositions/v2/previews/thread-mender-home-1440.png +0 -0
- package/design-system/compositions/v2/previews/thread-mender-home-390.png +0 -0
- package/design-system/compositions/v2/previews/thread-mender-interior-1440.png +0 -0
- package/design-system/compositions/v2/previews/thread-mender-interior-390.png +0 -0
- package/design-system/compositions/v2/relay-workflow/components/study-relay-workflow/styles.css +2 -0
- package/design-system/compositions/v2/relay-workflow/components/study-relay-workflow/template.html +1 -0
- package/design-system/compositions/v2/relay-workflow/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/relay-workflow/pages/index.html +5 -0
- package/design-system/compositions/v2/relay-workflow/site.json +7 -0
- package/design-system/compositions/v2/relay-workflow/study.json +283 -0
- package/design-system/compositions/v2/relay-workflow/theme/defaults.json +16 -0
- package/design-system/compositions/v2/rivet-components/components/study-rivet-components/styles.css +2 -0
- package/design-system/compositions/v2/rivet-components/components/study-rivet-components/template.html +1 -0
- package/design-system/compositions/v2/rivet-components/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/rivet-components/pages/index.html +5 -0
- package/design-system/compositions/v2/rivet-components/site.json +7 -0
- package/design-system/compositions/v2/rivet-components/study.json +241 -0
- package/design-system/compositions/v2/rivet-components/theme/defaults.json +16 -0
- package/design-system/compositions/v2/signal-fair/components/study-signal-fair/styles.css +2 -0
- package/design-system/compositions/v2/signal-fair/components/study-signal-fair/template.html +1 -0
- package/design-system/compositions/v2/signal-fair/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/signal-fair/pages/index.html +5 -0
- package/design-system/compositions/v2/signal-fair/site.json +7 -0
- package/design-system/compositions/v2/signal-fair/study.json +271 -0
- package/design-system/compositions/v2/signal-fair/theme/defaults.json +16 -0
- package/design-system/compositions/v2/sundial-goods/components/study-sundial-goods/styles.css +2 -0
- package/design-system/compositions/v2/sundial-goods/components/study-sundial-goods/template.html +1 -0
- package/design-system/compositions/v2/sundial-goods/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/sundial-goods/pages/index.html +5 -0
- package/design-system/compositions/v2/sundial-goods/site.json +7 -0
- package/design-system/compositions/v2/sundial-goods/study.json +247 -0
- package/design-system/compositions/v2/sundial-goods/theme/defaults.json +16 -0
- package/design-system/compositions/v2/thread-mender/components/study-thread-mender/styles.css +2 -0
- package/design-system/compositions/v2/thread-mender/components/study-thread-mender/template.html +1 -0
- package/design-system/compositions/v2/thread-mender/pages/detail/index.html +5 -0
- package/design-system/compositions/v2/thread-mender/pages/index.html +5 -0
- package/design-system/compositions/v2/thread-mender/site.json +7 -0
- package/design-system/compositions/v2/thread-mender/study.json +253 -0
- package/design-system/compositions/v2/thread-mender/theme/defaults.json +16 -0
- package/design-system/knowledge/v1/README.md +8 -0
- package/design-system/knowledge/v1/catalog.json +479 -0
- package/design-system/knowledge/v1/demonstrations/assets/teaching-slate-slope.png +0 -0
- package/design-system/knowledge/v1/demonstrations/assets/teaching-slate-slope.provenance.json +12 -0
- package/design-system/knowledge/v1/demonstrations/mobile-strong.html +50 -0
- package/design-system/knowledge/v1/demonstrations/mobile-weak.html +50 -0
- package/design-system/knowledge/v1/demonstrations/project-strong.html +50 -0
- package/design-system/knowledge/v1/demonstrations/project-weak.html +50 -0
- package/design-system/knowledge/v1/demonstrations/repeat-strong.html +50 -0
- package/design-system/knowledge/v1/demonstrations/repeat-weak.html +50 -0
- package/design-system/knowledge/v1/demonstrations/services-strong.html +50 -0
- package/design-system/knowledge/v1/demonstrations/services-weak.html +50 -0
- package/design-system/knowledge/v1/demonstrations/sparse-strong.html +50 -0
- package/design-system/knowledge/v1/demonstrations/sparse-weak.html +50 -0
- package/design-system/knowledge/v1/demonstrations/type-strong.html +50 -0
- package/design-system/knowledge/v1/demonstrations/type-weak.html +50 -0
- package/design-system/knowledge/v1/manifest.json +88 -0
- package/design-system/knowledge/v1/observations/mobile-strong-1080.png +0 -0
- package/design-system/knowledge/v1/observations/mobile-strong-375.png +0 -0
- package/design-system/knowledge/v1/observations/mobile-weak-1080.png +0 -0
- package/design-system/knowledge/v1/observations/mobile-weak-375.png +0 -0
- package/design-system/knowledge/v1/observations/project-strong-1080.png +0 -0
- package/design-system/knowledge/v1/observations/project-strong-375.png +0 -0
- package/design-system/knowledge/v1/observations/project-weak-1080.png +0 -0
- package/design-system/knowledge/v1/observations/project-weak-375.png +0 -0
- package/design-system/knowledge/v1/observations/type-strong-1080.png +0 -0
- package/design-system/knowledge/v1/observations/type-strong-375.png +0 -0
- package/design-system/knowledge/v1/observations/type-weak-1080.png +0 -0
- package/design-system/knowledge/v1/observations/type-weak-375.png +0 -0
- package/design-system/knowledge/v2/added-lessons.json +30 -0
- package/design-system/knowledge/v2/assets.json +14 -0
- package/design-system/knowledge/v2/fixtures/contact-alternate.html +17 -0
- package/design-system/knowledge/v2/fixtures/contact-broken.html +15 -0
- package/design-system/knowledge/v2/fixtures/contact-valid.html +20 -0
- package/design-system/knowledge/v2/fixtures/contrast-cases.html +10 -0
- package/design-system/knowledge/v2/island-audit.json +12 -0
- package/design-system/knowledge/v2/lesson-extensions.json +158 -0
- package/design-system/knowledge/v2/manifest.json +52 -0
- package/design-system/knowledge/v2/replacements.json +14 -0
- package/design-system/knowledge/v2/requirements.json +345 -0
- package/design-system/knowledge/v2/sources.json +182 -0
- package/design-system/knowledge/v3/catalog.json +1232 -0
- package/design-system/knowledge/v3/examples/catalog.json +799 -0
- package/design-system/knowledge/v3/lessons/cmp-collection-structure.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-comparison.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-contextual-action.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-contrastive-critique.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-disclosure.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-evidence-form.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-image-art-direction.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-image-sequence.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-interactive-explanation.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-local-information.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-motion-continuity.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-narrative-continuity.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-navigation.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-page-rhythm.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-process.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-proof-adjacency.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-responsive-recomposition.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-semantic-grouping.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-shared-alignment.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-sparse-media.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-surfaces-motifs.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-text-shape.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-type-roles.md +17 -0
- package/design-system/knowledge/v3/lessons/cmp-unequal-emphasis.md +17 -0
- package/design-system/knowledge/v3/manifest.json +117 -0
- package/design-system/knowledge/v3/sources.json +425 -0
- package/design-system/references/v1/README.md +27 -0
- package/design-system/references/v1/catalog.json +20035 -0
- package/design-system/references/v1/manifest.json +10 -0
- package/design-system/references/v2/README.md +27 -0
- package/design-system/references/v2/catalog.json +27382 -0
- package/design-system/references/v2/manifest.json +11 -0
- package/design-system/references/v3/README.md +27 -0
- package/design-system/references/v3/catalog.json +27628 -0
- package/design-system/references/v3/manifest.json +11 -0
- package/docs/CLI.md +299 -0
- package/docs/CLOUDFLARE.md +53 -0
- package/docs/CONTACT-FORMS.md +161 -0
- package/docs/DISTRIBUTION.md +70 -0
- package/docs/ENGINE.md +28 -0
- package/docs/PRESERVE.md +59 -0
- package/docs/SECURITY.md +23 -0
- package/docs/STOCK-MEDIA.md +66 -0
- package/licenses/blake3-wasm-LICENSE +21 -0
- package/licenses/entities-LICENSE +11 -0
- package/licenses/parse5-LICENSE +19 -0
- package/migrations/0001_init.sql +90 -0
- package/migrations/0002_analytics.sql +50 -0
- package/migrations/0003_site_updates.sql +29 -0
- package/migrations/0004_contact_forms.sql +75 -0
- package/migrations/0005_auth.sql +20 -0
- package/package.json +229 -6
- package/src/runtime/beacon.ts +329 -0
- package/src/runtime/before-after.ts +48 -0
- package/src/runtime/carousel.ts +20 -0
- package/src/runtime/cookie-compliance.ts +50 -0
- package/src/runtime/counter.ts +2 -0
- package/src/runtime/editor.ts +72 -0
- package/src/runtime/experience.ts +57 -0
- package/src/runtime/header.ts +46 -0
- package/src/runtime/leads.ts +102 -0
- package/src/runtime/lightbox.ts +26 -0
- package/src/runtime/reveal.ts +2 -0
- package/src/runtime/scroll-motion.controller.js +100 -0
- package/src/runtime/scroll-motion.count.js +21 -0
- package/src/runtime/scroll-motion.generated.ts +5 -0
- package/src/runtime/scroll-motion.vanilla.js +45 -0
- package/src/runtime/tabs.ts +40 -0
- package/src/stock/catalog.json +5445 -0
- package/src/stock/coverage.json +18 -0
- package/src/stock/picker.css +118 -0
- package/src/stock/picker.js +191 -0
- package/templates/site/.env.example +6 -0
- package/templates/site/.github/workflows/deploy.yml +59 -0
- package/templates/site/AGENTS.md +35 -0
- package/templates/site/CLAUDE.md +5 -0
- package/templates/site/GEMINI.md +5 -0
- package/templates/site/README.md +55 -0
- package/templates/site/components/README.md +18 -0
- package/templates/site/gitignore +10 -0
- package/templates/site/launch.json +14 -0
- package/templates/site/package.json +36 -0
- package/templates/site/pages/README.md +31 -0
- package/templates/site/site.json +10 -0
- package/templates/site/theme/defaults.json +17 -0
|
@@ -0,0 +1,923 @@
|
|
|
1
|
+
import {
|
|
2
|
+
KNOWLEDGE_RELEASE
|
|
3
|
+
} from "./chunk-BIEDSEL2.js";
|
|
4
|
+
import {
|
|
5
|
+
COMPOSITION_LESSON_RELEASE,
|
|
6
|
+
resolveDesignAuthoring
|
|
7
|
+
} from "./chunk-6H3T46F5.js";
|
|
8
|
+
import {
|
|
9
|
+
json
|
|
10
|
+
} from "./chunk-T6PE4KN4.js";
|
|
11
|
+
|
|
12
|
+
// src/agent/reference-fit.ts
|
|
13
|
+
var EXPRESSION_ALIASES = {
|
|
14
|
+
swiss: ["swiss", "systematic", "international typographic", "modernist"],
|
|
15
|
+
editorial: ["editorial", "literary", "reading room"],
|
|
16
|
+
"expressive-type": ["expressive type", "expressive typography", "typographic", "type led", "type-led"],
|
|
17
|
+
"quiet-luxury": ["quiet luxury", "quiet-luxury", "understated luxury", "refined", "restrained"],
|
|
18
|
+
documentary: ["documentary", "project first", "project-first"],
|
|
19
|
+
campaign: ["campaign", "fashion"],
|
|
20
|
+
hospitality: ["hospitality", "atmospheric", "cinematic"],
|
|
21
|
+
maximalism: ["maximalism", "maximalist", "collage", "graphic maximalism"],
|
|
22
|
+
handmade: ["handmade", "illustrative", "hand drawn", "hand-drawn"],
|
|
23
|
+
industrial: ["industrial", "utilitarian"],
|
|
24
|
+
technical: ["technical", "product led", "product-led"],
|
|
25
|
+
retro: ["retro", "nostalgic", "vintage"],
|
|
26
|
+
athletic: ["athletic", "kinetic"],
|
|
27
|
+
civic: ["civic", "functional", "task led", "task-led"],
|
|
28
|
+
"text-first": ["text first", "text-first", "sparse", "minimal"],
|
|
29
|
+
spatial: ["spatial", "experimental", "immersive"]
|
|
30
|
+
};
|
|
31
|
+
var clean = (s) => s.toLowerCase().replace(/[_-]/g, " ").replace(/\s+/g, " ").trim();
|
|
32
|
+
function expressionSignals(request) {
|
|
33
|
+
const text = clean(request), families = Object.entries(EXPRESSION_ALIASES).filter(([, terms]) => terms.some((t) => text.includes(clean(t)))).map(([id]) => id);
|
|
34
|
+
return { requested: request, families, uncertainty: request.trim() && !families.length ? "unsupported-expression" : null };
|
|
35
|
+
}
|
|
36
|
+
var TASK_ALIASES = {
|
|
37
|
+
"inspect-work": ["inspect work", "evaluate work", "portfolio", "case study", "inspect a specimen", "compare type families"],
|
|
38
|
+
"evaluate-service": ["evaluate service", "find service", "find specialist", "understand scope"],
|
|
39
|
+
"compare-options": ["compare options", "compare services", "choose", "compare topics"],
|
|
40
|
+
"understand-process": ["understand process", "how it works"],
|
|
41
|
+
"read-deeply": ["read deeply", "read insight", "find article", "find poem", "browse archive", "find film", "find information"],
|
|
42
|
+
"shop-collection": ["shop collection", "explore collection", "explore a brand and products"],
|
|
43
|
+
"explore-product": ["explore product", "inspect product", "inspect specification", "inspect specifications", "find practical product answers"],
|
|
44
|
+
"find-location": ["find location", "plan visit", "find menu", "find event", "find programme", "explore events"],
|
|
45
|
+
"book-inquiry": ["book inquiry", "book visit", "inquire"],
|
|
46
|
+
"play-audio": ["play audio", "listen audio"]
|
|
47
|
+
};
|
|
48
|
+
function normalizeTasks(tasks, precise = false) {
|
|
49
|
+
return [...new Set(tasks.flatMap((t) => {
|
|
50
|
+
const text = clean(t);
|
|
51
|
+
const hits = Object.entries(TASK_ALIASES).filter(([, aliases]) => aliases.some((a) => text === a && !(precise && ["explore collection", "find information"].includes(a)))).map(([id]) => id);
|
|
52
|
+
return hits.length ? hits : [text.replaceAll(" ", "-")];
|
|
53
|
+
}))].sort();
|
|
54
|
+
}
|
|
55
|
+
function businessContexts(text) {
|
|
56
|
+
const rules = {
|
|
57
|
+
"financial-service": /bookkeep|accountant|accounting|insurance|tax|financial|reconciliation/i,
|
|
58
|
+
"legal-service": /\blaw\b|legal|avocat|dispute resolution|chambers|counsel/i,
|
|
59
|
+
"creative-practice": /editorial|information design|graphic design|designer|typograph|writer|personal practice|creative studio/i,
|
|
60
|
+
"project-service": /architect|construction|building|roof|repair|contractor|landscape/i,
|
|
61
|
+
retail: /shop|retail|carry bag|objects for|wall shelf|collection|clothing|fashion/i,
|
|
62
|
+
venue: /restaurant|supper|menu|exhibition|museum|venue|hotel|gathering/i,
|
|
63
|
+
"technical-product": /software|platform|product ui|workflow|interface|component|specification/i
|
|
64
|
+
};
|
|
65
|
+
return Object.entries(rules).filter(([, pattern]) => pattern.test(text)).map(([id]) => id);
|
|
66
|
+
}
|
|
67
|
+
var WEAK = /* @__PURE__ */ new Set(["type-content", "real-copy", "process", "sparse-media", "action", "business-relationship", "professional-service", "routes", "content-group"]);
|
|
68
|
+
function fitScore(profile, fitSignals, signals, precise = false) {
|
|
69
|
+
const tasks = normalizeTasks(signals.visitorTasks || [], precise), expression = signals.expression || expressionSignals(signals.theme || "");
|
|
70
|
+
const specific = profile.tasks.filter((t) => tasks.includes(t) && t !== "book-inquiry"), action = Number(profile.tasks.includes("book-inquiry") && tasks.includes("book-inquiry"));
|
|
71
|
+
const styles = profile.expressions.filter((t) => expression.families.includes(t)), context = profile.contexts.filter((t) => signals.contexts?.includes(t));
|
|
72
|
+
const strong = fitSignals.filter((t) => !WEAK.has(t) && signals.known.includes(t)), generic = fitSignals.filter((t) => WEAK.has(t) && signals.known.includes(t));
|
|
73
|
+
const taskWeight = { "inspect-work": 24, "evaluate-service": 20, "shop-collection": 24, "find-location": 24, "explore-product": 20, "read-deeply": 12, "understand-process": 8, "compare-options": 8, "play-audio": 24 };
|
|
74
|
+
const contextConflict = precise && !!signals.contexts?.length && !!profile.contexts.length && !context.length;
|
|
75
|
+
const components = { task: (precise ? specific.map((t) => taskWeight[t] || 8).sort((a, b) => b - a).slice(0, 3).reduce((sum, n) => sum + n, 0) : Math.min(specific.length, 3) * 12) + action, expression: styles.length ? precise ? 50 : 30 : 0, context: context.length ? precise ? 16 : 10 : contextConflict ? -8 : 0, content: Math.min(strong.length, 2) * (precise ? 1 : 3), generic: Number(generic.length > 0) };
|
|
76
|
+
const score = Object.values(components).reduce((a, b) => a + b, 0);
|
|
77
|
+
return { score, components, reasons: [...specific.map((t) => `task:${t}`), ...styles.map((t) => `expression:${t}`), ...context.map((t) => `context:${t}`), ...contextConflict ? ["context:transfer-across-business-contexts"] : [], ...strong.map((t) => `content:${t}`), ...generic.length ? [`generic-bounded:${generic.join(",")}`] : []], supported: !!(specific.length || styles.length || context.length || !precise && strong.length) && (!precise || score >= 20) };
|
|
78
|
+
}
|
|
79
|
+
function essentialAssetGap(minimum, signals) {
|
|
80
|
+
if (minimum === "product-ui" && !signals.known.includes("product-ui")) return "actual product UI absent";
|
|
81
|
+
if (["one-image", "multiple-images"].includes(minimum) && !signals.known.includes("approved-image")) return "essential approved image absent";
|
|
82
|
+
if (minimum === "multiple-images" && !signals.known.includes("multiple-images")) return "multiple approved images absent";
|
|
83
|
+
return "";
|
|
84
|
+
}
|
|
85
|
+
function complementaryFit(pool, limit, tie, precise = false) {
|
|
86
|
+
const result = [], remaining = [...pool].sort((a, b) => b.score - a.score || tie(a.id).localeCompare(tie(b.id)));
|
|
87
|
+
while (remaining.length && result.length < limit) {
|
|
88
|
+
const near = remaining.filter((r) => r.score >= remaining[0].score - (precise ? 6 : 12));
|
|
89
|
+
const seen = new Set(result.flatMap((r) => r.profile.contributions)), styles = new Set(result.flatMap((r) => r.profile.expressions));
|
|
90
|
+
const gain = (r) => Math.min(r.profile.contributions.filter((c) => !seen.has(c)).length, precise ? 2 : Infinity) * 3 + Number(r.profile.expressions.some((s) => !styles.has(s)));
|
|
91
|
+
near.sort((a, b) => gain(b) - gain(a) || b.score - a.score || tie(a.id).localeCompare(tie(b.id)));
|
|
92
|
+
const next = near[0];
|
|
93
|
+
result.push({ ...next, reasons: [...next.reasons, `contribution:${next.profile.contributions.join(",")}`] });
|
|
94
|
+
remaining.splice(remaining.findIndex((r) => r.id === next.id), 1);
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// src/agent/reference-library.ts
|
|
100
|
+
import { createHash as createHash6 } from "node:crypto";
|
|
101
|
+
import { existsSync as existsSync6, readFileSync as readFileSync6, readdirSync, statSync } from "node:fs";
|
|
102
|
+
import { isAbsolute as isAbsolute2, join as join6, relative as relative4, resolve as resolve5, sep as sep2 } from "node:path";
|
|
103
|
+
|
|
104
|
+
// src/agent/design-calibration.ts
|
|
105
|
+
import { createHash } from "node:crypto";
|
|
106
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
107
|
+
import { dirname, join, resolve } from "node:path";
|
|
108
|
+
import { deflateSync } from "node:zlib";
|
|
109
|
+
var CALIBRATION_PACK_VERSION = "v2";
|
|
110
|
+
var PROBE_TOKEN = "2E6BFF";
|
|
111
|
+
var PROBE_RGB = { r: 46, g: 107, b: 255 };
|
|
112
|
+
var ACCURACY_PROBE_PHRASE = "Trusted legal help";
|
|
113
|
+
function crc32(buf) {
|
|
114
|
+
let c = ~0;
|
|
115
|
+
for (const byte of buf) {
|
|
116
|
+
c ^= byte;
|
|
117
|
+
for (let i = 0; i < 8; i++) c = c >>> 1 ^ 3988292384 & -(c & 1);
|
|
118
|
+
}
|
|
119
|
+
return ~c >>> 0;
|
|
120
|
+
}
|
|
121
|
+
function pngChunk(type, data) {
|
|
122
|
+
const length = Buffer.alloc(4);
|
|
123
|
+
length.writeUInt32BE(data.length);
|
|
124
|
+
const body = Buffer.concat([Buffer.from(type), data]);
|
|
125
|
+
const crc = Buffer.alloc(4);
|
|
126
|
+
crc.writeUInt32BE(crc32(body));
|
|
127
|
+
return Buffer.concat([length, body, crc]);
|
|
128
|
+
}
|
|
129
|
+
function solidPng(r, g, b, size = 24) {
|
|
130
|
+
const ihdr = Buffer.alloc(13);
|
|
131
|
+
ihdr.writeUInt32BE(size, 0);
|
|
132
|
+
ihdr.writeUInt32BE(size, 4);
|
|
133
|
+
ihdr[8] = 8;
|
|
134
|
+
ihdr[9] = 2;
|
|
135
|
+
const stride = size * 3 + 1;
|
|
136
|
+
const raw = Buffer.alloc(stride * size);
|
|
137
|
+
for (let y = 0; y < size; y++) {
|
|
138
|
+
const row = y * stride;
|
|
139
|
+
raw[row] = 0;
|
|
140
|
+
for (let x = 0; x < size; x++) {
|
|
141
|
+
const i = row + 1 + x * 3;
|
|
142
|
+
raw[i] = r;
|
|
143
|
+
raw[i + 1] = g;
|
|
144
|
+
raw[i + 2] = b;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return Buffer.concat([
|
|
148
|
+
Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]),
|
|
149
|
+
pngChunk("IHDR", ihdr),
|
|
150
|
+
pngChunk("IDAT", deflateSync(raw)),
|
|
151
|
+
pngChunk("IEND", Buffer.alloc(0))
|
|
152
|
+
]);
|
|
153
|
+
}
|
|
154
|
+
function resolveKernelRoot(siteOrKernel) {
|
|
155
|
+
const env = (process.env.VITRIS_HARNESS || process.env.VITRIS_KERNEL)?.trim();
|
|
156
|
+
if (env && existsSync(join(calibrationPackDir(env), "manifest.json"))) return resolve(env);
|
|
157
|
+
let cursor = resolve(siteOrKernel);
|
|
158
|
+
for (let i = 0; i < 8; i++) {
|
|
159
|
+
for (const packageName of ["@tryvitris/website-harness", "@tryvitris/harness", "@vitris/harness", "@vitris/kernel"]) {
|
|
160
|
+
const installed = join(cursor, "node_modules", packageName);
|
|
161
|
+
if (existsSync(join(calibrationPackDir(installed), "manifest.json")) && existsSync(join(installed, "package.json"))) return installed;
|
|
162
|
+
}
|
|
163
|
+
if (existsSync(join(calibrationPackDir(cursor), "manifest.json")) && existsSync(join(cursor, "agent/graph.yaml"))) {
|
|
164
|
+
return cursor;
|
|
165
|
+
}
|
|
166
|
+
const pkgPath = join(cursor, "package.json");
|
|
167
|
+
if (existsSync(pkgPath)) {
|
|
168
|
+
try {
|
|
169
|
+
const pkg = json(pkgPath);
|
|
170
|
+
if (["@tryvitris/website-harness", "@tryvitris/harness", "@vitris/harness", "@vitris/kernel"].includes(pkg.name || "") && existsSync(join(calibrationPackDir(cursor), "manifest.json"))) return cursor;
|
|
171
|
+
const dep = pkg.dependencies?.["@tryvitris/website-harness"] || pkg.dependencies?.["@tryvitris/harness"] || pkg.dependencies?.["@vitris/harness"] || pkg.dependencies?.["@vitris/kernel"];
|
|
172
|
+
if (typeof dep === "string" && dep.startsWith("file:")) {
|
|
173
|
+
const kernel = resolve(cursor, dep.slice("file:".length));
|
|
174
|
+
if (existsSync(join(calibrationPackDir(kernel), "manifest.json"))) return kernel;
|
|
175
|
+
}
|
|
176
|
+
} catch {
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
const parent = dirname(cursor);
|
|
180
|
+
if (parent === cursor) break;
|
|
181
|
+
cursor = parent;
|
|
182
|
+
}
|
|
183
|
+
return void 0;
|
|
184
|
+
}
|
|
185
|
+
function calibrationPackDir(kernel) {
|
|
186
|
+
const current = join(resolve(kernel), "design-system/calibration", CALIBRATION_PACK_VERSION);
|
|
187
|
+
return existsSync(join(current, "manifest.json")) ? current : join(resolve(kernel), "design-system/calibration/v1");
|
|
188
|
+
}
|
|
189
|
+
function loadCalibrationManifest(kernel) {
|
|
190
|
+
return json(join(calibrationPackDir(kernel), "manifest.json"));
|
|
191
|
+
}
|
|
192
|
+
function calibrationPackHash(kernel) {
|
|
193
|
+
const dir = calibrationPackDir(kernel);
|
|
194
|
+
const manifest = loadCalibrationManifest(kernel);
|
|
195
|
+
const hash2 = createHash("sha256");
|
|
196
|
+
hash2.update(readFileSync(join(dir, "manifest.json")));
|
|
197
|
+
for (const record of manifest.records) {
|
|
198
|
+
hash2.update(record.file);
|
|
199
|
+
hash2.update(readFileSync(join(dir, record.file)));
|
|
200
|
+
}
|
|
201
|
+
return hash2.digest("hex");
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// src/agent/composition-context.ts
|
|
205
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
206
|
+
import { existsSync as existsSync4, readFileSync as readFileSync4 } from "node:fs";
|
|
207
|
+
import { join as join4 } from "node:path";
|
|
208
|
+
|
|
209
|
+
// src/knowledge/composition.ts
|
|
210
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
211
|
+
import { existsSync as existsSync3, lstatSync, readFileSync as readFileSync3 } from "node:fs";
|
|
212
|
+
import { dirname as dirname2, join as join3, relative as relative2, resolve as resolve3 } from "node:path";
|
|
213
|
+
|
|
214
|
+
// src/knowledge/pack.ts
|
|
215
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
216
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
217
|
+
import { join as join2, relative, resolve as resolve2 } from "node:path";
|
|
218
|
+
function sha256(bytes) {
|
|
219
|
+
return createHash2("sha256").update(bytes).digest("hex");
|
|
220
|
+
}
|
|
221
|
+
function confined(dir, file) {
|
|
222
|
+
if (!file || file.includes("..") || file.startsWith("/") || /^[A-Za-z]:/.test(file)) return void 0;
|
|
223
|
+
const target = resolve2(dir, file);
|
|
224
|
+
const rel = relative(dir, target);
|
|
225
|
+
if (rel.startsWith("..")) return void 0;
|
|
226
|
+
return target;
|
|
227
|
+
}
|
|
228
|
+
function knowledgeV2Dir(kernel) {
|
|
229
|
+
return join2(resolve2(kernel), "design-system", "knowledge", "v2");
|
|
230
|
+
}
|
|
231
|
+
function readJson(path) {
|
|
232
|
+
try {
|
|
233
|
+
return JSON.parse(readFileSync2(path, "utf8"));
|
|
234
|
+
} catch {
|
|
235
|
+
return void 0;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function verifyKnowledgeV2(kernel) {
|
|
239
|
+
const dir = knowledgeV2Dir(kernel);
|
|
240
|
+
const errors = [];
|
|
241
|
+
const manifestPath = join2(dir, "manifest.json");
|
|
242
|
+
if (!existsSync2(manifestPath)) return ["Missing design-system/knowledge/v2 pack"];
|
|
243
|
+
const manifest = readJson(manifestPath);
|
|
244
|
+
if (!manifest || manifest.schemaVersion !== 1) errors.push("v2 manifest schema mismatch");
|
|
245
|
+
if (manifest && manifest.knowledgeRelease !== KNOWLEDGE_RELEASE) errors.push("v2 release mismatch");
|
|
246
|
+
if (manifest && manifest.labeledPreferenceData !== false) errors.push("v2 pack must not claim labeled preference data");
|
|
247
|
+
for (const file of manifest?.files || []) {
|
|
248
|
+
const target = confined(dir, file.path);
|
|
249
|
+
if (!target || !existsSync2(target)) errors.push(`Missing or unconfined v2 file: ${file.path}`);
|
|
250
|
+
else if (sha256(readFileSync2(target)) !== file.sha256) errors.push(`v2 hash mismatch: ${file.path}`);
|
|
251
|
+
}
|
|
252
|
+
return errors;
|
|
253
|
+
}
|
|
254
|
+
function loadKnowledgeV2(siteOrKernel) {
|
|
255
|
+
const kernel = resolveKernelRoot(siteOrKernel);
|
|
256
|
+
if (!kernel) return void 0;
|
|
257
|
+
const dir = knowledgeV2Dir(kernel);
|
|
258
|
+
const errors = verifyKnowledgeV2(kernel);
|
|
259
|
+
const siteConfig = readJson(join2(resolve2(siteOrKernel), "site.json"));
|
|
260
|
+
if (siteConfig?.knowledgeRelease && siteConfig.knowledgeRelease !== KNOWLEDGE_RELEASE) {
|
|
261
|
+
errors.push(`Site pins knowledge release ${siteConfig.knowledgeRelease}; installed kernel provides ${KNOWLEDGE_RELEASE}. Review and upgrade explicitly.`);
|
|
262
|
+
}
|
|
263
|
+
const sources = readJson(join2(dir, "sources.json")) || [];
|
|
264
|
+
const requirements = readJson(join2(dir, "requirements.json")) || [];
|
|
265
|
+
const extensions = readJson(join2(dir, "lesson-extensions.json")) || [];
|
|
266
|
+
const replacements = readJson(join2(dir, "replacements.json")) || [];
|
|
267
|
+
const assets = readJson(join2(dir, "assets.json")) || [];
|
|
268
|
+
for (const source of sources) {
|
|
269
|
+
if (sha256(source.summary) !== source.summarySha256) errors.push(`Source summary hash mismatch: ${source.id}`);
|
|
270
|
+
if (source.reviewStatus === "live-checked" && !source.lastReviewed) errors.push(`Live-checked source missing review date: ${source.id}`);
|
|
271
|
+
}
|
|
272
|
+
return { kernel, release: KNOWLEDGE_RELEASE, sources, requirements, extensions, replacements, assets, errors };
|
|
273
|
+
}
|
|
274
|
+
function lessonExtension(pack, id) {
|
|
275
|
+
return pack?.extensions.find((item) => item.id === id);
|
|
276
|
+
}
|
|
277
|
+
function coverageReport(pack) {
|
|
278
|
+
const missingClassification = pack.requirements.filter((item) => !item.authorityClass || !item.implementationStatus || item.authorityIds.length === 0).map((item) => item.id);
|
|
279
|
+
return {
|
|
280
|
+
release: pack.release,
|
|
281
|
+
requirements: pack.requirements.map((item) => ({
|
|
282
|
+
id: item.id,
|
|
283
|
+
authorityClass: item.authorityClass,
|
|
284
|
+
implementationStatus: item.implementationStatus,
|
|
285
|
+
verifierId: item.verifierId
|
|
286
|
+
})),
|
|
287
|
+
missingClassification
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// src/knowledge/composition.ts
|
|
292
|
+
var sha = (bytes) => createHash3("sha256").update(bytes).digest("hex");
|
|
293
|
+
var hex = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
|
|
294
|
+
var unique = (values) => new Set(values).size === values.length;
|
|
295
|
+
function confined2(dir, path) {
|
|
296
|
+
if (!path || path.includes("..") || path.startsWith("/") || path.includes("\\") || /^[A-Za-z]:/.test(path)) throw new Error(`Unconfined composition pack path: ${path}`);
|
|
297
|
+
const target = resolve3(dir, path);
|
|
298
|
+
if (relative2(dir, target).startsWith("..")) throw new Error(`Unconfined composition pack path: ${path}`);
|
|
299
|
+
for (let cursor = target; cursor !== dir; cursor = dirname2(cursor)) if (existsSync3(cursor) && lstatSync(cursor).isSymbolicLink()) throw new Error(`Symlink in composition pack path: ${path}`);
|
|
300
|
+
return target;
|
|
301
|
+
}
|
|
302
|
+
function object(value, label) {
|
|
303
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(`Invalid ${label}`);
|
|
304
|
+
return value;
|
|
305
|
+
}
|
|
306
|
+
function strings(value, label) {
|
|
307
|
+
if (!Array.isArray(value) || value.some((item) => typeof item !== "string" || !item.trim())) throw new Error(`Invalid ${label}`);
|
|
308
|
+
return value;
|
|
309
|
+
}
|
|
310
|
+
function parsed(bytes, label) {
|
|
311
|
+
try {
|
|
312
|
+
return object(JSON.parse(new TextDecoder().decode(bytes)), label);
|
|
313
|
+
} catch {
|
|
314
|
+
throw new Error(`Invalid composition pack JSON: ${label}`);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function loadCompositionPack(siteOrKernel, requestedRelease = COMPOSITION_LESSON_RELEASE) {
|
|
318
|
+
if (requestedRelease !== COMPOSITION_LESSON_RELEASE) throw new Error(`Unknown composition lesson release ${requestedRelease}`);
|
|
319
|
+
const kernel = resolveKernelRoot(siteOrKernel);
|
|
320
|
+
if (!kernel) throw new Error("Installed harness root is unavailable for composition lessons");
|
|
321
|
+
const dir = join3(kernel, "design-system/knowledge/v3");
|
|
322
|
+
const manifestPath = join3(dir, "manifest.json");
|
|
323
|
+
if (!existsSync3(manifestPath)) throw new Error(`Missing composition lesson release ${requestedRelease}`);
|
|
324
|
+
const manifestBytes = readFileSync3(manifestPath);
|
|
325
|
+
const manifest = parsed(manifestBytes, "manifest");
|
|
326
|
+
if (manifest.schemaVersion !== 1 || manifest.lessonRelease !== requestedRelease || manifest.standardsRelease !== KNOWLEDGE_RELEASE || manifest.labeledPreferenceData !== false) throw new Error("Composition manifest version or dependency mismatch");
|
|
327
|
+
const v2Errors = verifyKnowledgeV2(kernel);
|
|
328
|
+
if (v2Errors.length) throw new Error(`Composition standards dependency invalid: ${v2Errors.join("; ")}`);
|
|
329
|
+
const requirements = new Set(loadKnowledgeV2(kernel)?.requirements.map((item) => item.id) || []);
|
|
330
|
+
if (!Array.isArray(manifest.files)) throw new Error("Composition manifest has no files");
|
|
331
|
+
const bytes = /* @__PURE__ */ new Map();
|
|
332
|
+
for (const entry of manifest.files) {
|
|
333
|
+
const file = object(entry, "manifest file");
|
|
334
|
+
if (typeof file.path !== "string" || !hex(file.sha256)) throw new Error("Invalid composition manifest file entry");
|
|
335
|
+
if (bytes.has(file.path)) throw new Error(`Duplicate composition file ${file.path}`);
|
|
336
|
+
const target = confined2(dir, file.path);
|
|
337
|
+
if (!existsSync3(target)) throw new Error(`Missing composition file ${file.path}`);
|
|
338
|
+
const content = readFileSync3(target);
|
|
339
|
+
if (sha(content) !== file.sha256) throw new Error(`Composition hash mismatch: ${file.path}`);
|
|
340
|
+
bytes.set(file.path, content);
|
|
341
|
+
}
|
|
342
|
+
const read3 = (path) => {
|
|
343
|
+
const content = bytes.get(path);
|
|
344
|
+
if (!content) throw new Error(`Composition file not in verified manifest: ${path}`);
|
|
345
|
+
return content;
|
|
346
|
+
};
|
|
347
|
+
const catalog = parsed(read3("catalog.json"), "catalog");
|
|
348
|
+
const examplesFile = parsed(read3("examples/catalog.json"), "examples catalog");
|
|
349
|
+
const sourcesFile = parsed(read3("sources.json"), "sources");
|
|
350
|
+
if (catalog.schemaVersion !== 1 || catalog.lessonRelease !== requestedRelease || examplesFile.schemaVersion !== 1 || examplesFile.lessonRelease !== requestedRelease) throw new Error("Composition catalog release mismatch");
|
|
351
|
+
if (!Array.isArray(catalog.lessons) || catalog.lessons.length !== 24 || !Array.isArray(examplesFile.examples) || !Array.isArray(sourcesFile.sources)) throw new Error("Composition catalog count or shape mismatch");
|
|
352
|
+
const sources = sourcesFile.sources;
|
|
353
|
+
const sourceIds = new Set(sources.map((item) => item.id));
|
|
354
|
+
if (!unique([...sourceIds]) || sourceIds.size !== sources.length) throw new Error("Duplicate composition source ID");
|
|
355
|
+
const lessons = catalog.lessons;
|
|
356
|
+
if (!unique(lessons.map((item) => item.id))) throw new Error("Duplicate composition lesson ID");
|
|
357
|
+
const examples = examplesFile.examples;
|
|
358
|
+
if (!unique(examples.map((item) => item.id))) throw new Error("Duplicate composition example ID");
|
|
359
|
+
const exampleMap = new Map(examples.map((item) => [item.id, item]));
|
|
360
|
+
const usedExamples = /* @__PURE__ */ new Set();
|
|
361
|
+
for (const lesson of lessons) {
|
|
362
|
+
if (!/^cmp-[a-z0-9-]+$/.test(lesson.id) || lesson.version !== 1 || lesson.release !== requestedRelease || !lesson.title?.trim() || !lesson.summary?.trim() || !lesson.principle?.trim() || !lesson.relationshipGroup?.trim()) throw new Error(`Invalid composition lesson ${lesson.id}`);
|
|
363
|
+
for (const key of ["scope", "tasks", "stages", "relationships", "sourceIds", "requirementIds", "demonstrationIds", "reviewProbeIds"]) strings(lesson[key], `${lesson.id}.${key}`);
|
|
364
|
+
if (!lesson.scope.every((item) => ["element", "section", "page", "site"].includes(item))) throw new Error(`Invalid scope for ${lesson.id}`);
|
|
365
|
+
const applicability = object(lesson.applicability, `${lesson.id}.applicability`);
|
|
366
|
+
strings(applicability.positiveSignals, `${lesson.id}.positiveSignals`);
|
|
367
|
+
strings(applicability.exclusions, `${lesson.id}.exclusions`);
|
|
368
|
+
if (typeof applicability.uncertainty !== "string" || !applicability.uncertainty.trim()) throw new Error(`Missing uncertainty for ${lesson.id}`);
|
|
369
|
+
if (!Array.isArray(lesson.evidenceNeeds)) throw new Error(`Invalid evidence needs for ${lesson.id}`);
|
|
370
|
+
for (const need of lesson.evidenceNeeds) if (!["fact", "media", "route", "interaction-model"].includes(need.kind) || typeof need.mandatory !== "boolean" || need.minimum !== void 0 && (!Number.isInteger(need.minimum) || need.minimum < 0)) throw new Error(`Invalid evidence need for ${lesson.id}`);
|
|
371
|
+
if (!hex(lesson.contentHash) || sha(read3(lesson.bodyPath)) !== lesson.contentHash) throw new Error(`Body hash mismatch for ${lesson.id}`);
|
|
372
|
+
for (const id of lesson.sourceIds) if (!sourceIds.has(id)) throw new Error(`Missing source ${id} for ${lesson.id}`);
|
|
373
|
+
for (const id of lesson.requirementIds) if (!requirements.has(id)) throw new Error(`Missing v2 requirement ${id} for ${lesson.id}`);
|
|
374
|
+
if (lesson.demonstrationIds.length !== 3) throw new Error(`Lesson ${lesson.id} needs three contrasting scenario records`);
|
|
375
|
+
const roles = lesson.demonstrationIds.map((id) => {
|
|
376
|
+
const example = exampleMap.get(id);
|
|
377
|
+
usedExamples.add(id);
|
|
378
|
+
if (!example || example.lessonId !== lesson.id || !hex(example.sourceHash) || sha(example.scenario) !== example.sourceHash) throw new Error(`Invalid example ${id} for ${lesson.id}`);
|
|
379
|
+
if (example.fixturePath) read3(example.fixturePath);
|
|
380
|
+
if (example.inspectionStatus === "inspected" && (!example.fixturePath || !example.captureHandles.length)) throw new Error(`Example ${id} claims inspection without captured source`);
|
|
381
|
+
return example.role;
|
|
382
|
+
});
|
|
383
|
+
if (!unique(roles) || !roles.includes("application-a") || !roles.includes("application-b") || !roles.includes("counterexample")) throw new Error(`Inconsistent example roles for ${lesson.id}`);
|
|
384
|
+
}
|
|
385
|
+
if (usedExamples.size !== examples.length) throw new Error("Orphan composition example record");
|
|
386
|
+
return { kernel, release: requestedRelease, manifestHash: sha(manifestBytes), lessons, examples, sources, body: (id) => new TextDecoder().decode(read3(lessons.find((item) => item.id === id)?.bodyPath || "")) };
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// src/agent/composition-context.ts
|
|
390
|
+
var COMPOSITION_SELECTOR_VERSION = "composition-selector-1";
|
|
391
|
+
var sha2 = (value) => createHash4("sha256").update(value).digest("hex");
|
|
392
|
+
var read = (root, path) => {
|
|
393
|
+
const file = join4(root, path);
|
|
394
|
+
if (!existsSync4(file)) return void 0;
|
|
395
|
+
return JSON.parse(readFileSync4(file, "utf8"));
|
|
396
|
+
};
|
|
397
|
+
function compositionSignalsFromSite(root, page) {
|
|
398
|
+
const narrative = read(root, "onboarding/narrative-brief.json");
|
|
399
|
+
const media = read(root, "onboarding/media-inventory.json");
|
|
400
|
+
const story = read(root, "onboarding/storyboard.json");
|
|
401
|
+
const direction = read(root, "onboarding/direction.json");
|
|
402
|
+
const planned = page ? story?.pages.find((item) => item.path === page) : void 0;
|
|
403
|
+
const texts = [
|
|
404
|
+
...(narrative?.visitorQuestions || []).map((item) => ({ text: item.question, origin: `narrative:visitor-question:${item.id}` })),
|
|
405
|
+
...(narrative?.designOpportunities || []).map((item) => ({ text: `${item.visitorNeed} ${item.presentationOpportunity}`, origin: `narrative:opportunity:${item.id}` })),
|
|
406
|
+
...(planned?.sections || []).map((item) => ({ text: `${item.question} ${item.purpose} ${item.message}`, origin: `storyboard:${page}#${item.id}` })),
|
|
407
|
+
...direction?.centralIdea ? [{ text: direction.centralIdea, origin: "direction:centralIdea" }] : []
|
|
408
|
+
];
|
|
409
|
+
const patterns = {
|
|
410
|
+
"business-relationship": /work|service|process|result|outcome|detail/i,
|
|
411
|
+
"content-group": /group|related|detail|scope|caption|project|service/i,
|
|
412
|
+
priority: /urgent|important|primary|first|priority|main/i,
|
|
413
|
+
alignment: /compare|column|measure|specification|metadata/i,
|
|
414
|
+
"page-sequence": /process|sequence|journey|step|next|before|after/i,
|
|
415
|
+
"type-content": /explain|read|story|statement|editorial|guide/i,
|
|
416
|
+
"real-copy": /explain|detail|qualify|describe|scope|information/i,
|
|
417
|
+
"approved-image": /image|photo|project|product|visual/i,
|
|
418
|
+
"multiple-images": /sequence|gallery|portfolio|before and after/i,
|
|
419
|
+
proof: /evidence|proof|credential|case|review|testimonial|result/i,
|
|
420
|
+
collection: /services|projects|options|catalog|list|directory/i,
|
|
421
|
+
comparison: /compare|choose|which|versus|difference|options/i,
|
|
422
|
+
process: /process|step|prepare|how it works|responsib/i,
|
|
423
|
+
"sparse-media": /text|document|checklist|scope|ledger/i,
|
|
424
|
+
routes: /navigation|find|route|browse|pages/i,
|
|
425
|
+
action: /contact|inquire|book|call|visit|estimate|quote/i,
|
|
426
|
+
"local-facts": /address|hours|directions|parking|visit|location|service area/i,
|
|
427
|
+
identity: /identity|brand|motif|material|character/i,
|
|
428
|
+
responsive: /mobile|narrow|responsive|reflow/i,
|
|
429
|
+
"optional-detail": /details|optional|expand|technical|specifications/i,
|
|
430
|
+
"state-change": /motion|transition|animation|change|progress/i,
|
|
431
|
+
"interaction-model": /interact|select|filter|slider|compare/i,
|
|
432
|
+
"uncertain-choice": /alternative|uncertain|direction|choose/i
|
|
433
|
+
};
|
|
434
|
+
const signals = Object.entries(patterns).map(([id, pattern]) => {
|
|
435
|
+
const match = texts.find((item) => pattern.test(item.text));
|
|
436
|
+
return { id, state: match ? "known" : "unknown", origin: match?.origin || "not-established" };
|
|
437
|
+
});
|
|
438
|
+
if (media) {
|
|
439
|
+
const usable = media.assets.filter((item) => item.inspected && item.disposition === "use");
|
|
440
|
+
const images = usable.filter((item) => item.kind !== "video");
|
|
441
|
+
const set = (id, state) => {
|
|
442
|
+
const index = signals.findIndex((item) => item.id === id);
|
|
443
|
+
signals[index] = { id, state, origin: "onboarding/media-inventory.json:inspected-use" };
|
|
444
|
+
};
|
|
445
|
+
set("approved-image", images.length ? "known" : "absent");
|
|
446
|
+
set("multiple-images", images.length >= 2 ? "known" : "absent");
|
|
447
|
+
set("sparse-media", images.length <= 1 ? "known" : "absent");
|
|
448
|
+
}
|
|
449
|
+
if (story) {
|
|
450
|
+
const paths = story.pages.map((item) => item.path);
|
|
451
|
+
signals[signals.findIndex((item) => item.id === "routes")] = { id: "routes", state: paths.length > 1 ? "known" : "absent", origin: "onboarding/storyboard.json:pages" };
|
|
452
|
+
}
|
|
453
|
+
return signals;
|
|
454
|
+
}
|
|
455
|
+
function selectCompositionLessons(input) {
|
|
456
|
+
const known = new Set(input.signals.filter((item) => item.state === "known").map((item) => item.id));
|
|
457
|
+
const absent = new Set(input.signals.filter((item) => item.state === "absent").map((item) => item.id));
|
|
458
|
+
const eligible = [], excluded = [];
|
|
459
|
+
for (const lesson of input.pack.lessons) {
|
|
460
|
+
if (!lesson.stages.includes(input.stage)) {
|
|
461
|
+
excluded.push({ id: lesson.id, reason: "stage" });
|
|
462
|
+
continue;
|
|
463
|
+
}
|
|
464
|
+
const impossible = lesson.evidenceNeeds.find((item) => item.mandatory && item.kind === "media" && absent.has("approved-image"));
|
|
465
|
+
if (impossible) {
|
|
466
|
+
excluded.push({ id: lesson.id, reason: "required approved media absent" });
|
|
467
|
+
continue;
|
|
468
|
+
}
|
|
469
|
+
const hits = lesson.applicability.positiveSignals.filter((item) => known.has(item));
|
|
470
|
+
if (!hits.length) {
|
|
471
|
+
excluded.push({ id: lesson.id, reason: "no established positive signal; available for discovery" });
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
eligible.push({ id: lesson.id, score: hits.reduce((total, item) => total + 2 + (input.page && input.signals.find((signal) => signal.id === item)?.origin.startsWith(`storyboard:${input.page}#`) ? 3 : 0), 0), reasons: hits.map((item) => `${item}: ${input.signals.find((signal) => signal.id === item)?.origin}`) });
|
|
475
|
+
}
|
|
476
|
+
eligible.sort((a, b) => b.score - a.score || a.id.localeCompare(b.id));
|
|
477
|
+
const chosen = [], seenGroups = /* @__PURE__ */ new Set();
|
|
478
|
+
for (const candidate of eligible) {
|
|
479
|
+
const lesson = input.pack.lessons.find((item) => item.id === candidate.id);
|
|
480
|
+
if (chosen.length >= (input.limit ?? 4)) break;
|
|
481
|
+
if (seenGroups.has(lesson.relationshipGroup) && eligible.some((other) => other.score === candidate.score && !seenGroups.has(input.pack.lessons.find((item) => item.id === other.id).relationshipGroup))) continue;
|
|
482
|
+
chosen.push(lesson);
|
|
483
|
+
seenGroups.add(lesson.relationshipGroup);
|
|
484
|
+
}
|
|
485
|
+
const ties = [...new Set(eligible.map((item) => item.score))].map((score) => ({ score, ids: eligible.filter((item) => item.score === score).map((item) => item.id) })).filter((item) => item.ids.length > 1);
|
|
486
|
+
return {
|
|
487
|
+
schemaVersion: 1,
|
|
488
|
+
selectorVersion: COMPOSITION_SELECTOR_VERSION,
|
|
489
|
+
stage: input.stage,
|
|
490
|
+
page: input.page || null,
|
|
491
|
+
policyHash: input.policyHash,
|
|
492
|
+
manifestHash: input.pack.manifestHash,
|
|
493
|
+
inputSignalHash: sha2(JSON.stringify(input.signals)),
|
|
494
|
+
signals: input.signals,
|
|
495
|
+
eligible,
|
|
496
|
+
excluded,
|
|
497
|
+
selected: chosen.map((item) => ({ id: item.id, version: item.version, contentHash: item.contentHash, bodyHash: item.contentHash, summary: item.summary, expansionHandle: `composition:${item.id}@${item.version}`, reason: eligible.find((candidate) => candidate.id === item.id).reasons.join("; ") })),
|
|
498
|
+
alternatives: eligible.filter((item) => !chosen.some((lesson) => lesson.id === item.id)).map((item) => {
|
|
499
|
+
const lesson = input.pack.lessons.find((entry) => entry.id === item.id);
|
|
500
|
+
return { id: lesson.id, summary: lesson.summary, expansionHandle: `composition:${lesson.id}@${lesson.version}` };
|
|
501
|
+
}),
|
|
502
|
+
ties
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
function compositionContextForStage(root, stage, page, limit) {
|
|
506
|
+
const policy = resolveDesignAuthoring(root);
|
|
507
|
+
if (policy.mode !== "composition-v1") return void 0;
|
|
508
|
+
const pack = loadCompositionPack(root, policy.lessonRelease);
|
|
509
|
+
const receipt = selectCompositionLessons({ pack, stage, page, signals: compositionSignalsFromSite(root, page), policyHash: policy.hash, limit });
|
|
510
|
+
return { policy, pack, receipt };
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// src/agent/reference-studies.ts
|
|
514
|
+
import { createHash as createHash5 } from "node:crypto";
|
|
515
|
+
import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:fs";
|
|
516
|
+
import { isAbsolute, join as join5, relative as relative3, resolve as resolve4, sep } from "node:path";
|
|
517
|
+
var hash = (v) => createHash5("sha256").update(v).digest("hex");
|
|
518
|
+
function confined3(base, path) {
|
|
519
|
+
const target = resolve4(base, path), rel = relative3(base, target);
|
|
520
|
+
if (!rel || isAbsolute(path) || isAbsolute(rel) || rel === ".." || rel.startsWith(`..${sep}`)) throw new Error(`Study path escapes release: ${path}`);
|
|
521
|
+
return target;
|
|
522
|
+
}
|
|
523
|
+
function loadReferenceStudies(kernel, release = "2026-10-05.1") {
|
|
524
|
+
if (!["2026-10-05.1", "2026-10-06.1", "2026-10-06.2"].includes(release)) throw new Error(`Unsupported original study release: ${release}`);
|
|
525
|
+
const dataRoot = process.env.VITRIS_REFERENCE_DATA ? resolve4(process.env.VITRIS_REFERENCE_DATA) : kernel;
|
|
526
|
+
const base = join5(dataRoot, release === "2026-10-05.1" ? "design-system/compositions/v2" : release === "2026-10-06.1" ? "design-system/compositions/v3" : "design-system/compositions/v4"), manifestPath = join5(base, "manifest.json");
|
|
527
|
+
if (!existsSync5(manifestPath)) throw new Error("Original reference study release unavailable. Corrected teaching releases are optional data; set VITRIS_REFERENCE_DATA to the verified teaching bundle root (see docs/DISTRIBUTION.md).");
|
|
528
|
+
const bytes = readFileSync5(manifestPath), manifest = JSON.parse(bytes.toString());
|
|
529
|
+
if (manifest.schemaVersion !== 1 || manifest.release !== release || manifest.labeledPreferenceData !== false || !Array.isArray(manifest.files)) throw new Error("Unsupported original study manifest");
|
|
530
|
+
const readPinned = (pin) => {
|
|
531
|
+
const path = confined3(base, pin.path);
|
|
532
|
+
if (!existsSync5(path) || hash(readFileSync5(path)) !== pin.sha256) throw new Error(`Missing or changed original study file: ${pin.path}`);
|
|
533
|
+
return readFileSync5(path);
|
|
534
|
+
};
|
|
535
|
+
const catalog = JSON.parse(readPinned(manifest.catalog).toString());
|
|
536
|
+
if (catalog.schemaVersion !== 1 || catalog.release !== manifest.release || !Array.isArray(catalog.studies)) throw new Error("Unsupported original study catalog");
|
|
537
|
+
const pins = new Map(manifest.files.map((pin) => [pin.path, pin]));
|
|
538
|
+
if (pins.size !== manifest.files.length) throw new Error("Duplicate original study file pins");
|
|
539
|
+
for (const pin of manifest.files) readPinned(pin);
|
|
540
|
+
const ids = /* @__PURE__ */ new Set();
|
|
541
|
+
for (const study of catalog.studies) {
|
|
542
|
+
if (study.motionTags !== void 0 && (!Array.isArray(study.motionTags) || study.motionTags.some((t) => typeof t !== "string" || !t.trim()))) throw new Error(`Invalid motion study tags: ${study.id}`);
|
|
543
|
+
for (const evidence of study.temporalEvidence || []) {
|
|
544
|
+
if (!evidence.route || !evidence.observation?.trim() || !["agent", "human"].includes(evidence.assessor) || !/^[a-f0-9]{64}$/.test(evidence.scenarioHash) || !/^[a-f0-9]{64}$/.test(evidence.sourceHash) || pins.get(evidence.recording?.path)?.sha256 !== evidence.recording?.sha256) throw new Error(`Unverified original motion recording: ${study.id}`);
|
|
545
|
+
}
|
|
546
|
+
if (!/^[a-z0-9-]+$/.test(study.id) || ids.has(study.id) || !Number.isInteger(study.revision) || study.revision < 1 || study.brief?.fictional !== true || study.humanPreference !== null) throw new Error(`Invalid original study contract: ${study.id}`);
|
|
547
|
+
ids.add(study.id);
|
|
548
|
+
if (!study.organizingIdea || !study.provenance?.rights || !study.lessonIds?.length || !Array.isArray(study.renderEvidence)) throw new Error(`Incomplete original study: ${study.id}`);
|
|
549
|
+
confined3(base, study.sourcePath);
|
|
550
|
+
if (!pins.has(`${study.sourcePath}/study.json`) || !pins.has(`${study.sourcePath}/pages/index.html`) || !pins.has(`${study.sourcePath}/pages/detail/index.html`)) throw new Error(`Unpinned original study source: ${study.id}`);
|
|
551
|
+
for (const width of [1440, 390]) for (const route of ["/", "/detail"]) if (!study.renderEvidence.some((v) => v.route === route && v.viewport.width === width)) throw new Error(`Missing original study view: ${study.id}/${route}/${width}`);
|
|
552
|
+
for (const view of study.renderEvidence) {
|
|
553
|
+
if (pins.get(view.preview.path)?.sha256 !== view.preview.sha256 || !view.visualReview?.reviewedAt) throw new Error(`Unverified original preview: ${study.id}`);
|
|
554
|
+
if (view.fullPreview && pins.get(view.fullPreview.path)?.sha256 !== view.fullPreview.sha256) throw new Error(`Unverified full original preview: ${study.id}`);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
const lessons = new Set(loadCompositionPack(kernel).lessons.map((l) => l.id));
|
|
558
|
+
for (const study of catalog.studies) if (study.lessonIds.some((id) => !lessons.has(id))) throw new Error(`Missing original study lesson link: ${study.id}`);
|
|
559
|
+
return { base, manifest, manifestHash: hash(bytes), catalog, pins };
|
|
560
|
+
}
|
|
561
|
+
function referenceStudyExpansions(kernel, signals, references, accepted, release = "2026-10-05.1") {
|
|
562
|
+
const pack = loadReferenceStudies(kernel, release);
|
|
563
|
+
const legacyRanked = () => pack.catalog.studies.filter((s) => s.renderEvidence.length >= 4 && s.fitSignals.some((f) => signals.known.includes(f)) && (s.assetMinimum === "none" || (s.assetMinimum === "product-ui" ? signals.known.includes("product-ui") : signals.known.includes("approved-image"))) && (s.assetMinimum !== "multiple-images" || signals.known.includes("multiple-images"))).map((s) => ({ study: s, score: s.fitSignals.filter((f) => signals.known.includes(f)).length * 3 + Number(s.referenceIds.some((id) => references.includes(id))) })).sort((a, b) => b.score - a.score || hash(`${JSON.stringify(signals)}:${a.study.id}`).localeCompare(hash(`${JSON.stringify(signals)}:${b.study.id}`)));
|
|
564
|
+
const excluded = [];
|
|
565
|
+
const correctedRanked = () => pack.catalog.studies.flatMap((study) => {
|
|
566
|
+
if (!study.selectionProfile) throw new Error("Corrected study lacks normalized selection profile: " + study.id);
|
|
567
|
+
const profile = study.selectionProfile, interpretation = profile.interpretation;
|
|
568
|
+
const gap = essentialAssetGap(interpretation?.assetMinimum || study.assetMinimum, signals);
|
|
569
|
+
if (gap || study.renderEvidence.length < 4) {
|
|
570
|
+
excluded.push({ id: study.id, reason: gap || "missing preview evidence" });
|
|
571
|
+
return [];
|
|
572
|
+
}
|
|
573
|
+
const fit = fitScore(profile, study.fitSignals, signals, release === "2026-10-06.2");
|
|
574
|
+
if (!fit.supported) {
|
|
575
|
+
excluded.push({ id: study.id, reason: "no specific task, expression or context fit" });
|
|
576
|
+
return [];
|
|
577
|
+
}
|
|
578
|
+
return [{ id: study.id, study, profile, ...fit }];
|
|
579
|
+
}).sort((a, b) => b.score - a.score || hash(JSON.stringify(signals) + a.id).localeCompare(hash(JSON.stringify(signals) + b.id)));
|
|
580
|
+
const correctedPool = release === "2026-10-05.1" ? void 0 : correctedRanked();
|
|
581
|
+
const ranked = release === "2026-10-05.1" ? legacyRanked() : correctedPool;
|
|
582
|
+
if (accepted && new Set(accepted.map((s) => s.id)).size !== accepted.length) throw new Error("Duplicate accepted original study IDs");
|
|
583
|
+
const selected = accepted ? accepted.map((s) => {
|
|
584
|
+
const match = ranked.find((r) => r.study.id === s.id && r.study.revision === s.revision);
|
|
585
|
+
if (!match) throw new Error(`Accepted original study unavailable/ineligible: ${s.id}`);
|
|
586
|
+
return match;
|
|
587
|
+
}) : release === "2026-10-05.1" ? ranked.slice(0, 2) : complementaryFit(correctedPool, 2, (id) => hash(JSON.stringify(signals) + id), release === "2026-10-06.2");
|
|
588
|
+
const expansions = selected.map(({ study, score }) => {
|
|
589
|
+
const source = [...pack.pins].filter(([path]) => path.startsWith(`${study.sourcePath}/`)).map(([path, pin]) => ({ ...pin, absolutePath: confined3(pack.base, path) }));
|
|
590
|
+
const previews = study.renderEvidence.map((v) => ({ ...v, absolutePath: confined3(pack.base, v.preview.path) }));
|
|
591
|
+
const text = JSON.stringify({ boundary: "Original fictional teaching only. Inspect homepage/interior at both widths. Adapt relationships; do not import demo facts into customer inventories.", manifestHash: pack.manifestHash, fitScore: score, study, source, previews }, null, 2);
|
|
592
|
+
return { id: `reference-study-${study.id}-r${study.revision}`, hash: hash(text), chars: text.length, text };
|
|
593
|
+
});
|
|
594
|
+
const gaps = [];
|
|
595
|
+
if (release !== "2026-10-05.1") {
|
|
596
|
+
if (!selected.length) gaps.push("original-fit-gap: establish specific tasks/assets or author a suitable original lesson");
|
|
597
|
+
const requested = signals.expression?.families || [];
|
|
598
|
+
if (signals.theme?.trim() && (!requested.length || !selected.some((s) => s.study.selectionProfile?.expressions.some((e) => requested.includes(e))))) gaps.push("original-expression-gap: requested expression lacks an eligible selected interpretation; inspect a suitable source or explicitly justify an adaptation");
|
|
599
|
+
}
|
|
600
|
+
return { pack, excluded, gaps, selected: selected.map(({ study, score }) => ({ id: study.id, revision: study.revision, score, reasons: study.selectionProfile ? fitScore(study.selectionProfile, study.fitSignals, signals, release === "2026-10-06.2").reasons : [], handle: `reference-study-${study.id}-r${study.revision}`, idea: study.organizingIdea })), expansions };
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
// src/agent/reference-library.ts
|
|
604
|
+
var REFERENCE_RELEASE = "2026-10-05.1";
|
|
605
|
+
var REFERENCE_SELECTOR = "fit-complementarity-3";
|
|
606
|
+
var INITIAL_CORRECTED_REFERENCE_RELEASE = "2026-10-06.1";
|
|
607
|
+
var CORRECTED_REFERENCE_RELEASE = "2026-10-06.2";
|
|
608
|
+
var CORRECTED_REFERENCE_SELECTOR = "task-expression-complementarity-2";
|
|
609
|
+
var referenceSelectorVersion = (release) => release === REFERENCE_RELEASE ? REFERENCE_SELECTOR : release === INITIAL_CORRECTED_REFERENCE_RELEASE ? "task-expression-complementarity-1" : CORRECTED_REFERENCE_SELECTOR;
|
|
610
|
+
var referenceReleaseDirectory = (release = REFERENCE_RELEASE) => {
|
|
611
|
+
if (release === REFERENCE_RELEASE) return "v1";
|
|
612
|
+
if (release === INITIAL_CORRECTED_REFERENCE_RELEASE) return "v2";
|
|
613
|
+
if (release === CORRECTED_REFERENCE_RELEASE) return "v3";
|
|
614
|
+
throw new Error(`Unsupported reference release: ${release}`);
|
|
615
|
+
};
|
|
616
|
+
var REFERENCE_FAMILIES = ["swiss", "editorial", "expressive-type", "quiet-luxury", "documentary", "campaign", "hospitality", "maximalism", "handmade", "industrial", "technical", "retro", "athletic", "civic", "text-first", "spatial"];
|
|
617
|
+
var referenceHash = (value) => createHash6("sha256").update(value).digest("hex");
|
|
618
|
+
var read2 = (path) => JSON.parse(readFileSync6(path, "utf8"));
|
|
619
|
+
function confinedReferencePath(base, path) {
|
|
620
|
+
const target = resolve5(base, path), rel = relative4(resolve5(base), target);
|
|
621
|
+
if (isAbsolute2(path) || !rel || rel === ".." || rel.startsWith(`..${sep2}`) || isAbsolute2(rel)) throw new Error(`Reference path escapes release: ${path}`);
|
|
622
|
+
return target;
|
|
623
|
+
}
|
|
624
|
+
function referencePolicy(root) {
|
|
625
|
+
const launch = existsSync6(join6(root, "launch.json")) ? read2(join6(root, "launch.json")) : {};
|
|
626
|
+
const raw = launch.designReferences;
|
|
627
|
+
if (raw === void 0) return void 0;
|
|
628
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) throw new Error("designReferences must be an object");
|
|
629
|
+
const config = raw;
|
|
630
|
+
if (![REFERENCE_RELEASE, INITIAL_CORRECTED_REFERENCE_RELEASE, CORRECTED_REFERENCE_RELEASE].includes(String(config.release)) || config.mode !== "lessons") throw new Error(`Unsupported designReferences; use mode lessons, release ${REFERENCE_RELEASE}`);
|
|
631
|
+
if (config.manifestHash !== void 0 && (typeof config.manifestHash !== "string" || !/^[a-f0-9]{64}$/.test(config.manifestHash))) throw new Error("Invalid reference manifestHash");
|
|
632
|
+
if (config.teachingManifestHash !== void 0 && (typeof config.teachingManifestHash !== "string" || !/^[a-f0-9]{64}$/.test(config.teachingManifestHash))) throw new Error("Invalid reference teachingManifestHash");
|
|
633
|
+
return { release: config.release, mode: "lessons", manifestHash: config.manifestHash, teachingManifestHash: config.teachingManifestHash, hash: referenceHash(JSON.stringify(config)) };
|
|
634
|
+
}
|
|
635
|
+
function validateReferenceCatalog(catalog) {
|
|
636
|
+
const errors = [], ids = /* @__PURE__ */ new Set(), urls = /* @__PURE__ */ new Set();
|
|
637
|
+
if (catalog.schemaVersion !== 1 || ![REFERENCE_RELEASE, INITIAL_CORRECTED_REFERENCE_RELEASE, CORRECTED_REFERENCE_RELEASE].includes(catalog.release) || !Array.isArray(catalog.records)) return ["Unsupported reference catalog"];
|
|
638
|
+
for (const r of catalog.records) {
|
|
639
|
+
if (!r || typeof r !== "object") {
|
|
640
|
+
errors.push("Reference must be an object");
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
643
|
+
const fail = (message) => errors.push(`${r.id || "missing-id"}: ${message}`);
|
|
644
|
+
if (catalog.release !== REFERENCE_RELEASE) {
|
|
645
|
+
const p = r.selectionProfile, e = r.visualEvidence;
|
|
646
|
+
if (!p || [p.tasks, p.expressions, p.contexts, p.contributions].some((a) => !Array.isArray(a) || a.some((v) => typeof v !== "string" || !v.trim())) || !p.contributions.length || p.expressions.some((v) => !REFERENCE_FAMILIES.includes(v))) fail("invalid normalized selection profile");
|
|
647
|
+
if (!e || !["legacy-observation", "live-only", "retained-capture", "accessible-session"].includes(e.kind) || e.sourceRevision !== r.revision || !Array.isArray(e.durableOriginalIds) || !e.note?.trim() || !e.freshness || !e.availability || e.lastVerifiedAt !== null && !Number.isFinite(Date.parse(e.lastVerifiedAt))) fail("invalid visual evidence/freshness state");
|
|
648
|
+
for (const v of r.views || []) if (!v.evidence || !["legacy-observation", "live-only", "retained-capture", "accessible-session"].includes(v.evidence.kind) || v.evidence.sourceRevision > r.revision || !Number.isFinite(Date.parse(v.evidence.inspectedAt)) || v.evidence.kind === "retained-capture" && !v.capture || v.evidence.kind === "accessible-session" && (!v.evidence.sessionId || !v.evidence.uri) || v.evidence.kind === "live-only" && !/^https?:\/\//.test(v.evidence.uri || "")) fail("unresolvable visual evidence state");
|
|
649
|
+
}
|
|
650
|
+
if (r.motionTags !== void 0 && (!Array.isArray(r.motionTags) || r.motionTags.some((t) => typeof t !== "string" || !t.trim()) || new Set(r.motionTags).size !== r.motionTags.length)) fail("invalid motion tags");
|
|
651
|
+
if (r.temporalEvidence !== void 0 && (!Array.isArray(r.temporalEvidence) || r.temporalEvidence.some((v) => !v?.route || !v.observation?.trim() || !["agent", "human"].includes(v.assessor) || !Number.isInteger(v.viewport?.width) || !Number.isInteger(v.viewport?.height) || v.viewport.width < 1 || v.viewport.height < 1 || !/^[a-f0-9]{64}$/.test(v.sourceHash) || !/^[a-f0-9]{64}$/.test(v.scenarioHash) || !v.recording?.path || !/^[a-f0-9]{64}$/.test(v.recording.sha256)))) fail("invalid temporal evidence");
|
|
652
|
+
if (r.compositionTags !== void 0 && (!Array.isArray(r.compositionTags) || r.compositionTags.some((t) => typeof t !== "string" || !t.trim()) || new Set(r.compositionTags).size !== r.compositionTags.length)) fail("invalid composition tags");
|
|
653
|
+
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(r.id) || ids.has(r.id)) fail("invalid or duplicate id");
|
|
654
|
+
ids.add(r.id);
|
|
655
|
+
if (!Number.isInteger(r.revision) || r.revision < 1) fail("invalid revision");
|
|
656
|
+
if (!REFERENCE_FAMILIES.includes(r.primaryFamily)) fail("invalid primary family");
|
|
657
|
+
if (!["candidate", "live-screened", "deep-reviewed", "unavailable", "retired"].includes(r.evidenceLevel)) fail("invalid evidence level");
|
|
658
|
+
if (!["draft", "active", "retired"].includes(r.lifecycle) || !["live", "pending", "blocked", "retired"].includes(r.sourceStatus)) fail("invalid lifecycle/source status");
|
|
659
|
+
if (!["none", "one-image", "multiple-images", "product-ui"].includes(r.assetMinimum) || !["low", "medium", "high"].includes(r.complexity)) fail("invalid asset/complexity contract");
|
|
660
|
+
try {
|
|
661
|
+
const url = new URL(r.resolvedUrl || r.requestedUrl);
|
|
662
|
+
if (!/^https?:$/.test(url.protocol)) fail("invalid URL protocol");
|
|
663
|
+
const key = url.hostname.replace(/^www\./, "");
|
|
664
|
+
if (urls.has(key)) fail("duplicate publisher domain; review distinctness");
|
|
665
|
+
urls.add(key);
|
|
666
|
+
} catch {
|
|
667
|
+
fail("invalid URL");
|
|
668
|
+
}
|
|
669
|
+
for (const key of ["title", "adds", "lowComplexityAlternative"]) if (!r[key]?.trim()) fail(`missing ${key}`);
|
|
670
|
+
if (!r.creator || !r.discovery?.source || !r.discovery.url || !r.sourcing?.basis || !r.sourcing.researchRetention || !r.sourcing.redistribution || !r.coverage) fail("missing provenance/coverage");
|
|
671
|
+
if (!r.structure || ["opening", "navigation", "evidence", "density", "imageTypeRelationship", "interior", "responsive", "action"].some((key) => typeof r.structure[key] !== "string" || !String(r.structure[key]).trim()) || !Array.isArray(r.structure.sequence) || !r.structure.sequence.length) fail("incomplete structure");
|
|
672
|
+
for (const key of ["tags", "fitSignals", "visitorTasks", "observedRelationships", "lessons", "useWhen", "avoidWhen", "views", "limitations", "relatedExamples", "lessonIds"]) if (!Array.isArray(r[key])) fail(`missing ${key}`);
|
|
673
|
+
const screened = ["live-screened", "deep-reviewed"].includes(r.evidenceLevel);
|
|
674
|
+
if (screened && (!r.inspectedAt || !r.resolvedUrl || !r.views?.length || !r.observedRelationships?.length || !r.lessons?.length || r.sourceStatus !== "live")) fail("screened record lacks actual inspection");
|
|
675
|
+
if (!r.eligible || ["metadata", "images", "code"].some((key) => typeof r.eligible[key] !== "boolean")) fail("missing eligibility contract");
|
|
676
|
+
if (!r.sourcing || !["abstract-lessons-only", "cleared-material", "none"].includes(r.sourcing.generationUse)) fail("invalid sourcing contract");
|
|
677
|
+
if (r.eligible?.metadata && (!screened || r.lifecycle !== "active" || r.sourcing?.generationUse === "none")) fail("ineligible evidence admitted for generation");
|
|
678
|
+
if ((r.eligible?.images || r.eligible?.code) && r.sourcing?.generationUse !== "cleared-material") fail("uncleared external material admitted");
|
|
679
|
+
for (const v of Array.isArray(r.views) ? r.views : []) {
|
|
680
|
+
if (!v || !v.id || !v.route || !v.observation || !v.evidencePointer || !Number.isFinite(Date.parse(v.inspectedAt)) || !Number.isInteger(v.viewport?.width) || !Number.isInteger(v.viewport?.height) || v.viewport.width < 1 || v.viewport.height < 1 || !v.resolvedUrl || !["opening", "whole-page", "task"].includes(v.scope) || !Array.isArray(v.limitations)) fail(`incomplete view ${v?.id}`);
|
|
681
|
+
if (v?.capture && (!v.capture.path || !/^[a-f0-9]{64}$/.test(v.capture.sha256))) fail(`invalid capture hash ${v.id}`);
|
|
682
|
+
}
|
|
683
|
+
if (r.evidenceLevel === "deep-reviewed") {
|
|
684
|
+
for (const narrow of [false, true]) {
|
|
685
|
+
const views = (Array.isArray(r.views) ? r.views : []).filter((v) => v?.viewport && v.viewport.width < 600 === narrow);
|
|
686
|
+
if (!views.some((v) => v.scope === "opening") || !views.some((v) => v.scope === "whole-page")) fail(`missing ${narrow ? "mobile" : "desktop"} opening/full inspection`);
|
|
687
|
+
if (!views.some((v) => v.scope === "task" && v.state !== "opening")) fail(`missing ${narrow ? "mobile" : "desktop"} interior/task inspection`);
|
|
688
|
+
}
|
|
689
|
+
if (!r.structure?.interior || !r.structure?.responsive) fail("missing interior/mobile relationships");
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
return errors;
|
|
693
|
+
}
|
|
694
|
+
function loadReferenceCatalog(root, kernel, release = referencePolicy(root)?.release || REFERENCE_RELEASE) {
|
|
695
|
+
const base = join6(kernel || resolveKernelRoot(root) || root, `design-system/references/${referenceReleaseDirectory(release)}`);
|
|
696
|
+
const manifestPath = join6(base, "manifest.json");
|
|
697
|
+
if (!existsSync6(manifestPath)) throw new Error("Reference release unavailable; restore the pinned harness package");
|
|
698
|
+
const manifest = read2(manifestPath);
|
|
699
|
+
if (manifest.schemaVersion !== 1 || manifest.release !== release || manifest.labeledPreferenceData !== false) throw new Error("Unsupported reference manifest");
|
|
700
|
+
const body = readFileSync6(confinedReferencePath(base, manifest.catalog.path));
|
|
701
|
+
if (referenceHash(body) !== manifest.catalog.sha256) throw new Error("Reference catalog hash mismatch");
|
|
702
|
+
const catalog = JSON.parse(body.toString());
|
|
703
|
+
const errors = validateReferenceCatalog(catalog);
|
|
704
|
+
if (errors.length) throw new Error(`Reference catalog quarantined: ${errors.join("; ")}`);
|
|
705
|
+
validateReferenceDependencies(catalog, resolve5(base, "../../.."), base);
|
|
706
|
+
return { base, kernel: resolve5(base, "../../.."), manifest, catalog, manifestHash: referenceHash(readFileSync6(manifestPath)) };
|
|
707
|
+
}
|
|
708
|
+
function validateReferenceDependencies(catalog, releaseKernel, base) {
|
|
709
|
+
for (const record of catalog.records) for (const view of record.temporalEvidence || []) {
|
|
710
|
+
const path = confinedReferencePath(base, view.recording.path);
|
|
711
|
+
if (!existsSync6(path) || referenceHash(readFileSync6(path)) !== view.recording.sha256) throw new Error(`Missing or changed reference recording: ${record.id}`);
|
|
712
|
+
}
|
|
713
|
+
for (const record of catalog.records) for (const view of record.views) if (view.capture) {
|
|
714
|
+
const path = confinedReferencePath(base, view.capture.path);
|
|
715
|
+
if (!existsSync6(path) || referenceHash(readFileSync6(path)) !== view.capture.sha256) throw new Error(`Missing or changed reference capture: ${record.id}/${view.id}`);
|
|
716
|
+
}
|
|
717
|
+
const lessons = new Set(loadCompositionPack(releaseKernel).lessons.map((l) => l.id)), studies = loadReferenceStudies(releaseKernel, catalog.release);
|
|
718
|
+
const studyIds = new Set(studies.catalog.studies.map((s) => s.id)), referenceIds = new Set(catalog.records.map((r) => r.id));
|
|
719
|
+
for (const record of catalog.records) {
|
|
720
|
+
if (!record.lessonIds.length || record.lessonIds.some((id) => !lessons.has(id))) throw new Error(`Missing reference lesson link: ${record.id}`);
|
|
721
|
+
if (record.relatedExamples.some((id) => !studyIds.has(id))) throw new Error(`Missing original study link: ${record.id}`);
|
|
722
|
+
if (record.visualEvidence?.durableOriginalIds.some((id) => !studyIds.has(id))) throw new Error(`Missing durable original evidence: ${record.id}`);
|
|
723
|
+
}
|
|
724
|
+
for (const study of studies.catalog.studies) if (study.referenceIds.some((id) => !referenceIds.has(id))) throw new Error(`Missing study reference link: ${study.id}`);
|
|
725
|
+
}
|
|
726
|
+
function referenceSignals(root, release = referencePolicy(root)?.release || REFERENCE_RELEASE) {
|
|
727
|
+
const signals = compositionSignalsFromSite(root);
|
|
728
|
+
const text = (path) => existsSync6(join6(root, path)) ? read2(join6(root, path)) : {};
|
|
729
|
+
const business = text("onboarding/business.json"), request = text("agent/request.json"), story = text("onboarding/storyboard.json"), narrative = text("onboarding/narrative-brief.json"), media = text("onboarding/media-inventory.json");
|
|
730
|
+
const businessText = JSON.stringify([business.offer, business.audience, business.engagement]);
|
|
731
|
+
const extra = [];
|
|
732
|
+
if (/service|repair|advis|consult|law|account|contract|architect|practice/i.test(businessText)) extra.push("professional-service");
|
|
733
|
+
if (/shop|product|retail|collection/i.test(businessText)) extra.push("shop");
|
|
734
|
+
if (/\bsoftware\b|\bworkflow\b|\bapp\b|\bplatform\b/i.test(businessText)) extra.push("technical-product");
|
|
735
|
+
const usable = Array.isArray(media.assets) ? media.assets.filter((a) => a.inspected && a.disposition === "use" && a.kind !== "video") : [];
|
|
736
|
+
const hasUi = usable.some((a) => /\binterface\b|\bscreenshot\b|\bproduct ui\b|\bworkspace\b/i.test(`${a.role || ""} ${a.description || ""}`));
|
|
737
|
+
if (hasUi) extra.push("product-ui");
|
|
738
|
+
const established = signals.filter((s) => s.state === "known" && (!["approved-image", "multiple-images"].includes(s.id) || Array.isArray(media.assets))).map((s) => s.id);
|
|
739
|
+
const taskText = JSON.stringify([narrative.visitorQuestions, narrative.designOpportunities, story.pages, business.offer]);
|
|
740
|
+
const taskPatterns = { "evaluate-service": /service|scope|advis|repair|consult/i, "compare-options": /compare|choose|options|difference/i, "inspect-work": /project|portfolio|case study|finished work/i, "understand-process": /process|sequence|step|how it works/i, "shop-collection": /shop|purchase|retail|collection/i, "read-deeply": /essay|article|publication|read|guide/i, "find-location": /location|address|directions|parking/i, "book-inquiry": /book|inquir|contact|appointment|estimate/i, "explore-product": /software|product|workflow|demonstrat/i };
|
|
741
|
+
const visitorTasks = Object.entries(taskPatterns).filter(([, p]) => p.test(taskText)).map(([id]) => id).sort();
|
|
742
|
+
const roles = Array.isArray(story.pages) ? story.pages.map((p) => p.role || "") : [];
|
|
743
|
+
const result = { known: [.../* @__PURE__ */ new Set([...established, ...extra])].sort(), absent: [.../* @__PURE__ */ new Set([...signals.filter((s) => s.state === "absent").map((s) => s.id), ...Array.isArray(media.assets) && !hasUi ? ["product-ui"] : []])].sort(), theme: typeof request.theme === "string" ? request.theme : "", roles, visitorTasks, complexity: request.referenceComplexity === "high" ? "high" : request.referenceComplexity === "medium" ? "medium" : "low", origins: [...signals, { taskInference: "keyword fit from established business/narrative/storyboard; not a new customer fact", businessHash: referenceHash(JSON.stringify(business)), requestHash: referenceHash(JSON.stringify(request)), storyboardHash: referenceHash(JSON.stringify(story)), narrativeHash: referenceHash(JSON.stringify(narrative)), mediaHash: referenceHash(JSON.stringify(media)) }] };
|
|
744
|
+
if (release !== REFERENCE_RELEASE) {
|
|
745
|
+
result.contexts = businessContexts(businessText);
|
|
746
|
+
if (!/service|repair|advis|consult|law|account|contract|architect/i.test(businessText)) result.known = result.known.filter((id) => id !== "professional-service");
|
|
747
|
+
if (result.contexts.includes("creative-practice")) result.visitorTasks = [.../* @__PURE__ */ new Set([...(result.visitorTasks || []).filter((t) => t !== "evaluate-service"), "inspect-work", "read-deeply"])].sort();
|
|
748
|
+
result.visitorTasks = normalizeTasks(result.visitorTasks || [], release === CORRECTED_REFERENCE_RELEASE);
|
|
749
|
+
result.expression = expressionSignals(result.theme);
|
|
750
|
+
}
|
|
751
|
+
return result;
|
|
752
|
+
}
|
|
753
|
+
function selectReferences(pack, signals, acceptedIds, workingLimit = 4) {
|
|
754
|
+
if (pack.catalog.release !== REFERENCE_RELEASE) return selectCorrectedReferences(pack, signals, acceptedIds, workingLimit);
|
|
755
|
+
const excluded = [], eligible = [];
|
|
756
|
+
for (const r of pack.catalog.records) {
|
|
757
|
+
let exclusion = !r.eligible.metadata ? `evidence ${r.evidenceLevel}; metadata use not eligible` : r.lifecycle !== "active" ? "retired" : "";
|
|
758
|
+
if (["one-image", "multiple-images"].includes(r.assetMinimum) && !signals.known.includes("approved-image")) exclusion = "essential approved media absent or not established";
|
|
759
|
+
if (r.assetMinimum === "multiple-images" && !signals.known.includes("multiple-images")) exclusion = "multiple images absent or not established";
|
|
760
|
+
if (r.assetMinimum === "product-ui" && !signals.known.includes("product-ui")) exclusion = "actual product UI absent or not established";
|
|
761
|
+
if (r.coverage.immersive && signals.complexity !== "high") exclusion = "immersive interaction outside established complexity allowance";
|
|
762
|
+
if (exclusion) {
|
|
763
|
+
excluded.push({ id: r.id, reason: exclusion });
|
|
764
|
+
continue;
|
|
765
|
+
}
|
|
766
|
+
const hits = r.fitSignals.filter((s) => signals.known.includes(s));
|
|
767
|
+
const themeHits = [r.primaryFamily, ...r.tags].filter((t) => signals.theme.toLowerCase().includes(t.replaceAll("-", " ")));
|
|
768
|
+
const taskHits = r.visitorTasks.filter((task) => (signals.visitorTasks || []).includes(task));
|
|
769
|
+
if (!hits.length && !themeHits.length && !taskHits.length) {
|
|
770
|
+
excluded.push({ id: r.id, reason: "no established fit; expand discovery by recording task/evidence gaps" });
|
|
771
|
+
continue;
|
|
772
|
+
}
|
|
773
|
+
eligible.push({ id: r.id, revision: r.revision, score: hits.length * 3 + themeHits.length * 6 + Math.min(taskHits.length, 2) * 2 + (r.evidenceLevel === "deep-reviewed" ? 1 : 0), reasons: [...hits.map((h) => `fit:${h}`), ...themeHits.map((h) => `explicit-theme:${h}`), ...taskHits.map((t) => `visitor-task:${t}`)] });
|
|
774
|
+
}
|
|
775
|
+
eligible.sort((a, b) => b.score - a.score || referenceHash(`${JSON.stringify(signals)}:${a.id}`).localeCompare(referenceHash(`${JSON.stringify(signals)}:${b.id}`)));
|
|
776
|
+
const complementary = (pool, limit) => {
|
|
777
|
+
const result = [], remaining = [...pool];
|
|
778
|
+
while (remaining.length && result.length < limit) {
|
|
779
|
+
const best = remaining[0].score;
|
|
780
|
+
const near = remaining.filter((r) => r.score >= best - 2);
|
|
781
|
+
const gain = (id) => {
|
|
782
|
+
const r = pack.catalog.records.find((r2) => r2.id === id);
|
|
783
|
+
const seen = result.map((x) => pack.catalog.records.find((r2) => r2.id === x.id));
|
|
784
|
+
return Number(!seen.some((x) => x.primaryFamily === r.primaryFamily)) + (r.compositionTags || []).filter((tag) => !seen.some((x) => x.compositionTags?.includes(tag))).length;
|
|
785
|
+
};
|
|
786
|
+
near.sort((a, b) => gain(b.id) - gain(a.id) || b.score - a.score || pool.indexOf(a) - pool.indexOf(b));
|
|
787
|
+
const next = near[0];
|
|
788
|
+
result.push(next);
|
|
789
|
+
remaining.splice(remaining.indexOf(next), 1);
|
|
790
|
+
}
|
|
791
|
+
return result;
|
|
792
|
+
};
|
|
793
|
+
const shortlist = complementary(eligible, 10);
|
|
794
|
+
if (acceptedIds && new Set(acceptedIds).size !== acceptedIds.length) throw new Error("Duplicate accepted reference IDs");
|
|
795
|
+
const selected = acceptedIds ? acceptedIds.map((id) => {
|
|
796
|
+
const found = eligible.find((r) => r.id === id);
|
|
797
|
+
if (!found) throw new Error(`Accepted reference ${id} is unavailable/ineligible; explicitly revise reference analysis`);
|
|
798
|
+
return found;
|
|
799
|
+
}) : complementary(shortlist, workingLimit);
|
|
800
|
+
return { schemaVersion: 1, selectorVersion: REFERENCE_SELECTOR, release: pack.catalog.release, manifestHash: pack.manifestHash, catalogHash: pack.manifest.catalog.sha256, inputSignalHash: referenceHash(JSON.stringify(signals)), signals, eligible, excluded, shortlist, selected, accepted: !!acceptedIds, gaps: selected.length < 3 ? ["Fewer than three appropriate references; expand researched coverage or establish missing brief signals"] : [], inspectedEvidence: [], ties: [...new Set(eligible.map((r) => r.score))].map((score) => ({ score, ids: eligible.filter((r) => r.score === score).map((r) => r.id) })).filter((t) => t.ids.length > 1) };
|
|
801
|
+
}
|
|
802
|
+
function frozenReferenceSignals(root, accepted) {
|
|
803
|
+
const runs = join6(root, "agent/runs");
|
|
804
|
+
for (const name of existsSync6(runs) ? readdirSync(runs).filter((n) => n.endsWith(".design-context.json")) : []) {
|
|
805
|
+
const path = join6(runs, name);
|
|
806
|
+
if (statSync(path).size > 2e6) continue;
|
|
807
|
+
const wrapper = read2(path), m = wrapper.manifest;
|
|
808
|
+
const receipt = m?.referenceSelection, preparation = join6(root, "agent/preparations", name.slice(0, -".design-context.json".length) + ".json");
|
|
809
|
+
if (m?.nodeId !== "reference-analysis" || receipt?.inputSignalHash !== accepted.inputSignalHash || receipt.manifestHash !== accepted.manifestHash || !existsSync6(preparation)) continue;
|
|
810
|
+
const p = read2(preparation);
|
|
811
|
+
if (p.nodeId === "reference-analysis" && ["prepared", "consumed"].includes(p.status) && referenceHash(JSON.stringify(receipt.signals)) === accepted.inputSignalHash) return receipt.signals;
|
|
812
|
+
}
|
|
813
|
+
throw new Error("Accepted references need their frozen prepared analysis signals; explicitly revise analysis if unavailable");
|
|
814
|
+
}
|
|
815
|
+
function selectCorrectedReferences(pack, signals, acceptedIds, workingLimit = 3) {
|
|
816
|
+
const excluded = [], eligible = [];
|
|
817
|
+
for (const r of pack.catalog.records) {
|
|
818
|
+
const profile = r.selectionProfile;
|
|
819
|
+
if (!profile) throw new Error(`Corrected reference lacks normalized profile: ${r.id}`);
|
|
820
|
+
const essential = essentialAssetGap(profile.interpretation?.assetMinimum || r.assetMinimum, signals);
|
|
821
|
+
const reason = !r.eligible.metadata || r.lifecycle !== "active" || r.sourceStatus !== "live" || ["blocked", "unavailable", "retired", "redirect-unverified"].includes(r.visualEvidence?.availability || "") || ["retired", "unavailable", "candidate"].includes(r.evidenceLevel) ? "source unavailable/retired or metadata ineligible" : essential || (r.coverage.immersive && signals.complexity !== "high" ? "immersive dependency outside complexity allowance" : "");
|
|
822
|
+
if (reason) {
|
|
823
|
+
excluded.push({ id: r.id, reason });
|
|
824
|
+
continue;
|
|
825
|
+
}
|
|
826
|
+
const fit = fitScore(profile, r.fitSignals, signals, pack.catalog.release === CORRECTED_REFERENCE_RELEASE);
|
|
827
|
+
if (!fit.supported) {
|
|
828
|
+
excluded.push({ id: r.id, reason: "no specific task, expression or context fit" });
|
|
829
|
+
continue;
|
|
830
|
+
}
|
|
831
|
+
eligible.push({ id: r.id, revision: r.revision, ...fit, profile, reasons: [...fit.reasons, `evidence:${r.visualEvidence?.kind || "legacy-observation"}; fresh live inspection required before pixel claims`, ...profile.interpretation ? [`interpretation:${profile.interpretation.scope}; missing:${profile.interpretation.missingDependencies.join(",")}`] : []] });
|
|
832
|
+
}
|
|
833
|
+
const inputSignalHash = referenceHash(JSON.stringify(signals)), tie = (id) => referenceHash(inputSignalHash + ":" + id);
|
|
834
|
+
eligible.sort((a, b) => b.score - a.score || tie(a.id).localeCompare(tie(b.id)));
|
|
835
|
+
const shortlist = complementaryFit(eligible, 10, tie, pack.catalog.release === CORRECTED_REFERENCE_RELEASE);
|
|
836
|
+
if (acceptedIds && new Set(acceptedIds).size !== acceptedIds.length) throw new Error("Duplicate accepted reference IDs");
|
|
837
|
+
const selected = acceptedIds ? acceptedIds.map((id) => {
|
|
838
|
+
const match = eligible.find((r) => r.id === id);
|
|
839
|
+
if (!match) throw new Error(`Accepted reference ${id} is unavailable/ineligible; explicitly revise reference analysis`);
|
|
840
|
+
return match;
|
|
841
|
+
}) : complementaryFit(shortlist, workingLimit, tie, pack.catalog.release === CORRECTED_REFERENCE_RELEASE);
|
|
842
|
+
const expression = signals.expression || expressionSignals(signals.theme), gaps = [];
|
|
843
|
+
if (!selected.length) gaps.push("specific-fit-gap: broaden researched discovery or establish the visitor task and approved assets");
|
|
844
|
+
if (expression.uncertainty) gaps.push(`unsupported-expression: preserve exact request '${signals.theme}'; clarify interpretation or inspect suitable material`);
|
|
845
|
+
else if (expression.families.length && !selected.some((r) => r.profile.expressions.some((e) => expression.families.includes(e)))) gaps.push("expression-coverage-gap: no eligible selected lesson supports requested expression; inspect source or justify bounded interpretation");
|
|
846
|
+
return { schemaVersion: 1, selectorVersion: referenceSelectorVersion(pack.catalog.release), release: pack.catalog.release, manifestHash: pack.manifestHash, catalogHash: pack.manifest.catalog.sha256, inputSignalHash, signals, eligible, excluded, shortlist, selected, accepted: !!acceptedIds, gaps, inspectedEvidence: [], ties: [...new Set(eligible.map((r) => r.score))].map((score) => ({ score, ids: eligible.filter((r) => r.score === score).map((r) => r.id) })).filter((t) => t.ids.length > 1) };
|
|
847
|
+
}
|
|
848
|
+
function referenceContext(root, stage, kernel) {
|
|
849
|
+
const policy = referencePolicy(root);
|
|
850
|
+
if (!policy || !["reference-analysis", "direction", "storyboard", "representative", "representative-quality", "pages", "visual-review", "content-review", "refine"].includes(stage)) return void 0;
|
|
851
|
+
const pack = loadReferenceCatalog(root, kernel, policy.release);
|
|
852
|
+
if (policy.manifestHash && policy.manifestHash !== pack.manifestHash) throw new Error("Pinned reference manifest changed");
|
|
853
|
+
const path = join6(root, "onboarding/reference-analysis.json");
|
|
854
|
+
const analysis = existsSync6(path) ? read2(path) : void 0;
|
|
855
|
+
const accepted = stage !== "reference-analysis" ? analysis?.referenceSelection : void 0;
|
|
856
|
+
if (accepted && policy.release !== REFERENCE_RELEASE && accepted.selectorVersion !== referenceSelectorVersion(policy.release)) throw new Error("Accepted selector version changed; explicitly revise reference analysis");
|
|
857
|
+
if (accepted && accepted.manifestHash !== pack.manifestHash) throw new Error("Accepted reference release changed; explicitly revise reference analysis");
|
|
858
|
+
for (const chosen of accepted?.selected || []) if (!pack.catalog.records.some((r) => r.id === chosen.id && r.revision === chosen.revision)) throw new Error(`Accepted reference revision changed: ${chosen.id}`);
|
|
859
|
+
const receipt = selectReferences(pack, accepted && policy.release !== REFERENCE_RELEASE ? frozenReferenceSignals(root, accepted) : referenceSignals(root), accepted?.selected.map((r) => r.id), 3);
|
|
860
|
+
const summaries = receipt.selected.map((s) => {
|
|
861
|
+
const r = pack.catalog.records.find((r2) => r2.id === s.id);
|
|
862
|
+
return { id: s.id, revision: s.revision, reason: s.reasons.join(", "), summary: `${r.title}: ${r.adds}`, avoid: r.avoidWhen.join("; "), handle: `reference-${s.id}-r${s.revision}` };
|
|
863
|
+
});
|
|
864
|
+
const text = [`Reference release ${pack.catalog.release}; manifest ${pack.manifestHash}; signal ${receipt.inputSignalHash}. Advisory teaching only; preserve customer facts and exact theme.`, ...summaries.map((s) => `- ${s.id}@${s.revision}: ${s.summary.slice(0, 260)} Fit ${s.reason}. Avoid ${s.avoid.slice(0, 180)}. Expand ${s.handle}.`), ...receipt.gaps, "Inspect selected live routes or cleared captures before describing pixels. Delivery is not inspection. Record actual viewports/evidence and relationships in reference-analysis.referenceSelection; preserve the accepted idea in direction/storyboard and later review."].join("\n");
|
|
865
|
+
const expansions = summaries.map((s) => {
|
|
866
|
+
const r = pack.catalog.records.find((r2) => r2.id === s.id);
|
|
867
|
+
const text2 = JSON.stringify({ boundary: "Teaching only. No customer claims, code, branding or assets transfer from this record.", record: r }, null, 2);
|
|
868
|
+
return { id: s.handle, hash: referenceHash(text2), chars: text2.length, text: text2 };
|
|
869
|
+
});
|
|
870
|
+
const discoveryText = JSON.stringify(receipt, null, 2);
|
|
871
|
+
expansions.push({ id: "reference-discovery", hash: referenceHash(discoveryText), chars: discoveryText.length, text: discoveryText });
|
|
872
|
+
const teaching = referenceStudyExpansions(pack.kernel, receipt.signals, receipt.selected.map((r) => r.id), accepted?.teachingSelected, policy.release);
|
|
873
|
+
if (policy.teachingManifestHash && policy.teachingManifestHash !== teaching.pack.manifestHash) throw new Error("Pinned original teaching manifest changed");
|
|
874
|
+
if (accepted?.teachingManifestHash && accepted.teachingManifestHash !== teaching.pack.manifestHash) throw new Error("Accepted original teaching release changed; explicitly revise reference analysis");
|
|
875
|
+
expansions.push(...teaching.expansions);
|
|
876
|
+
const teachingText = teaching.selected.map((s) => `- Original study ${s.id}@${s.revision}: ${s.idea} Expand ${s.handle}; inspect its pinned desktop/mobile homepage and interior previews. Fictional facts never transfer.`).join("\n");
|
|
877
|
+
return { policy, pack, receipt: { ...receipt, gaps: [...receipt.gaps, ...teaching.gaps], teachingManifestHash: teaching.pack.manifestHash, teachingSelected: teaching.selected }, text: [text, teachingText, ...teaching.gaps].filter(Boolean).join("\n"), expansions };
|
|
878
|
+
}
|
|
879
|
+
function referenceCoverage(catalog) {
|
|
880
|
+
const screened = catalog.records.filter((r) => ["live-screened", "deep-reviewed"].includes(r.evidenceLevel)), deep = screened.filter((r) => r.evidenceLevel === "deep-reviewed");
|
|
881
|
+
const count = (records, key) => records.filter((r) => r.coverage[key]).length;
|
|
882
|
+
return { total: catalog.records.length, candidate: catalog.records.filter((r) => r.evidenceLevel === "candidate").length, screened: screened.length, deep: deep.length, eligibleMetadata: catalog.records.filter((r) => r.eligible.metadata).length, eligibleImages: catalog.records.filter((r) => r.eligible.images).length, unavailable: catalog.records.filter((r) => ["unavailable", "retired"].includes(r.evidenceLevel)).length, families: REFERENCE_FAMILIES.map((family) => ({ family, screened: screened.filter((r) => r.primaryFamily === family).length, deep: deep.filter((r) => r.primaryFamily === family).length, deepGap: Math.max(0, 3 - deep.filter((r) => r.primaryFamily === family).length) })), crossCutting: Object.fromEntries(["localProfessional", "sparseMedia", "informationDense", "immersive"].map((key) => [key, { screened: count(screened, key), deep: count(deep, key) }])), intersections: { localSparse: screened.filter((r) => r.coverage.localProfessional && r.coverage.sparseMedia).length, localDense: screened.filter((r) => r.coverage.localProfessional && r.coverage.informationDense).length, sparseDense: screened.filter((r) => r.coverage.sparseMedia && r.coverage.informationDense).length } };
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
export {
|
|
886
|
+
CALIBRATION_PACK_VERSION,
|
|
887
|
+
PROBE_TOKEN,
|
|
888
|
+
PROBE_RGB,
|
|
889
|
+
ACCURACY_PROBE_PHRASE,
|
|
890
|
+
solidPng,
|
|
891
|
+
resolveKernelRoot,
|
|
892
|
+
calibrationPackDir,
|
|
893
|
+
loadCalibrationManifest,
|
|
894
|
+
calibrationPackHash,
|
|
895
|
+
loadKnowledgeV2,
|
|
896
|
+
lessonExtension,
|
|
897
|
+
coverageReport,
|
|
898
|
+
loadCompositionPack,
|
|
899
|
+
compositionSignalsFromSite,
|
|
900
|
+
selectCompositionLessons,
|
|
901
|
+
compositionContextForStage,
|
|
902
|
+
loadReferenceStudies,
|
|
903
|
+
referenceStudyExpansions,
|
|
904
|
+
REFERENCE_RELEASE,
|
|
905
|
+
REFERENCE_SELECTOR,
|
|
906
|
+
INITIAL_CORRECTED_REFERENCE_RELEASE,
|
|
907
|
+
CORRECTED_REFERENCE_RELEASE,
|
|
908
|
+
CORRECTED_REFERENCE_SELECTOR,
|
|
909
|
+
referenceSelectorVersion,
|
|
910
|
+
referenceReleaseDirectory,
|
|
911
|
+
REFERENCE_FAMILIES,
|
|
912
|
+
referenceHash,
|
|
913
|
+
confinedReferencePath,
|
|
914
|
+
referencePolicy,
|
|
915
|
+
validateReferenceCatalog,
|
|
916
|
+
loadReferenceCatalog,
|
|
917
|
+
validateReferenceDependencies,
|
|
918
|
+
referenceSignals,
|
|
919
|
+
selectReferences,
|
|
920
|
+
frozenReferenceSignals,
|
|
921
|
+
referenceContext,
|
|
922
|
+
referenceCoverage
|
|
923
|
+
};
|