pub struct CheckpointBuilder { /* private fields */ }Expand description
Builder for creating pipeline checkpoints.
Provides a convenient interface for capturing all necessary state when creating checkpoints during pipeline execution.
§Example
let checkpoint = CheckpointBuilder::new()
.phase(PipelinePhase::Development, 3, 5)
.reviewer_pass(1, 2)
.capture_from_config(&ctx, ®istry, "claude", "codex")
.build();Implementations§
Source§impl CheckpointBuilder
impl CheckpointBuilder
Sourcepub fn phase(
self,
phase: PipelinePhase,
iteration: u32,
total_iterations: u32,
) -> Self
pub fn phase( self, phase: PipelinePhase, iteration: u32, total_iterations: u32, ) -> Self
Set the phase and iteration information.
Sourcepub fn reviewer_pass(self, pass: u32, total: u32) -> Self
pub fn reviewer_pass(self, pass: u32, total: u32) -> Self
Set the reviewer pass information.
Sourcepub fn skip_rebase(self, value: bool) -> Self
pub fn skip_rebase(self, value: bool) -> Self
Set the skip_rebase flag for CLI args capture.
Sourcepub fn capture_cli_args(self, config: &Config) -> Self
pub fn capture_cli_args(self, config: &Config) -> Self
Capture CLI arguments from a Config.
Sourcepub fn capture_from_context(
self,
config: &Config,
registry: &AgentRegistry,
developer_name: &str,
reviewer_name: &str,
logger: &Logger,
run_context: &RunContext,
) -> Self
pub fn capture_from_context( self, config: &Config, registry: &AgentRegistry, developer_name: &str, reviewer_name: &str, logger: &Logger, run_context: &RunContext, ) -> Self
Capture all configuration from a PhaseContext and AgentRegistry.
This is a convenience method that captures CLI args and both agent configs. It takes a PhaseContext which provides access to config, registry, and agents.
Sourcepub fn with_execution_history(self, history: ExecutionHistory) -> Self
pub fn with_execution_history(self, history: ExecutionHistory) -> Self
Attach execution history from a PhaseContext.
This method captures the execution history from the phase context and attaches it to the checkpoint.
Sourcepub fn with_prompt_history(self, history: HashMap<String, String>) -> Self
pub fn with_prompt_history(self, history: HashMap<String, String>) -> Self
Set the entire prompt history from a HashMap.
This is useful when transferring prompts from a PhaseContext.
§Arguments
history- HashMap of prompt keys to prompt text
Sourcepub fn build(self) -> Option<PipelineCheckpoint>
pub fn build(self) -> Option<PipelineCheckpoint>
Build the checkpoint.
Returns None if required fields (phase, agent configs) are missing. Generates a new RunContext if not set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CheckpointBuilder
impl RefUnwindSafe for CheckpointBuilder
impl Send for CheckpointBuilder
impl Sync for CheckpointBuilder
impl Unpin for CheckpointBuilder
impl UnwindSafe for CheckpointBuilder
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> 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>
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>
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