From b9aad60c9f28b1055ed5b43b9aa0e4bbabfed6c5 Mon Sep 17 00:00:00 2001 From: Roy Han Date: Thu, 12 Mar 2026 09:30:52 -0700 Subject: [PATCH] schema update --- .../schema/json/ClientRequest.json | 33 +++++++++++++++++++ .../schema/json/EventMsg.json | 25 ++++++++++++++ .../codex_app_server_protocol.schemas.json | 25 ++++++++++++++ .../codex_app_server_protocol.v2.schemas.json | 25 ++++++++++++++ .../RawResponseItemCompletedNotification.json | 33 +++++++++++++++++++ .../schema/json/v2/ThreadResumeParams.json | 33 +++++++++++++++++++ .../schema/typescript/ResponseItem.ts | 3 +- .../schema/typescript/ResponseItemMetadata.ts | 6 ++++ .../schema/typescript/index.ts | 1 + 9 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 codex-rs/app-server-protocol/schema/typescript/ResponseItemMetadata.ts diff --git a/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/codex-rs/app-server-protocol/schema/json/ClientRequest.json index 84fd8014b0..2e7e64e186 100644 --- a/codex-rs/app-server-protocol/schema/json/ClientRequest.json +++ b/codex-rs/app-server-protocol/schema/json/ClientRequest.json @@ -1344,6 +1344,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -1711,6 +1721,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -3061,6 +3086,14 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued" + ], + "type": "string" + }, "WindowsSandboxSetupMode": { "enum": [ "elevated", diff --git a/codex-rs/app-server-protocol/schema/json/EventMsg.json b/codex-rs/app-server-protocol/schema/json/EventMsg.json index 4788880d9e..60f49aa556 100644 --- a/codex-rs/app-server-protocol/schema/json/EventMsg.json +++ b/codex-rs/app-server-protocol/schema/json/EventMsg.json @@ -5156,6 +5156,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -5523,6 +5533,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 819078f088..c6471e785f 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -13771,6 +13771,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -14138,6 +14148,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/v2/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 2aeaba745d..ca6af0b958 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -10296,6 +10296,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -10663,6 +10673,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/RawResponseItemCompletedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/RawResponseItemCompletedNotification.json index 94a6c8ba77..1ee627988c 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/RawResponseItemCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/RawResponseItemCompletedNotification.json @@ -366,6 +366,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -733,6 +743,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -833,6 +858,14 @@ "type": "object" } ] + }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued" + ], + "type": "string" } }, "properties": { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeParams.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeParams.json index 191ff80a99..593e08534a 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeParams.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeParams.json @@ -424,6 +424,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -791,6 +801,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -906,6 +931,14 @@ "flex" ], "type": "string" + }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued" + ], + "type": "string" } }, "description": "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", diff --git a/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts b/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts index dc42485935..b1045a9f9d 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts @@ -9,9 +9,10 @@ import type { LocalShellStatus } from "./LocalShellStatus"; import type { MessagePhase } from "./MessagePhase"; import type { ReasoningItemContent } from "./ReasoningItemContent"; import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary"; +import type { ResponseItemMetadata } from "./ResponseItemMetadata"; import type { WebSearchAction } from "./WebSearchAction"; -export type ResponseItem = { "type": "message", role: string, content: Array, end_turn?: boolean, phase?: MessagePhase, } | { "type": "reasoning", summary: Array, content?: Array, encrypted_content: string | null, } | { "type": "local_shell_call", +export type ResponseItem = { "type": "message", role: string, content: Array, metadata?: ResponseItemMetadata, end_turn?: boolean, phase?: MessagePhase, } | { "type": "reasoning", summary: Array, content?: Array, encrypted_content: string | null, } | { "type": "local_shell_call", /** * Set when using the Responses API. */ diff --git a/codex-rs/app-server-protocol/schema/typescript/ResponseItemMetadata.ts b/codex-rs/app-server-protocol/schema/typescript/ResponseItemMetadata.ts new file mode 100644 index 0000000000..e7ce27e9af --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/ResponseItemMetadata.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { UserMessageType } from "./UserMessageType"; + +export type ResponseItemMetadata = { user_message_type?: UserMessageType, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/index.ts b/codex-rs/app-server-protocol/schema/typescript/index.ts index 980f965f79..61881ac708 100644 --- a/codex-rs/app-server-protocol/schema/typescript/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/index.ts @@ -174,6 +174,7 @@ export type { RequestUserInputQuestionOption } from "./RequestUserInputQuestionO export type { Resource } from "./Resource"; export type { ResourceTemplate } from "./ResourceTemplate"; export type { ResponseItem } from "./ResponseItem"; +export type { ResponseItemMetadata } from "./ResponseItemMetadata"; export type { ReviewCodeLocation } from "./ReviewCodeLocation"; export type { ReviewDecision } from "./ReviewDecision"; export type { ReviewFinding } from "./ReviewFinding";