perf(skills): batch namespace ancestor searches

This commit is contained in:
Adam Perry
2026-07-10 06:13:04 +00:00
parent e51b9d1d56
commit e9df803d23
6 changed files with 654 additions and 74 deletions
+1
View File
@@ -9,6 +9,7 @@ pub mod plugin_namespace;
pub use plugin_namespace::DISCOVERABLE_PLUGIN_MANIFEST_PATHS;
pub use plugin_namespace::find_plugin_manifest_path;
pub use plugin_namespace::plugin_namespace_for_manifest_uri;
pub use plugin_namespace::plugin_namespace_for_root_uri;
pub use plugin_namespace::plugin_namespace_for_skill_path;
pub use plugin_namespace::plugin_namespace_for_skill_uri;
+10 -1
View File
@@ -40,8 +40,17 @@ pub async fn plugin_namespace_for_root_uri(
Ok(_) | Err(_) => {}
}
}
plugin_namespace_for_manifest_uri(fs, plugin_root, &manifest_path?).await
}
/// Reads the plugin namespace from an already-discovered manifest path.
pub async fn plugin_namespace_for_manifest_uri(
fs: &dyn ExecutorFileSystem,
plugin_root: &PathUri,
manifest_path: &PathUri,
) -> Option<String> {
let contents = fs
.read_file_text(&manifest_path?, /*sandbox*/ None)
.read_file_text(manifest_path, /*sandbox*/ None)
.await
.ok()?;
let RawPluginManifestName { name: raw_name } = serde_json::from_str(&contents).ok()?;