pub struct PathfinderServer { /* private fields */ }Expand description
The main Pathfinder MCP server.
Holds shared workspace state and dispatches MCP tool calls.
Implementations§
Source§impl PathfinderServer
impl PathfinderServer
Sourcepub async fn new(
workspace_root: WorkspaceRoot,
config: PathfinderConfig,
) -> Self
pub async fn new( workspace_root: WorkspaceRoot, config: PathfinderConfig, ) -> Self
Create a new Pathfinder server backed by the real Ripgrep scout, Tree-sitter
surgeon, and LspClient for LSP operations.
Zero-Config language detection (PRD §6.5) runs synchronously during construction. LSP processes are started lazily — only when the first LSP-dependent tool call is made for a given language.
If Zero-Config detection fails (e.g., unreadable workspace directory), the server
falls back to NoOpLawyer and logs a warning. All tools remain functional in
degraded mode.
Sourcepub fn with_engines(
workspace_root: WorkspaceRoot,
config: PathfinderConfig,
sandbox: Sandbox,
scout: Arc<dyn Scout>,
surgeon: Arc<dyn Surgeon>,
) -> Self
pub fn with_engines( workspace_root: WorkspaceRoot, config: PathfinderConfig, sandbox: Sandbox, scout: Arc<dyn Scout>, surgeon: Arc<dyn Surgeon>, ) -> Self
Create a server with injected Scout and Surgeon engines (for testing).
Uses a NoOpLawyer for LSP operations — keeps existing tests unchanged.
Sourcepub fn with_all_engines(
workspace_root: WorkspaceRoot,
_config: PathfinderConfig,
sandbox: Sandbox,
scout: Arc<dyn Scout>,
surgeon: Arc<dyn Surgeon>,
lawyer: Arc<dyn Lawyer>,
) -> Self
pub fn with_all_engines( workspace_root: WorkspaceRoot, _config: PathfinderConfig, sandbox: Sandbox, scout: Arc<dyn Scout>, surgeon: Arc<dyn Surgeon>, lawyer: Arc<dyn Lawyer>, ) -> Self
Create a server with all three engines injected (for testing with a MockLawyer).
Source§impl PathfinderServer
impl PathfinderServer
Sourcepub fn explore_tool_attr() -> Tool
pub fn explore_tool_attr() -> Tool
Generated tool metadata function for explore
Sourcepub fn search_tool_attr() -> Tool
pub fn search_tool_attr() -> Tool
Generated tool metadata function for search
Sourcepub fn read_tool_attr() -> Tool
pub fn read_tool_attr() -> Tool
Generated tool metadata function for read
Sourcepub fn inspect_tool_attr() -> Tool
pub fn inspect_tool_attr() -> Tool
Generated tool metadata function for inspect
Sourcepub fn locate_tool_attr() -> Tool
pub fn locate_tool_attr() -> Tool
Generated tool metadata function for locate
Sourcepub fn trace_tool_attr() -> Tool
pub fn trace_tool_attr() -> Tool
Generated tool metadata function for trace
Sourcepub fn health_tool_attr() -> Tool
pub fn health_tool_attr() -> Tool
Generated tool metadata function for health
Trait Implementations§
Source§impl Clone for PathfinderServer
impl Clone for PathfinderServer
Source§fn clone(&self) -> PathfinderServer
fn clone(&self) -> PathfinderServer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more