pub struct SessionState {Show 16 fields
pub version: u32,
pub session_id: String,
pub task_id: String,
pub run_started_at: String,
pub last_updated_at: String,
pub iterations_planned: u8,
pub iterations_completed: u8,
pub current_phase: u8,
pub runner: Runner,
pub model: String,
pub tasks_completed_in_loop: u32,
pub max_tasks: u32,
pub git_head_commit: Option<String>,
pub phase1_settings: Option<PhaseSettingsSnapshot>,
pub phase2_settings: Option<PhaseSettingsSnapshot>,
pub phase3_settings: Option<PhaseSettingsSnapshot>,
}Expand description
Session state persisted to enable crash recovery.
Fields§
§version: u32Schema version for forward compatibility.
session_id: StringUnique session ID (UUID v4) for this run session.
task_id: StringThe task currently being executed.
run_started_at: StringWhen the session/run started (RFC3339 UTC).
last_updated_at: StringWhen the session state was last updated (RFC3339 UTC).
iterations_planned: u8Total number of iterations planned for the current task.
iterations_completed: u8Number of iterations completed so far.
current_phase: u8Current phase being executed (1, 2, or 3).
runner: RunnerRunner being used for this session.
model: StringModel being used for this session.
tasks_completed_in_loop: u32Number of tasks completed in this loop session (for loop progress tracking).
max_tasks: u32Maximum tasks to run in this loop (0 = no limit).
git_head_commit: Option<String>Git HEAD commit at session start (for advanced recovery validation).
phase1_settings: Option<PhaseSettingsSnapshot>Phase 1 settings (planning) - display/logging only. Crash recovery recomputes from CLI+config+task.
phase2_settings: Option<PhaseSettingsSnapshot>Phase 2 settings (implementation) - display/logging only. Crash recovery recomputes from CLI+config+task.
phase3_settings: Option<PhaseSettingsSnapshot>Phase 3 settings (review) - display/logging only. Crash recovery recomputes from CLI+config+task.
Implementations§
Source§impl SessionState
impl SessionState
Sourcepub fn new(
session_id: String,
task_id: String,
run_started_at: String,
iterations_planned: u8,
runner: Runner,
model: String,
max_tasks: u32,
git_head_commit: Option<String>,
phase_settings: Option<(PhaseSettingsSnapshot, PhaseSettingsSnapshot, PhaseSettingsSnapshot)>,
) -> Self
pub fn new( session_id: String, task_id: String, run_started_at: String, iterations_planned: u8, runner: Runner, model: String, max_tasks: u32, git_head_commit: Option<String>, phase_settings: Option<(PhaseSettingsSnapshot, PhaseSettingsSnapshot, PhaseSettingsSnapshot)>, ) -> Self
Create a new session state for the given task.
Sourcepub fn mark_iteration_complete(&mut self, completed_at: String)
pub fn mark_iteration_complete(&mut self, completed_at: String)
Update the session after iteration completion.
Sourcepub fn set_phase(&mut self, phase: u8, updated_at: String)
pub fn set_phase(&mut self, phase: u8, updated_at: String)
Update the session after phase completion.
Sourcepub fn mark_task_complete(&mut self, updated_at: String)
pub fn mark_task_complete(&mut self, updated_at: String)
Update the session after task completion.
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionState
impl Debug for SessionState
Source§impl<'de> Deserialize<'de> for SessionState
impl<'de> Deserialize<'de> for SessionState
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>,
Source§impl JsonSchema for SessionState
impl JsonSchema for SessionState
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SessionState
impl PartialEq for SessionState
Source§impl Serialize for SessionState
impl Serialize for SessionState
impl Eq for SessionState
impl StructuralPartialEq for SessionState
Auto Trait Implementations§
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.