@disclosureos/schema 2.0.0-beta.0 → 2.0.0-beta.2
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 +28 -0
- package/README.md +9 -0
- package/dist/experimental/v2/index.d.ts +130 -2
- package/dist/experimental/v2/index.js +851 -2
- package/dist/experimental/v2/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseExperimentalClaimHistory, compareUtcInstants } from '@disclosureos/records/experimental/v2';
|
|
1
|
+
import { parseExperimentalClaimHistory, compareUtcInstants, parseContextClaimHistory, parseObservationContext, parseExperimentalObservation, parseResearchClaimHistory, parseResearchEntities, researchEntityAssertions, researchEntityContextReferences, contextAssertions } from '@disclosureos/records/experimental/v2';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { parseAcquisitionContext } from '@disclosureos/instruments/experimental/v2';
|
|
4
4
|
|
|
@@ -4526,7 +4526,856 @@ function migrationCompatibilityJsonSchema() {
|
|
|
4526
4526
|
$id: MIGRATION_COMPATIBILITY_SCHEMA_ID
|
|
4527
4527
|
};
|
|
4528
4528
|
}
|
|
4529
|
+
var CONTEXT_MEASUREMENT_ROLES = {
|
|
4530
|
+
size: {
|
|
4531
|
+
entities: ["reported_object"],
|
|
4532
|
+
quantities: ["size", "length"],
|
|
4533
|
+
units: ["m", "km"]
|
|
4534
|
+
},
|
|
4535
|
+
count: { entities: ["reported_object"], quantities: ["count"], units: ["1"] },
|
|
4536
|
+
speed: {
|
|
4537
|
+
entities: ["reported_object", "platform"],
|
|
4538
|
+
quantities: ["speed"],
|
|
4539
|
+
units: ["m/s", "km/h"]
|
|
4540
|
+
},
|
|
4541
|
+
altitude: {
|
|
4542
|
+
entities: ["reported_object", "platform", "place"],
|
|
4543
|
+
quantities: ["altitude", "elevation"],
|
|
4544
|
+
units: ["m", "km"]
|
|
4545
|
+
},
|
|
4546
|
+
heading: {
|
|
4547
|
+
entities: ["reported_object", "platform"],
|
|
4548
|
+
quantities: ["heading"],
|
|
4549
|
+
units: ["deg"]
|
|
4550
|
+
},
|
|
4551
|
+
ambient_temperature: {
|
|
4552
|
+
entities: ["environment"],
|
|
4553
|
+
quantities: ["temperature", "ambient_temperature"],
|
|
4554
|
+
units: ["Cel", "K"]
|
|
4555
|
+
},
|
|
4556
|
+
relative_humidity: {
|
|
4557
|
+
entities: ["environment"],
|
|
4558
|
+
quantities: ["relative_humidity"],
|
|
4559
|
+
units: ["%"]
|
|
4560
|
+
},
|
|
4561
|
+
wind_speed: {
|
|
4562
|
+
entities: ["environment"],
|
|
4563
|
+
quantities: ["wind_speed"],
|
|
4564
|
+
units: ["m/s", "km/h"]
|
|
4565
|
+
},
|
|
4566
|
+
moon_illumination: {
|
|
4567
|
+
entities: ["environment"],
|
|
4568
|
+
quantities: ["moon_illumination"],
|
|
4569
|
+
units: ["%", "1"]
|
|
4570
|
+
},
|
|
4571
|
+
duration: {
|
|
4572
|
+
entities: ["temporal", "collection"],
|
|
4573
|
+
quantities: ["duration"],
|
|
4574
|
+
units: ["s", "min", "h"]
|
|
4575
|
+
},
|
|
4576
|
+
distance: {
|
|
4577
|
+
entities: ["place"],
|
|
4578
|
+
quantities: ["distance"],
|
|
4579
|
+
units: ["m", "km"]
|
|
4580
|
+
},
|
|
4581
|
+
bearing: { entities: ["place"], quantities: ["bearing"], units: ["deg"] },
|
|
4582
|
+
water_depth: {
|
|
4583
|
+
entities: ["place"],
|
|
4584
|
+
quantities: ["water_depth"],
|
|
4585
|
+
units: ["m"]
|
|
4586
|
+
},
|
|
4587
|
+
coordinate_precision: {
|
|
4588
|
+
entities: ["place"],
|
|
4589
|
+
quantities: ["coordinate_precision"],
|
|
4590
|
+
units: ["m"]
|
|
4591
|
+
},
|
|
4592
|
+
time_alignment: {
|
|
4593
|
+
entities: ["collection"],
|
|
4594
|
+
quantities: ["time_alignment_uncertainty"],
|
|
4595
|
+
units: ["s", "ms"]
|
|
4596
|
+
}
|
|
4597
|
+
};
|
|
4598
|
+
function equal(a, b) {
|
|
4599
|
+
if (a === b) return true;
|
|
4600
|
+
if (!a || !b || typeof a !== "object" || typeof b !== "object") return false;
|
|
4601
|
+
if (Array.isArray(a) || Array.isArray(b))
|
|
4602
|
+
return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((v, i) => equal(v, b[i]));
|
|
4603
|
+
const x = a, y = b;
|
|
4604
|
+
return Object.keys(x).length === Object.keys(y).length && Object.keys(x).every(
|
|
4605
|
+
(k) => Object.prototype.hasOwnProperty.call(y, k) && equal(x[k], y[k])
|
|
4606
|
+
);
|
|
4607
|
+
}
|
|
4608
|
+
async function evaluateContextClaimHistory(input, options) {
|
|
4609
|
+
const history = parseContextClaimHistory(input);
|
|
4610
|
+
const issues = history.issues.map((i) => ({
|
|
4611
|
+
code: i.code,
|
|
4612
|
+
stage: i.stage,
|
|
4613
|
+
pointer: i.pointer,
|
|
4614
|
+
message: i.message
|
|
4615
|
+
}));
|
|
4616
|
+
const snapshots = [];
|
|
4617
|
+
const contexts = /* @__PURE__ */ new Map();
|
|
4618
|
+
const problem = (code, pointer6, message, stage = "semantic") => issues.push({ code, pointer: pointer6, message, stage });
|
|
4619
|
+
async function load(ref5, pointer6) {
|
|
4620
|
+
const supplied = options.documents.get(ref5.sha256);
|
|
4621
|
+
const bytes = supplied ? Uint8Array.from(supplied) : void 0;
|
|
4622
|
+
if (!bytes) {
|
|
4623
|
+
snapshots.push({ ...ref5, status: "unavailable" });
|
|
4624
|
+
problem(
|
|
4625
|
+
"SNAPSHOT.UNAVAILABLE",
|
|
4626
|
+
pointer6,
|
|
4627
|
+
"Required snapshot bytes were not supplied.",
|
|
4628
|
+
"external"
|
|
4629
|
+
);
|
|
4630
|
+
return;
|
|
4631
|
+
}
|
|
4632
|
+
if ([
|
|
4633
|
+
...new Uint8Array(
|
|
4634
|
+
await globalThis.crypto.subtle.digest("SHA-256", bytes)
|
|
4635
|
+
)
|
|
4636
|
+
].map((b) => b.toString(16).padStart(2, "0")).join("") !== ref5.sha256) {
|
|
4637
|
+
snapshots.push({ ...ref5, status: "failed" });
|
|
4638
|
+
problem(
|
|
4639
|
+
"SNAPSHOT.DIGEST",
|
|
4640
|
+
pointer6,
|
|
4641
|
+
"Supplied bytes do not match the reference digest.",
|
|
4642
|
+
"external"
|
|
4643
|
+
);
|
|
4644
|
+
return;
|
|
4645
|
+
}
|
|
4646
|
+
let value;
|
|
4647
|
+
try {
|
|
4648
|
+
value = JSON.parse(
|
|
4649
|
+
new TextDecoder("utf-8", { fatal: true }).decode(bytes)
|
|
4650
|
+
);
|
|
4651
|
+
} catch {
|
|
4652
|
+
snapshots.push({ ...ref5, status: "failed" });
|
|
4653
|
+
problem(
|
|
4654
|
+
"SNAPSHOT.JSON",
|
|
4655
|
+
pointer6,
|
|
4656
|
+
"Snapshot is not a UTF-8 JSON document.",
|
|
4657
|
+
"external"
|
|
4658
|
+
);
|
|
4659
|
+
return;
|
|
4660
|
+
}
|
|
4661
|
+
snapshots.push({ ...ref5, status: "passed" });
|
|
4662
|
+
if (!value || typeof value !== "object" || value.id !== ref5.documentId) {
|
|
4663
|
+
problem(
|
|
4664
|
+
"SNAPSHOT.IDENTITY",
|
|
4665
|
+
pointer6,
|
|
4666
|
+
"Snapshot document ID does not match its reference."
|
|
4667
|
+
);
|
|
4668
|
+
return;
|
|
4669
|
+
}
|
|
4670
|
+
return value;
|
|
4671
|
+
}
|
|
4672
|
+
async function checkContext(context, observation, p) {
|
|
4673
|
+
const sources = new Map([
|
|
4674
|
+
...observation.sources.map((s) => [`source:${s.id}`, s]),
|
|
4675
|
+
...observation.products.map((s) => [`product:${s.id}`, s])
|
|
4676
|
+
]);
|
|
4677
|
+
const methods = new Map(
|
|
4678
|
+
observation.methods.map((m) => [`method:${m.id}`, m])
|
|
4679
|
+
);
|
|
4680
|
+
const measurements = new Map(
|
|
4681
|
+
observation.measurements.map((m) => [m.id, m])
|
|
4682
|
+
);
|
|
4683
|
+
let acquisitionIds;
|
|
4684
|
+
if (context.acquisitionRef) {
|
|
4685
|
+
const value = await load(context.acquisitionRef, `${p}/acquisitionRef`);
|
|
4686
|
+
if (value !== void 0) {
|
|
4687
|
+
const acquisition = parseAcquisitionContext(value);
|
|
4688
|
+
if (!acquisition.success)
|
|
4689
|
+
problem(
|
|
4690
|
+
"CONTEXT.ACQUISITION",
|
|
4691
|
+
`${p}/acquisitionRef`,
|
|
4692
|
+
"Acquisition snapshot does not satisfy its declared contract.",
|
|
4693
|
+
acquisition.checks.structural === "failed" ? "structural" : "semantic"
|
|
4694
|
+
);
|
|
4695
|
+
else
|
|
4696
|
+
acquisitionIds = new Set(
|
|
4697
|
+
acquisition.data.acquisitions.map((a) => a.id)
|
|
4698
|
+
);
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4701
|
+
for (const [index, entity] of context.entities.entries()) {
|
|
4702
|
+
const ep = `${p}/entities/${index}`;
|
|
4703
|
+
for (const { field, assertion } of contextAssertions(entity)) {
|
|
4704
|
+
const prov = assertion.content.provenance;
|
|
4705
|
+
if (prov) {
|
|
4706
|
+
const source = sources.get(prov.sourceRef);
|
|
4707
|
+
if (!source)
|
|
4708
|
+
problem(
|
|
4709
|
+
"REF.LOCAL_RESOLUTION",
|
|
4710
|
+
ep,
|
|
4711
|
+
"Context source is absent from the scoped observation."
|
|
4712
|
+
);
|
|
4713
|
+
else if (source.digest && prov.sourceDigest && source.digest.value !== prov.sourceDigest.value)
|
|
4714
|
+
problem(
|
|
4715
|
+
"SOURCE.DIGEST_MISMATCH",
|
|
4716
|
+
ep,
|
|
4717
|
+
"Source digest declarations differ."
|
|
4718
|
+
);
|
|
4719
|
+
}
|
|
4720
|
+
const value = assertion.content.value;
|
|
4721
|
+
if (value === void 0) continue;
|
|
4722
|
+
if (field === "productRefs") {
|
|
4723
|
+
for (const ref5 of value)
|
|
4724
|
+
if (!sources.has(ref5))
|
|
4725
|
+
problem(
|
|
4726
|
+
"REF.LOCAL_RESOLUTION",
|
|
4727
|
+
ep,
|
|
4728
|
+
"Collection artifact is not declared."
|
|
4729
|
+
);
|
|
4730
|
+
}
|
|
4731
|
+
if (field === "acquisitionIds") {
|
|
4732
|
+
for (const id12 of value)
|
|
4733
|
+
if (!acquisitionIds?.has(id12))
|
|
4734
|
+
problem(
|
|
4735
|
+
"REF.ACQUISITION",
|
|
4736
|
+
ep,
|
|
4737
|
+
"Acquisition ID needs a supplied, valid acquisition snapshot."
|
|
4738
|
+
);
|
|
4739
|
+
}
|
|
4740
|
+
if (field === "position") {
|
|
4741
|
+
const checked = parseExperimentalObservation({
|
|
4742
|
+
...observation,
|
|
4743
|
+
position: { state: "known", value, sourceRefs: [prov.sourceRef] }
|
|
4744
|
+
});
|
|
4745
|
+
if (!checked.success)
|
|
4746
|
+
problem(
|
|
4747
|
+
"CONTEXT.POSITION",
|
|
4748
|
+
ep,
|
|
4749
|
+
"Context position must satisfy the observation frame, unit and source-reference rules."
|
|
4750
|
+
);
|
|
4751
|
+
}
|
|
4752
|
+
}
|
|
4753
|
+
for (const selection of entity.selections ?? []) {
|
|
4754
|
+
if (methods.get(selection.methodRef)?.version !== selection.methodVersion)
|
|
4755
|
+
problem(
|
|
4756
|
+
"METHOD.VERSION_MISMATCH",
|
|
4757
|
+
ep,
|
|
4758
|
+
"Selection method/version must match the observation inventory."
|
|
4759
|
+
);
|
|
4760
|
+
}
|
|
4761
|
+
const proximityLinks = contextAssertions(entity).flatMap(
|
|
4762
|
+
({ field, assertion }) => {
|
|
4763
|
+
if (field !== "proximity" || !assertion.content.value) return [];
|
|
4764
|
+
const value = assertion.content.value;
|
|
4765
|
+
return [
|
|
4766
|
+
...value.distanceMeasurementId ? [
|
|
4767
|
+
{
|
|
4768
|
+
id: assertion.id,
|
|
4769
|
+
role: "distance",
|
|
4770
|
+
measurementId: value.distanceMeasurementId,
|
|
4771
|
+
relatedPlaceId: value.targetPlaceId
|
|
4772
|
+
}
|
|
4773
|
+
] : [],
|
|
4774
|
+
...value.bearingMeasurementId ? [
|
|
4775
|
+
{
|
|
4776
|
+
id: assertion.id,
|
|
4777
|
+
role: "bearing",
|
|
4778
|
+
measurementId: value.bearingMeasurementId,
|
|
4779
|
+
relatedPlaceId: value.targetPlaceId
|
|
4780
|
+
}
|
|
4781
|
+
] : []
|
|
4782
|
+
];
|
|
4783
|
+
}
|
|
4784
|
+
);
|
|
4785
|
+
for (const link of [...entity.measurements ?? [], ...proximityLinks]) {
|
|
4786
|
+
const role = CONTEXT_MEASUREMENT_ROLES[link.role];
|
|
4787
|
+
const measurement = measurements.get(link.measurementId);
|
|
4788
|
+
if (!measurement) {
|
|
4789
|
+
problem(
|
|
4790
|
+
"REF.MEASUREMENT",
|
|
4791
|
+
ep,
|
|
4792
|
+
"Measurement is absent from the scoped observation."
|
|
4793
|
+
);
|
|
4794
|
+
continue;
|
|
4795
|
+
}
|
|
4796
|
+
if (!role.entities.includes(entity.kind) || !role.quantities.includes(
|
|
4797
|
+
measurement.quantity
|
|
4798
|
+
) || !role.units.includes(measurement.value.unit))
|
|
4799
|
+
problem(
|
|
4800
|
+
"CONTEXT.MEASUREMENT_ROLE",
|
|
4801
|
+
ep,
|
|
4802
|
+
"Measurement entity, quantity and unit must match the declared role."
|
|
4803
|
+
);
|
|
4804
|
+
const value = measurement.value.value;
|
|
4805
|
+
if ([
|
|
4806
|
+
"count",
|
|
4807
|
+
"size",
|
|
4808
|
+
"speed",
|
|
4809
|
+
"wind_speed",
|
|
4810
|
+
"duration",
|
|
4811
|
+
"distance",
|
|
4812
|
+
"water_depth",
|
|
4813
|
+
"coordinate_precision",
|
|
4814
|
+
"time_alignment"
|
|
4815
|
+
].includes(link.role) && value < 0)
|
|
4816
|
+
problem(
|
|
4817
|
+
"CONTEXT.MEASUREMENT_RANGE",
|
|
4818
|
+
ep,
|
|
4819
|
+
"This role cannot be negative."
|
|
4820
|
+
);
|
|
4821
|
+
if (link.role === "count" && !Number.isInteger(value))
|
|
4822
|
+
problem("CONTEXT.MEASUREMENT_RANGE", ep, "Count must be an integer.");
|
|
4823
|
+
if (["heading", "bearing"].includes(link.role) && (value < 0 || value > 360))
|
|
4824
|
+
problem(
|
|
4825
|
+
"CONTEXT.MEASUREMENT_RANGE",
|
|
4826
|
+
ep,
|
|
4827
|
+
"Direction must lie between zero and 360 degrees."
|
|
4828
|
+
);
|
|
4829
|
+
if (["relative_humidity", "moon_illumination"].includes(link.role) && (value < 0 || value > (measurement.value.unit === "1" ? 1 : 100)))
|
|
4830
|
+
problem(
|
|
4831
|
+
"CONTEXT.MEASUREMENT_RANGE",
|
|
4832
|
+
ep,
|
|
4833
|
+
"Fraction lies outside its unit range."
|
|
4834
|
+
);
|
|
4835
|
+
if (["distance", "bearing"].includes(link.role) && !link.relatedPlaceId)
|
|
4836
|
+
problem(
|
|
4837
|
+
"CONTEXT.RELATED_PLACE",
|
|
4838
|
+
ep,
|
|
4839
|
+
"Distance and bearing must identify the other place."
|
|
4840
|
+
);
|
|
4841
|
+
}
|
|
4842
|
+
}
|
|
4843
|
+
}
|
|
4844
|
+
if (history.success) {
|
|
4845
|
+
let resolve2 = function(reference, pointer6, assertionId) {
|
|
4846
|
+
const context = contexts.get(reference.document.sha256);
|
|
4847
|
+
if (!context) return;
|
|
4848
|
+
const entity = context.entities.find(
|
|
4849
|
+
(e) => e.kind === reference.target.kind && e.id === reference.target.id
|
|
4850
|
+
);
|
|
4851
|
+
if (!entity) {
|
|
4852
|
+
problem(
|
|
4853
|
+
"REF.ENTITY",
|
|
4854
|
+
pointer6,
|
|
4855
|
+
"Typed entity is absent from the selected snapshot."
|
|
4856
|
+
);
|
|
4857
|
+
return;
|
|
4858
|
+
}
|
|
4859
|
+
const assertions = contextAssertions(entity);
|
|
4860
|
+
if (reference.target.field && !assertions.some((a) => a.field === reference.target.field))
|
|
4861
|
+
problem(
|
|
4862
|
+
"REF.FIELD",
|
|
4863
|
+
pointer6,
|
|
4864
|
+
"Target field has no supplied assertions."
|
|
4865
|
+
);
|
|
4866
|
+
if (assertionId && (!reference.target.field || !assertions.some(
|
|
4867
|
+
(a) => a.field === reference.target.field && a.assertion.id === assertionId
|
|
4868
|
+
)))
|
|
4869
|
+
problem(
|
|
4870
|
+
"REF.ASSERTION",
|
|
4871
|
+
pointer6,
|
|
4872
|
+
"Assessment input must select an existing assertion on its named field."
|
|
4873
|
+
);
|
|
4874
|
+
};
|
|
4875
|
+
for (const [i, ref5] of history.data.contextRefs.entries()) {
|
|
4876
|
+
const p = `/contextRefs/${i}`;
|
|
4877
|
+
const value = await load(ref5, p);
|
|
4878
|
+
if (value === void 0) continue;
|
|
4879
|
+
const parsed = parseObservationContext(value);
|
|
4880
|
+
if (!parsed.success) {
|
|
4881
|
+
issues.push(
|
|
4882
|
+
...parsed.issues.map((i2) => ({ ...i2, pointer: p + i2.pointer }))
|
|
4883
|
+
);
|
|
4884
|
+
continue;
|
|
4885
|
+
}
|
|
4886
|
+
const context = parsed.data;
|
|
4887
|
+
const observationBytes = await load(
|
|
4888
|
+
context.observationRef,
|
|
4889
|
+
`${p}/observationRef`
|
|
4890
|
+
);
|
|
4891
|
+
if (observationBytes === void 0) continue;
|
|
4892
|
+
const observation = parseExperimentalObservation(observationBytes);
|
|
4893
|
+
if (!observation.success || !equal(observationBytes, history.data.observation)) {
|
|
4894
|
+
problem(
|
|
4895
|
+
"CONTEXT.OBSERVATION_SCOPE",
|
|
4896
|
+
p,
|
|
4897
|
+
"Context must select the same complete observation snapshot as the history.",
|
|
4898
|
+
observation.checks.structural === "failed" ? "structural" : "semantic"
|
|
4899
|
+
);
|
|
4900
|
+
continue;
|
|
4901
|
+
}
|
|
4902
|
+
await checkContext(context, observation.data, p);
|
|
4903
|
+
contexts.set(ref5.sha256, context);
|
|
4904
|
+
}
|
|
4905
|
+
for (const [i, claim] of history.data.claims.entries()) {
|
|
4906
|
+
if (claim.subject.kind === "context")
|
|
4907
|
+
resolve2(claim.subject.reference, `/claims/${i}/subject`);
|
|
4908
|
+
if (claim.kind === "assessment")
|
|
4909
|
+
for (const [j, ref5] of (claim.contextInputRefs ?? []).entries())
|
|
4910
|
+
resolve2(ref5, `/claims/${i}/contextInputRefs/${j}`, ref5.assertionId);
|
|
4911
|
+
}
|
|
4912
|
+
}
|
|
4913
|
+
const external = snapshots.some((s) => s.status === "failed") ? "failed" : snapshots.some((s) => s.status === "unavailable") || !snapshots.length ? "not_checked" : "passed";
|
|
4914
|
+
return {
|
|
4915
|
+
success: history.success && issues.length === 0,
|
|
4916
|
+
issues,
|
|
4917
|
+
snapshots,
|
|
4918
|
+
checks: {
|
|
4919
|
+
structural: issues.some((i) => i.stage === "structural") ? "failed" : history.checks.structural,
|
|
4920
|
+
semantic: history.checks.structural === "failed" || issues.some((i) => i.stage === "structural") ? "not_checked" : issues.some((i) => i.stage !== "external") ? "failed" : issues.length ? "not_checked" : "passed",
|
|
4921
|
+
profile: "not_checked",
|
|
4922
|
+
external
|
|
4923
|
+
},
|
|
4924
|
+
currentClaimRefs: history.success && issues.length === 0 ? history.currentClaimRefs : [],
|
|
4925
|
+
integrityScope: "supplied_context_observation_and_acquisition_snapshot_bytes",
|
|
4926
|
+
temporalNormalization: "not_checked",
|
|
4927
|
+
sourceArtifactIntegrity: "not_checked",
|
|
4928
|
+
scientificInterpretation: "not_checked",
|
|
4929
|
+
multiSensorFusion: "not_checked"
|
|
4930
|
+
};
|
|
4931
|
+
}
|
|
4932
|
+
function equal2(a, b) {
|
|
4933
|
+
if (a === b) return true;
|
|
4934
|
+
if (!a || !b || typeof a !== "object" || typeof b !== "object") return false;
|
|
4935
|
+
if (Array.isArray(a) || Array.isArray(b))
|
|
4936
|
+
return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((v, i) => equal2(v, b[i]));
|
|
4937
|
+
const x = a, y = b;
|
|
4938
|
+
return Object.keys(x).length === Object.keys(y).length && Object.keys(x).every(
|
|
4939
|
+
(k) => Object.prototype.hasOwnProperty.call(y, k) && equal2(x[k], y[k])
|
|
4940
|
+
);
|
|
4941
|
+
}
|
|
4942
|
+
async function evaluateResearchClaimHistory(input, options) {
|
|
4943
|
+
const history = parseResearchClaimHistory(input);
|
|
4944
|
+
const issues = history.issues.map((i) => ({
|
|
4945
|
+
code: i.code,
|
|
4946
|
+
stage: i.stage,
|
|
4947
|
+
pointer: i.pointer,
|
|
4948
|
+
message: i.message
|
|
4949
|
+
}));
|
|
4950
|
+
const snapshots = [];
|
|
4951
|
+
const contexts = /* @__PURE__ */ new Map();
|
|
4952
|
+
const entityDocuments = /* @__PURE__ */ new Map();
|
|
4953
|
+
const problem = (code, pointer6, message, stage = "semantic") => issues.push({ code, pointer: pointer6, message, stage });
|
|
4954
|
+
async function load(ref5, pointer6) {
|
|
4955
|
+
const supplied = options.documents.get(ref5.sha256);
|
|
4956
|
+
const bytes = supplied ? Uint8Array.from(supplied) : void 0;
|
|
4957
|
+
if (!bytes) {
|
|
4958
|
+
snapshots.push({ ...ref5, status: "unavailable" });
|
|
4959
|
+
problem(
|
|
4960
|
+
"SNAPSHOT.UNAVAILABLE",
|
|
4961
|
+
pointer6,
|
|
4962
|
+
"Required snapshot bytes were not supplied.",
|
|
4963
|
+
"external"
|
|
4964
|
+
);
|
|
4965
|
+
return;
|
|
4966
|
+
}
|
|
4967
|
+
if ([
|
|
4968
|
+
...new Uint8Array(
|
|
4969
|
+
await globalThis.crypto.subtle.digest("SHA-256", bytes)
|
|
4970
|
+
)
|
|
4971
|
+
].map((b) => b.toString(16).padStart(2, "0")).join("") !== ref5.sha256) {
|
|
4972
|
+
snapshots.push({ ...ref5, status: "failed" });
|
|
4973
|
+
problem(
|
|
4974
|
+
"SNAPSHOT.DIGEST",
|
|
4975
|
+
pointer6,
|
|
4976
|
+
"Supplied bytes do not match the reference digest.",
|
|
4977
|
+
"external"
|
|
4978
|
+
);
|
|
4979
|
+
return;
|
|
4980
|
+
}
|
|
4981
|
+
let value;
|
|
4982
|
+
try {
|
|
4983
|
+
value = JSON.parse(
|
|
4984
|
+
new TextDecoder("utf-8", { fatal: true }).decode(bytes)
|
|
4985
|
+
);
|
|
4986
|
+
} catch {
|
|
4987
|
+
snapshots.push({ ...ref5, status: "failed" });
|
|
4988
|
+
problem(
|
|
4989
|
+
"SNAPSHOT.JSON",
|
|
4990
|
+
pointer6,
|
|
4991
|
+
"Snapshot is not a UTF-8 JSON document.",
|
|
4992
|
+
"external"
|
|
4993
|
+
);
|
|
4994
|
+
return;
|
|
4995
|
+
}
|
|
4996
|
+
snapshots.push({ ...ref5, status: "passed" });
|
|
4997
|
+
if (!value || typeof value !== "object" || value.id !== ref5.documentId) {
|
|
4998
|
+
problem(
|
|
4999
|
+
"SNAPSHOT.IDENTITY",
|
|
5000
|
+
pointer6,
|
|
5001
|
+
"Snapshot document ID does not match its reference."
|
|
5002
|
+
);
|
|
5003
|
+
return;
|
|
5004
|
+
}
|
|
5005
|
+
return value;
|
|
5006
|
+
}
|
|
5007
|
+
async function checkContext(context, observation, p) {
|
|
5008
|
+
const sources = new Map([
|
|
5009
|
+
...observation.sources.map((s) => [`source:${s.id}`, s]),
|
|
5010
|
+
...observation.products.map((s) => [`product:${s.id}`, s])
|
|
5011
|
+
]);
|
|
5012
|
+
const methods = new Map(
|
|
5013
|
+
observation.methods.map((m) => [`method:${m.id}`, m])
|
|
5014
|
+
);
|
|
5015
|
+
const measurements = new Map(
|
|
5016
|
+
observation.measurements.map((m) => [m.id, m])
|
|
5017
|
+
);
|
|
5018
|
+
let acquisitionIds;
|
|
5019
|
+
if (context.acquisitionRef) {
|
|
5020
|
+
const value = await load(context.acquisitionRef, `${p}/acquisitionRef`);
|
|
5021
|
+
if (value !== void 0) {
|
|
5022
|
+
const acquisition = parseAcquisitionContext(value);
|
|
5023
|
+
if (!acquisition.success)
|
|
5024
|
+
problem(
|
|
5025
|
+
"CONTEXT.ACQUISITION",
|
|
5026
|
+
`${p}/acquisitionRef`,
|
|
5027
|
+
"Acquisition snapshot does not satisfy its declared contract.",
|
|
5028
|
+
acquisition.checks.structural === "failed" ? "structural" : "semantic"
|
|
5029
|
+
);
|
|
5030
|
+
else
|
|
5031
|
+
acquisitionIds = new Set(
|
|
5032
|
+
acquisition.data.acquisitions.map((a) => a.id)
|
|
5033
|
+
);
|
|
5034
|
+
}
|
|
5035
|
+
}
|
|
5036
|
+
for (const [index, entity] of context.entities.entries()) {
|
|
5037
|
+
const ep = `${p}/entities/${index}`;
|
|
5038
|
+
for (const { field, assertion } of contextAssertions(entity)) {
|
|
5039
|
+
const prov = assertion.content.provenance;
|
|
5040
|
+
if (prov) {
|
|
5041
|
+
const source = sources.get(prov.sourceRef);
|
|
5042
|
+
if (!source)
|
|
5043
|
+
problem(
|
|
5044
|
+
"REF.LOCAL_RESOLUTION",
|
|
5045
|
+
ep,
|
|
5046
|
+
"Context source is absent from the scoped observation."
|
|
5047
|
+
);
|
|
5048
|
+
else if (source.digest && prov.sourceDigest && source.digest.value !== prov.sourceDigest.value)
|
|
5049
|
+
problem(
|
|
5050
|
+
"SOURCE.DIGEST_MISMATCH",
|
|
5051
|
+
ep,
|
|
5052
|
+
"Source digest declarations differ."
|
|
5053
|
+
);
|
|
5054
|
+
}
|
|
5055
|
+
const value = assertion.content.value;
|
|
5056
|
+
if (value === void 0) continue;
|
|
5057
|
+
if (field === "productRefs") {
|
|
5058
|
+
for (const ref5 of value)
|
|
5059
|
+
if (!sources.has(ref5))
|
|
5060
|
+
problem(
|
|
5061
|
+
"REF.LOCAL_RESOLUTION",
|
|
5062
|
+
ep,
|
|
5063
|
+
"Collection artifact is not declared."
|
|
5064
|
+
);
|
|
5065
|
+
}
|
|
5066
|
+
if (field === "acquisitionIds") {
|
|
5067
|
+
for (const id12 of value)
|
|
5068
|
+
if (!acquisitionIds?.has(id12))
|
|
5069
|
+
problem(
|
|
5070
|
+
"REF.ACQUISITION",
|
|
5071
|
+
ep,
|
|
5072
|
+
"Acquisition ID needs a supplied, valid acquisition snapshot."
|
|
5073
|
+
);
|
|
5074
|
+
}
|
|
5075
|
+
if (field === "position") {
|
|
5076
|
+
const checked = parseExperimentalObservation({
|
|
5077
|
+
...observation,
|
|
5078
|
+
position: { state: "known", value, sourceRefs: [prov.sourceRef] }
|
|
5079
|
+
});
|
|
5080
|
+
if (!checked.success)
|
|
5081
|
+
problem(
|
|
5082
|
+
"CONTEXT.POSITION",
|
|
5083
|
+
ep,
|
|
5084
|
+
"Context position must satisfy the observation frame, unit and source-reference rules."
|
|
5085
|
+
);
|
|
5086
|
+
}
|
|
5087
|
+
}
|
|
5088
|
+
for (const selection of entity.selections ?? []) {
|
|
5089
|
+
if (methods.get(selection.methodRef)?.version !== selection.methodVersion)
|
|
5090
|
+
problem(
|
|
5091
|
+
"METHOD.VERSION_MISMATCH",
|
|
5092
|
+
ep,
|
|
5093
|
+
"Selection method/version must match the observation inventory."
|
|
5094
|
+
);
|
|
5095
|
+
}
|
|
5096
|
+
const proximityLinks = contextAssertions(entity).flatMap(
|
|
5097
|
+
({ field, assertion }) => {
|
|
5098
|
+
if (field !== "proximity" || !assertion.content.value) return [];
|
|
5099
|
+
const value = assertion.content.value;
|
|
5100
|
+
return [
|
|
5101
|
+
...value.distanceMeasurementId ? [
|
|
5102
|
+
{
|
|
5103
|
+
id: assertion.id,
|
|
5104
|
+
role: "distance",
|
|
5105
|
+
measurementId: value.distanceMeasurementId,
|
|
5106
|
+
relatedPlaceId: value.targetPlaceId
|
|
5107
|
+
}
|
|
5108
|
+
] : [],
|
|
5109
|
+
...value.bearingMeasurementId ? [
|
|
5110
|
+
{
|
|
5111
|
+
id: assertion.id,
|
|
5112
|
+
role: "bearing",
|
|
5113
|
+
measurementId: value.bearingMeasurementId,
|
|
5114
|
+
relatedPlaceId: value.targetPlaceId
|
|
5115
|
+
}
|
|
5116
|
+
] : []
|
|
5117
|
+
];
|
|
5118
|
+
}
|
|
5119
|
+
);
|
|
5120
|
+
for (const link of [...entity.measurements ?? [], ...proximityLinks]) {
|
|
5121
|
+
const role = CONTEXT_MEASUREMENT_ROLES[link.role];
|
|
5122
|
+
const measurement = measurements.get(link.measurementId);
|
|
5123
|
+
if (!measurement) {
|
|
5124
|
+
problem(
|
|
5125
|
+
"REF.MEASUREMENT",
|
|
5126
|
+
ep,
|
|
5127
|
+
"Measurement is absent from the scoped observation."
|
|
5128
|
+
);
|
|
5129
|
+
continue;
|
|
5130
|
+
}
|
|
5131
|
+
if (!role.entities.includes(entity.kind) || !role.quantities.includes(
|
|
5132
|
+
measurement.quantity
|
|
5133
|
+
) || !role.units.includes(measurement.value.unit))
|
|
5134
|
+
problem(
|
|
5135
|
+
"CONTEXT.MEASUREMENT_ROLE",
|
|
5136
|
+
ep,
|
|
5137
|
+
"Measurement entity, quantity and unit must match the declared role."
|
|
5138
|
+
);
|
|
5139
|
+
const value = measurement.value.value;
|
|
5140
|
+
if ([
|
|
5141
|
+
"count",
|
|
5142
|
+
"size",
|
|
5143
|
+
"speed",
|
|
5144
|
+
"wind_speed",
|
|
5145
|
+
"duration",
|
|
5146
|
+
"distance",
|
|
5147
|
+
"water_depth",
|
|
5148
|
+
"coordinate_precision",
|
|
5149
|
+
"time_alignment"
|
|
5150
|
+
].includes(link.role) && value < 0)
|
|
5151
|
+
problem(
|
|
5152
|
+
"CONTEXT.MEASUREMENT_RANGE",
|
|
5153
|
+
ep,
|
|
5154
|
+
"This role cannot be negative."
|
|
5155
|
+
);
|
|
5156
|
+
if (link.role === "count" && !Number.isInteger(value))
|
|
5157
|
+
problem("CONTEXT.MEASUREMENT_RANGE", ep, "Count must be an integer.");
|
|
5158
|
+
if (["heading", "bearing"].includes(link.role) && (value < 0 || value > 360))
|
|
5159
|
+
problem(
|
|
5160
|
+
"CONTEXT.MEASUREMENT_RANGE",
|
|
5161
|
+
ep,
|
|
5162
|
+
"Direction must lie between zero and 360 degrees."
|
|
5163
|
+
);
|
|
5164
|
+
if (["relative_humidity", "moon_illumination"].includes(link.role) && (value < 0 || value > (measurement.value.unit === "1" ? 1 : 100)))
|
|
5165
|
+
problem(
|
|
5166
|
+
"CONTEXT.MEASUREMENT_RANGE",
|
|
5167
|
+
ep,
|
|
5168
|
+
"Fraction lies outside its unit range."
|
|
5169
|
+
);
|
|
5170
|
+
if (["distance", "bearing"].includes(link.role) && !link.relatedPlaceId)
|
|
5171
|
+
problem(
|
|
5172
|
+
"CONTEXT.RELATED_PLACE",
|
|
5173
|
+
ep,
|
|
5174
|
+
"Distance and bearing must identify the other place."
|
|
5175
|
+
);
|
|
5176
|
+
}
|
|
5177
|
+
}
|
|
5178
|
+
}
|
|
5179
|
+
if (history.success) {
|
|
5180
|
+
let resolveEntity2 = function(reference, pointer6, assertionId) {
|
|
5181
|
+
const document = entityDocuments.get(reference.document.sha256);
|
|
5182
|
+
if (!document) return;
|
|
5183
|
+
const entity = document.entities.find(
|
|
5184
|
+
(e) => e.kind === reference.target.kind && e.id === reference.target.id
|
|
5185
|
+
);
|
|
5186
|
+
if (!entity) {
|
|
5187
|
+
problem(
|
|
5188
|
+
"REF.ENTITY",
|
|
5189
|
+
pointer6,
|
|
5190
|
+
"Typed entity is absent from the selected snapshot."
|
|
5191
|
+
);
|
|
5192
|
+
return;
|
|
5193
|
+
}
|
|
5194
|
+
const assertions = researchEntityAssertions(entity);
|
|
5195
|
+
if (reference.target.field && !assertions.some((a) => a.field === reference.target.field))
|
|
5196
|
+
problem(
|
|
5197
|
+
"REF.FIELD",
|
|
5198
|
+
pointer6,
|
|
5199
|
+
"Target field has no supplied assertions."
|
|
5200
|
+
);
|
|
5201
|
+
if (assertionId && (!reference.target.field || !assertions.some(
|
|
5202
|
+
(a) => a.field === reference.target.field && a.assertion.id === assertionId
|
|
5203
|
+
)))
|
|
5204
|
+
problem(
|
|
5205
|
+
"REF.ASSERTION",
|
|
5206
|
+
pointer6,
|
|
5207
|
+
"Input must select an existing assertion on its named field."
|
|
5208
|
+
);
|
|
5209
|
+
}, resolve2 = function(reference, pointer6, assertionId) {
|
|
5210
|
+
const context = contexts.get(reference.document.sha256);
|
|
5211
|
+
if (!context) return;
|
|
5212
|
+
const entity = context.entities.find(
|
|
5213
|
+
(e) => e.kind === reference.target.kind && e.id === reference.target.id
|
|
5214
|
+
);
|
|
5215
|
+
if (!entity) {
|
|
5216
|
+
problem(
|
|
5217
|
+
"REF.ENTITY",
|
|
5218
|
+
pointer6,
|
|
5219
|
+
"Typed entity is absent from the selected snapshot."
|
|
5220
|
+
);
|
|
5221
|
+
return;
|
|
5222
|
+
}
|
|
5223
|
+
const assertions = contextAssertions(entity);
|
|
5224
|
+
if (reference.target.field && !assertions.some((a) => a.field === reference.target.field))
|
|
5225
|
+
problem(
|
|
5226
|
+
"REF.FIELD",
|
|
5227
|
+
pointer6,
|
|
5228
|
+
"Target field has no supplied assertions."
|
|
5229
|
+
);
|
|
5230
|
+
if (assertionId && (!reference.target.field || !assertions.some(
|
|
5231
|
+
(a) => a.field === reference.target.field && a.assertion.id === assertionId
|
|
5232
|
+
)))
|
|
5233
|
+
problem(
|
|
5234
|
+
"REF.ASSERTION",
|
|
5235
|
+
pointer6,
|
|
5236
|
+
"Assessment input must select an existing assertion on its named field."
|
|
5237
|
+
);
|
|
5238
|
+
};
|
|
5239
|
+
for (const [i, ref5] of history.data.contextRefs.entries()) {
|
|
5240
|
+
const p = `/contextRefs/${i}`;
|
|
5241
|
+
const value = await load(ref5, p);
|
|
5242
|
+
if (value === void 0) continue;
|
|
5243
|
+
const parsed = parseObservationContext(value);
|
|
5244
|
+
if (!parsed.success) {
|
|
5245
|
+
issues.push(
|
|
5246
|
+
...parsed.issues.map((i2) => ({ ...i2, pointer: p + i2.pointer }))
|
|
5247
|
+
);
|
|
5248
|
+
continue;
|
|
5249
|
+
}
|
|
5250
|
+
const context = parsed.data;
|
|
5251
|
+
const observationBytes = await load(
|
|
5252
|
+
context.observationRef,
|
|
5253
|
+
`${p}/observationRef`
|
|
5254
|
+
);
|
|
5255
|
+
if (observationBytes === void 0) continue;
|
|
5256
|
+
const observation = parseExperimentalObservation(observationBytes);
|
|
5257
|
+
if (!observation.success || !equal2(observationBytes, history.data.observation)) {
|
|
5258
|
+
problem(
|
|
5259
|
+
"CONTEXT.OBSERVATION_SCOPE",
|
|
5260
|
+
p,
|
|
5261
|
+
"Context must select the same complete observation snapshot as the history.",
|
|
5262
|
+
observation.checks.structural === "failed" ? "structural" : "semantic"
|
|
5263
|
+
);
|
|
5264
|
+
continue;
|
|
5265
|
+
}
|
|
5266
|
+
await checkContext(context, observation.data, p);
|
|
5267
|
+
contexts.set(ref5.sha256, context);
|
|
5268
|
+
}
|
|
5269
|
+
for (const [i, ref5] of history.data.entityRefs.entries()) {
|
|
5270
|
+
const p = `/entityRefs/${i}`;
|
|
5271
|
+
const value = await load(ref5, p);
|
|
5272
|
+
if (value === void 0) continue;
|
|
5273
|
+
const parsed = parseResearchEntities(value);
|
|
5274
|
+
if (!parsed.success) {
|
|
5275
|
+
issues.push(
|
|
5276
|
+
...parsed.issues.map((i2) => ({ ...i2, pointer: p + i2.pointer }))
|
|
5277
|
+
);
|
|
5278
|
+
continue;
|
|
5279
|
+
}
|
|
5280
|
+
const entities = parsed.data;
|
|
5281
|
+
const raw = await load(entities.observationRef, `${p}/observationRef`);
|
|
5282
|
+
if (raw === void 0) continue;
|
|
5283
|
+
const observation = parseExperimentalObservation(raw);
|
|
5284
|
+
if (!observation.success || !equal2(raw, history.data.observation)) {
|
|
5285
|
+
problem(
|
|
5286
|
+
"ENTITIES.OBSERVATION_SCOPE",
|
|
5287
|
+
p,
|
|
5288
|
+
"Research entities must select the same complete observation snapshot as the history."
|
|
5289
|
+
);
|
|
5290
|
+
continue;
|
|
5291
|
+
}
|
|
5292
|
+
const contextSnapshots = new Set(
|
|
5293
|
+
history.data.contextRefs.map((r) => JSON.stringify(r))
|
|
5294
|
+
);
|
|
5295
|
+
for (const r of entities.contextRefs)
|
|
5296
|
+
if (!contextSnapshots.has(JSON.stringify(r)))
|
|
5297
|
+
problem(
|
|
5298
|
+
"REF.LOCAL_RESOLUTION",
|
|
5299
|
+
p,
|
|
5300
|
+
"Entity context dependency must be declared in the history and checked."
|
|
5301
|
+
);
|
|
5302
|
+
const sources = new Map([
|
|
5303
|
+
...observation.data.sources.map((x) => [`source:${x.id}`, x]),
|
|
5304
|
+
...observation.data.products.map(
|
|
5305
|
+
(x) => [`product:${x.id}`, x]
|
|
5306
|
+
)
|
|
5307
|
+
]);
|
|
5308
|
+
for (const [j, entity] of entities.entities.entries()) {
|
|
5309
|
+
const ep = `${p}/entities/${j}`;
|
|
5310
|
+
for (const { field, assertion } of researchEntityAssertions(entity)) {
|
|
5311
|
+
const prov = assertion.content.provenance;
|
|
5312
|
+
if (prov) {
|
|
5313
|
+
const source = sources.get(prov.sourceRef);
|
|
5314
|
+
if (!source)
|
|
5315
|
+
problem(
|
|
5316
|
+
"REF.LOCAL_RESOLUTION",
|
|
5317
|
+
ep,
|
|
5318
|
+
"Entity source is absent from the scoped observation."
|
|
5319
|
+
);
|
|
5320
|
+
else if (source.digest && prov.sourceDigest && source.digest.value !== prov.sourceDigest.value)
|
|
5321
|
+
problem(
|
|
5322
|
+
"SOURCE.DIGEST_MISMATCH",
|
|
5323
|
+
ep,
|
|
5324
|
+
"Source digest declarations differ."
|
|
5325
|
+
);
|
|
5326
|
+
}
|
|
5327
|
+
const value2 = assertion.content.value;
|
|
5328
|
+
const refs = field === "sourceDocument" && typeof value2 === "string" ? [value2] : field === "supportRefs" && Array.isArray(value2) ? value2 : [];
|
|
5329
|
+
for (const r of refs)
|
|
5330
|
+
if (!sources.has(r))
|
|
5331
|
+
problem(
|
|
5332
|
+
"REF.LOCAL_RESOLUTION",
|
|
5333
|
+
ep,
|
|
5334
|
+
"Account or procedure artifact is not declared in the observation."
|
|
5335
|
+
);
|
|
5336
|
+
}
|
|
5337
|
+
for (const reference of researchEntityContextReferences(entity))
|
|
5338
|
+
resolve2(reference, ep);
|
|
5339
|
+
}
|
|
5340
|
+
entityDocuments.set(ref5.sha256, entities);
|
|
5341
|
+
}
|
|
5342
|
+
for (const [i, claim] of history.data.claims.entries()) {
|
|
5343
|
+
if (claim.subject.kind === "entity")
|
|
5344
|
+
resolveEntity2(claim.subject.reference, `/claims/${i}/subject`);
|
|
5345
|
+
if (claim.kind === "assessment")
|
|
5346
|
+
for (const [j, ref5] of (claim.entityInputRefs ?? []).entries())
|
|
5347
|
+
resolveEntity2(
|
|
5348
|
+
ref5,
|
|
5349
|
+
`/claims/${i}/entityInputRefs/${j}`,
|
|
5350
|
+
ref5.assertionId
|
|
5351
|
+
);
|
|
5352
|
+
if (claim.subject.kind === "context")
|
|
5353
|
+
resolve2(claim.subject.reference, `/claims/${i}/subject`);
|
|
5354
|
+
if (claim.kind === "assessment")
|
|
5355
|
+
for (const [j, ref5] of (claim.contextInputRefs ?? []).entries())
|
|
5356
|
+
resolve2(ref5, `/claims/${i}/contextInputRefs/${j}`, ref5.assertionId);
|
|
5357
|
+
}
|
|
5358
|
+
}
|
|
5359
|
+
const external = snapshots.some((s) => s.status === "failed") ? "failed" : snapshots.some((s) => s.status === "unavailable") || !snapshots.length ? "not_checked" : "passed";
|
|
5360
|
+
return {
|
|
5361
|
+
success: history.success && issues.length === 0,
|
|
5362
|
+
issues,
|
|
5363
|
+
snapshots,
|
|
5364
|
+
checks: {
|
|
5365
|
+
structural: issues.some((i) => i.stage === "structural") ? "failed" : history.checks.structural,
|
|
5366
|
+
semantic: history.checks.structural === "failed" || issues.some((i) => i.stage === "structural") ? "not_checked" : issues.some((i) => i.stage !== "external") ? "failed" : issues.length ? "not_checked" : "passed",
|
|
5367
|
+
profile: "not_checked",
|
|
5368
|
+
external
|
|
5369
|
+
},
|
|
5370
|
+
currentClaimRefs: history.success && issues.length === 0 ? history.currentClaimRefs : [],
|
|
5371
|
+
integrityScope: "supplied_entities_context_observation_and_acquisition_snapshot_bytes",
|
|
5372
|
+
temporalNormalization: "not_checked",
|
|
5373
|
+
sourceArtifactIntegrity: "not_checked",
|
|
5374
|
+
scientificInterpretation: "not_checked",
|
|
5375
|
+
multiSensorFusion: "not_checked"
|
|
5376
|
+
};
|
|
5377
|
+
}
|
|
4529
5378
|
|
|
4530
|
-
export { ACQUISITION_BINDINGS_PROFILE, ACQUISITION_BINDINGS_SCHEMA_ID, ASSESSMENT_DOCUMENTATION_PROFILE, AcquisitionBindingsSchema, DATASET_RELEASE_PROFILE, DATASET_RELEASE_SCHEMA_ID, DOCUMENTATION_COMPLETION_POLICY, DOCUMENTATION_REQUIREMENTS, DatasetReleaseSchema, HISTORICAL_TESTIMONY_PROFILE, HISTORICAL_TESTIMONY_REQUIREMENTS, HISTORICAL_TESTIMONY_SELECTION_SCHEMA_ID, HistoricalTestimonySelectionSchema, INSTRUMENT_RESEARCH_COMPLETION_POLICY, INSTRUMENT_RESEARCH_PREREQUISITES_PROFILE, INSTRUMENT_RESEARCH_REQUIREMENTS, INSTRUMENT_RESEARCH_REVIEW_SCHEMA_ID, InstrumentResearchReviewSchema, MEASUREMENT_BINDINGS_PROFILE, MEASUREMENT_BINDINGS_SCHEMA_ID, MIGRATION_COMPATIBILITY_SCHEMA_ID, MIGRATION_LEGACY_SCORES_SCHEMA_ID, MIGRATION_RESOLUTION_SCHEMA_ID, MIGRATION_REVIEW_SCHEMA_ID, MeasurementBindingsSchema, MigrationCompatibilitySchema, MigrationLegacyScoresSchema, MigrationResolutionSchema, MigrationReviewSchema, PHYSICAL_SAMPLE_PROFILE, PHYSICAL_SAMPLE_REQUIREMENTS, PHYSICAL_SAMPLE_SELECTION_SCHEMA_ID, PROFILE_EVALUATION_POLICY, PROFILE_EVALUATION_SCHEMA_ID, PROFILE_PREPARATION_SCHEMA_ID, PhysicalSampleSelectionSchema, ProfileEvaluationSchema, ProfilePreparationSchema, RELEASED_DOCUMENT_PROFILE, RELEASED_DOCUMENT_REQUIREMENTS, RELEASED_DOCUMENT_SELECTION_SCHEMA_ID, REPRODUCTION_PACKET_PROFILE, REPRODUCTION_PACKET_SCHEMA_ID, RESEARCH_EVALUATION_POLICY, RESEARCH_EVALUATION_SCHEMA_ID, ReleasedDocumentSelectionSchema, ReproductionPacketSchema, ResearchEvaluationSchema, SOURCE_INTAKE_PROFILE, SOURCE_INTAKE_SCHEMA_ID, SourceIntakeSchema, acquisitionBindingsJsonSchema, datasetReleaseJsonSchema, evaluateAcquisitionBindings, evaluateAssessmentDocumentation, evaluateDatasetRelease, evaluateDocumentationCompletion, evaluateHistoricalTestimony, evaluateInstrumentResearchCompletion, evaluateInstrumentResearchPrerequisites, evaluateMeasurementBindings, evaluatePhysicalSamples, evaluateProfileEvaluation, evaluateReleasedDocuments, evaluateReproductionPacket, evaluateResearchEvaluation, evaluateSourceIntake, historicalTestimonySelectionJsonSchema, instrumentResearchReviewJsonSchema, measurementBindingsJsonSchema, migrationCompatibilityJsonSchema, migrationLegacyScoresJsonSchema, migrationResolutionJsonSchema, migrationReviewJsonSchema, physicalSampleSelectionJsonSchema, profileEvaluationJsonSchema, profilePreparationJsonSchema, releasedDocumentSelectionJsonSchema, reproductionPacketJsonSchema, researchEvaluationJsonSchema, sourceIntakeJsonSchema };
|
|
5379
|
+
export { ACQUISITION_BINDINGS_PROFILE, ACQUISITION_BINDINGS_SCHEMA_ID, ASSESSMENT_DOCUMENTATION_PROFILE, AcquisitionBindingsSchema, CONTEXT_MEASUREMENT_ROLES, DATASET_RELEASE_PROFILE, DATASET_RELEASE_SCHEMA_ID, DOCUMENTATION_COMPLETION_POLICY, DOCUMENTATION_REQUIREMENTS, DatasetReleaseSchema, HISTORICAL_TESTIMONY_PROFILE, HISTORICAL_TESTIMONY_REQUIREMENTS, HISTORICAL_TESTIMONY_SELECTION_SCHEMA_ID, HistoricalTestimonySelectionSchema, INSTRUMENT_RESEARCH_COMPLETION_POLICY, INSTRUMENT_RESEARCH_PREREQUISITES_PROFILE, INSTRUMENT_RESEARCH_REQUIREMENTS, INSTRUMENT_RESEARCH_REVIEW_SCHEMA_ID, InstrumentResearchReviewSchema, MEASUREMENT_BINDINGS_PROFILE, MEASUREMENT_BINDINGS_SCHEMA_ID, MIGRATION_COMPATIBILITY_SCHEMA_ID, MIGRATION_LEGACY_SCORES_SCHEMA_ID, MIGRATION_RESOLUTION_SCHEMA_ID, MIGRATION_REVIEW_SCHEMA_ID, MeasurementBindingsSchema, MigrationCompatibilitySchema, MigrationLegacyScoresSchema, MigrationResolutionSchema, MigrationReviewSchema, PHYSICAL_SAMPLE_PROFILE, PHYSICAL_SAMPLE_REQUIREMENTS, PHYSICAL_SAMPLE_SELECTION_SCHEMA_ID, PROFILE_EVALUATION_POLICY, PROFILE_EVALUATION_SCHEMA_ID, PROFILE_PREPARATION_SCHEMA_ID, PhysicalSampleSelectionSchema, ProfileEvaluationSchema, ProfilePreparationSchema, RELEASED_DOCUMENT_PROFILE, RELEASED_DOCUMENT_REQUIREMENTS, RELEASED_DOCUMENT_SELECTION_SCHEMA_ID, REPRODUCTION_PACKET_PROFILE, REPRODUCTION_PACKET_SCHEMA_ID, RESEARCH_EVALUATION_POLICY, RESEARCH_EVALUATION_SCHEMA_ID, ReleasedDocumentSelectionSchema, ReproductionPacketSchema, ResearchEvaluationSchema, SOURCE_INTAKE_PROFILE, SOURCE_INTAKE_SCHEMA_ID, SourceIntakeSchema, acquisitionBindingsJsonSchema, datasetReleaseJsonSchema, evaluateAcquisitionBindings, evaluateAssessmentDocumentation, evaluateContextClaimHistory, evaluateDatasetRelease, evaluateDocumentationCompletion, evaluateHistoricalTestimony, evaluateInstrumentResearchCompletion, evaluateInstrumentResearchPrerequisites, evaluateMeasurementBindings, evaluatePhysicalSamples, evaluateProfileEvaluation, evaluateReleasedDocuments, evaluateReproductionPacket, evaluateResearchClaimHistory, evaluateResearchEvaluation, evaluateSourceIntake, historicalTestimonySelectionJsonSchema, instrumentResearchReviewJsonSchema, measurementBindingsJsonSchema, migrationCompatibilityJsonSchema, migrationLegacyScoresJsonSchema, migrationResolutionJsonSchema, migrationReviewJsonSchema, physicalSampleSelectionJsonSchema, profileEvaluationJsonSchema, profilePreparationJsonSchema, releasedDocumentSelectionJsonSchema, reproductionPacketJsonSchema, researchEvaluationJsonSchema, sourceIntakeJsonSchema };
|
|
4531
5380
|
//# sourceMappingURL=index.js.map
|
|
4532
5381
|
//# sourceMappingURL=index.js.map
|