Installation
Install the DisclosureOS packages and configure TypeScript
Requirements
- Node.js 20 or later
- TypeScript 5.0+ (for TypeScript projects) with
"strict": true - An ESM project — the v1 packages do not ship CommonJS builds
Install the foundation
Install the foundation packages and the contract:
npm install @disclosureos/records @disclosureos/observables @disclosureos/origins @disclosureos/scoring @disclosureos/schemaOr only what you need — each package is independently useful:
npm install @disclosureos/records| Package | Depends on | Install when |
|---|---|---|
@disclosureos/records | Zod only | Always — it is the shared record vocabulary |
@disclosureos/observables | records | You assess anomalous characteristics |
@disclosureos/origins | records | You classify origin hypotheses |
@disclosureos/scoring | records, observables, origins | You measure completeness or compellingness |
@disclosureos/schema | records, observables, origins | You validate enriched records (recommended whenever you use more than records) |
The CLI doesn't need installing — run it with npx:
npx @disclosureos/cli validate observation.jsonTypeScript configuration
{
"compilerOptions": {
"strict": true,
"module": "esnext",
"moduleResolution": "bundler",
"target": "es2020"
}
}"moduleResolution": "node16" or "nodenext" also work. All packages ship built-in type declarations — there are no @types/* packages to install.
ESM only
The v1 packages publish ESM exclusively. If your project uses require(), you'll need to migrate to import (or dynamic import()) to use them.
Imports
The root barrel of each package exports its full public API:
import { createObservation, validateObservation } from '@disclosureos/records';
import { createObservableClaim } from '@disclosureos/observables';
import { createOriginClaim } from '@disclosureos/origins';
import { parseEnrichedObservation } from '@disclosureos/schema';
import { getCompleteness, score } from '@disclosureos/scoring';Subpath imports
Packages also expose focused subpaths for tighter imports:
// Records: domain modules and companions
import { createObservation } from '@disclosureos/records/factories';
import { evidenceRef, type Claim } from '@disclosureos/records/shared';
import type { Observation } from '@disclosureos/records/observation';
// Observables: the two frameworks
import { TECHNOLOGY_OBSERVABLES } from '@disclosureos/observables/technology';
import { BIOLOGICS_OBSERVABLES } from '@disclosureos/observables/biologics';
// Origins: taxonomy and reference systems
import { getNode, searchNodes } from '@disclosureos/origins/taxonomy';
import { HYNEK_SYSTEM } from '@disclosureos/origins/reference/hynek';
// Scoring: one measure at a time
import { getCompleteness } from '@disclosureos/scoring/completeness';
import { score } from '@disclosureos/scoring/compellingness';Side-effect imports and typing
Importing @disclosureos/observables or @disclosureos/origins augments the Observation type with that layer's slot. Importing @disclosureos/schema registers both slots and gives you the EnrichedObservation convenience type:
import type { EnrichedObservation } from '@disclosureos/schema';
// observation.observableAssessments and observation.origin are now typedJSON Schema artifacts
Every package commits its generated JSON Schema (draft 2020-12) and exposes it as a subpath:
import recordsSchema from '@disclosureos/records/schema' with { type: 'json' };
import enrichedSchema from '@disclosureos/schema/schema' with { type: 'json' };The schemas are also hosted at https://os.disclosure.org/schema/... for non-JavaScript consumers. See JSON Schema.
Next steps
Walk the golden path — one observation through every layer — or jump into the Tour of the API.