pub trait WorktreeResolver {
// Required method
fn worktree_root_for(&self, agent_id: &str) -> Option<PathBuf>;
}Expand description
Trait providing the worktree root path for a given agent ID.
Used by the worktree-file-op classifier (bug 3) to resolve a captured
file-operation prompt’s target against the agent’s worktree boundary.
cmd_supervisor builds the mapping from session state; tests substitute a
closure-backed implementation. Returns None for agents without a known
worktree (e.g. the supervisor itself), which suppresses file-op
auto-approval for that agent.
Required Methods§
Sourcefn worktree_root_for(&self, agent_id: &str) -> Option<PathBuf>
fn worktree_root_for(&self, agent_id: &str) -> Option<PathBuf>
Returns the worktree root for agent_id, or None when unknown.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".