pub struct CodingAgentBuilder { /* private fields */ }Expand description
Product builder assembling one mode-neutral coding service.
Implementations§
Source§impl CodingAgentBuilder
impl CodingAgentBuilder
Sourcepub fn new<S>(
provider: Arc<dyn ModelProvider>,
workspace: WorkspaceRoot,
resources: ResourceCatalog,
store: Arc<S>,
bash: BashConfig,
settings: CodingSettings,
actor: ActorId,
workspace_id: WorkspaceId,
) -> Selfwhere
S: SessionStore + SessionCatalog + 'static,
pub fn new<S>(
provider: Arc<dyn ModelProvider>,
workspace: WorkspaceRoot,
resources: ResourceCatalog,
store: Arc<S>,
bash: BashConfig,
settings: CodingSettings,
actor: ActorId,
workspace_id: WorkspaceId,
) -> Selfwhere
S: SessionStore + SessionCatalog + 'static,
Creates a fully explicit, test-isolated builder.
Sourcepub fn provider(self, provider: Arc<dyn ModelProvider>) -> Self
pub fn provider(self, provider: Arc<dyn ModelProvider>) -> Self
Registers an additional model provider in the immutable runtime generation.
Sourcepub fn compaction_summarizer(
self,
summarizer: Arc<dyn CompactionSummarizer>,
) -> Self
pub fn compaction_summarizer( self, summarizer: Arc<dyn CompactionSummarizer>, ) -> Self
Supplies the required summarizer when automatic compaction is enabled.
Sourcepub fn mcp_manager(self, manager: Arc<McpManager>) -> Self
pub fn mcp_manager(self, manager: Arc<McpManager>) -> Self
Injects a manager initialized before immutable runtime binding.
The resulting service owns the manager and must be shut down normally to await its child processes. The manager’s catalog is never refreshed during this service lifetime.
Sourcepub fn search_provider(self, provider: Arc<dyn SearchProvider>) -> Self
pub fn search_provider(self, provider: Arc<dyn SearchProvider>) -> Self
Injects a real client web-search backend.
Injection alone does not enable the client route and never adds
web_search to the active-tool allowlist. Both remain controlled by
explicit product settings.
Sourcepub fn fetch_provider(self, provider: Arc<dyn FetchProvider>) -> Self
pub fn fetch_provider(self, provider: Arc<dyn FetchProvider>) -> Self
Injects a real client web-fetch backend.
Injection alone never registers or activates web_fetch; both the
active-tool allowlist and explicit backend enablement remain required.
Sourcepub fn build(self) -> Result<CodingAgentService, CodingError>
pub fn build(self) -> Result<CodingAgentService, CodingError>
Assembles provider, profile, policy, context, registered tools, and session ports.
§Errors
Returns a bounded product error for any invalid contract or registration.