Support plugin roots in the host skill loader (#37267)

## What changed

- Carry plugin identity, namespace, root, and discovery mode through host skill loading.
- Apply the owning plugin namespace and IDs to loaded skill metadata.
- Respect direct-child discovery for Agent Plugins and reject skills that resolve outside the plugin root or are not regular files.
- Preserve recursive discovery and symlink behavior for legacy plugin roots, and allow the full 64-character namespace plus 64-character skill name.

## Testing

Add host-loader coverage for plugin metadata, namespace ownership, direct-child filtering, path containment, recursive symlinks, shared assets, and maximum-length qualified names.

GitOrigin-RevId: cdde821643ce39bd030d0c3753b3304b75161690
This commit is contained in:
felixxia-oai authored and copyberry committed 2026-08-06 12:44:36 +00:00
1 parent 1151b23f01
commit bfb6a6ea22
8 files changed
+445 -55

No files matched your search

+5 -6
View File
@@ -303,12 +303,11 @@ impl HostSkillsService {
let snapshot = if use_legacy_loader {
load_skill_root_snapshot(root, plugin_skill_snapshots).await
} else {
let snapshot = load_host_skill_root(HostSkillRoot {
path: root.path,
scope: root.scope,
file_system: root.file_system,
plugin_root: root.plugin_root,
})
let snapshot = load_host_skill_root(HostSkillRoot::host(
root.path,
root.scope,
root.file_system,
))
.await;
SkillRootSnapshot::new(
snapshot.root,