pub struct SpawnConfigBuilder { /* private fields */ }Expand description
Builder for SpawnConfig with fluent setter methods for optional fields.
Implementations§
Source§impl SpawnConfigBuilder
impl SpawnConfigBuilder
Sourcepub fn cwd(self, cwd: impl Into<PathBuf>) -> Self
pub fn cwd(self, cwd: impl Into<PathBuf>) -> Self
Set the working directory for the agent process.
Sourcepub fn allowed_tools(self, tools: Vec<String>) -> Self
pub fn allowed_tools(self, tools: Vec<String>) -> Self
Set the tools the agent is allowed to use.
Sourcepub fn permission_mode(self, mode: impl Into<String>) -> Self
pub fn permission_mode(self, mode: impl Into<String>) -> Self
Set the permission mode (e.g., "default", "plan", "bypassPermissions").
Sourcepub fn reasoning_effort(self, effort: impl Into<String>) -> Self
pub fn reasoning_effort(self, effort: impl Into<String>) -> Self
Set the reasoning effort level.
Sourcepub fn env_var(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn env_var(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a single environment variable.
Sourcepub fn memory(self, config: MemoryConfig) -> Self
pub fn memory(self, config: MemoryConfig) -> Self
Set memory configuration for cross-turn context injection.
Sourcepub fn delegate(self, delegation: CliDelegation) -> Self
pub fn delegate(self, delegation: CliDelegation) -> Self
Add a CLI delegation for this agent.
The agent’s prompt will be augmented with instructions on how and when to invoke the delegated CLI tool via Bash.
use agent_teams::backend::delegation::CliDelegation;
use agent_teams::SpawnConfig;
let config = SpawnConfig::builder("coder", "You write Rust code.")
.delegate(CliDelegation::codex())
.delegate(CliDelegation::gemini("gemini-2.5-pro"))
.build();
assert_eq!(config.delegations.len(), 2);Sourcepub fn build(self) -> SpawnConfig
pub fn build(self) -> SpawnConfig
Build the SpawnConfig.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpawnConfigBuilder
impl RefUnwindSafe for SpawnConfigBuilder
impl Send for SpawnConfigBuilder
impl Sync for SpawnConfigBuilder
impl Unpin for SpawnConfigBuilder
impl UnwindSafe for SpawnConfigBuilder
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