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

@@ -3,7 +3,7 @@ use std::pin::Pin;
use codex_utils_absolute_path::AbsolutePathBuf;
/// User instructions supplied by the host.
/// Instructions supplied by the host.
///
/// `source` must be an absolute filesystem path because the app-server
/// `instructionSources` API currently exposes instruction sources as
@@ -11,8 +11,8 @@ use codex_utils_absolute_path::AbsolutePathBuf;
// TODO(anp): Replace the absolute path with a more general instruction-source
// abstraction when non-filesystem providers need first-class attribution.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UserInstructions {
/// Model-visible user instruction text.
pub struct Instructions {
/// Model-visible instruction text.
pub text: String,
/// Absolute filesystem path reported through `instructionSources`.
pub source: AbsolutePathBuf,
@@ -22,7 +22,7 @@ pub struct UserInstructions {
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct LoadedUserInstructions {
/// Loaded instructions, or `None` when the provider has no applicable text.
pub instructions: Option<UserInstructions>,
pub instructions: Option<Instructions>,
/// Recoverable loading problems that should be surfaced during startup.
pub warnings: Vec<String>,
}