Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Values and Identifiers

Generated schemas and clients preserve RiffDB values exactly. Do not substitute JSON floating-point values for exact decimals or infer internal numeric identities.

ValuePublic representationNotes
UUIDCanonical lowercase UUID stringGenerated clients use native UUID types where available
DecimalExact generated decimal value/objectNever a JSON float
MoneyCurrency plus fixed-scale amountCurrency and scale are checked
Signed/unsigned integerChecked integerLow-level CLI tagged i64/u64 values use decimal strings; generated schema-directed inputs may accept JSON integers
VectorFinite binary32 component arrayLength and declared field dimension are checked; no bytes alias is accepted
TimestampNanosecond-precision valueNo implicit operating-system clock in command evaluation
DateExact epoch-day domainPython supports values outside datetime.date
BytesGenerated binary representationBounded before decoding or persistence
EnumDeclared variant nameInternal enum and variant IDs are compiler-owned
Record/list/mapImmutable generated structureMaps and sets are canonically ordered before hashing or persistence

Public names and internal IDs

Applications select contract lineages, commands, queries, outcomes, and fields by generated symbolic names. The compiler assigns nonzero internal IDs and pins them in the exact bundle. Application source must not copy or override those values.

Canonical input

Command input is materialized under the selected contract schema and encoded in a canonical order before hashing. The hash is part of idempotency identity: the same key with a different canonical input is rejected.

Vector transport shapes

The low-level typed Protobuf value branch is Value.vector_value = 15, containing VectorValue.components = 1 as repeated binary32 values. CLI output uses the exact JSON shape:

{"type":"vector","components":[0.0,1.5,-2.25]}

Hosted MCP uses its existing tagged-value convention:

{"kind":"vector","components":[0.0,1.5,-2.25]}

Every transport accepts 1 to 4,096 finite components, converts each value to IEEE-754 binary32, and canonicalizes negative zero to positive zero. Command materialization additionally requires the component count to equal the selected contract field’s declared dimension. A vector is never represented as bytes or another value kind. Canonical durable value encoding uses the internal tag 0x0e; that tag is not an application-facing spelling.

A production vector field can be mutated only by a compiled embed effect. That effect binds the canonical vector to exact compiler-declared model identity/version evidence in the same authoritative commit; ordinary set cannot target the field. Generated application facades expose vectors as CanonicalVector in Rust, []float32 in Go, ReadonlyArray<number> in TypeScript, and an exact-dimension annotated tuple in Python. Field-specific generated constructors supply the declared model identity/version and expose those values for inspection. The shared driver registry carries exact binary32 component bits rather than relying on ambiguous JSON floating-point spelling. See Known Limitations.

Limits

All values, collections, recursion, input and output messages, scans, waits, and diagnostics have explicit bounds. The generated schema is the authoritative public shape; an adapter must reject rather than truncate an out-of-range value.