CheckpointBuilder

Struct CheckpointBuilder 

Source
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, &registry, "claude", "codex")
    .build();

Implementations§

Source§

impl CheckpointBuilder

Source

pub fn new() -> Self

Create a new checkpoint builder with default values.

Source

pub fn phase( self, phase: PipelinePhase, iteration: u32, total_iterations: u32, ) -> Self

Set the phase and iteration information.

Source

pub fn reviewer_pass(self, pass: u32, total: u32) -> Self

Set the reviewer pass information.

Source

pub fn skip_rebase(self, value: bool) -> Self

Set the skip_rebase flag for CLI args capture.

Source

pub fn capture_cli_args(self, config: &Config) -> Self

Capture CLI arguments from a Config.

Source

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.

Source

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.

Source

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
Source

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§

Source§

impl Default for CheckpointBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.