pub struct State {
pub stage: Stage,
pub phase: u32,
pub agent: AgentKind,
pub mode: Mode,
pub gate_pending: bool,
pub consecutive_failures: u32,
pub started_at: String,
pub project_root: PathBuf,
pub worktree_path: Option<PathBuf>,
}Expand description
Full workflow state persisted to .devflow/state.json.
Fields§
§stage: StageCurrent workflow stage.
phase: u32Phase number being worked on.
agent: AgentKindWhich coding agent was launched.
mode: ModeHow the pipeline is driven (auto vs. supervise).
gate_pending: boolWhether a gate has been written and is awaiting a human response.
consecutive_failures: u32Consecutive Validate failures — drives the Auto-mode forced gate after
crate::mode::MAX_CONSECUTIVE_FAILURES failures. Persisted across
devflow advance invocations so the counter survives monitor restarts.
started_at: StringWhen the phase started (Unix seconds).
project_root: PathBufPath to the project root.
worktree_path: Option<PathBuf>Working directory for the agent when running in a git worktree.
None means the agent runs in project_root. State and capture files
always live under the main project_root; only the agent’s cwd changes.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
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
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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