Version History
v0.2.0 (Current)
Adds the types needed for structured, order-sensitive data such as rule tables. Every v0.1 schema loads, encodes and fingerprints exactly as before; this is proven against all production and documentation schemas with a frozen copy of the v0.1 implementation.
Language
int: signed integer within ±(253 − 1), with optionalmin/maxboundslist<T>: ordered list; order is part of the canonical form, the fingerprint and the wiremap<string,T>: string-keyed map of any type- Named types in a
typessection:record,variant(exactly one field present) andenum - Optional fields inside records; recursive types (guarded)
- Rules and conditions as data: predicate trees are variant values, not expressions
Compiler and library
check(value, schema): type checker with JSON-pointer pathscanonicalJson(value, schema),typedFingerprint(value, schema),versionedId(name, fp)- Extended Vein (
LEmagic, 32-bit lengths) for schemas using v0.2 types lodec check,lodec canonical,lodec fingerprint -s <schema> [--id <name>]fingerprintandloadLodeno longer need Bun-only APIs
Fixes
- v0.1 Vein encoding throws for values over 65,535 bytes instead of writing a truncated length
v0.1.2
Stable release of the LODE language and lodec compiler.
Changes since v0.1.0
- Improved error messages for schema validation
lodec diffcommand for comparing Vein binaries- Documentation portal with versioned docs
v0.1.0
Initial release of the LODE language and lodec compiler.
Features
- Schema definition format (
.lodefiles) - Vein binary encoding/decoding
- Four primitive types:
string,bool,string[],map<string,string> - Deterministic SHA-256 fingerprinting with canonicalization
- Verification (decode + fingerprint + compare)
lodecCLI withcompile,decode,fingerprint,verify,diffcommands- Forward compatibility (unknown fields skipped by decoder)
Schemas
model-layer-v1.lode— Model pool definitions for the StackNet registry
API
// Core functions
compile(source, schema): Uint8Array
decode(vein, schema): Record<string, any>
fingerprint(obj): string
verify(vein, hash, schema): boolean
loadLode(pathOrObj): LodeSchemaWire Format
- Magic bytes:
0x4C44(“LD”) - Header: 4 bytes (magic + version + count)
- Fields: id(1) + tag(1) + length(2) + data(N)
- Byte order: big-endian
Roadmap
Planned
- Raw bytes type (
bytes) - Schema import/reference mechanism
- Streaming encoder for large payloads
- Schema-to-TypeScript and Rust code generation
Floats are not planned: use scaled integers (basis points, milliseconds), which are exact in every language.
Last updated on