package session // Store defines the persistence interface for session message storage. // // Implementations must be safe for concurrent use. The default implementation // uses JSONL files (one file per session) with O(1) append writes. type Store interface { // Save appends a single message to a session's history. // Creates the session file if it does not exist. Save(sessionID string, msg SessionMessage) error // Load retrieves all messages for a session in chronological order. // Returns an error if the session does not exist. Load(sessionID string) ([]SessionMessage, error) // List returns all known session IDs. List() ([]string, error) // Exists checks whether a session exists in the store. Exists(sessionID string) (bool, error) // Archive marks a session as archived (read-only). // This is a soft delete that preserves the data. Archive(sessionID string) error // Delete removes a session permanently from the store. Delete(sessionID string) error }