Restack context fragment standardization

Reapply the standardized model-visible context fragment work on top of the latest origin/main as a clean squashed restack.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-12 10:52:17 -07:00
parent 9f2da5a9ce
commit 3954e00f53
56 changed files with 6123 additions and 1483 deletions

View File

@@ -2279,6 +2279,8 @@ pub struct ThreadStartParams {
pub service_name: Option<String>,
#[ts(optional = nullable)]
pub base_instructions: Option<String>,
/// Custom developer override for this thread session.
/// Takes precedence over `~/.codex/config.toml` `developer_instructions`.
#[ts(optional = nullable)]
pub developer_instructions: Option<String>,
#[ts(optional = nullable)]
@@ -2351,6 +2353,10 @@ pub struct ThreadStartResponse {
/// If using history or path, the thread_id param will be ignored.
///
/// Prefer using thread_id whenever possible.
///
/// When resuming a thread that is already loaded/running, override fields are
/// ignored and reported as mismatch warnings rather than being reapplied
/// mid-session.
pub struct ThreadResumeParams {
pub thread_id: String,
@@ -2391,6 +2397,8 @@ pub struct ThreadResumeParams {
pub config: Option<HashMap<String, serde_json::Value>>,
#[ts(optional = nullable)]
pub base_instructions: Option<String>,
/// Custom developer override for this thread session.
/// Takes precedence over `~/.codex/config.toml` `developer_instructions`.
#[ts(optional = nullable)]
pub developer_instructions: Option<String>,
#[ts(optional = nullable)]
@@ -2462,6 +2470,8 @@ pub struct ThreadForkParams {
pub config: Option<HashMap<String, serde_json::Value>>,
#[ts(optional = nullable)]
pub base_instructions: Option<String>,
/// Custom developer override for this thread session.
/// Takes precedence over `~/.codex/config.toml` `developer_instructions`.
#[ts(optional = nullable)]
pub developer_instructions: Option<String>,
#[serde(default, skip_serializing_if = "std::ops::Not::not")]