Skip to main content

discover_manifests

Function discover_manifests 

Source
pub fn discover_manifests(dirs: &[PathBuf]) -> Vec<(String, PathBuf)>
Expand description

Scan dirs for <plugin-name>/plugin.toml manifests — each entry of dirs is expected to be a directory whose immediate subdirectories are plugin roots (the same shape default_plugins_dir() itself has). Returns (plugin name, manifest path) pairs, sorted by name; a name that appears under more than one scanned directory keeps the LAST directory’s entry (later/more-specific wins — same precedent crates/cli/src/main.rs::attach_mcp’s “same-named entries here WIN” documents for capabilities.mcp.servers over mcp.json). A dirs entry that doesn’t exist or isn’t readable is silently skipped (not every configured location need exist).