mirror of
https://github.com/openai/codex.git
synced 2026-11-29 07:35:16 +00:00
Encapsulate watchable skill root selection (#37833)
## Why The app server should not need access to host skill root internals to decide which paths require filesystem watching. ## What changed - Add `HostSkillsService::watchable_skill_root_paths` to return non-plugin, non-system skill roots for the watcher. - Make `HostSkillRoot` and root resolution private to the skills extension. - Update the app-server watcher to consume the filtered paths directly. ## Testing Add a host service test confirming that user skill roots remain watchable while plugin and generated system roots are excluded. GitOrigin-RevId: b3e3b576e4ffe96230af71d9bf7c6c315b1705d3
This commit is contained in:
1 parent
bfb7790eb3
commit
680934adc4
6 files changed
+61
-15
No files matched your search
@@ -33,10 +33,10 @@ use super::metadata::validate_len;
|
||||
use super::namespace::SkillNamespaceResolver;
|
||||
|
||||
/// A resolved host skill root ready for filesystem discovery.
|
||||
pub struct HostSkillRoot {
|
||||
pub path: AbsolutePathBuf,
|
||||
pub scope: SkillScope,
|
||||
pub file_system: Arc<dyn ExecutorFileSystem>,
|
||||
pub(crate) struct HostSkillRoot {
|
||||
pub(crate) path: AbsolutePathBuf,
|
||||
pub(crate) scope: SkillScope,
|
||||
pub(crate) file_system: Arc<dyn ExecutorFileSystem>,
|
||||
plugin: Option<PluginSkillRootContext>,
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ impl HostSkillRoot {
|
||||
}
|
||||
|
||||
/// Returns the owning plugin identity when this root belongs to a plugin.
|
||||
pub fn plugin_identity(&self) -> Option<&PluginIdentity> {
|
||||
pub(crate) fn plugin_identity(&self) -> Option<&PluginIdentity> {
|
||||
self.plugin.as_ref().map(|plugin| &plugin.identity)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ mod namespace;
|
||||
|
||||
pub(crate) use environment::load_environment_skills_from_discovery;
|
||||
pub(crate) use environment::load_environment_skills_from_root;
|
||||
pub use host::HostSkillRoot;
|
||||
pub(crate) use host::HostSkillRoot;
|
||||
pub(crate) use host::HostSkillRootSnapshot;
|
||||
pub(crate) use host::load_host_skill_root;
|
||||
pub(crate) use host_merge::load_and_merge_host_skill_roots;
|
||||
|
||||
Reference in new issue
Block a user