///|
/// SessionStore: persist and load conversation sessions by id.
///
/// Methods are `async` so that backing stores can use async I/O (e.g.
/// `node:fs/promises`-style APIs on the JS target, `@async/fs` on native).
/// Implementations that only touch in-memory state simply return synchronously
/// inside the async body — no `await` keyword is required (MoonBit auto-awaits
/// async trait methods when called from an async context).
pub(open) trait SessionStore {
async fn load(Self, id : String) -> Result[Session, SessionError]
async fn save(Self, id : String, session : Session) -> Result[
Unit,
SessionError,
]
}