Expand description
Input envelope and the five-class input taxonomy (spec §7.1, §7.2).
Structs§
- AbiRevision
- The wire revision marker. Only
KERNEL_ABI_VERSIONdecodes — §16.2 has no negotiation, no adapter and no inference from missing fields, so the revision check belongs in the type, not in one lucky code path. - Configure
Operation - §7.2 ·
ConfigureOperation { config }. The 16 historical setup events collapse here. - Deliver
External Event - §7.2 ·
DeliverExternalEvent { event }. - Host
Control - §7.2 ·
HostControl { command }. The 10 historical control events collapse here. - Resolve
Effect - §7.2 ·
ResolveEffect { effect_id, outcome }. The 11 historical result events collapse here. - Start
Operation - §7.2 ·
StartOperation { entry, initial_context }. The five historical start-ish events collapse into this one atomic input;initial_contextlives here and only here, never duplicated inside aRootEntryvariant. - Wire
Envelope - The one shape a host may hand the kernel (spec §7.1 calls it
KernelEnvelope). - Wire
Rejection - A structured decode rejection.
Enums§
- Input
Authority - The validation path an input class enters. One per class — the type-level statement that the taxonomy is about authority rather than enum arity.
- Kernel
Input - The closed five-class input taxonomy (§7.2).
- Operation
Lifecycle - Operation lifecycle (§6). Wire-local on purpose: the canonical contract owns its own vocabulary rather than borrowing the legacy protocol’s.
- Wire
Rejection Kind - Why an envelope never became a typed input. Every kind is fail-closed: nothing is decoded, nothing is staged, no state moves.
Functions§
- decode_
envelope_ json - Decode one wire envelope in the mandated order: measure bytes → absolute structural boundary → probe revision → decode (§7.1). Parsing before measuring would let an oversized or pathologically nested document allocate first and be rejected second.
- encode_
envelope_ json - Serialize an envelope back to JSON. Canonical record bytes are a separate, core-owned concern (Task 6); this is the plain wire projection.
- scan_
structural_ boundary - Single pass over the raw bytes enforcing the absolute nesting depth and per-container entry bounds before any parser allocates. This is a boundary check, not a validator: malformed JSON is still the parser’s business.