Skip to main content

Module kinds

Module kinds 

Source
Expand description

What a conversation’s history is made of: how many bytes are the person’s and the agent’s messages, jekts, thinking, tool calls and tool results (SPEC_CONVERSATION_HISTORY_ONE_TOTAL_AND_COMPRESSION_AT_THE_BOUNDARY_2026_11_30.md section 3).

The panel breaks its one total into these kinds. Counting them by decoding the history on every request would read gigabytes, so each zone keeps a small sidecar, SIDECAR: for each line-oriented file (the transcript, the provider’s copy, the session files imported whole) the logical bytes of each kind up to a byte offset, with a fingerprint of the bytes just before that offset. The owner srv moves the offsets forward a budget at a time (step), so a file is read once and afterwards only what was appended since. A file that was rewritten (its fingerprint no longer matches, or it is shorter than the offset) is counted again from its start.

Counted in logical bytes, exactly. The panel applies each kind’s share to the stored total (history_usage.rs), so the numbers it shows are about, not exact: kinds compress differently.

Structs§

FileKinds
The counts for one file, up to scanned.
KindBytes
Logical bytes per kind.
StepReport
What a step did.

Enums§

Kind
What a line of a conversation is.

Constants§

KINDS
The kinds in the order the panel lists them, with the key each goes by on the wire.
SIDECAR
The per-zone file the counts are kept in.
STEP_BYTES
Bytes a pass counts at most (the owner’s loop runs it again every few seconds while work is left).

Functions§

classify
What kind of line line (one NDJSON record, without its newline) is. A line that is not a record is Other.
step
Count history forward, budget bytes at most, a file at a time. Only the srv that owns the store calls this; the sidecar is written once per zone, and only when it changed.
totals
The counted bytes of every zone, by kind, and how many bytes they cover.