@decantr/essence-spec
v2.0.1
Published
Essence schemas, validation, migration, and TypeScript types for Decantr
Readme
@decantr/essence-spec
Support status: core-supported
Release channel: stable
Schemas, validation, migration, guard evaluation, and TypeScript types for decantr.essence.json.
Install
npm install @decantr/essence-specWhat It Exports
validateEssence()for schema validationevaluateGuard()for contract/guard checksnormalizeEssence()for active Essence v4 normalizationmigrateToV4()for the explicit legacy migration path- Decantr Essence v4 TypeScript types
Example
import { evaluateGuard, validateEssence } from '@decantr/essence-spec';
const result = validateEssence(essence);
if (!result.valid) {
console.error(result.errors);
}
const violations = evaluateGuard(essence, {});Schema Exports
@decantr/essence-spec/schema/essence.v4.json@decantr/essence-spec/schema/essence.v2.jsonandessence.v3.jsonremain archived references for migration tooling only
Compatibility
@decantr/essence-spec defines the active Essence v4 public contract for Decantr V2. Runtime validation accepts v4 only; older Essence v2/v3 files are supported through decantr migrate --to v4.
- additive schema fields may be introduced in compatible minor releases
- breaking schema or migration behavior changes require a major version
- deprecation and migration guidance should be documented before removing or replacing a supported essence path
Stability Note
This package is the lowest-level public Decantr contract and is intended to remain boring and dependable for downstream consumers.
- patch releases should stay documentation-only or behaviorally compatible
- schema export paths are part of the supported public surface
- coordinated downstream releases should only be needed when a package explicitly adopts a newer essence-spec version
License
MIT
