mirror of
https://github.com/openai/codex.git
synced 2026-11-29 07:35:16 +00:00
Tighten the skills extension API surface (#37838)
## What changed - Restrict host loading, snapshot, and outcome implementation details to the skills extension crate. - Require `HostSkillsLoadInput` construction through its public constructor instead of exposing its fields. - Remove redundant implicit-invocation helpers from `SkillLoadOutcome`; use the `ImplicitSkillLookup` interface for enabled-skill lookup instead. GitOrigin-RevId: e79c77fc3e69ecc0231b0c87e5f9f24a5487f9e4
This commit is contained in:
1 parent
3b67b03a3f
commit
3c60d4da64
4 files changed
+24
-36
No files matched your search
@@ -109,13 +109,13 @@ impl HostSkillRoot {
|
||||
|
||||
/// Skills and errors loaded from one canonical host root.
|
||||
#[derive(Clone)]
|
||||
pub struct HostSkillRootSnapshot {
|
||||
pub root: AbsolutePathBuf,
|
||||
pub skills: Vec<SkillMetadata>,
|
||||
pub skill_discovery_path_by_path: Arc<HashMap<AbsolutePathBuf, AbsolutePathBuf>>,
|
||||
pub errors: Vec<SkillError>,
|
||||
pub file_system: Arc<dyn ExecutorFileSystem>,
|
||||
pub is_agent_plugin: bool,
|
||||
pub(crate) struct HostSkillRootSnapshot {
|
||||
pub(crate) root: AbsolutePathBuf,
|
||||
pub(crate) skills: Vec<SkillMetadata>,
|
||||
pub(crate) skill_discovery_path_by_path: Arc<HashMap<AbsolutePathBuf, AbsolutePathBuf>>,
|
||||
pub(crate) errors: Vec<SkillError>,
|
||||
pub(crate) file_system: Arc<dyn ExecutorFileSystem>,
|
||||
pub(crate) is_agent_plugin: bool,
|
||||
}
|
||||
|
||||
struct ResolvedDiscoveredSkill {
|
||||
@@ -124,7 +124,7 @@ struct ResolvedDiscoveredSkill {
|
||||
path_uri: PathUri,
|
||||
}
|
||||
|
||||
pub async fn load_host_skill_root(root: HostSkillRoot) -> HostSkillRootSnapshot {
|
||||
pub(crate) async fn load_host_skill_root(root: HostSkillRoot) -> HostSkillRootSnapshot {
|
||||
let is_agent_plugin = root.discovery_mode() == SkillDiscoveryMode::DirectChildren;
|
||||
let canonical_root =
|
||||
canonicalize_for_skill_identity(root.file_system.as_ref(), &root.path).await;
|
||||
|
||||
Reference in new issue
Block a user