Skip to main content

LocalSessionStore

Struct LocalSessionStore 

Source
pub struct LocalSessionStore { /* private fields */ }
Expand description

Session store bound to a resolved CLI database path.

Implementations§

Source§

impl LocalSessionStore

Source

pub fn new(config: CliConfig) -> SessionStoreResult<Self>

Open a CLI session-store adapter before it is used by async runtime code.

Trait Implementations§

Source§

impl Clone for LocalSessionStore

Source§

fn clone(&self) -> LocalSessionStore

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LocalSessionStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SessionStore for LocalSessionStore

Source§

fn commit_run_evidence<'life0, 'async_trait>( &'life0 self, commit: RunEvidenceCommit, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<RunRecord>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Atomically persist a complete run evidence bundle. Read more
Source§

fn commit_checkpoint<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, checkpoint: AgentCheckpoint, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically bootstrap missing session/run records and persist one runtime checkpoint. Read more
Source§

fn claim_hitl_resume<'life0, 'async_trait>( &'life0 self, claim: HitlResumeClaim, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Acquire exclusive ownership of a waiting run before any continuation side effect. Read more
Source§

fn mark_hitl_resume_started<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, claim_id: &'life3 str, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Mark a claim started immediately before the first continuation hook or tool executes.
Source§

fn release_hitl_resume_claim<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, claim_id: &'life3 str, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Release a preflight claim. Stores must reject release after execution has started.
Source§

fn pending_stream_publications<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<Vec<PendingStreamPublication>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List transactionally enqueued stream publications still awaiting at least one sink.
Source§

fn acknowledge_stream_publication<'life0, 'life1, 'async_trait>( &'life0 self, publication_id: &'life1 str, target: StreamPublicationTarget, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Acknowledge one sink only after its complete idempotent delivery succeeds.
Source§

fn save_session<'life0, 'async_trait>( &'life0 self, session: SessionRecord, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Save a session record.
Source§

fn load_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<SessionRecord>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load a session record.
Source§

fn list_sessions<'life0, 'async_trait>( &'life0 self, filter: SessionFilter, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<Vec<SessionRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List sessions by optional filter.
Source§

fn update_session_status<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, status: SessionStatus, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update session status.
Source§

fn save_context_state<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, state: ResumableState, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save a context state snapshot for a session.
Source§

fn save_environment_state<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, environment_state: EnvironmentStateRef, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save an environment state reference for a session.
Source§

fn append_run<'life0, 'async_trait>( &'life0 self, run: RunRecord, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Append or replace a run record. Read more
Source§

fn load_run<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<RunRecord>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load a run record.
Source§

fn list_runs<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<Vec<RunRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List runs for a session.
Source§

fn update_run_status<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, status: RunStatus, output_preview: Option<String>, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update run status and optional output preview.
Source§

fn append_checkpoint<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, checkpoint: AgentCheckpoint, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Append a full runtime checkpoint.
Source§

fn load_checkpoints<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<Vec<AgentCheckpoint>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load checkpoints for a run in insertion order.
Source§

fn append_stream_records<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, records: Vec<AgentStreamRecord>, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Append runtime stream records used as resume evidence.
Source§

fn replay_stream_records<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<Vec<AgentStreamRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Replay runtime stream records for a run.
Source§

fn replay_stream_records_after<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, after_sequence: Option<usize>, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<Vec<AgentStreamRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Replay runtime stream records after a sequence cursor.
Source§

fn save_stream_cursor<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, cursor: StreamCursorRef, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Store a stream cursor reference for a run and session.
Source§

fn append_approval<'life0, 'async_trait>( &'life0 self, approval: ApprovalRecord, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Append an approval record.
Source§

fn load_approvals<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<Vec<ApprovalRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load approval records for a run.
Source§

fn append_deferred_tool<'life0, 'async_trait>( &'life0 self, record: DeferredToolRecord, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Append a deferred tool record.
Source§

fn load_deferred_tools<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<Vec<DeferredToolRecord>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load deferred tool records for a run.
Source§

fn compact_run_trace<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<CompactRunTrace>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Return compact run trace projection.
Source§

fn compact_session_trace<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = SessionStoreResult<CompactSessionTrace>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return compact session trace projection.
Source§

fn latest_checkpoint<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = Result<Option<AgentCheckpoint>, SessionStoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Load the latest checkpoint for a run.
Source§

fn resume_snapshot<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = Result<SessionResumeSnapshot, SessionStoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Load a resume snapshot from session, checkpoint, and stream evidence.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more