pub struct TaskConfigBuilder { /* private fields */ }Expand description
Fluent builder for TaskConfig.
use harness::config::{AgentKind, TaskConfig};
let config = TaskConfig::builder("fix the bug", AgentKind::Claude)
.model("opus")
.timeout_secs(60)
.build();Implementations§
Source§impl TaskConfigBuilder
impl TaskConfigBuilder
pub fn new(prompt: impl Into<String>, agent: AgentKind) -> Self
pub fn cwd(self, cwd: impl Into<PathBuf>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
pub fn permission_mode(self, mode: PermissionMode) -> Self
pub fn read_only(self) -> Self
pub fn output_format(self, format: OutputFormat) -> Self
pub fn max_turns(self, turns: u32) -> Self
pub fn max_budget_usd(self, budget: f64) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn append_system_prompt(self, prompt: impl Into<String>) -> Self
pub fn binary_path(self, path: impl Into<PathBuf>) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn extra_arg(self, arg: impl Into<String>) -> Self
pub fn extra_args(self, args: Vec<String>) -> Self
pub fn build(self) -> TaskConfig
Auto Trait Implementations§
impl Freeze for TaskConfigBuilder
impl RefUnwindSafe for TaskConfigBuilder
impl Send for TaskConfigBuilder
impl Sync for TaskConfigBuilder
impl Unpin for TaskConfigBuilder
impl UnwindSafe for TaskConfigBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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