Simplify package-based skill reads (#37808)

## What changed

- Make `package` the only required argument to `skills.read`, resolving the
  owning orchestrator or executor catalog automatically.
- Default omitted `resource` values to the package's main `SKILL.md`.
- Render orchestrator skills as package locators and instruct the model to read
  them directly without first calling `skills.list`.
- Update skill extension and app-server coverage for direct main-resource
  reads, referenced resources, aliases, and the revised tool schema.

GitOrigin-RevId: 9faf57a8d0935566a15094931eaabaa8f0613e9e
This commit is contained in:
jif authored and copyberry committed 2026-08-10 11:10:01 +00:00
1 parent beeba1d2fc
commit 09f47c8785
10 files changed
+157 -96

No files matched your search

+18 -6
View File
@@ -181,7 +181,13 @@ struct SkillLine<'a> {
impl<'a> SkillLine<'a> {
fn new(entry: &'a SkillCatalogEntry, policy: SkillCatalogRenderPolicy) -> Self {
Self::with_locator(entry, policy, entry.rendered_path().to_string())
let locator = match &entry.authority.kind {
SkillSourceKind::Orchestrator => entry.id.0.as_str(),
SkillSourceKind::Host | SkillSourceKind::Executor | SkillSourceKind::Custom(_) => {
entry.rendered_path()
}
};
Self::with_locator(entry, policy, locator.to_string())
}
fn with_locator(
@@ -197,7 +203,7 @@ impl<'a> SkillLine<'a> {
locator_kind: match &entry.authority.kind {
SkillSourceKind::Host => "file",
SkillSourceKind::Executor => "environment resource",
SkillSourceKind::Orchestrator => "orchestrator resource",
SkillSourceKind::Orchestrator => "orchestrator package",
SkillSourceKind::Custom(_) => "custom resource",
},
}
@@ -1071,12 +1077,18 @@ 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()
}
};
if entry.alias_root().is_none() {
return entry.rendered_path().to_string();
return locator.to_string();
}
let locator = entry.rendered_path().replace('\\', "/");
plan.shorten(&locator)
.unwrap_or_else(|| entry.rendered_path().to_string())
let normalized_locator = locator.replace('\\', "/");
plan.shorten(&normalized_locator)
.unwrap_or_else(|| locator.to_string())
}
fn aliased_metadata_overhead_cost(