@skenora/contracts
v0.1.3
Published
Serializable scene, entity, material, resource, and Flow contracts for Skenora.
Readme
@skenora/contracts
Serializable, renderer-independent contracts for Skenora scenes, entities, assets, materials, procedural programs, resources, camera paths, and Flow graphs.
This package is not currently published to npm; the install command below is intended release syntax. The procedural V1 sections describe current repository source and are not covered by the 2026-08-28 package/browser evidence.
pnpm add @skenora/contractsimport {
assertSceneDocument,
normalizeSceneDocument,
parseSceneDocument,
} from "@skenora/contracts";
const document = parseSceneDocument(json);
const normalized = normalizeSceneDocument(document);
assertSceneDocument(normalized);Use this package at persistence and external-input boundaries. It contains no Babylon.js objects, workspace I/O, editing session, or rendering behavior.
The package also owns the shared JSON-safe SkenoraDiagnostic, backend/device
snapshot, Runtime probe, GPU-program identity/cache/preparation, doctor, and
tooling-manifest contracts. These are detached observations and reports; they
never contain Engine, Scene, GPUDevice, filesystem, or network handles.
AI-oriented contracts include ProceduralGeometryProgram, MaterialProgram V1
and V2, TextureProgram, RenderGraphProgram, and SimulationProgram. Their
validators, JSON Schema getters, capability descriptions, stable capability
IDs, and execution limits remain data-only. Simulation programs select only
installed fluid, FFT-ocean, or radiance-cascade kernels and never contain
JavaScript, shader source, callbacks, imports, GPU handles, or resource
locators.
See the repository; the current
working-tree guides are docs/SCENE_DOCUMENT.md and docs/PROCEDURAL_AI.md.
