Expand description
Rollout persistence and discovery for Codex session files.
Re-exports§
pub use state_db::StateDbHandle;pub use state_db::sqlite_telemetry_recorder;
Modules§
Structs§
- Cursor
- Pagination cursor identifying the last item in a page.
- Model
Context Scan - Accumulates newest-to-oldest rollout items until they are sufficient to reconstruct the latest model context.
- Reverse
Jsonl Scanner - Read-only scanner for newline-delimited JSON records, starting from the end.
- Rollout
Config - Rollout
Line Reader - Line-oriented rollout reader returned by
open_rollout_line_reader. - Rollout
Persistence Batch Measurement - Rollout
Persistence Telemetry - Rollout
Recorder - Writes canonical session rollout items to JSONL.
- Rollout
Reference Index - Direct history-base edges discovered from local rollout metadata.
- Session
Meta - SessionMeta contains session-level data that doesn’t correspond to a specific turn.
- Thread
Item - Summary information for a thread rollout file.
- Thread
List Config - Threads
Page - Returned page of thread (thread) summaries.
Enums§
- Model
Context Scan Progress - Whether a reverse model-context scan needs more rollout items.
- Rollout
Recorder Params - Scan
Outcome - Sort
Direction - Thread
List Layout - Thread
Sort Key
Constants§
Statics§
Traits§
Functions§
- append_
rollout_ item_ to_ path - Append one already-filtered rollout item to an existing rollout JSONL file.
- append_
thread_ name - Append a thread name update to the session index. Name updates are append-only; the most recent entry wins when resolving names or ids.
- builder_
from_ items - existing_
rollout_ path - Returns the existing rollout path, preferring the plain
.jsonlfile over its.jsonl.zstcompressed sibling. - find_
archived_ thread_ path_ by_ id_ str - Locate an archived thread rollout file by its UUID string.
- find_
conversation_ path_ by_ id_ str - Locate a recorded thread rollout file by its UUID string using the existing
paginated listing implementation. Returns
Ok(Some(path))if found,Ok(None)if not present or the id is invalid. - find_
thread_ meta_ by_ name_ str - Locate a recorded thread rollout and read its session metadata by thread name. Returns the newest indexed name that still has a readable rollout header.
- find_
thread_ name_ by_ id - Find the latest thread name for a thread id, if any.
- find_
thread_ names_ by_ ids - Find the latest thread names for a batch of thread ids.
- find_
thread_ path_ by_ id_ str - Locate a recorded thread rollout file by its UUID string using the existing
paginated listing implementation. Returns
Ok(Some(path))if found,Ok(None)if not present or the id is invalid. - first_
rollout_ content_ match_ snippet - get_
threads - Retrieve recorded thread file paths with token pagination. The returned
next_cursorcan be supplied on the next call to resume after the last returned item, resilient to concurrent new sessions being appended. Ordering is stable by the requested sort key (timestamp desc). - get_
threads_ in_ root - is_
persisted_ rollout_ item - Whether a rollout
itemshould be persisted in rollout files. - measure_
and_ filter_ rollout_ items - Measures logical JSON sizes while applying the shared rollout persistence policy once.
- open_
rollout_ line_ reader - Opens a rollout line reader that transparently handles plain
.jsonland.jsonl.zstfiles. - parse_
cursor - Pagination cursor token format: an RFC3339 timestamp with an optional thread ID tie-breaker.
- persisted_
rollout_ items - Return the rollout items that should be persisted for a live append.
- plain_
rollout_ path - Returns the plain
.jsonlpath for a plain or compressed rollout path. - read_
head_ for_ summary - Read up to
HEAD_RECORD_LIMITrecords from the start of the rollout file atpath. This should be enough to produce a summary including the session meta line. - read_
session_ meta_ line - Read the SessionMetaLine from the head of a rollout file for reuse by callers that need the session metadata (e.g. to derive a cwd for config).
- read_
thread_ item_ from_ rollout - Read a single rollout file into the same summary item shape used by thread listing.
- remove_
thread_ name_ entries - Remove all recorded names for a thread from the session index.
- rollout_
date_ parts - Extract the
YYYY/MM/DDdirectory components from a rollout filename. - search_
rollout_ matches - search_
rollout_ paths - should_
persist_ response_ item_ for_ memories - Whether a
ResponseItemshould be persisted for the memories. - spawn_
rollout_ compression_ worker - Starts a best-effort background job that compresses cold local rollout files.