Skip to content

Wire Tags

Twilic v3 uses profile-selected first-byte models. A decoder must know the active profile before interpreting byte 0.

Dynamic Tags

Dynamic Profile retains the compact v2-style tag table for unchanged tags.

Range / TagMeaning
0x00..0x7Fpositive fixint (0..127)
0x80..0x9Ffixstr (len=0..31)
0xA0..0xAFfixarray (count=0..15)
0xB0..0xBFfixmap (count=0..15)
0xC0null
0xC1false
0xC2true
0xC3float64 little-endian
0xC4..0xC7u8 / u16 / u32 / u64
0xC8..0xCBi8 / i16 / i32 / i64
0xCC..0xCEbin8 / bin16 / bin32
0xCF..0xD1str8 / str16 / str32
0xD2..0xD3array16 / array32
0xD4..0xD5map16 / map32
0xD6shape_def
0xD7shape_ref
0xD8key_ref
0xD9str_ref
0xDAtyped_vec
0xDBrow_batch
0xDCcol_batch
0xDDstate_patch
0xDEtemplate_batch
0xDFextension (ext)
0xE0..0xFFnegative fixint (-32..-1)

Dynamic fixed-width integer payloads and fixed-width length/count fields are little-endian.

Bound and Batch Envelope Kinds

Bound and Batch profiles use message-kind envelopes when self-delimiting payloads are needed.

KindNamePurpose
0x00SCALARscalar root
0x01ARRAYdynamic heterogeneous array
0x02MAPdynamic map
0x03SHAPED_OBJECTobject using a session shape
0x04SCHEMA_OBJECTschema-aware object
0x05TYPED_VECTORhomogeneous typed vector
0x06ROW_BATCHrow-wise batch
0x07COLUMN_BATCHschema-less or shape-bound column batch
0x08CONTROLtable and profile updates
0x09EXTextension
0x0ASTATE_PATCHpatch against a base
0x0BTEMPLATE_BATCHmicro-batch based on a template
0x0CCONTROL_STREAMcontrol lane for packed control payloads
0x0DBASE_SNAPSHOTsnapshot used by patches
0x0ESCHEMA_BATCHschema-aware columnar batch
0x0FBOUND_STREAMschema-bound compact record stream

Bound/Batch byte-0 values outside 0x00..0x0F are reserved in the v3 reference profile and fail decode unless a negotiated extension defines them.

Message-Local Reuse

shape_def (0xD6)

text
0xD6 [shape_id][key_count][key_0]...[key_n]

shape_def declares an ordered key sequence for the current top-level message. It is not a decoded application value and does not count toward array element count.

shape_ref (0xD7)

text
0xD7 [shape_id][value_0]...[value_n]

shape_ref references a prior shape_def and produces one decoded object value.

key_ref (0xD8)

text
0xD8 [key_id]

key_id is a zero-based Twilic-PV id assigned once per top-level message for eligible map key literals.

str_ref (0xD9)

text
0xD9 [str_id]

str_id is a zero-based Twilic-PV id assigned once per string-table scope. Dynamic Profile registers string values in value position, excluding map keys and shape_def keys.

All Dynamic intern tables reset at each top-level message boundary unless a stateful extension explicitly changes the scope.

Released under the CC-BY-4.0 License.