pub fn discover(
root: &Path,
options: DiscoveryOptions,
) -> Result<DiscoveryResult, ExtensionError>Expand description
Discover extensions in a directory tree
Scans the given directory for extension.toml files and optionally
legacy agent TOML files in spawn-agents/ directories.
§Arguments
root- The root directory to scanoptions- Discovery options controlling behavior
§Returns
Ok(DiscoveryResult)- The discovery results with extensions and any errorsErr(ExtensionError)- If a fatal error occurs during discovery
§Example
use std::path::PathBuf;
use scud::extensions::loader::{discover, DiscoveryOptions};
let root = PathBuf::from("./extensions");
let result = discover(&root, DiscoveryOptions::standard()).unwrap();
for ext in result.extensions {
println!("Found: {} v{}", ext.manifest.extension.name, ext.manifest.extension.version);
}