pub struct SqliteCheckpointBackend { /* private fields */ }Expand description
SQLite-backed checkpoint backend.
Wraps an EventWriter for structured event-to-SQL translation and adds
checkpoint table management on top. Maintains an in-memory checkpoint
cache for O(1) hot-path reads.
Implementations§
Trait Implementations§
Source§impl CheckpointBackend for SqliteCheckpointBackend
impl CheckpointBackend for SqliteCheckpointBackend
Source§fn init_run(&self, run_id: RunId, task: &str, run_dir: &str) -> Result<()>
fn init_run(&self, run_id: RunId, task: &str, run_dir: &str) -> Result<()>
Initialize a new run.
Source§fn init_run_with_meta(
&self,
run_id: RunId,
task: &str,
run_dir: &str,
workflow_meta: Value,
) -> Result<()>
fn init_run_with_meta( &self, run_id: RunId, task: &str, run_dir: &str, workflow_meta: Value, ) -> Result<()>
Initialize a new run with declarative workflow metadata.
Source§fn open_run(&self, _run_id: RunId) -> Result<Option<RunCheckpoint>>
fn open_run(&self, _run_id: RunId) -> Result<Option<RunCheckpoint>>
Open an existing run for resume. Returns None if not found.
Source§fn append_event(&self, event: &AgentEvent) -> Result<()>
fn append_event(&self, event: &AgentEvent) -> Result<()>
Append an event to the log and update checkpoint state.
Source§fn upsert_agent_result(&self, cache: &AgentResultCache) -> Result<()>
fn upsert_agent_result(&self, cache: &AgentResultCache) -> Result<()>
Insert or update an agent result.
Source§fn upsert_agent_session(&self, session: &AgentSessionCheckpoint) -> Result<()>
fn upsert_agent_session(&self, session: &AgentSessionCheckpoint) -> Result<()>
Insert or update an agent session.
Source§fn get_checkpoint(&self) -> Option<RunCheckpoint>
fn get_checkpoint(&self) -> Option<RunCheckpoint>
Get current checkpoint (from in-memory cache).
Source§fn get_findings(&self) -> Vec<Finding>
fn get_findings(&self) -> Vec<Finding>
Get all findings.
Source§fn get_event_log(&self) -> Result<Vec<AgentEvent>>
fn get_event_log(&self) -> Result<Vec<AgentEvent>>
Get event log as a vector.
Source§fn can_resume(&self) -> bool
fn can_resume(&self) -> bool
Check if a run can be resumed.
Source§fn reset_status_to_running(&self) -> Result<()>
fn reset_status_to_running(&self) -> Result<()>
Reset checkpoint status to Running.
Source§fn save_checkpoint(&self, checkpoint: &RunCheckpoint) -> Result<()>
fn save_checkpoint(&self, checkpoint: &RunCheckpoint) -> Result<()>
Save checkpoint (full overwrite).
Auto Trait Implementations§
impl !Freeze for SqliteCheckpointBackend
impl !RefUnwindSafe for SqliteCheckpointBackend
impl !UnwindSafe for SqliteCheckpointBackend
impl Send for SqliteCheckpointBackend
impl Sync for SqliteCheckpointBackend
impl Unpin for SqliteCheckpointBackend
impl UnsafeUnpin for SqliteCheckpointBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more