[codex] add roles to realtime append text (#27936)

## Summary

Add an explicit `user` or `developer` role to
`thread/realtime/appendText` and propagate it through the realtime input
queue into `conversation.item.create`. Older JSON clients that omit the
field continue to default to `user`.

This lets app-provided context such as memory retain developer authority
without bypassing app-server through a renderer-owned data channel. The
app-server schemas, API documentation, and focused protocol and
websocket coverage are updated with the new contract.

The Codex Apps consumer is tracked in
[openai/openai#1025261](https://github.com/openai/openai/pull/1025261).
This commit is contained in:
Alex Gamble
2026-06-12 15:05:37 -07:00
committed by GitHub
Unverified
parent 9915d34684
commit 216dee1189
18 changed files with 176 additions and 50 deletions
+10
View File
@@ -401,6 +401,16 @@ pub struct ConversationAudioParams {
#[derive(Debug, Clone, PartialEq)]
pub struct ConversationTextParams {
pub text: String,
pub role: ConversationTextRole,
}
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Deserialize, Serialize, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
#[ts(rename_all = "snake_case")]
pub enum ConversationTextRole {
#[default]
User,
Developer,
}
/// Persistent thread-settings overrides that can be applied before user input or