pub struct CodingAgentProfileBuilder { /* private fields */ }Expand description
Builder for the single shared coding-agent composition profile.
Implementations§
Source§impl CodingAgentProfileBuilder
impl CodingAgentProfileBuilder
Sourcepub fn new(root: impl Into<PathBuf>) -> Self
pub fn new(root: impl Into<PathBuf>) -> Self
Creates a coding-agent profile builder with one workspace root.
Sourcepub fn workspace_root(&self) -> &Path
pub fn workspace_root(&self) -> &Path
Returns the configured workspace root path.
Sourcepub fn prompt_profile(self, prompt_profile: PromptProfile) -> Self
pub fn prompt_profile(self, prompt_profile: PromptProfile) -> Self
Replaces the default main-agent prompt profile with a custom profile (used by child runtimes to install dedicated subagent instructions and role blocks without carrying parent-only policy text).
Sourcepub fn readonly_resource_roots<I, P>(self, roots: I) -> Self
pub fn readonly_resource_roots<I, P>(self, roots: I) -> Self
Adds read-only resource roots that are not the writable workspace root.
Sourcepub fn limits(self, limits: WorkspaceToolLimits) -> Self
pub fn limits(self, limits: WorkspaceToolLimits) -> Self
Sets workspace tool limits.
Sourcepub fn patch_tool(self) -> Self
pub fn patch_tool(self) -> Self
Enables the constrained workspace patch tool.
Sourcepub fn web_tools(self) -> Self
pub fn web_tools(self) -> Self
Enables built-in web and browser verification tools (web_fetch, browser_tab, browser_network).
Sourcepub fn read_scope<I, P>(self, paths: I) -> Self
pub fn read_scope<I, P>(self, paths: I) -> Self
Sets workspace-relative paths that read_file may read.
Sourcepub fn patch_write_scope<I, P>(self, paths: I) -> Self
pub fn patch_write_scope<I, P>(self, paths: I) -> Self
Sets workspace-relative paths that apply_patch may write.
Sourcepub fn read_only_patch_scope(self) -> Self
pub fn read_only_patch_scope(self) -> Self
Denies all apply_patch writes.
Sourcepub fn forbidden_paths<I, P>(self, paths: I) -> Self
pub fn forbidden_paths<I, P>(self, paths: I) -> Self
Sets workspace-relative paths that apply_patch must never write.
Sourcepub fn host_path_policy(self, policy: HostPathPolicy) -> Self
pub fn host_path_policy(self, policy: HostPathPolicy) -> Self
Sets the shared host path policy governing denied private directories and Merry-owned read-only subtrees (such as session journals).
Sourcepub fn read_only_process_runner(self, runner: Arc<dyn ProcessRunner>) -> Self
pub fn read_only_process_runner(self, runner: Arc<dyn ProcessRunner>) -> Self
Includes read-only process execution lanes.
Sourcepub fn accepted_process_session(self, session: ProcessSession) -> Self
pub fn accepted_process_session(self, session: ProcessSession) -> Self
Includes one host-process session and its reviewed-action capability.
Sourcepub fn browser_process_launcher(
self,
launcher: Arc<dyn BrowserProcessLauncher>,
) -> Self
pub fn browser_process_launcher( self, launcher: Arc<dyn BrowserProcessLauncher>, ) -> Self
Overrides the headless browser process launcher used by browser_tab
when web tools are enabled (for custom host runners or disabling local
browser launches).
Sourcepub fn retry_policy(self, retry_policy: ModelRetryPolicy) -> Self
pub fn retry_policy(self, retry_policy: ModelRetryPolicy) -> Self
Sets the provider-neutral retry/recovery policy for model turns.
Sourcepub fn run_policy(self, run_policy: CodingAgentRunPolicy) -> Self
pub fn run_policy(self, run_policy: CodingAgentRunPolicy) -> Self
Sets coding-loop recovery and final-report policy.
Sourcepub fn project_rules(self, project_rules: ProjectRules) -> Self
pub fn project_rules(self, project_rules: ProjectRules) -> Self
Adds the stable project rules projection.
Sourcepub fn skill_catalog(self, skill_catalog: SkillCatalog) -> Self
pub fn skill_catalog(self, skill_catalog: SkillCatalog) -> Self
Adds stable skill metadata without embedding skill bodies.
Sourcepub fn task_anchor(self, task_anchor: TaskAnchor) -> Self
pub fn task_anchor(self, task_anchor: TaskAnchor) -> Self
Adds the dynamic task anchor projection.
Sourcepub fn tool(self, tool: Tool) -> Self
pub fn tool(self, tool: Tool) -> Self
Adds a typed application tool after the canonical Merry-managed tools.
Sourcepub fn durable_memory(self, memory: Arc<DurableMemory>) -> Self
pub fn durable_memory(self, memory: Arc<DurableMemory>) -> Self
Attaches the durable memory store shared by parent and child runtimes.
The store supplies the stable memory instructions and the workspace tool policy. The frozen index is attached separately on the runtime.
Sourcepub fn durable_memory_handle(&self) -> Option<Arc<DurableMemory>>
pub fn durable_memory_handle(&self) -> Option<Arc<DurableMemory>>
Returns the attached memory store, when this profile has one.
Sourcepub fn build(self) -> Result<CodingAgentProfile, CodingAgentProfileBuildError>
pub fn build(self) -> Result<CodingAgentProfile, CodingAgentProfileBuildError>
Builds the shared coding-agent profile.