pub struct FileSystemState {
pub files: HashMap<String, FileSnapshot>,
pub git_head_oid: Option<String>,
pub git_branch: Option<String>,
pub git_status: Option<String>,
pub git_modified_files: Option<Vec<String>>,
}Expand description
File system state snapshot for key files.
Captures the state of important files that affect pipeline execution. This enables validation on resume to detect unexpected changes.
Fields§
§files: HashMap<String, FileSnapshot>Snapshots of tracked files
git_head_oid: Option<String>Git HEAD commit OID (if available)
git_branch: Option<String>Git branch name (if available)
git_status: Option<String>Git status output (porcelain format) for tracking staged/unstaged changes
git_modified_files: Option<Vec<String>>List of modified files from git diff
Implementations§
Source§impl FileSystemState
impl FileSystemState
Sourcepub fn capture_current() -> Self
pub fn capture_current() -> Self
Capture the current state of key files.
This includes files that are critical for pipeline execution:
- PROMPT.md: The primary task description
- .agent/PLAN.md: The implementation plan (if exists)
- .agent/ISSUES.md: Review findings (if exists)
- .agent/config.toml: Agent configuration (if exists)
- .agent/start_commit: Baseline commit reference (if exists)
- .agent/NOTES.md: Development notes (if exists)
- .agent/status: Pipeline status file (if exists)
Sourcepub fn capture_file(&mut self, path: &str)
pub fn capture_file(&mut self, path: &str)
Capture a single file’s state.
Sourcepub fn validate(&self) -> Vec<ValidationError>
pub fn validate(&self) -> Vec<ValidationError>
Validate the current file system state against this snapshot.
Returns a list of validation errors. Empty list means all checks passed.
Trait Implementations§
Source§impl Clone for FileSystemState
impl Clone for FileSystemState
Source§fn clone(&self) -> FileSystemState
fn clone(&self) -> FileSystemState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileSystemState
impl Debug for FileSystemState
Source§impl Default for FileSystemState
impl Default for FileSystemState
Source§fn default() -> FileSystemState
fn default() -> FileSystemState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FileSystemState
impl<'de> Deserialize<'de> for FileSystemState
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 FileSystemState
impl RefUnwindSafe for FileSystemState
impl Send for FileSystemState
impl Sync for FileSystemState
impl Unpin for FileSystemState
impl UnwindSafe for FileSystemState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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