Skip to main content

Module session_storage

Module session_storage 

Source
Expand description

Low-level session persistence abstraction — Pi-compatible SessionStorage.

Pi architecture: SessionStorage (trait) ← InMemorySessionStorage / JsonlSessionStorage Session (struct) ← wraps SessionStorage, provides high-level API AgentHarness ← owns Session, drives agent loop

This module provides the trait and both implementations. The Session struct lives in session.rs.

Structs§

InMemorySessionStorage
Fully in-memory storage — no file I/O. Pi-compatible: owns all state (entries, labels, leaf).
JsonlSessionStorage
File-backed storage: holds full state in memory and persists to a JSONL file. Pi-compatible: loads from file on creation, appends on every write.
SessionMetadata
Metadata about a session, derived from the session header. Pi-compatible: wraps header info into a metadata object.

Traits§

SessionStorage
Low-level CRUD abstraction for session persistence.