mirror of
https://github.com/openai/codex.git
synced 2026-11-29 07:35:16 +00:00
Read executor skill packages directly (#38167)
## Why Executor skills required a `skills.list` lookup before their contents could be read, even when the catalog already identified the skill. ## What changed - Render executor skill catalog entries as package locators, including shortened locators when skill roots are aliased. - Tell the model to pass those packages directly to `skills.read`, while keeping `skills.list` as the fallback when no package is available. - Use the shorter package locators when applying the skills context budget. ## Testing Update catalog, aliasing, budget-pressure, and selected-skill coverage, including an executor package ID containing a literal backslash. GitOrigin-RevId: 2ace5e527dc4f29651a8f3214475ccc90d52c73f
This commit is contained in:
1 parent
3fe19fcd81
commit
69ae78291d
7 files changed
+70
-50
No files matched your search
@@ -182,10 +182,8 @@ struct SkillLine<'a> {
|
||||
impl<'a> SkillLine<'a> {
|
||||
fn new(entry: &'a SkillCatalogEntry, policy: SkillCatalogRenderPolicy) -> Self {
|
||||
let locator = match &entry.authority.kind {
|
||||
SkillSourceKind::Orchestrator => entry.id.0.as_str(),
|
||||
SkillSourceKind::Host | SkillSourceKind::Executor | SkillSourceKind::Custom(_) => {
|
||||
entry.rendered_path()
|
||||
}
|
||||
SkillSourceKind::Executor | SkillSourceKind::Orchestrator => entry.id.0.as_str(),
|
||||
SkillSourceKind::Host | SkillSourceKind::Custom(_) => entry.rendered_path(),
|
||||
};
|
||||
Self::with_locator(entry, policy, locator.to_string())
|
||||
}
|
||||
@@ -202,7 +200,7 @@ impl<'a> SkillLine<'a> {
|
||||
locator,
|
||||
locator_kind: match &entry.authority.kind {
|
||||
SkillSourceKind::Host => "file",
|
||||
SkillSourceKind::Executor => "environment resource",
|
||||
SkillSourceKind::Executor => "executor package",
|
||||
SkillSourceKind::Orchestrator => "orchestrator package",
|
||||
SkillSourceKind::Custom(_) => "custom resource",
|
||||
},
|
||||
@@ -1078,17 +1076,13 @@ fn build_alias_plan(entries: &[&SkillCatalogEntry]) -> Option<AliasPlan> {
|
||||
|
||||
fn render_skill_locator_with_aliases(entry: &SkillCatalogEntry, plan: &AliasPlan) -> String {
|
||||
let locator = match &entry.authority.kind {
|
||||
SkillSourceKind::Orchestrator => entry.id.0.as_str(),
|
||||
SkillSourceKind::Host | SkillSourceKind::Executor | SkillSourceKind::Custom(_) => {
|
||||
entry.rendered_path()
|
||||
}
|
||||
SkillSourceKind::Executor | SkillSourceKind::Orchestrator => entry.id.0.as_str(),
|
||||
SkillSourceKind::Host | SkillSourceKind::Custom(_) => entry.rendered_path(),
|
||||
};
|
||||
if entry.alias_root().is_none() {
|
||||
return locator.to_string();
|
||||
}
|
||||
let normalized_locator = locator.replace('\\', "/");
|
||||
plan.shorten(&normalized_locator)
|
||||
.unwrap_or_else(|| locator.to_string())
|
||||
plan.shorten(locator).unwrap_or_else(|| locator.to_string())
|
||||
}
|
||||
|
||||
fn aliased_metadata_overhead_cost(
|
||||
|
||||
Reference in new issue
Block a user