An official website of the Disclosure Foundation

Introduction

Overview

Modules

ObservationShared PrimitivesExtension SlotsCompanions

Guides

Composing an ObservationValidating at Boundaries

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/records

What's in the package

ModuleProvides
ObservationThe core record: temporal, location, object, movement, witnesses, sensors, media, relations
Shared primitivesConfidence, Attribution, Claim, evidence refs, validation helpers — the primitives the other parts reuse
Extension slotsForensic and clerical surfaces: provenance, identifiers, testimony, physical evidence, documents
CompanionsConstants, 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:

  • observables and origins compose their claims from records' Claim and Confidence
  • Their slots attach to Observation through the ObservationExtensions extension point records declares
  • scoring derives its completeness field inventory from records' JSON Schema
  • All validation across the standard returns records' ValidationIssue shape

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.

Observation

The core record type — fields, domains, and the extension seam

On this page

What's in the package
Sixty seconds of records
Records is the shared vocabulary
JSON Schema