Refresh host skill catalogs through world state (#33425)

## Why

Host skills can change after a thread starts. Subsequent turns need the updated
catalog without reinjecting an unchanged catalog on every turn.

## What changed

- Register the host skill provider in app-server and project its catalog through
  a dedicated World State section.
- Render host skills with the existing metadata budget and usage instructions,
  including skill-root aliases when available.
- Suppress the legacy host catalog and contextual fragment when World State owns
  the catalog, while preserving host skills for explicit and shadow selection.

## Testing

Added an app-server test that installs a host skill at runtime and verifies the
catalog updates once and remains stable on the following turn.

GitOrigin-RevId: 4cacc6b2258fc3cab8499fbdf9aa6ab0324ec10d
This commit is contained in:
jif authored and copyberry committed 2026-07-15 20:59:21 +00:00
1 parent 2b486b4676
commit 0f2321f244
10 files changed
+366 -23

No files matched your search

+11
View File
@@ -107,6 +107,12 @@ impl SkillProviders {
.any(|source| source.kind == SkillSourceKind::Orchestrator)
}
pub(crate) fn has_host_provider(&self) -> bool {
self.sources
.iter()
.any(|source| source.kind == SkillSourceKind::Host)
}
pub(crate) async fn list_for_turn(&self, query: SkillListQuery) -> SkillCatalog {
self.list_matching(&query, |source| source.should_list(&query))
.await
@@ -140,6 +146,11 @@ impl SkillProviders {
.await
}
pub(crate) async fn list_host_for_turn(&self, query: SkillListQuery) -> SkillCatalog {
self.list_matching(&query, |source| source.kind == SkillSourceKind::Host)
.await
}
async fn list_matching(
&self,
query: &SkillListQuery,