Expand description
L1 — canonical conversation types.
Pure data + serde. No tokio, no I/O. Forward-compat serde is policy:
#[serde(other)] Unknown on persisted enums, format_version in the
session header, optional fields default + skip-when-none.
Assistant content is kept as verbatim provider blocks (serde_json::Value)
rather than re-typed structs: signed thinking blocks must echo back to the
provider byte-faithfully or replay breaks (review A11), and unknown future
block types survive a round-trip losslessly. Typed views are provided for
the engine (assistant_text, assistant_tool_uses).
Structs§
- Entry
- One appended log record.
parent_idforms a chain (a tree from M3); M0 logs are strictly linear. - Session
Header - Token
Usage - Normalized usage; fields absent from a provider response default to zero.
- Tool
Result Item - ToolUse
- A tool invocation extracted from assistant blocks.
Enums§
- Entry
Payload - Item
- One conversation item. Internally tagged so
#[serde(other)]can absorb item kinds this binary doesn’t know yet (payload dropped, no crash). - Stop
Reason - Why a sample stopped.
Otherabsorbs stop reasons newer than this binary. - Synthetic
Reason - Structural provenance on every injected user item (grok 04): no consumer ever parses message text to learn where it came from.
Constants§
- FORMAT_
VERSION - Bumped only on breaking changes to the persisted entry format.
Functions§
- assistant_
text - Concatenated text of the assistant’s text blocks.
- assistant_
tool_ uses - Tool-use blocks in source order.
- new_
ulid