pub struct Session {
pub id: String,
pub goal: String,
pub state: SessionState,
pub model_turns: u32,
pub tool_calls: u32,
pub repair_cycles: u32,
pub started_at_ms: u64,
}Fields§
§id: String§goal: String§state: SessionState§model_turns: u32§tool_calls: u32§repair_cycles: u32§started_at_ms: u64Implementations§
Source§impl Session
impl Session
pub fn create( store: &mut EventStore, goal: impl Into<String>, ) -> Result<Self, SessionError>
pub fn reconstruct(store: &EventStore, id: &str) -> Result<Self, SessionError>
pub fn create_replacement( store: &mut EventStore, workspace: &Workspace, predecessor_session_id: &str, expected_candidate_sha256: &str, ) -> Result<CreatedReplacementSession, SessionError>
Sourcepub fn validate_replacement_resume(
&self,
store: &EventStore,
workspace: &Workspace,
) -> Result<Option<SessionReplacementRecord>, SessionError>
pub fn validate_replacement_resume( &self, store: &EventStore, workspace: &Workspace, ) -> Result<Option<SessionReplacementRecord>, SessionError>
Validate the durable verification-only execution class before runtime or verification.
pub fn transition( &mut self, store: &mut EventStore, next: SessionState, reason: &str, ) -> Result<(), SessionError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Session
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.