Load host skill roots through the skills extension (#37162)

## What changed

- Load ordinary recursive host skill roots with the skills extension's host loader.
- Keep plugin-specific roots on the existing loader so plugin snapshot caching and namespacing continue to work.
- Merge both kinds of root snapshots through the existing precedence and deduplication logic, including discovery paths and source filesystem mappings.
- Move `HostSkillsSnapshot` into the skills extension as the owner of host skill loading.

## Testing

- Cover merged host and plugin catalogs, precedence for symlinked roots, discovery paths, and end-to-end rendering and invocation of host, repository, and plugin skills.

GitOrigin-RevId: c18080afb917c33c57bc17e36b40dd0f3c72d1d7
This commit is contained in:
felixxia-oai authored and copyberry committed 2026-08-05 21:17:54 +00:00
1 parent c38a60ded2
commit bd36d69aae
21 files changed
+515 -162

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
use std::io;
use std::sync::Arc;
use codex_core_skills::SkillLoadOutcome;
use codex_skills::SkillMetadata;
/// Immutable snapshot of host-owned skills and their source filesystems.
#[derive(Debug, Clone)]
pub struct HostSkillsSnapshot {
outcome: Arc<SkillLoadOutcome>,
}
impl HostSkillsSnapshot {
pub fn new(outcome: Arc<SkillLoadOutcome>) -> Self {
Self { outcome }
}
pub fn outcome(&self) -> &SkillLoadOutcome {
self.outcome.as_ref()
}
pub async fn read_skill_text(&self, skill: &SkillMetadata) -> io::Result<String> {
self.outcome.read_skill_text(skill).await
}
}