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

+8 -1
View File
@@ -56,6 +56,7 @@ use codex_analytics::TurnCodexErrorFact;
use codex_config::types::AuthKeyringBackendKind;
use codex_config::types::OAuthCredentialsStoreMode;
use codex_connectors::connector_runtime_context_key;
use codex_core_skills::injection::HostSkillsCatalogInWorldState;
use codex_exec_server::Environment;
use codex_exec_server::EnvironmentManager;
use codex_extension_api::ExtensionDataInit;
@@ -3257,6 +3258,10 @@ impl Session {
}
}
if turn_context.config.include_skill_instructions {
let host_catalog_in_world_state = turn_context
.extension_data
.get::<HostSkillsCatalogInWorldState>()
.is_some();
let available_skills = build_available_skills(
turn_context.turn_skills.snapshot.outcome(),
default_skill_metadata_budget(turn_context.model_info.context_window),
@@ -3279,7 +3284,9 @@ impl Session {
})
.await;
}
developer_sections.push(skills_instructions.render());
if !host_catalog_in_world_state {
developer_sections.push(skills_instructions.render());
}
}
}
let loaded_plugins = self