@dailephd/my-frontend-observer 0.8.1
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/CHANGELOG.md +397 -0
- package/LICENSE +21 -0
- package/README.md +255 -0
- package/dist/application/browserCaptureService.d.ts +11 -0
- package/dist/application/browserCaptureService.js +12 -0
- package/dist/application/browserCaptureService.js.map +1 -0
- package/dist/application/comparisonService.d.ts +56 -0
- package/dist/application/comparisonService.js +77 -0
- package/dist/application/comparisonService.js.map +1 -0
- package/dist/application/externalReferencePersistenceService.d.ts +75 -0
- package/dist/application/externalReferencePersistenceService.js +182 -0
- package/dist/application/externalReferencePersistenceService.js.map +1 -0
- package/dist/application/frontendContractEvaluationService.d.ts +49 -0
- package/dist/application/frontendContractEvaluationService.js +112 -0
- package/dist/application/frontendContractEvaluationService.js.map +1 -0
- package/dist/application/frontendContractPersistenceService.d.ts +56 -0
- package/dist/application/frontendContractPersistenceService.js +91 -0
- package/dist/application/frontendContractPersistenceService.js.map +1 -0
- package/dist/application/observationPersistence.d.ts +59 -0
- package/dist/application/observationPersistence.js +79 -0
- package/dist/application/observationPersistence.js.map +1 -0
- package/dist/application/projectCheckService.d.ts +3 -0
- package/dist/application/projectCheckService.js +169 -0
- package/dist/application/projectCheckService.js.map +1 -0
- package/dist/application/projectWorkflowService.d.ts +46 -0
- package/dist/application/projectWorkflowService.js +92 -0
- package/dist/application/projectWorkflowService.js.map +1 -0
- package/dist/application/referenceFidelityEvaluationService.d.ts +28 -0
- package/dist/application/referenceFidelityEvaluationService.js +45 -0
- package/dist/application/referenceFidelityEvaluationService.js.map +1 -0
- package/dist/artifacts/artifactReader.d.ts +19 -0
- package/dist/artifacts/artifactReader.js +36 -0
- package/dist/artifacts/artifactReader.js.map +1 -0
- package/dist/artifacts/artifactWriter.d.ts +25 -0
- package/dist/artifacts/artifactWriter.js +68 -0
- package/dist/artifacts/artifactWriter.js.map +1 -0
- package/dist/artifacts/comparisonArtifactReader.d.ts +18 -0
- package/dist/artifacts/comparisonArtifactReader.js +35 -0
- package/dist/artifacts/comparisonArtifactReader.js.map +1 -0
- package/dist/artifacts/comparisonArtifactWriter.d.ts +41 -0
- package/dist/artifacts/comparisonArtifactWriter.js +67 -0
- package/dist/artifacts/comparisonArtifactWriter.js.map +1 -0
- package/dist/artifacts/externalReferenceArtifactReader.d.ts +18 -0
- package/dist/artifacts/externalReferenceArtifactReader.js +35 -0
- package/dist/artifacts/externalReferenceArtifactReader.js.map +1 -0
- package/dist/artifacts/externalReferenceArtifactWriter.d.ts +44 -0
- package/dist/artifacts/externalReferenceArtifactWriter.js +77 -0
- package/dist/artifacts/externalReferenceArtifactWriter.js.map +1 -0
- package/dist/artifacts/frontendContractArtifactReader.d.ts +24 -0
- package/dist/artifacts/frontendContractArtifactReader.js +47 -0
- package/dist/artifacts/frontendContractArtifactReader.js.map +1 -0
- package/dist/artifacts/frontendContractArtifactWriter.d.ts +34 -0
- package/dist/artifacts/frontendContractArtifactWriter.js +70 -0
- package/dist/artifacts/frontendContractArtifactWriter.js.map +1 -0
- package/dist/artifacts/frontendContractEvaluationArtifactReader.d.ts +17 -0
- package/dist/artifacts/frontendContractEvaluationArtifactReader.js +34 -0
- package/dist/artifacts/frontendContractEvaluationArtifactReader.js.map +1 -0
- package/dist/artifacts/frontendContractEvaluationArtifactWriter.d.ts +32 -0
- package/dist/artifacts/frontendContractEvaluationArtifactWriter.js +58 -0
- package/dist/artifacts/frontendContractEvaluationArtifactWriter.js.map +1 -0
- package/dist/artifacts/types.d.ts +17 -0
- package/dist/artifacts/types.js +2 -0
- package/dist/artifacts/types.js.map +1 -0
- package/dist/browser/chromiumAdapter.d.ts +21 -0
- package/dist/browser/chromiumAdapter.js +204 -0
- package/dist/browser/chromiumAdapter.js.map +1 -0
- package/dist/browser/evidenceCapture.d.ts +62 -0
- package/dist/browser/evidenceCapture.js +500 -0
- package/dist/browser/evidenceCapture.js.map +1 -0
- package/dist/browser/scrollCapture.d.ts +32 -0
- package/dist/browser/scrollCapture.js +163 -0
- package/dist/browser/scrollCapture.js.map +1 -0
- package/dist/browser/types.d.ts +24 -0
- package/dist/browser/types.js +2 -0
- package/dist/browser/types.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +2411 -0
- package/dist/cli.js.map +1 -0
- package/dist/domain/boundedAgentContext.d.ts +226 -0
- package/dist/domain/boundedAgentContext.js +355 -0
- package/dist/domain/boundedAgentContext.js.map +1 -0
- package/dist/domain/boundedAgentContextCorrelation.d.ts +74 -0
- package/dist/domain/boundedAgentContextCorrelation.js +441 -0
- package/dist/domain/boundedAgentContextCorrelation.js.map +1 -0
- package/dist/domain/boundedAgentContextIdentity.d.ts +26 -0
- package/dist/domain/boundedAgentContextIdentity.js +69 -0
- package/dist/domain/boundedAgentContextIdentity.js.map +1 -0
- package/dist/domain/boundedAgentContextProjection.d.ts +71 -0
- package/dist/domain/boundedAgentContextProjection.js +477 -0
- package/dist/domain/boundedAgentContextProjection.js.map +1 -0
- package/dist/domain/comparison.d.ts +220 -0
- package/dist/domain/comparison.js +350 -0
- package/dist/domain/comparison.js.map +1 -0
- package/dist/domain/comparisonEngine.d.ts +76 -0
- package/dist/domain/comparisonEngine.js +734 -0
- package/dist/domain/comparisonEngine.js.map +1 -0
- package/dist/domain/comparisonIdentity.d.ts +13 -0
- package/dist/domain/comparisonIdentity.js +46 -0
- package/dist/domain/comparisonIdentity.js.map +1 -0
- package/dist/domain/completion.d.ts +30 -0
- package/dist/domain/completion.js +22 -0
- package/dist/domain/completion.js.map +1 -0
- package/dist/domain/diagnostics.d.ts +17 -0
- package/dist/domain/diagnostics.js +77 -0
- package/dist/domain/diagnostics.js.map +1 -0
- package/dist/domain/evidence.d.ts +29 -0
- package/dist/domain/evidence.js +59 -0
- package/dist/domain/evidence.js.map +1 -0
- package/dist/domain/explicitState.d.ts +40 -0
- package/dist/domain/explicitState.js +54 -0
- package/dist/domain/explicitState.js.map +1 -0
- package/dist/domain/externalReference.d.ts +158 -0
- package/dist/domain/externalReference.js +167 -0
- package/dist/domain/externalReference.js.map +1 -0
- package/dist/domain/externalReferenceApplicability.d.ts +43 -0
- package/dist/domain/externalReferenceApplicability.js +52 -0
- package/dist/domain/externalReferenceApplicability.js.map +1 -0
- package/dist/domain/externalReferenceCompatibility.d.ts +40 -0
- package/dist/domain/externalReferenceCompatibility.js +48 -0
- package/dist/domain/externalReferenceCompatibility.js.map +1 -0
- package/dist/domain/externalReferenceFidelity.d.ts +171 -0
- package/dist/domain/externalReferenceFidelity.js +419 -0
- package/dist/domain/externalReferenceFidelity.js.map +1 -0
- package/dist/domain/externalReferenceIdentity.d.ts +38 -0
- package/dist/domain/externalReferenceIdentity.js +70 -0
- package/dist/domain/externalReferenceIdentity.js.map +1 -0
- package/dist/domain/externalReferenceImage.d.ts +35 -0
- package/dist/domain/externalReferenceImage.js +160 -0
- package/dist/domain/externalReferenceImage.js.map +1 -0
- package/dist/domain/externalReferenceRegionRelationships.d.ts +63 -0
- package/dist/domain/externalReferenceRegionRelationships.js +98 -0
- package/dist/domain/externalReferenceRegionRelationships.js.map +1 -0
- package/dist/domain/externalReferenceRegions.d.ts +65 -0
- package/dist/domain/externalReferenceRegions.js +105 -0
- package/dist/domain/externalReferenceRegions.js.map +1 -0
- package/dist/domain/externalReferenceRequirementIdentity.d.ts +12 -0
- package/dist/domain/externalReferenceRequirementIdentity.js +35 -0
- package/dist/domain/externalReferenceRequirementIdentity.js.map +1 -0
- package/dist/domain/externalReferenceRequirements.d.ts +215 -0
- package/dist/domain/externalReferenceRequirements.js +401 -0
- package/dist/domain/externalReferenceRequirements.js.map +1 -0
- package/dist/domain/externalReferenceRuntimeBinding.d.ts +146 -0
- package/dist/domain/externalReferenceRuntimeBinding.js +183 -0
- package/dist/domain/externalReferenceRuntimeBinding.js.map +1 -0
- package/dist/domain/frontendContractEvaluation.d.ts +57 -0
- package/dist/domain/frontendContractEvaluation.js +454 -0
- package/dist/domain/frontendContractEvaluation.js.map +1 -0
- package/dist/domain/frontendContractEvaluationArtifact.d.ts +65 -0
- package/dist/domain/frontendContractEvaluationArtifact.js +108 -0
- package/dist/domain/frontendContractEvaluationArtifact.js.map +1 -0
- package/dist/domain/frontendContractIdentity.d.ts +39 -0
- package/dist/domain/frontendContractIdentity.js +70 -0
- package/dist/domain/frontendContractIdentity.js.map +1 -0
- package/dist/domain/frontendContracts.d.ts +188 -0
- package/dist/domain/frontendContracts.js +260 -0
- package/dist/domain/frontendContracts.js.map +1 -0
- package/dist/domain/identity.d.ts +21 -0
- package/dist/domain/identity.js +47 -0
- package/dist/domain/identity.js.map +1 -0
- package/dist/domain/referenceCorrectionIdentity.d.ts +40 -0
- package/dist/domain/referenceCorrectionIdentity.js +77 -0
- package/dist/domain/referenceCorrectionIdentity.js.map +1 -0
- package/dist/domain/referenceCorrectionWorkflow.d.ts +160 -0
- package/dist/domain/referenceCorrectionWorkflow.js +165 -0
- package/dist/domain/referenceCorrectionWorkflow.js.map +1 -0
- package/dist/domain/referenceFidelityProjection.d.ts +65 -0
- package/dist/domain/referenceFidelityProjection.js +135 -0
- package/dist/domain/referenceFidelityProjection.js.map +1 -0
- package/dist/domain/relationships.d.ts +210 -0
- package/dist/domain/relationships.js +352 -0
- package/dist/domain/relationships.js.map +1 -0
- package/dist/domain/schema.d.ts +269 -0
- package/dist/domain/schema.js +442 -0
- package/dist/domain/schema.js.map +1 -0
- package/dist/domain/scrollEvidence.d.ts +51 -0
- package/dist/domain/scrollEvidence.js +134 -0
- package/dist/domain/scrollEvidence.js.map +1 -0
- package/dist/index.d.ts +114 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/projectWorkflow/aliasCatalog.d.ts +21 -0
- package/dist/projectWorkflow/aliasCatalog.js +67 -0
- package/dist/projectWorkflow/aliasCatalog.js.map +1 -0
- package/dist/projectWorkflow/checkAcceptance.d.ts +25 -0
- package/dist/projectWorkflow/checkAcceptance.js +55 -0
- package/dist/projectWorkflow/checkAcceptance.js.map +1 -0
- package/dist/projectWorkflow/checkResult.d.ts +85 -0
- package/dist/projectWorkflow/checkResult.js +101 -0
- package/dist/projectWorkflow/checkResult.js.map +1 -0
- package/dist/projectWorkflow/projectConfig.d.ts +43 -0
- package/dist/projectWorkflow/projectConfig.js +84 -0
- package/dist/projectWorkflow/projectConfig.js.map +1 -0
- package/dist/projectWorkflow/projectDiscovery.d.ts +9 -0
- package/dist/projectWorkflow/projectDiscovery.js +20 -0
- package/dist/projectWorkflow/projectDiscovery.js.map +1 -0
- package/dist/projectWorkflow/projectPaths.d.ts +8 -0
- package/dist/projectWorkflow/projectPaths.js +23 -0
- package/dist/projectWorkflow/projectPaths.js.map +1 -0
- package/dist/request/paths.d.ts +14 -0
- package/dist/request/paths.js +33 -0
- package/dist/request/paths.js.map +1 -0
- package/dist/request/request.d.ts +111 -0
- package/dist/request/request.js +464 -0
- package/dist/request/request.js.map +1 -0
- package/dist/safety/policy.d.ts +14 -0
- package/dist/safety/policy.js +81 -0
- package/dist/safety/policy.js.map +1 -0
- package/dist/viewer/assets/index-CN_yb9Uf.css +1 -0
- package/dist/viewer/assets/index-D98S1_2d.js +9 -0
- package/dist/viewer/icons/icon-192.png +0 -0
- package/dist/viewer/icons/icon-512.png +0 -0
- package/dist/viewer/index.html +15 -0
- package/dist/viewer/manifest.webmanifest +1 -0
- package/dist/viewer/registerSW.js +1 -0
- package/dist/viewer/sw.js +1 -0
- package/dist/viewer/workbox-9c191d2f.js +1 -0
- package/dist/viewerServer/context.d.ts +48 -0
- package/dist/viewerServer/context.js +60 -0
- package/dist/viewerServer/context.js.map +1 -0
- package/dist/viewerServer/evidence/classify.d.ts +59 -0
- package/dist/viewerServer/evidence/classify.js +124 -0
- package/dist/viewerServer/evidence/classify.js.map +1 -0
- package/dist/viewerServer/evidence/comparisonView.d.ts +28 -0
- package/dist/viewerServer/evidence/comparisonView.js +43 -0
- package/dist/viewerServer/evidence/comparisonView.js.map +1 -0
- package/dist/viewerServer/evidence/contextSourceView.d.ts +25 -0
- package/dist/viewerServer/evidence/contextSourceView.js +20 -0
- package/dist/viewerServer/evidence/contextSourceView.js.map +1 -0
- package/dist/viewerServer/evidence/discovery.d.ts +31 -0
- package/dist/viewerServer/evidence/discovery.js +78 -0
- package/dist/viewerServer/evidence/discovery.js.map +1 -0
- package/dist/viewerServer/evidence/evaluationView.d.ts +32 -0
- package/dist/viewerServer/evidence/evaluationView.js +50 -0
- package/dist/viewerServer/evidence/evaluationView.js.map +1 -0
- package/dist/viewerServer/evidence/handles.d.ts +21 -0
- package/dist/viewerServer/evidence/handles.js +43 -0
- package/dist/viewerServer/evidence/handles.js.map +1 -0
- package/dist/viewerServer/evidence/index.d.ts +41 -0
- package/dist/viewerServer/evidence/index.js +82 -0
- package/dist/viewerServer/evidence/index.js.map +1 -0
- package/dist/viewerServer/evidence/limits.d.ts +27 -0
- package/dist/viewerServer/evidence/limits.js +28 -0
- package/dist/viewerServer/evidence/limits.js.map +1 -0
- package/dist/viewerServer/evidence/linkedEvidence.d.ts +43 -0
- package/dist/viewerServer/evidence/linkedEvidence.js +151 -0
- package/dist/viewerServer/evidence/linkedEvidence.js.map +1 -0
- package/dist/viewerServer/evidence/mediaResolver.d.ts +16 -0
- package/dist/viewerServer/evidence/mediaResolver.js +85 -0
- package/dist/viewerServer/evidence/mediaResolver.js.map +1 -0
- package/dist/viewerServer/evidence/observationView.d.ts +29 -0
- package/dist/viewerServer/evidence/observationView.js +46 -0
- package/dist/viewerServer/evidence/observationView.js.map +1 -0
- package/dist/viewerServer/evidence/pathSafety.d.ts +11 -0
- package/dist/viewerServer/evidence/pathSafety.js +31 -0
- package/dist/viewerServer/evidence/pathSafety.js.map +1 -0
- package/dist/viewerServer/evidence/projection.d.ts +55 -0
- package/dist/viewerServer/evidence/projection.js +152 -0
- package/dist/viewerServer/evidence/projection.js.map +1 -0
- package/dist/viewerServer/evidence/referenceView.d.ts +133 -0
- package/dist/viewerServer/evidence/referenceView.js +169 -0
- package/dist/viewerServer/evidence/referenceView.js.map +1 -0
- package/dist/viewerServer/httpServer.d.ts +27 -0
- package/dist/viewerServer/httpServer.js +381 -0
- package/dist/viewerServer/httpServer.js.map +1 -0
- package/dist/viewerServer/openBrowser.d.ts +7 -0
- package/dist/viewerServer/openBrowser.js +32 -0
- package/dist/viewerServer/openBrowser.js.map +1 -0
- package/dist/viewerServer/port.d.ts +16 -0
- package/dist/viewerServer/port.js +19 -0
- package/dist/viewerServer/port.js.map +1 -0
- package/dist/viewerServer/viewerService.d.ts +62 -0
- package/dist/viewerServer/viewerService.js +88 -0
- package/dist/viewerServer/viewerService.js.map +1 -0
- package/docs/ARCHITECTURE.md +1286 -0
- package/docs/CI_CD.md +250 -0
- package/docs/COMMANDS.md +972 -0
- package/docs/CONTRACTS.md +1856 -0
- package/docs/CURRENT_STATE.md +1049 -0
- package/docs/DEVELOPMENT.md +202 -0
- package/docs/DOCUMENTATION_PRESERVATION_POLICY.md +50 -0
- package/docs/PROJECT_DESCRIPTION.md +2221 -0
- package/docs/PROJECT_MILESTONES.md +2526 -0
- package/docs/PROJECT_OVERVIEW.md +150 -0
- package/docs/QUICKSTART.md +83 -0
- package/docs/RELEASE.md +27 -0
- package/docs/ROADMAP.md +641 -0
- package/docs/SECURITY.md +218 -0
- package/docs/WORKFLOWS.md +642 -0
- package/docs/plans/v0.8-implementation-plan.md +655 -0
- package/docs/plans/v0.8.1-cli-usability-patch-plan.md +505 -0
- package/docs/reports/v0.7-bounded-fidelity-context-prompt7.md +243 -0
- package/docs/reports/v0.7-implementation-completeness-documentation-reconciliation.md +497 -0
- package/docs/reports/v0.7-pre-release-readiness.md +337 -0
- package/docs/reports/v0.7-reference-binding-prompt5.md +223 -0
- package/docs/reports/v0.7-reference-compatibility-prompt4.md +234 -0
- package/docs/reports/v0.7-reference-correction-workflow-prompt8.md +222 -0
- package/docs/reports/v0.7-reference-fidelity-prompt6.md +216 -0
- package/docs/reports/v0.7-reference-foundation-prompt1.md +151 -0
- package/docs/reports/v0.7-reference-regions-prompt2.md +195 -0
- package/docs/reports/v0.7-reference-requirements-prompt3.md +217 -0
- package/docs/reports/v0.7-release-prep.md +423 -0
- package/docs/reports/v0.8-binding-fidelity-interaction-batch6.md +279 -0
- package/docs/reports/v0.8-bounded-context-correlation-batch7.md +233 -0
- package/docs/reports/v0.8-comparison-contract-inspection-batch4.md +279 -0
- package/docs/reports/v0.8-evidence-index-readers-batch2.md +247 -0
- package/docs/reports/v0.8-implementation-completeness-documentation-reconciliation.md +741 -0
- package/docs/reports/v0.8-integrated-viewer-acceptance-batch8.md +128 -0
- package/docs/reports/v0.8-observation-svg-inspection-batch3.md +223 -0
- package/docs/reports/v0.8-prerelease-readiness-cross-platform-security-code-rot.md +687 -0
- package/docs/reports/v0.8-reference-candidate-inspection-batch5.md +232 -0
- package/docs/reports/v0.8-viewer-runtime-pwa-batch1.md +278 -0
- package/docs/reports/v0.8.1-check-orchestration-prompt2.md +69 -0
- package/docs/reports/v0.8.1-implementation-completeness-documentation-reconciliation.md +114 -0
- package/docs/reports/v0.8.1-prerelease-readiness-cross-platform-security-code-rot.md +170 -0
- package/docs/reports/v0.8.1-project-workflow-foundation-prompt1.md +66 -0
- package/package.json +58 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v0.7 Prompt 6 structured reference-vs-candidate fidelity evaluation.
|
|
3
|
+
* Answers "for a compatible candidate with explicit valid bindings, does the
|
|
4
|
+
* candidate actually match the selected reference design requirements?" -
|
|
5
|
+
* the first point in this whole v0.7 stack where a reference's authored
|
|
6
|
+
* expectation is actually compared against live candidate evidence.
|
|
7
|
+
*
|
|
8
|
+
* Reuses, never duplicates:
|
|
9
|
+
* - `deriveReferenceRequirementAdequacy`/`deriveReferenceRequirementExpectation`
|
|
10
|
+
* (v0.7 Prompt 3) for reference-side expected values/relationships and the
|
|
11
|
+
* reference-adequacy gate.
|
|
12
|
+
* - `evaluateReferenceCandidateCompatibility` (v0.7 Prompt 4) as a hard gate
|
|
13
|
+
* - viewport/theme/application-state/authenticated-state comparison is
|
|
14
|
+
* never re-implemented here.
|
|
15
|
+
* - `evaluateReferenceRuntimeBindings` (v0.7 Prompt 5) as the sole source of
|
|
16
|
+
* which runtime target (if any) represents each reference region for this
|
|
17
|
+
* candidate - no automatic binding, no name/geometry matching.
|
|
18
|
+
* - `deriveLayoutRelationships` (v0.4) as the sole source of runtime
|
|
19
|
+
* relationship evidence, scoped to the exact requested relationship
|
|
20
|
+
* family (the same Prompt 3 bug-fix precedent - matching the first
|
|
21
|
+
* record for a pair, regardless of family, was a real bug there and would
|
|
22
|
+
* be here too).
|
|
23
|
+
*
|
|
24
|
+
* Coordinate systems are never conflated: Prompt 2 regions and Prompt 3
|
|
25
|
+
* tolerances are authored in reference-image pixels; `ObservationArtifact`
|
|
26
|
+
* target geometry is CSS pixels. This module establishes one explicit,
|
|
27
|
+
* deterministic, full-frame scale from `reference.applicability.viewport`
|
|
28
|
+
* (CSS pixels) to the reference image's own pixel dimensions, and converts
|
|
29
|
+
* candidate CSS measurements into reference-image-pixel space before
|
|
30
|
+
* comparing them against a Prompt 3 tolerance - it never assumes 1
|
|
31
|
+
* reference-image pixel equals 1 CSS pixel, never re-expresses a tolerance
|
|
32
|
+
* in a different unit, and never performs cropping/offset/rotation/
|
|
33
|
+
* perspective registration.
|
|
34
|
+
*
|
|
35
|
+
* No new persisted artifact family: `evaluateReferenceCandidateFidelity` is
|
|
36
|
+
* a pure, synchronous, on-demand function over already-persisted/in-memory
|
|
37
|
+
* evidence (an `ExternalReferenceArtifact`, an `ObservationArtifact`, and a
|
|
38
|
+
* binding-declaration collection). It mutates none of its inputs.
|
|
39
|
+
*/
|
|
40
|
+
import type { ExternalReferenceArtifact } from './externalReference.js';
|
|
41
|
+
import type { ReferenceRequirementSubject, ReferenceRequirementTolerance, ReferenceRequirementAdequacy, AuthoredChangeScopeCategory, ExpectedDependentMode } from './externalReferenceRequirements.js';
|
|
42
|
+
import type { ObservationArtifact } from './schema.js';
|
|
43
|
+
import type { ComparabilityResult } from './comparison.js';
|
|
44
|
+
import type { ReferenceRuntimeBindingDeclaration, ReferenceRuntimeBindingEvaluation } from './externalReferenceRuntimeBinding.js';
|
|
45
|
+
import type { PairwiseRelationshipKind } from './relationships.js';
|
|
46
|
+
/**
|
|
47
|
+
* Deliberately its own small vocabulary, not an import of v0.5's
|
|
48
|
+
* `CLAUSE_RESULT_STATUSES`: that vocabulary includes `'conflict'`, which has
|
|
49
|
+
* no equivalent here (each requirement is evaluated independently against
|
|
50
|
+
* its own single reference/candidate pair - there is no cross-requirement
|
|
51
|
+
* authoring conflict concept in Prompt 6). `pass`/`fail`/`unavailable` are
|
|
52
|
+
* reused as the same honest three-state shape v0.5 already established.
|
|
53
|
+
*/
|
|
54
|
+
export declare const REFERENCE_REQUIREMENT_FIDELITY_STATUSES: readonly ["pass", "fail", "unavailable"];
|
|
55
|
+
export type ReferenceRequirementFidelityStatus = (typeof REFERENCE_REQUIREMENT_FIDELITY_STATUSES)[number];
|
|
56
|
+
export declare const REFERENCE_REQUIREMENT_FIDELITY_REASON_CODES: readonly ["reference-evidence-unavailable", "reference-relationship-not-exhibited", "binding-unavailable", "candidate-evidence-unavailable", "coordinate-mapping-unavailable"];
|
|
57
|
+
export type ReferenceRequirementFidelityReasonCode = (typeof REFERENCE_REQUIREMENT_FIDELITY_REASON_CODES)[number];
|
|
58
|
+
/**
|
|
59
|
+
* One requirement's structured result. Numeric fields (`referenceValue`
|
|
60
|
+
* through `tolerance`) apply only to `region-property`/`region-measurement`
|
|
61
|
+
* subjects; relationship fields (`expectedRelationship`/`actualRelationship`)
|
|
62
|
+
* apply only to `region-relationship` subjects - never both populated on
|
|
63
|
+
* the same result, mirroring the subject's own discriminated shape.
|
|
64
|
+
* `reasonCode`/`detail` are present only when `status === 'unavailable'` - a
|
|
65
|
+
* `fail` is already fully explained by its numeric/relationship fields.
|
|
66
|
+
*/
|
|
67
|
+
export interface ReferenceRequirementFidelityResult {
|
|
68
|
+
requirementId: string;
|
|
69
|
+
category: AuthoredChangeScopeCategory;
|
|
70
|
+
expectedDependentMode?: ExpectedDependentMode;
|
|
71
|
+
subject: ReferenceRequirementSubject;
|
|
72
|
+
boundRuntimeTargets: string[];
|
|
73
|
+
status: ReferenceRequirementFidelityStatus;
|
|
74
|
+
reasonCode?: ReferenceRequirementFidelityReasonCode;
|
|
75
|
+
detail?: string;
|
|
76
|
+
referenceValue?: number;
|
|
77
|
+
candidateRawValue?: number;
|
|
78
|
+
candidateValue?: number;
|
|
79
|
+
delta?: number;
|
|
80
|
+
tolerance?: ReferenceRequirementTolerance;
|
|
81
|
+
expectedRelationship?: PairwiseRelationshipKind;
|
|
82
|
+
actualRelationship?: PairwiseRelationshipKind;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* v0.7 Prompt 7 addition (additive; no prior structural validator existed
|
|
86
|
+
* for this Prompt 6 shape - fidelity evaluations previously only ever
|
|
87
|
+
* flowed in-memory from `evaluateReferenceCandidateFidelity`'s own return
|
|
88
|
+
* type, with no external/persisted input path to defend against). Reused by
|
|
89
|
+
* `boundedAgentContext.ts` as defense-in-depth when a caller-supplied
|
|
90
|
+
* `ReferenceRequirementFidelityResult` becomes part of a bounded fidelity
|
|
91
|
+
* projection. No change to `evaluateReferenceCandidateFidelity`'s own logic.
|
|
92
|
+
*/
|
|
93
|
+
export declare function isValidReferenceRequirementFidelityResult(value: unknown): value is ReferenceRequirementFidelityResult;
|
|
94
|
+
export declare const REFERENCE_FIDELITY_STATES: readonly ["not-evaluated", "pass", "fail"];
|
|
95
|
+
export type ReferenceFidelityState = (typeof REFERENCE_FIDELITY_STATES)[number];
|
|
96
|
+
export declare const REFERENCE_FIDELITY_BLOCK_REASONS: readonly ["reference-inadequate", "incompatible"];
|
|
97
|
+
export type ReferenceFidelityBlockReason = (typeof REFERENCE_FIDELITY_BLOCK_REASONS)[number];
|
|
98
|
+
/**
|
|
99
|
+
* `state === 'not-evaluated'` exactly when an earlier gate (reference
|
|
100
|
+
* adequacy or reference/candidate compatibility) blocked ordinary
|
|
101
|
+
* evaluation - `requirementResults`/`bindings` are empty in that case, never
|
|
102
|
+
* a fabricated PASS/FAIL set. This is REFERENCE FIDELITY only - a
|
|
103
|
+
* downstream, separate concern from v0.5 baseline/per-change contract
|
|
104
|
+
* evaluation (see docs/CONTRACTS.md "v0.7 Prompt 6"): a `pass` here says
|
|
105
|
+
* nothing about, and never overrides, any v0.5 contract result.
|
|
106
|
+
*/
|
|
107
|
+
export interface ReferenceCandidateFidelityEvaluation {
|
|
108
|
+
referenceId: string;
|
|
109
|
+
referenceRequestId: string;
|
|
110
|
+
candidateObservationId: string;
|
|
111
|
+
candidateRequestId: string;
|
|
112
|
+
adequacy: ReferenceRequirementAdequacy;
|
|
113
|
+
compatibility?: ComparabilityResult;
|
|
114
|
+
bindings?: ReferenceRuntimeBindingEvaluation;
|
|
115
|
+
state: ReferenceFidelityState;
|
|
116
|
+
blockedBy?: ReferenceFidelityBlockReason;
|
|
117
|
+
requirementResults: ReferenceRequirementFidelityResult[];
|
|
118
|
+
}
|
|
119
|
+
export type EvaluateReferenceCandidateFidelityResult = {
|
|
120
|
+
ok: true;
|
|
121
|
+
evaluation: ReferenceCandidateFidelityEvaluation;
|
|
122
|
+
} | {
|
|
123
|
+
ok: false;
|
|
124
|
+
reason: string;
|
|
125
|
+
};
|
|
126
|
+
export interface EvaluateReferenceCandidateFidelityOptions {
|
|
127
|
+
geometryTolerancePx?: number;
|
|
128
|
+
}
|
|
129
|
+
export interface CoordinateScale {
|
|
130
|
+
scaleX: number;
|
|
131
|
+
scaleY: number;
|
|
132
|
+
}
|
|
133
|
+
export type DeriveCoordinateScaleResult = {
|
|
134
|
+
ok: true;
|
|
135
|
+
scale: CoordinateScale;
|
|
136
|
+
} | {
|
|
137
|
+
ok: false;
|
|
138
|
+
reason: string;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Establishes the one explicit reference-image-pixel <-> CSS-pixel scale
|
|
142
|
+
* this module ever uses, from `reference.applicability.viewport` (the CSS-
|
|
143
|
+
* pixel runtime viewport the design represents) and the reference image's
|
|
144
|
+
* own pixel dimensions (never conflated - see externalReferenceApplicability.ts).
|
|
145
|
+
* No applicable viewport at all means no scale can be established (this
|
|
146
|
+
* module never infers one from image dimensions alone). A deliberately
|
|
147
|
+
* bounded full-frame mapping only: `scaleX`/`scaleY` must agree within
|
|
148
|
+
* `ASPECT_RATIO_MAPPING_TOLERANCE`, or the mapping is rejected outright -
|
|
149
|
+
* this module performs no cropping, offset, rotation, perspective, or other
|
|
150
|
+
* arbitrary affine registration.
|
|
151
|
+
*/
|
|
152
|
+
/**
|
|
153
|
+
* Exported additively in v0.8 Batch 6 (previously module-private) so the
|
|
154
|
+
* viewer's lock-eligibility/view-lock-source-space-mapping feature can reuse
|
|
155
|
+
* this exact function - never a second aspect-ratio/scale implementation.
|
|
156
|
+
* The function body, formula, and tolerance are unchanged from Prompt 6.
|
|
157
|
+
*/
|
|
158
|
+
export declare function deriveCoordinateScale(reference: ExternalReferenceArtifact): DeriveCoordinateScaleResult;
|
|
159
|
+
/**
|
|
160
|
+
* Pure and synchronous. Evaluation order (frozen by this prompt's own
|
|
161
|
+
* design, never reordered): reference structural validation -> candidate
|
|
162
|
+
* structural validation -> binding-declaration structural validation ->
|
|
163
|
+
* Prompt 3 reference adequacy -> Prompt 4 compatibility -> Prompt 5 binding
|
|
164
|
+
* evaluation -> per-requirement candidate-evidence/coordinate-mapping
|
|
165
|
+
* checks -> per-requirement tolerance/relationship comparison -> overall
|
|
166
|
+
* result. An earlier blocking gate (adequacy `inadequate`, compatibility
|
|
167
|
+
* `incomparable`) always short-circuits to `state: 'not-evaluated'` with an
|
|
168
|
+
* empty `requirementResults` - no ordinary PASS/FAIL set is ever fabricated
|
|
169
|
+
* past a blocked gate.
|
|
170
|
+
*/
|
|
171
|
+
export declare function evaluateReferenceCandidateFidelity(reference: ExternalReferenceArtifact, candidate: ObservationArtifact, bindingDeclarations: readonly ReferenceRuntimeBindingDeclaration[], options?: EvaluateReferenceCandidateFidelityOptions): EvaluateReferenceCandidateFidelityResult;
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import { isValidExternalReferenceArtifact, isImportedExternalReferenceArtifact } from './externalReference.js';
|
|
2
|
+
import { deriveReferenceRequirementAdequacy, deriveReferenceRequirementExpectation, deriveReferenceRequirementMeasurement, isAuthoredChangeScopeCategory, isValidExpectedDependentMode, isValidReferenceRequirementSubjectShape, isValidReferenceRequirementTolerance, } from './externalReferenceRequirements.js';
|
|
3
|
+
import { isValidObservationArtifact } from './schema.js';
|
|
4
|
+
import { evidenceValue } from './evidence.js';
|
|
5
|
+
import { evaluateReferenceCandidateCompatibility } from './externalReferenceCompatibility.js';
|
|
6
|
+
import { evaluateReferenceRuntimeBindings } from './externalReferenceRuntimeBinding.js';
|
|
7
|
+
import { deriveLayoutRelationships, HORIZONTAL_ORDER_RELATIONSHIPS, VERTICAL_ORDER_RELATIONSHIPS, AREA_OVERLAP_RELATIONSHIPS, RELATIVE_WIDTH_RELATIONSHIPS, GEOMETRIC_FIT_RELATIONSHIPS, VERTICAL_SEQUENCE_RELATIONSHIPS, PAIRWISE_RELATIONSHIP_KINDS, } from './relationships.js';
|
|
8
|
+
function isPlainObject(value) {
|
|
9
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
10
|
+
}
|
|
11
|
+
function isNonEmptyString(value) {
|
|
12
|
+
return typeof value === 'string' && value.length > 0;
|
|
13
|
+
}
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// Result vocabulary
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
/**
|
|
18
|
+
* Deliberately its own small vocabulary, not an import of v0.5's
|
|
19
|
+
* `CLAUSE_RESULT_STATUSES`: that vocabulary includes `'conflict'`, which has
|
|
20
|
+
* no equivalent here (each requirement is evaluated independently against
|
|
21
|
+
* its own single reference/candidate pair - there is no cross-requirement
|
|
22
|
+
* authoring conflict concept in Prompt 6). `pass`/`fail`/`unavailable` are
|
|
23
|
+
* reused as the same honest three-state shape v0.5 already established.
|
|
24
|
+
*/
|
|
25
|
+
export const REFERENCE_REQUIREMENT_FIDELITY_STATUSES = ['pass', 'fail', 'unavailable'];
|
|
26
|
+
export const REFERENCE_REQUIREMENT_FIDELITY_REASON_CODES = [
|
|
27
|
+
'reference-evidence-unavailable',
|
|
28
|
+
'reference-relationship-not-exhibited',
|
|
29
|
+
'binding-unavailable',
|
|
30
|
+
'candidate-evidence-unavailable',
|
|
31
|
+
'coordinate-mapping-unavailable',
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* v0.7 Prompt 7 addition (additive; no prior structural validator existed
|
|
35
|
+
* for this Prompt 6 shape - fidelity evaluations previously only ever
|
|
36
|
+
* flowed in-memory from `evaluateReferenceCandidateFidelity`'s own return
|
|
37
|
+
* type, with no external/persisted input path to defend against). Reused by
|
|
38
|
+
* `boundedAgentContext.ts` as defense-in-depth when a caller-supplied
|
|
39
|
+
* `ReferenceRequirementFidelityResult` becomes part of a bounded fidelity
|
|
40
|
+
* projection. No change to `evaluateReferenceCandidateFidelity`'s own logic.
|
|
41
|
+
*/
|
|
42
|
+
export function isValidReferenceRequirementFidelityResult(value) {
|
|
43
|
+
if (!isPlainObject(value))
|
|
44
|
+
return false;
|
|
45
|
+
if (!isNonEmptyString(value.requirementId))
|
|
46
|
+
return false;
|
|
47
|
+
if (!isAuthoredChangeScopeCategory(value.category))
|
|
48
|
+
return false;
|
|
49
|
+
if (value.expectedDependentMode !== undefined && !isValidExpectedDependentMode(value.expectedDependentMode))
|
|
50
|
+
return false;
|
|
51
|
+
if (!isValidReferenceRequirementSubjectShape(value.subject))
|
|
52
|
+
return false;
|
|
53
|
+
if (!Array.isArray(value.boundRuntimeTargets) || !value.boundRuntimeTargets.every(isNonEmptyString))
|
|
54
|
+
return false;
|
|
55
|
+
if (typeof value.status !== 'string' || !REFERENCE_REQUIREMENT_FIDELITY_STATUSES.includes(value.status))
|
|
56
|
+
return false;
|
|
57
|
+
if (value.status === 'unavailable') {
|
|
58
|
+
if (typeof value.reasonCode !== 'string' || !REFERENCE_REQUIREMENT_FIDELITY_REASON_CODES.includes(value.reasonCode))
|
|
59
|
+
return false;
|
|
60
|
+
if (!isNonEmptyString(value.detail))
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
else if ('reasonCode' in value && value.reasonCode !== undefined) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
for (const key of ['referenceValue', 'candidateRawValue', 'candidateValue', 'delta']) {
|
|
67
|
+
if (value[key] !== undefined && typeof value[key] !== 'number')
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (value.tolerance !== undefined && !isValidReferenceRequirementTolerance(value.tolerance))
|
|
71
|
+
return false;
|
|
72
|
+
for (const key of ['expectedRelationship', 'actualRelationship']) {
|
|
73
|
+
if (value[key] !== undefined && (typeof value[key] !== 'string' || !PAIRWISE_RELATIONSHIP_KINDS.includes(value[key])))
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
export const REFERENCE_FIDELITY_STATES = ['not-evaluated', 'pass', 'fail'];
|
|
79
|
+
export const REFERENCE_FIDELITY_BLOCK_REASONS = ['reference-inadequate', 'incompatible'];
|
|
80
|
+
// ---------------------------------------------------------------------------
|
|
81
|
+
// Coordinate mapping (reference-image pixels <-> CSS pixels)
|
|
82
|
+
// ---------------------------------------------------------------------------
|
|
83
|
+
/**
|
|
84
|
+
* A coordinate-mapping-validity check only - never a design tolerance.
|
|
85
|
+
* Independently owned, deliberately tiny: this exists solely to detect
|
|
86
|
+
* "the applicable viewport and the reference image cannot represent the
|
|
87
|
+
* same full-frame content" (e.g. a viewport declared with a materially
|
|
88
|
+
* different aspect ratio than the image), never to forgive an actual
|
|
89
|
+
* design mismatch.
|
|
90
|
+
*/
|
|
91
|
+
const ASPECT_RATIO_MAPPING_TOLERANCE = 0.01;
|
|
92
|
+
function referenceImageDimensions(reference) {
|
|
93
|
+
if (isImportedExternalReferenceArtifact(reference))
|
|
94
|
+
return { width: reference.image.width, height: reference.image.height };
|
|
95
|
+
return { width: reference.sourceReference.image.width, height: reference.sourceReference.image.height };
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Establishes the one explicit reference-image-pixel <-> CSS-pixel scale
|
|
99
|
+
* this module ever uses, from `reference.applicability.viewport` (the CSS-
|
|
100
|
+
* pixel runtime viewport the design represents) and the reference image's
|
|
101
|
+
* own pixel dimensions (never conflated - see externalReferenceApplicability.ts).
|
|
102
|
+
* No applicable viewport at all means no scale can be established (this
|
|
103
|
+
* module never infers one from image dimensions alone). A deliberately
|
|
104
|
+
* bounded full-frame mapping only: `scaleX`/`scaleY` must agree within
|
|
105
|
+
* `ASPECT_RATIO_MAPPING_TOLERANCE`, or the mapping is rejected outright -
|
|
106
|
+
* this module performs no cropping, offset, rotation, perspective, or other
|
|
107
|
+
* arbitrary affine registration.
|
|
108
|
+
*/
|
|
109
|
+
/**
|
|
110
|
+
* Exported additively in v0.8 Batch 6 (previously module-private) so the
|
|
111
|
+
* viewer's lock-eligibility/view-lock-source-space-mapping feature can reuse
|
|
112
|
+
* this exact function - never a second aspect-ratio/scale implementation.
|
|
113
|
+
* The function body, formula, and tolerance are unchanged from Prompt 6.
|
|
114
|
+
*/
|
|
115
|
+
export function deriveCoordinateScale(reference) {
|
|
116
|
+
const viewport = reference.applicability?.viewport;
|
|
117
|
+
if (!viewport) {
|
|
118
|
+
return { ok: false, reason: 'reference declares no applicable viewport; reference-image-pixel <-> CSS-pixel coordinate mapping cannot be established' };
|
|
119
|
+
}
|
|
120
|
+
const { width: imageWidth, height: imageHeight } = referenceImageDimensions(reference);
|
|
121
|
+
const scaleX = imageWidth / viewport.width;
|
|
122
|
+
const scaleY = imageHeight / viewport.height;
|
|
123
|
+
const largerScale = Math.max(scaleX, scaleY);
|
|
124
|
+
const relativeScaleDelta = largerScale === 0 ? 0 : Math.abs(scaleX - scaleY) / largerScale;
|
|
125
|
+
if (relativeScaleDelta > ASPECT_RATIO_MAPPING_TOLERANCE) {
|
|
126
|
+
return {
|
|
127
|
+
ok: false,
|
|
128
|
+
reason: `reference image (${imageWidth}x${imageHeight}) and applicable viewport (${viewport.width}x${viewport.height}) do not share a coherent full-frame aspect ratio (scaleX=${scaleX}, scaleY=${scaleY})`,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
return { ok: true, scale: { scaleX, scaleY } };
|
|
132
|
+
}
|
|
133
|
+
/** Raw CSS-pixel geometry, reshaped into `ReferenceRegionGeometry`'s exact field set (adding centerX/centerY, computed identically to `deriveReferenceRegionGeometry`) so the same downstream property/measurement logic applies to both reference and candidate geometry uniformly. */
|
|
134
|
+
function candidateRawGeometry(geometry) {
|
|
135
|
+
return {
|
|
136
|
+
x: geometry.x,
|
|
137
|
+
y: geometry.y,
|
|
138
|
+
width: geometry.width,
|
|
139
|
+
height: geometry.height,
|
|
140
|
+
right: geometry.right,
|
|
141
|
+
bottom: geometry.bottom,
|
|
142
|
+
centerX: geometry.x + geometry.width / 2,
|
|
143
|
+
centerY: geometry.y + geometry.height / 2,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/** Applies the coordinate scale per axis - horizontal fields (x/width/right/centerX) scale by `scaleX`, vertical fields (y/height/bottom/centerY) scale by `scaleY`. Never rounds; subpixel precision is preserved through to the final tolerance comparison. */
|
|
147
|
+
function scaleGeometryToReferenceSpace(geometry, scale) {
|
|
148
|
+
return {
|
|
149
|
+
x: geometry.x * scale.scaleX,
|
|
150
|
+
y: geometry.y * scale.scaleY,
|
|
151
|
+
width: geometry.width * scale.scaleX,
|
|
152
|
+
height: geometry.height * scale.scaleY,
|
|
153
|
+
right: geometry.right * scale.scaleX,
|
|
154
|
+
bottom: geometry.bottom * scale.scaleY,
|
|
155
|
+
centerX: geometry.centerX * scale.scaleX,
|
|
156
|
+
centerY: geometry.centerY * scale.scaleY,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
// Tolerance (reused exactly, never redefined)
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
/**
|
|
163
|
+
* `exact` is the zero-tolerance case of the same rule, so a single
|
|
164
|
+
* `abs(delta) <= allowed` comparison covers every Prompt 3 tolerance kind
|
|
165
|
+
* without a separate equality branch. Percent's denominator mirrors
|
|
166
|
+
* v0.5's own `toleranceToPx` convention exactly (`frontendContractEvaluation.ts`:
|
|
167
|
+
* "the absolute before-value, the standard 'may vary by up to N%' reading") -
|
|
168
|
+
* independently reimplemented here in reference-image-pixel units, never
|
|
169
|
+
* imported, since v0.5's CSS-pixel `ContractTolerance` is a different unit
|
|
170
|
+
* (see externalReferenceRequirements.ts's own tolerance doc comment).
|
|
171
|
+
*/
|
|
172
|
+
function referenceToleranceAmountPx(tolerance, referenceValue) {
|
|
173
|
+
switch (tolerance.kind) {
|
|
174
|
+
case 'exact':
|
|
175
|
+
return 0;
|
|
176
|
+
case 'absolute-reference-px':
|
|
177
|
+
return tolerance.amount;
|
|
178
|
+
case 'percent':
|
|
179
|
+
return (tolerance.amount / 100) * Math.abs(referenceValue);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// ---------------------------------------------------------------------------
|
|
183
|
+
// Runtime-target lookup (mirrors externalReferenceRuntimeBinding.ts's own
|
|
184
|
+
// case-insensitive resolution convention - duplicated per the established
|
|
185
|
+
// per-module small-helper-ownership pattern, not cross-imported as a
|
|
186
|
+
// private helper)
|
|
187
|
+
// ---------------------------------------------------------------------------
|
|
188
|
+
function resolveConfiguredTargetName(candidate, runtimeTarget) {
|
|
189
|
+
const lower = runtimeTarget.toLowerCase();
|
|
190
|
+
return candidate.requestConfig.targets.find((t) => t.name.toLowerCase() === lower)?.name;
|
|
191
|
+
}
|
|
192
|
+
/** Mirrors frontendContractEvaluation.ts's/externalReferenceRequirements.ts's own independently-owned `RELATIONSHIP_FAMILY_GROUPS` shape - the third such duplicate in this repository, per the same established "never share this constant cross-module" convention. */
|
|
193
|
+
const RELATIONSHIP_FAMILY_GROUPS = [
|
|
194
|
+
HORIZONTAL_ORDER_RELATIONSHIPS,
|
|
195
|
+
VERTICAL_ORDER_RELATIONSHIPS,
|
|
196
|
+
AREA_OVERLAP_RELATIONSHIPS,
|
|
197
|
+
RELATIVE_WIDTH_RELATIONSHIPS,
|
|
198
|
+
GEOMETRIC_FIT_RELATIONSHIPS,
|
|
199
|
+
VERTICAL_SEQUENCE_RELATIONSHIPS,
|
|
200
|
+
];
|
|
201
|
+
// ---------------------------------------------------------------------------
|
|
202
|
+
// Per-requirement evaluation
|
|
203
|
+
// ---------------------------------------------------------------------------
|
|
204
|
+
function baseFields(requirement) {
|
|
205
|
+
return {
|
|
206
|
+
requirementId: requirement.requirementId,
|
|
207
|
+
category: requirement.category,
|
|
208
|
+
subject: requirement.subject,
|
|
209
|
+
...(requirement.expectedDependentMode !== undefined ? { expectedDependentMode: requirement.expectedDependentMode } : {}),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function unavailable(requirement, boundRuntimeTargets, reasonCode, detail) {
|
|
213
|
+
return { ...baseFields(requirement), boundRuntimeTargets, status: 'unavailable', reasonCode, detail };
|
|
214
|
+
}
|
|
215
|
+
function bindingFor(bindingsByRegion, regionId) {
|
|
216
|
+
return bindingsByRegion.get(regionId.toLowerCase());
|
|
217
|
+
}
|
|
218
|
+
function evaluateRegionPropertyRequirement(requirement, subject, reference, candidate, bindingsByRegion, scaleResult, options) {
|
|
219
|
+
const expectation = deriveReferenceRequirementExpectation(subject, reference.regions ?? [], options);
|
|
220
|
+
if (!expectation.available)
|
|
221
|
+
return unavailable(requirement, [], 'reference-evidence-unavailable', expectation.reason);
|
|
222
|
+
if (expectation.kind !== 'numeric')
|
|
223
|
+
return unavailable(requirement, [], 'reference-evidence-unavailable', 'a region-property subject unexpectedly produced non-numeric reference evidence');
|
|
224
|
+
const binding = bindingFor(bindingsByRegion, subject.region);
|
|
225
|
+
if (!binding || binding.status !== 'bound') {
|
|
226
|
+
return unavailable(requirement, [], 'binding-unavailable', binding ? binding.detail : `no runtime binding declared for reference region "${subject.region}"`);
|
|
227
|
+
}
|
|
228
|
+
const boundRuntimeTargets = [binding.runtimeTarget];
|
|
229
|
+
const configuredName = resolveConfiguredTargetName(candidate, binding.runtimeTarget);
|
|
230
|
+
const record = configuredName ? candidate.targetEvidence[configuredName] : undefined;
|
|
231
|
+
const visibility = record ? evidenceValue(record.visibility) : undefined;
|
|
232
|
+
if (!visibility || !visibility.visible) {
|
|
233
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', 'bound runtime target is not visible; geometry evidence is not usable for fidelity evaluation');
|
|
234
|
+
}
|
|
235
|
+
const geometry = record ? evidenceValue(record.geometry) : undefined;
|
|
236
|
+
if (!geometry) {
|
|
237
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', 'bound runtime target has no geometry evidence');
|
|
238
|
+
}
|
|
239
|
+
if (!scaleResult.ok) {
|
|
240
|
+
return unavailable(requirement, boundRuntimeTargets, 'coordinate-mapping-unavailable', scaleResult.reason);
|
|
241
|
+
}
|
|
242
|
+
const rawGeometry = candidateRawGeometry(geometry);
|
|
243
|
+
const scaledGeometry = scaleGeometryToReferenceSpace(rawGeometry, scaleResult.scale);
|
|
244
|
+
const candidateRawValue = rawGeometry[subject.property];
|
|
245
|
+
const candidateValue = scaledGeometry[subject.property];
|
|
246
|
+
const referenceValue = expectation.value;
|
|
247
|
+
const delta = candidateValue - referenceValue;
|
|
248
|
+
const tolerance = requirement.tolerance;
|
|
249
|
+
const allowed = referenceToleranceAmountPx(tolerance, referenceValue);
|
|
250
|
+
const status = Math.abs(delta) <= allowed ? 'pass' : 'fail';
|
|
251
|
+
return { ...baseFields(requirement), boundRuntimeTargets, status, referenceValue, candidateRawValue, candidateValue, delta, tolerance };
|
|
252
|
+
}
|
|
253
|
+
function evaluateRegionMeasurementRequirement(requirement, subject, reference, candidate, bindingsByRegion, scaleResult, options) {
|
|
254
|
+
const expectation = deriveReferenceRequirementExpectation(subject, reference.regions ?? [], options);
|
|
255
|
+
if (!expectation.available)
|
|
256
|
+
return unavailable(requirement, [], 'reference-evidence-unavailable', expectation.reason);
|
|
257
|
+
if (expectation.kind !== 'numeric')
|
|
258
|
+
return unavailable(requirement, [], 'reference-evidence-unavailable', 'a region-measurement subject unexpectedly produced non-numeric reference evidence');
|
|
259
|
+
const subjectBinding = bindingFor(bindingsByRegion, subject.subjectRegion);
|
|
260
|
+
const relatedBinding = bindingFor(bindingsByRegion, subject.relatedRegion);
|
|
261
|
+
if (!subjectBinding || subjectBinding.status !== 'bound') {
|
|
262
|
+
return unavailable(requirement, [], 'binding-unavailable', subjectBinding ? subjectBinding.detail : `no runtime binding declared for reference region "${subject.subjectRegion}"`);
|
|
263
|
+
}
|
|
264
|
+
if (!relatedBinding || relatedBinding.status !== 'bound') {
|
|
265
|
+
return unavailable(requirement, [subjectBinding.runtimeTarget], 'binding-unavailable', relatedBinding ? relatedBinding.detail : `no runtime binding declared for reference region "${subject.relatedRegion}"`);
|
|
266
|
+
}
|
|
267
|
+
const boundRuntimeTargets = [subjectBinding.runtimeTarget, relatedBinding.runtimeTarget];
|
|
268
|
+
const subjectConfiguredName = resolveConfiguredTargetName(candidate, subjectBinding.runtimeTarget);
|
|
269
|
+
const relatedConfiguredName = resolveConfiguredTargetName(candidate, relatedBinding.runtimeTarget);
|
|
270
|
+
const subjectRecord = subjectConfiguredName ? candidate.targetEvidence[subjectConfiguredName] : undefined;
|
|
271
|
+
const relatedRecord = relatedConfiguredName ? candidate.targetEvidence[relatedConfiguredName] : undefined;
|
|
272
|
+
const subjectVisibility = subjectRecord ? evidenceValue(subjectRecord.visibility) : undefined;
|
|
273
|
+
const relatedVisibility = relatedRecord ? evidenceValue(relatedRecord.visibility) : undefined;
|
|
274
|
+
if (!subjectVisibility?.visible || !relatedVisibility?.visible) {
|
|
275
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', 'one or both bound runtime targets are not visible; geometry evidence is not usable for fidelity evaluation');
|
|
276
|
+
}
|
|
277
|
+
const subjectGeometry = subjectRecord ? evidenceValue(subjectRecord.geometry) : undefined;
|
|
278
|
+
const relatedGeometry = relatedRecord ? evidenceValue(relatedRecord.geometry) : undefined;
|
|
279
|
+
if (!subjectGeometry || !relatedGeometry) {
|
|
280
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', 'one or both bound runtime targets have no geometry evidence');
|
|
281
|
+
}
|
|
282
|
+
if (!scaleResult.ok) {
|
|
283
|
+
return unavailable(requirement, boundRuntimeTargets, 'coordinate-mapping-unavailable', scaleResult.reason);
|
|
284
|
+
}
|
|
285
|
+
const subjectRaw = candidateRawGeometry(subjectGeometry);
|
|
286
|
+
const relatedRaw = candidateRawGeometry(relatedGeometry);
|
|
287
|
+
const subjectScaled = scaleGeometryToReferenceSpace(subjectRaw, scaleResult.scale);
|
|
288
|
+
const relatedScaled = scaleGeometryToReferenceSpace(relatedRaw, scaleResult.scale);
|
|
289
|
+
const candidateRawValue = deriveReferenceRequirementMeasurement(subject.measurement, subjectRaw, relatedRaw);
|
|
290
|
+
const candidateValue = deriveReferenceRequirementMeasurement(subject.measurement, subjectScaled, relatedScaled);
|
|
291
|
+
if (candidateValue === undefined) {
|
|
292
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', `"${subject.measurement}" is geometrically undefined for these two bound runtime targets (they overlap on the relevant axis)`);
|
|
293
|
+
}
|
|
294
|
+
const referenceValue = expectation.value;
|
|
295
|
+
const delta = candidateValue - referenceValue;
|
|
296
|
+
const tolerance = requirement.tolerance;
|
|
297
|
+
const allowed = referenceToleranceAmountPx(tolerance, referenceValue);
|
|
298
|
+
const status = Math.abs(delta) <= allowed ? 'pass' : 'fail';
|
|
299
|
+
return {
|
|
300
|
+
...baseFields(requirement),
|
|
301
|
+
boundRuntimeTargets,
|
|
302
|
+
status,
|
|
303
|
+
referenceValue,
|
|
304
|
+
...(candidateRawValue !== undefined ? { candidateRawValue } : {}),
|
|
305
|
+
candidateValue,
|
|
306
|
+
delta,
|
|
307
|
+
tolerance,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function evaluateRegionRelationshipRequirement(requirement, subject, reference, candidate, bindingsByRegion, options) {
|
|
311
|
+
const expectation = deriveReferenceRequirementExpectation(subject, reference.regions ?? [], options);
|
|
312
|
+
if (!expectation.available)
|
|
313
|
+
return unavailable(requirement, [], 'reference-evidence-unavailable', expectation.reason);
|
|
314
|
+
if (expectation.kind === 'relationship' && !expectation.matches) {
|
|
315
|
+
return unavailable(requirement, [], 'reference-relationship-not-exhibited', `the reference does not exhibit the required "${subject.relationship}" relationship between "${subject.subjectRegion}" and "${subject.relatedRegion}"`);
|
|
316
|
+
}
|
|
317
|
+
const subjectBinding = bindingFor(bindingsByRegion, subject.subjectRegion);
|
|
318
|
+
const relatedBinding = bindingFor(bindingsByRegion, subject.relatedRegion);
|
|
319
|
+
if (!subjectBinding || subjectBinding.status !== 'bound') {
|
|
320
|
+
return unavailable(requirement, [], 'binding-unavailable', subjectBinding ? subjectBinding.detail : `no runtime binding declared for reference region "${subject.subjectRegion}"`);
|
|
321
|
+
}
|
|
322
|
+
if (!relatedBinding || relatedBinding.status !== 'bound') {
|
|
323
|
+
return unavailable(requirement, [subjectBinding.runtimeTarget], 'binding-unavailable', relatedBinding ? relatedBinding.detail : `no runtime binding declared for reference region "${subject.relatedRegion}"`);
|
|
324
|
+
}
|
|
325
|
+
const boundRuntimeTargets = [subjectBinding.runtimeTarget, relatedBinding.runtimeTarget];
|
|
326
|
+
const relationshipsResult = deriveLayoutRelationships(candidate, options.geometryTolerancePx !== undefined ? { geometryTolerancePx: options.geometryTolerancePx } : {});
|
|
327
|
+
if (!relationshipsResult.ok) {
|
|
328
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', relationshipsResult.reason);
|
|
329
|
+
}
|
|
330
|
+
const subjectTargetName = resolveConfiguredTargetName(candidate, subjectBinding.runtimeTarget);
|
|
331
|
+
const relatedTargetName = resolveConfiguredTargetName(candidate, relatedBinding.runtimeTarget);
|
|
332
|
+
if (!subjectTargetName || !relatedTargetName) {
|
|
333
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', 'bound runtime target is not part of the candidate\'s configured target set');
|
|
334
|
+
}
|
|
335
|
+
const unresolved = new Set(relationshipsResult.graph.unresolvedTargets.map((u) => u.target));
|
|
336
|
+
if (unresolved.has(subjectTargetName) || unresolved.has(relatedTargetName)) {
|
|
337
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', 'one or both bound runtime targets have no usable geometry for relationship derivation');
|
|
338
|
+
}
|
|
339
|
+
const family = RELATIONSHIP_FAMILY_GROUPS.find((group) => group.includes(subject.relationship));
|
|
340
|
+
const direct = relationshipsResult.graph.pairwiseRelationships.find((r) => family.includes(r.kind) && r.subjectTarget === subjectTargetName && r.relatedTarget === relatedTargetName);
|
|
341
|
+
if (direct) {
|
|
342
|
+
const status = direct.kind === subject.relationship ? 'pass' : 'fail';
|
|
343
|
+
return { ...baseFields(requirement), boundRuntimeTargets, status, expectedRelationship: subject.relationship, actualRelationship: direct.kind };
|
|
344
|
+
}
|
|
345
|
+
const reversed = relationshipsResult.graph.pairwiseRelationships.find((r) => family.includes(r.kind) && r.subjectTarget === relatedTargetName && r.relatedTarget === subjectTargetName);
|
|
346
|
+
if (reversed) {
|
|
347
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', `runtime relationship evidence for the bound targets was only derivable in the opposite order (found "${reversed.kind}") - this requirement's subjectRegion/relatedRegion order does not match the candidate's configured target order`);
|
|
348
|
+
}
|
|
349
|
+
return unavailable(requirement, boundRuntimeTargets, 'candidate-evidence-unavailable', `no "${subject.relationship}" runtime relationship evidence was derivable between the bound targets`);
|
|
350
|
+
}
|
|
351
|
+
function evaluateOneRequirement(requirement, reference, candidate, bindingsByRegion, scaleResult, options) {
|
|
352
|
+
const subject = requirement.subject;
|
|
353
|
+
if (subject.kind === 'region-property')
|
|
354
|
+
return evaluateRegionPropertyRequirement(requirement, subject, reference, candidate, bindingsByRegion, scaleResult, options);
|
|
355
|
+
if (subject.kind === 'region-measurement')
|
|
356
|
+
return evaluateRegionMeasurementRequirement(requirement, subject, reference, candidate, bindingsByRegion, scaleResult, options);
|
|
357
|
+
return evaluateRegionRelationshipRequirement(requirement, subject, reference, candidate, bindingsByRegion, options);
|
|
358
|
+
}
|
|
359
|
+
// ---------------------------------------------------------------------------
|
|
360
|
+
// Top-level evaluation
|
|
361
|
+
// ---------------------------------------------------------------------------
|
|
362
|
+
/**
|
|
363
|
+
* Pure and synchronous. Evaluation order (frozen by this prompt's own
|
|
364
|
+
* design, never reordered): reference structural validation -> candidate
|
|
365
|
+
* structural validation -> binding-declaration structural validation ->
|
|
366
|
+
* Prompt 3 reference adequacy -> Prompt 4 compatibility -> Prompt 5 binding
|
|
367
|
+
* evaluation -> per-requirement candidate-evidence/coordinate-mapping
|
|
368
|
+
* checks -> per-requirement tolerance/relationship comparison -> overall
|
|
369
|
+
* result. An earlier blocking gate (adequacy `inadequate`, compatibility
|
|
370
|
+
* `incomparable`) always short-circuits to `state: 'not-evaluated'` with an
|
|
371
|
+
* empty `requirementResults` - no ordinary PASS/FAIL set is ever fabricated
|
|
372
|
+
* past a blocked gate.
|
|
373
|
+
*/
|
|
374
|
+
export function evaluateReferenceCandidateFidelity(reference, candidate, bindingDeclarations, options = {}) {
|
|
375
|
+
const referenceValidation = isValidExternalReferenceArtifact(reference);
|
|
376
|
+
if (!referenceValidation.valid)
|
|
377
|
+
return { ok: false, reason: `reference is invalid: ${referenceValidation.reason}` };
|
|
378
|
+
const candidateValidation = isValidObservationArtifact(candidate);
|
|
379
|
+
if (!candidateValidation.valid)
|
|
380
|
+
return { ok: false, reason: `candidate is invalid: ${candidateValidation.reason}` };
|
|
381
|
+
const geometryOptions = options.geometryTolerancePx !== undefined ? { geometryTolerancePx: options.geometryTolerancePx } : {};
|
|
382
|
+
const adequacy = deriveReferenceRequirementAdequacy(reference.regions ?? [], reference.requirements ?? [], geometryOptions);
|
|
383
|
+
const provenance = {
|
|
384
|
+
referenceId: reference.referenceId,
|
|
385
|
+
referenceRequestId: reference.referenceRequestId,
|
|
386
|
+
candidateObservationId: candidate.observationId,
|
|
387
|
+
candidateRequestId: candidate.requestId,
|
|
388
|
+
};
|
|
389
|
+
if (adequacy.status === 'inadequate') {
|
|
390
|
+
return { ok: true, evaluation: { ...provenance, adequacy, state: 'not-evaluated', blockedBy: 'reference-inadequate', requirementResults: [] } };
|
|
391
|
+
}
|
|
392
|
+
const compatibilityResult = evaluateReferenceCandidateCompatibility(reference, candidate);
|
|
393
|
+
if (compatibilityResult.compatibility.state === 'incomparable') {
|
|
394
|
+
return {
|
|
395
|
+
ok: true,
|
|
396
|
+
evaluation: { ...provenance, adequacy, compatibility: compatibilityResult.compatibility, state: 'not-evaluated', blockedBy: 'incompatible', requirementResults: [] },
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
const bindingEvaluationResult = evaluateReferenceRuntimeBindings(reference, candidate, bindingDeclarations);
|
|
400
|
+
if (!bindingEvaluationResult.ok)
|
|
401
|
+
return { ok: false, reason: bindingEvaluationResult.reason };
|
|
402
|
+
const bindingEvaluation = bindingEvaluationResult.evaluation;
|
|
403
|
+
const bindingsByRegion = new Map(bindingEvaluation.bindings.map((b) => [b.referenceRegion.toLowerCase(), b]));
|
|
404
|
+
const scaleResult = deriveCoordinateScale(reference);
|
|
405
|
+
const requirementResults = (reference.requirements ?? []).map((requirement) => evaluateOneRequirement(requirement, reference, candidate, bindingsByRegion, scaleResult, geometryOptions));
|
|
406
|
+
const state = requirementResults.every((r) => r.status === 'pass') ? 'pass' : 'fail';
|
|
407
|
+
return {
|
|
408
|
+
ok: true,
|
|
409
|
+
evaluation: {
|
|
410
|
+
...provenance,
|
|
411
|
+
adequacy,
|
|
412
|
+
compatibility: compatibilityResult.compatibility,
|
|
413
|
+
bindings: bindingEvaluation,
|
|
414
|
+
state,
|
|
415
|
+
requirementResults,
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
//# sourceMappingURL=externalReferenceFidelity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"externalReferenceFidelity.js","sourceRoot":"","sources":["../../src/domain/externalReferenceFidelity.ts"],"names":[],"mappings":"AAwCA,OAAO,EAAE,gCAAgC,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAa/G,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,qCAAqC,EACrC,6BAA6B,EAC7B,4BAA4B,EAC5B,uCAAuC,EACvC,oCAAoC,GACrC,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,uCAAuC,EAAE,MAAM,qCAAqC,CAAC;AAE9F,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAExF,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,+BAA+B,EAC/B,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAE5B,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACvD,CAAC;AAED,8EAA8E;AAC9E,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