Rename host instruction payload to Instructions (#40709)

## What changed

Rename the `UserInstructions` type to `Instructions` across the extension API,
its core API re-export, and all consumers. This keeps loading behavior and the
`LoadedUserInstructions` provider interface unchanged.

GitOrigin-RevId: 1ac236b34c31718e7aa38ff5eae5e9b179aeedd8
This commit is contained in:
vkg-oai authored and copyberry committed 2026-08-25 21:20:51 +00:00
1 parent 13fe2bcb7a
commit 5ca4175295
12 files changed
+31 -31

No files matched your search

+4 -4
View File
@@ -2,7 +2,7 @@ use crate::agents_md::LoadedAgentsMd;
use crate::agents_md::load_project_instructions;
use crate::config::Config;
use crate::environment_selection::TurnEnvironmentSnapshot;
use codex_extension_api::UserInstructions;
use codex_extension_api::Instructions;
use codex_protocol::config_types::TrustLevel;
use codex_protocol::protocol::TurnEnvironmentSelection;
use std::io;
@@ -11,7 +11,7 @@ use tokio::sync::Mutex;
/// Owns the inputs and cached result of AGENTS.md discovery for a session.
pub(crate) struct AgentsMdManager {
user_instructions: Option<UserInstructions>,
user_instructions: Option<Instructions>,
cache: Mutex<AgentsMdCache>,
}
@@ -23,7 +23,7 @@ struct AgentsMdCache {
}
impl AgentsMdManager {
pub(crate) fn new(user_instructions: Option<UserInstructions>) -> Self {
pub(crate) fn new(user_instructions: Option<Instructions>) -> Self {
Self {
user_instructions: user_instructions
.filter(|instructions| !instructions.text.trim().is_empty()),
@@ -69,7 +69,7 @@ impl AgentsMdManager {
self.cache.lock().await.loaded.clone()
}
pub(crate) fn user_instructions(&self) -> Option<UserInstructions> {
pub(crate) fn user_instructions(&self) -> Option<Instructions> {
self.user_instructions.clone()
}
}