Public declaration syntax from harness-sdk/src/session/store.rs Original source SHA-256: c04a0d2846f3cc7b2f4dcdf4633207c0d23a30eeb3ae98ee6ec99bcd61147539 Function bodies and constant values are omitted. This is not the complete implementation. Source line 25 #[derive(Debug, Error)] pub enum SessionStoreError { /// I/O error reaching the underlying storage. #[error("session store i/o: {0}")] Io(#[from] std::io::Error), /// Serialization error encoding a record. #[error("session store serde: {0}")] Serde(#[from] serde_json::Error), /// The home directory could not be located. The default JSONL /// store falls back to the system temp directory before /// surfacing this. #[error("home directory not available")] NoHome, /// The requested session id is not present in the store. #[error("session not found: {0}")] NotFound(Uuid), } Source line 43 pub trait SessionStore: Send + Sync { /// Begin a new session, persisting its metadata as the first /// line. Returns the freshly-minted session id. fn begin(&self, meta: SessionMetadata) -> Result; /// Append a single record to a session. fn append(&self, session_id: Uuid, record: &SessionRecord) -> Result<(), SessionStoreError>; /// Read the metadata line for one session. fn metadata(&self, session_id: Uuid) -> Result; /// Replay all records for a session in append order. fn replay(&self, session_id: Uuid) -> Result, SessionStoreError>; /// List every session in the store, sorted by `last_updated_at` /// descending (most-recent first). Limit caps the number of /// rows returned (use `usize::MAX` for "all"). fn list(&self, app_name: &str, limit: usize) -> Result, SessionStoreError>; /// Delete a session. fn delete(&self, session_id: Uuid) -> Result<(), SessionStoreError>; } Source line 72 #[derive(Debug, Clone)] pub struct JsonlSessionStore { } Source line 80 pub fn standard(app_name: &str) -> Result; Source line 88 pub fn rooted_at(root: impl Into) -> Result; Source line 96 #[must_use] pub fn root(&self) -> &Path;