pub struct CliBootstrap { /* private fields */ }Expand description
Injectable product bootstrap; production uses the live provider by default.
Implementations§
Source§impl CliBootstrap
impl CliBootstrap
Sourcepub fn new(environment: BootstrapEnvironment) -> Self
pub fn new(environment: BootstrapEnvironment) -> Self
Creates a bootstrap from an injected environment.
Sourcepub fn with_provider(self, provider: Arc<dyn ModelProvider>) -> Self
pub fn with_provider(self, provider: Arc<dyn ModelProvider>) -> Self
Injects an additional provider (for embedding and hermetic tests).
Sourcepub fn mcp_environment_resolver(&self) -> &dyn McpEnvironmentResolver
pub fn mcp_environment_resolver(&self) -> &dyn McpEnvironmentResolver
Returns the late MCP environment resolver owned by this bootstrap.
Sourcepub fn read_prompt_file(
&self,
args: &CliArgs,
path: &str,
) -> Result<String, CliFailure>
pub fn read_prompt_file( &self, args: &CliArgs, path: &str, ) -> Result<String, CliFailure>
Reads one bounded UTF-8 prompt file through the workspace capability.
§Errors
Rejects absolute, traversing, escaping, changed, non-file, invalid UTF-8, or oversized input.
Sourcepub fn build(
&self,
args: &CliArgs,
) -> Result<(CodingAgentService, SessionSelection), CliFailure>
pub fn build( &self, args: &CliArgs, ) -> Result<(CodingAgentService, SessionSelection), CliFailure>
Builds one mode-neutral coding service and resolves session selection.
§Errors
Returns stable trust/config/provider/internal failures without secret values.
Sourcepub async fn build_async(
&self,
args: &CliArgs,
) -> Result<(CodingAgentService, SessionSelection), CliFailure>
pub async fn build_async( &self, args: &CliArgs, ) -> Result<(CodingAgentService, SessionSelection), CliFailure>
Asynchronously initializes MCP servers before immutable runtime binding.
§Errors
Returns a stable CLI failure when configuration, environment resolution, server startup, or runtime assembly fails.
Trait Implementations§
Source§impl Clone for CliBootstrap
impl Clone for CliBootstrap
Auto Trait Implementations§
impl !RefUnwindSafe for CliBootstrap
impl !UnwindSafe for CliBootstrap
impl Freeze for CliBootstrap
impl Send for CliBootstrap
impl Sync for CliBootstrap
impl Unpin for CliBootstrap
impl UnsafeUnpin for CliBootstrap
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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