pub struct RetryingDraftProcessor<I: LlmInvoker> { /* private fields */ }Expand description
LLM-backed draft processor with bounded validation retry.
Implementations§
Source§impl<I: LlmInvoker> RetryingDraftProcessor<I>
impl<I: LlmInvoker> RetryingDraftProcessor<I>
Sourcepub fn new(
invoker: I,
max_retries: u32,
workspace_log: impl AsRef<Path>,
) -> Result<Self, LibrarianError>
pub fn new( invoker: I, max_retries: u32, workspace_log: impl AsRef<Path>, ) -> Result<Self, LibrarianError>
Construct a processor using the embedded librarian system prompt and the current wall clock for validation.
§Errors
Returns LibrarianError::ValidationClock if the host clock
cannot be converted into a Mimir ClockTime.
Sourcepub fn new_at(
invoker: I,
max_retries: u32,
now: ClockTime,
workspace_log: impl AsRef<Path>,
) -> Result<Self, LibrarianError>
pub fn new_at( invoker: I, max_retries: u32, now: ClockTime, workspace_log: impl AsRef<Path>, ) -> Result<Self, LibrarianError>
Construct with a caller-supplied validation clock.
Tests use this for deterministic candidates; production code
normally calls Self::new.
§Errors
Returns LibrarianError::StoreOpen when the canonical store
cannot be opened.
Sourcepub fn with_system_prompt(self, system_prompt: impl Into<String>) -> Self
pub fn with_system_prompt(self, system_prompt: impl Into<String>) -> Self
Override the system prompt. Useful for controlled integration tests and future prompt-version experiments.
Sourcepub fn with_conflict_policy(self, policy: SupersessionConflictPolicy) -> Self
pub fn with_conflict_policy(self, policy: SupersessionConflictPolicy) -> Self
Override how deterministic supersession conflicts are handled.
Sourcepub fn with_dedup_policy(self, policy: DedupPolicy) -> Self
pub fn with_dedup_policy(self, policy: DedupPolicy) -> Self
Override deterministic duplicate-detection behavior.
Trait Implementations§
Source§impl<I: Debug + LlmInvoker> Debug for RetryingDraftProcessor<I>
impl<I: Debug + LlmInvoker> Debug for RetryingDraftProcessor<I>
Source§impl<I: LlmInvoker> DraftProcessor for RetryingDraftProcessor<I>
impl<I: LlmInvoker> DraftProcessor for RetryingDraftProcessor<I>
Source§fn process(
&mut self,
draft: &Draft,
) -> Result<DraftProcessingDecision, LibrarianError>
fn process( &mut self, draft: &Draft, ) -> Result<DraftProcessingDecision, LibrarianError>
Process one draft and decide where it should move next. Read more
Auto Trait Implementations§
impl<I> Freeze for RetryingDraftProcessor<I>where
I: Freeze,
impl<I> !RefUnwindSafe for RetryingDraftProcessor<I>
impl<I> Send for RetryingDraftProcessor<I>
impl<I> !Sync for RetryingDraftProcessor<I>
impl<I> Unpin for RetryingDraftProcessor<I>where
I: Unpin,
impl<I> UnsafeUnpin for RetryingDraftProcessor<I>where
I: UnsafeUnpin,
impl<I> !UnwindSafe for RetryingDraftProcessor<I>
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