Skip to main content

Module session_backend

Module session_backend 

Source
Expand description

Trait abstraction for session persistence backends.

Backends store per-sender conversation histories. The trait is intentionally minimal — load, append, remove_last, clear_messages, list — so that JSONL and SQLite (and future backends) share a common interface.

Structs§

SessionContext
Structured routing context recorded alongside a session. Mirrors the ChannelMessage fields the orchestrator uses to compose conversation_history_key so the session row can be queried by channel / room / sender without re-parsing the synthetic key.
SessionMetadata
Metadata about a persisted session.
SessionQuery
Query parameters for listing sessions.
SessionState
Session state information.
TimestampedMessage
One persisted message with the optional created_at the backend stamped on it. JSONL / in-memory backends return None; SQLite returns the row’s created_at column.

Traits§

SessionBackend
Trait for session persistence backends.