Skip to main content

load_manifests

Function load_manifests 

Source
pub fn load_manifests(
    user_dir: impl AsRef<Path>,
    project_dir: Option<&Path>,
) -> Result<Vec<DriverManifest>>
Expand description

The manifests of the user’s drivers directory, each restricted by the workspace’s manifest of the same id (spec 3.2 §7.7: a project scope may only restrict).

§Example

let dir = tempfile::tempdir().unwrap();
std::fs::write(dir.path().join("email.toml"), "id = \"email\"\ncommand = \"mcp-email\"\n").unwrap();
let manifests = adk_kernel::drivers::load_manifests(dir.path(), None).unwrap();
assert_eq!(manifests[0].id, "email");

§Errors

Returns the errors of load_dir, and KernelError::Config when a workspace manifest names a driver the user did not declare or loosens one.