Conversation history snapshot reading, LRU caching, and crash recovery.
Remarks
Reads consolidated .json snapshots or replays append-only .jsonl deltas.
Each event's sequence is its 1-based stored log position; consolidating
streaming assistant_delta records into an assistant_message keeps the
first record's sequence while advancing nextSequence, so sequence gaps in
consolidated history are expected and do not indicate lost events.
Recovers from ungraceful process crashes by ignoring torn trailing lines,
and maintains an in-memory snapshot cache bounded to 64 entries.
Conversation history snapshot reading, LRU caching, and crash recovery.
Remarks
Reads consolidated
.jsonsnapshots or replays append-only.jsonldeltas. Each event'ssequenceis its 1-based stored log position; consolidating streamingassistant_deltarecords into anassistant_messagekeeps the first record'ssequencewhile advancingnextSequence, so sequence gaps in consolidated history are expected and do not indicate lost events. Recovers from ungraceful process crashes by ignoring torn trailing lines, and maintains an in-memory snapshot cache bounded to 64 entries.