Structs§
- Branch
Summary Entry - Compaction
Entry - Custom
Entry - Custom
Message Entry - Label
Entry - Message
Entry - Base fields shared by all entries.
- Model
Change Entry - Session
Context - Resolved conversation context sent to the LLM.
- Session
Header - The first entry in every session file.
- Session
Info - Lightweight metadata about a session, used for listing and selection.
- Session
Info Entry - Session
Manager - Manages conversation sessions as append-only trees in JSONL files.
- Thinking
Level Change Entry
Enums§
- Session
Entry - A session entry — one JSON line in the session file.
Constants§
Functions§
- append_
entry_ to_ file - Append a single entry to the session file (one JSON line).
- encode_
cwd_ for_ dir - Encode a working directory path into a safe directory name. Mirrors pi’s encoding: strip leading /, replace / \ : with -, wrap in –…–
- find_
most_ recent_ session - Find the most recent session file by mtime.
- generate_
entry_ id - Generate a unique ID for session entries (8 hex chars, collision-checked).
- get_
default_ session_ dir - Get the default session directory for a cwd.
- load_
entries_ from_ file - Load all entries from a session JSONL file. Returns (header, entries) or empty vec if the file is missing or corrupted.
- parse_
session_ entry_ line - Parse a single line as a SessionEntry. Returns None for empty/malformed lines.
- parse_
session_ header_ line - Parse a single line as a SessionHeader.
- read_
session_ header - Read the session header from a JSONL file (first line only).
- write_
entries_ to_ file - Write entries to a session file (used for initial write / rewrite). Does NOT write the session header — caller must include it.