@openexam/sdk
v0.1.0
Published
Type contracts and tiny helpers for OpenExam addons, parsers, and renderers (spec 0.1).
Readme
@openexam/sdk
Type contracts and tiny helpers for OpenExam addons, parsers, and renderers, targeting spec 0.1 (M1).
This package is the boundary other OpenExam packages depend on. It exposes:
- OEAST node types — TypeScript types matching
spec/0.1/oeast.schema.json. - Widget contract types — the per-target adapter shapes from
spec/0.1/widgets.md. - Manifest types — package and addon manifests matching
spec/0.1/manifest.schema.json. - Capability set — the v1 capability tokens from ADR-005.
PrintFragmentIR — the typesetting-neutral fragment shape from ADR-015.- Tiny runtime helpers —
defineWidget,definePackage, small constructors. No validators (those live in consuming packages); no DOM dependencies.
Stability
Pre-1.0 the spec follows the Cargo convention (every minor may be
breaking). The SDK's exported types track the spec they target —
0.1 today, 0.2 when that lands. See
../../docs/compatibility-promise.md.
Layout
src/
├── index.ts public re-exports
├── ast.ts OEAST node types (matches oeast.schema.json)
├── widget.ts Widget01 contract and target sub-shapes
├── host.ts Host interface (what the runtime injects)
├── manifest.ts Package / addon manifest types
├── capabilities.ts Capability tokens
├── print.ts PrintFragment IR
└── schema.ts JSONSchema type aliasLicense
Apache-2.0. See LICENSE and the repository root
../../LICENSE.
