Overview
@disclosureos/records — the Observation lexicon and shared primitives
@disclosureos/records answers the first question the standard asks: what was observed?
It provides the Observation type — the core record of the entire standard — and the shared primitives every other layer builds on. It depends only on Zod, so it works standalone in any TypeScript project.
Explore it visually
The Records page in the Standard Explorer shows how the Observation fields are grouped and rendered from the package schema.
npm install @disclosureos/recordsWhat's in the package
| Module | Provides |
|---|---|
| Observation | The core record: temporal, location, object, movement, witnesses, sensors, media, relations |
| Shared primitives | Confidence, Attribution, Claim, evidence refs, validation helpers — the primitives the other parts reuse |
| Extension slots | Forensic and clerical surfaces: provenance, identifiers, testimony, physical evidence, documents |
| Companions | Constants, guards, factories, formatters, labels for every vocabulary in the lexicon |
Sixty seconds of records
import { createObservation, createSensorReading } from '@disclosureos/records/factories';
import { validateObservation } from '@disclosureos/records';
const radar = createSensorReading('shipborne_radar', 'radar_phased_array', {
platform: 'USS Princeton (CG-59)',
});
const observation = createObservation(
{
temporal: { date: '2004-11-14', dateCertainty: 'exact' },
location: {
name: 'Pacific Ocean, SW of San Diego',
country: 'United States',
latitude: 31.5,
longitude: -117.5,
siteType: 'ocean',
},
summary: 'Tic-Tac-shaped craft tracked on radar.',
witnesses: { count: 4, militaryWitnesses: true, multipleIndependent: true },
sensorEvidence: { sensors: [radar] },
},
{ id: 'nimitz-tic-tac-2004', status: 'published' },
);
const issues = validateObservation(observation); // []Factories parse their output against the schema, so what they return is guaranteed valid.
Records is the shared vocabulary
The other layers don't just sit beside records — they're built from its primitives:
observablesandoriginscompose their claims from records'ClaimandConfidence- Their slots attach to
Observationthrough theObservationExtensionsextension point records declares scoringderives its completeness field inventory from records' JSON Schema- All validation across the standard returns records'
ValidationIssueshape
This is why records has no DisclosureOS dependencies and everything else depends on it.
Validating enriched records
validateObservation checks the core record only — it ignores observableAssessments and origin. If your record carries slots, validate with parseEnrichedObservation from @disclosureos/schema.
JSON Schema
The full lexicon is published as JSON Schema (draft 2020-12):
import { recordsJsonSchema, RECORDS_SCHEMA_VERSION } from '@disclosureos/records';The committed artifact ships at @disclosureos/records/schema and is hosted for non-JavaScript consumers. See JSON Schema.