diff --git a/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/codex-rs/app-server-protocol/schema/json/ClientRequest.json index 7950007e01..c592ea8e3f 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": [ { @@ -1793,6 +1803,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -3143,6 +3168,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 6d2f273445..cc08f6ca9d 100644 --- a/codex-rs/app-server-protocol/schema/json/EventMsg.json +++ b/codex-rs/app-server-protocol/schema/json/EventMsg.json @@ -5170,6 +5170,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -5619,6 +5629,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -6501,16 +6526,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "UserMessage" @@ -6539,16 +6554,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -6581,16 +6586,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -6615,16 +6610,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "raw_content": { "default": [], "items": { @@ -6662,16 +6647,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -6697,16 +6672,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -6747,16 +6712,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "ContextCompaction" @@ -6774,21 +6729,6 @@ } ] }, - "TurnItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "UserInput": { "description": "User input", "oneOf": [ diff --git a/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/codex-rs/app-server-protocol/schema/json/ServerNotification.json index 1e59da8e60..2dec976b2a 100644 --- a/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -1253,21 +1253,6 @@ ], "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "ItemStartedNotification": { "properties": { "item": { @@ -2061,16 +2046,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -2092,16 +2067,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -2138,16 +2103,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -2179,16 +2134,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -2254,16 +2199,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -2304,16 +2239,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -2358,16 +2283,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -2429,16 +2344,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -2482,16 +2387,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -2579,16 +2474,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -2613,16 +2498,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -2647,16 +2522,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -2691,16 +2556,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -2725,16 +2580,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -2759,16 +2604,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -3394,14 +3229,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "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 09b818e2a1..2710d84130 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 @@ -8588,16 +8588,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "UserMessage" @@ -8626,16 +8616,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -8668,16 +8648,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -8702,16 +8672,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "raw_content": { "default": [], "items": { @@ -8749,16 +8709,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -8784,16 +8734,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -8834,16 +8774,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "ContextCompaction" @@ -8861,21 +8791,6 @@ } ] }, - "TurnItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/v2/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "W3cTraceContext": { "properties": { "traceparent": { @@ -11940,21 +11855,6 @@ "title": "ItemCompletedNotification", "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/v2/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "ItemStartedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { @@ -13767,6 +13667,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -14216,6 +14126,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/v2/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -15557,16 +15482,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -15588,16 +15503,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -15634,16 +15539,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -15675,16 +15570,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -15750,16 +15635,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -15800,16 +15675,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/v2/PatchApplyStatus" }, @@ -15854,16 +15719,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -15925,16 +15780,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/v2/DynamicToolCallStatus" }, @@ -15978,16 +15823,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -16075,16 +15910,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -16109,16 +15934,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -16143,16 +15958,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -16187,16 +15992,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -16221,16 +16016,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -16255,16 +16040,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" 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 54066e1d96..bace2cf6cb 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 @@ -7794,21 +7794,6 @@ "title": "ItemCompletedNotification", "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "ItemStartedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { @@ -10292,6 +10277,16 @@ ], "writeOnly": true }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ResponseItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -10741,6 +10736,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -13239,16 +13249,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -13270,16 +13270,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -13316,16 +13306,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -13357,16 +13337,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -13432,16 +13402,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -13482,16 +13442,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -13536,16 +13486,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -13607,16 +13547,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -13660,16 +13590,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -13757,16 +13677,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -13791,16 +13701,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -13825,16 +13725,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -13869,16 +13759,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -13903,16 +13783,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -13937,16 +13807,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -15244,16 +15104,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "UserMessage" @@ -15282,16 +15132,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -15324,16 +15164,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -15358,16 +15188,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "raw_content": { "default": [], "items": { @@ -15405,16 +15225,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -15440,16 +15250,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -15490,16 +15290,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/TurnItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "ContextCompaction" @@ -15517,21 +15307,6 @@ } ] }, - "TurnItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "TurnPlanStep": { "properties": { "status": { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json index 1841d3a247..4a8358944b 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json @@ -256,21 +256,6 @@ ], "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -437,16 +422,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -468,16 +443,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -514,16 +479,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -555,16 +510,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -630,16 +575,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -680,16 +615,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -734,16 +659,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -805,16 +720,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -858,16 +763,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -955,16 +850,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -989,16 +874,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1023,16 +898,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1067,16 +932,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1101,16 +956,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1135,16 +980,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1282,14 +1117,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json index 01ae5febc4..4940cb19a8 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json @@ -256,21 +256,6 @@ ], "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -437,16 +422,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -468,16 +443,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -514,16 +479,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -555,16 +510,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -630,16 +575,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -680,16 +615,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -734,16 +659,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -805,16 +720,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -858,16 +763,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -955,16 +850,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -989,16 +874,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1023,16 +898,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1067,16 +932,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1101,16 +956,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1135,16 +980,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1282,14 +1117,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "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 19f0fe34f2..e469d38621 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": [ { @@ -815,6 +825,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -915,6 +940,14 @@ "type": "object" } ] + }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued" + ], + "type": "string" } }, "properties": { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json index 1e171c604d..15b66e9903 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json @@ -370,21 +370,6 @@ ], "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -551,16 +536,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -582,16 +557,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -628,16 +593,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -669,16 +624,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -744,16 +689,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -794,16 +729,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -848,16 +773,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -919,16 +834,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -972,16 +877,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1069,16 +964,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1103,16 +988,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1137,16 +1012,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1181,16 +1046,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1215,16 +1070,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1249,16 +1094,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1467,14 +1302,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json index c189d7c721..82532ca0c3 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json @@ -447,21 +447,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -1023,16 +1008,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -1054,16 +1029,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -1100,16 +1065,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -1141,16 +1096,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -1216,16 +1161,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1266,16 +1201,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1320,16 +1245,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1391,16 +1306,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1444,16 +1349,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1541,16 +1436,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1575,16 +1460,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1609,16 +1484,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1653,16 +1518,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1687,16 +1542,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1721,16 +1566,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -2014,14 +1849,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json index 62fab4677c..341069d246 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json @@ -393,21 +393,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -789,16 +774,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -820,16 +795,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -866,16 +831,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -907,16 +862,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -982,16 +927,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1032,16 +967,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1086,16 +1011,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1157,16 +1072,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1210,16 +1115,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1307,16 +1202,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1341,16 +1226,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1375,16 +1250,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1419,16 +1284,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1453,16 +1308,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1487,16 +1332,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1780,14 +1615,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json index b9747e686f..f502f7620e 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json @@ -393,21 +393,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -789,16 +774,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -820,16 +795,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -866,16 +831,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -907,16 +862,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -982,16 +927,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1032,16 +967,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1086,16 +1011,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1157,16 +1072,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1210,16 +1115,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1307,16 +1202,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1341,16 +1226,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1375,16 +1250,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1419,16 +1284,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1453,16 +1308,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1487,16 +1332,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1780,14 +1615,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json index b00af0ef8a..a902b747e6 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json @@ -393,21 +393,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -789,16 +774,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -820,16 +795,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -866,16 +831,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -907,16 +862,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -982,16 +927,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1032,16 +967,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1086,16 +1011,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1157,16 +1072,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1210,16 +1115,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1307,16 +1202,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1341,16 +1226,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1375,16 +1250,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1419,16 +1284,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1453,16 +1308,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1487,16 +1332,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1780,14 +1615,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { 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 1b54a95a03..f314b0c0ef 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": [ { @@ -873,6 +883,21 @@ } ] }, + "ResponseItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ResponsesApiWebSearchAction": { "oneOf": [ { @@ -988,6 +1013,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/json/v2/ThreadResumeResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json index 47cb32232d..6a1ec1ccce 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json @@ -447,21 +447,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -1023,16 +1008,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -1054,16 +1029,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -1100,16 +1065,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -1141,16 +1096,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -1216,16 +1161,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1266,16 +1201,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1320,16 +1245,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1391,16 +1306,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1444,16 +1349,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1541,16 +1436,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1575,16 +1460,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1609,16 +1484,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1653,16 +1518,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1687,16 +1542,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1721,16 +1566,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -2014,14 +1849,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json index f6af6d0a06..2207ea5d0b 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json @@ -393,21 +393,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -789,16 +774,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -820,16 +795,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -866,16 +831,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -907,16 +862,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -982,16 +927,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1032,16 +967,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1086,16 +1011,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1157,16 +1072,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1210,16 +1115,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1307,16 +1202,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1341,16 +1226,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1375,16 +1250,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1419,16 +1284,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1453,16 +1308,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1487,16 +1332,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1780,14 +1615,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json index 8e2f0794c8..3382e76b1d 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json @@ -447,21 +447,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -1023,16 +1008,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -1054,16 +1029,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -1100,16 +1065,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -1141,16 +1096,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -1216,16 +1161,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1266,16 +1201,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1320,16 +1245,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1391,16 +1306,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1444,16 +1349,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1541,16 +1436,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1575,16 +1460,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1609,16 +1484,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1653,16 +1518,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1687,16 +1542,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1721,16 +1566,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -2014,14 +1849,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json index 23c68efaff..aa821520d8 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json @@ -393,21 +393,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -789,16 +774,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -820,16 +795,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -866,16 +831,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -907,16 +862,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -982,16 +927,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1032,16 +967,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1086,16 +1011,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1157,16 +1072,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1210,16 +1115,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1307,16 +1202,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1341,16 +1226,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1375,16 +1250,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1419,16 +1284,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1453,16 +1308,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1487,16 +1332,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1780,14 +1615,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json index e61a77748a..de94a4ced0 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json @@ -393,21 +393,6 @@ }, "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -789,16 +774,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -820,16 +795,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -866,16 +831,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -907,16 +862,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -982,16 +927,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1032,16 +967,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1086,16 +1011,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -1157,16 +1072,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1210,16 +1115,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1307,16 +1202,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1341,16 +1226,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1375,16 +1250,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1419,16 +1284,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1453,16 +1308,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1487,16 +1332,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1780,14 +1615,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json index 6e77709834..7f49860e87 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json @@ -370,21 +370,6 @@ ], "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -551,16 +536,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -582,16 +557,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -628,16 +593,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -669,16 +624,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -744,16 +689,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -794,16 +729,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -848,16 +773,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -919,16 +834,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -972,16 +877,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1069,16 +964,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1103,16 +988,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1137,16 +1012,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1181,16 +1046,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1215,16 +1070,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1249,16 +1094,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1467,14 +1302,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json b/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json index 9b92196a7c..5a51175028 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json @@ -370,21 +370,6 @@ ], "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -551,16 +536,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -582,16 +557,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -628,16 +593,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -669,16 +624,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -744,16 +689,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -794,16 +729,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -848,16 +773,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -919,16 +834,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -972,16 +877,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1069,16 +964,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1103,16 +988,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1137,16 +1012,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1181,16 +1046,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1215,16 +1070,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1249,16 +1094,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1467,14 +1302,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json index 27cc358ad8..3800ee102f 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json @@ -370,21 +370,6 @@ ], "type": "object" }, - "ItemMetadata": { - "properties": { - "user_message_type": { - "anyOf": [ - { - "$ref": "#/definitions/UserMessageType" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, "McpToolCallError": { "properties": { "message": { @@ -551,16 +536,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "userMessage" @@ -582,16 +557,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "phase": { "anyOf": [ { @@ -628,16 +593,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "text": { "type": "string" }, @@ -669,16 +624,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "summary": { "default": [], "items": { @@ -744,16 +689,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -794,16 +729,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -848,16 +773,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "anyOf": [ { @@ -919,16 +834,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -972,16 +877,6 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "model": { "description": "Model requested for the spawned agent, when applicable.", "type": [ @@ -1069,16 +964,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "query": { "type": "string" }, @@ -1103,16 +988,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "path": { "type": "string" }, @@ -1137,16 +1012,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "result": { "type": "string" }, @@ -1181,16 +1046,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1215,16 +1070,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "review": { "type": "string" }, @@ -1249,16 +1094,6 @@ "id": { "type": "string" }, - "metadata": { - "anyOf": [ - { - "$ref": "#/definitions/ItemMetadata" - }, - { - "type": "null" - } - ] - }, "type": { "enum": [ "contextCompaction" @@ -1467,14 +1302,6 @@ } ] }, - "UserMessageType": { - "enum": [ - "prompt", - "prompt_steering", - "prompt_queued" - ], - "type": "string" - }, "WebSearchAction": { "oneOf": [ { diff --git a/codex-rs/app-server-protocol/schema/typescript/AgentMessageItem.ts b/codex-rs/app-server-protocol/schema/typescript/AgentMessageItem.ts index 549a026fc5..ee67a3e23b 100644 --- a/codex-rs/app-server-protocol/schema/typescript/AgentMessageItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/AgentMessageItem.ts @@ -3,7 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AgentMessageContent } from "./AgentMessageContent"; import type { MessagePhase } from "./MessagePhase"; -import type { TurnItemMetadata } from "./TurnItemMetadata"; /** * Assistant-authored message payload used in turn-item streams. @@ -19,4 +18,4 @@ export type AgentMessageItem = { id: string, content: Array * This is currently used by TUI rendering to distinguish mid-turn * commentary from a final answer and avoid status-indicator jitter. */ -phase?: MessagePhase, metadata?: TurnItemMetadata, }; +phase?: MessagePhase, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ContextCompactionItem.ts b/codex-rs/app-server-protocol/schema/typescript/ContextCompactionItem.ts index ac8ab6effa..dc3ab6388e 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ContextCompactionItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ContextCompactionItem.ts @@ -1,6 +1,5 @@ // 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 { TurnItemMetadata } from "./TurnItemMetadata"; -export type ContextCompactionItem = { id: string, metadata?: TurnItemMetadata, }; +export type ContextCompactionItem = { id: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ImageGenerationItem.ts b/codex-rs/app-server-protocol/schema/typescript/ImageGenerationItem.ts index 179622b18b..0edb7c22e6 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ImageGenerationItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ImageGenerationItem.ts @@ -1,6 +1,5 @@ // 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 { TurnItemMetadata } from "./TurnItemMetadata"; -export type ImageGenerationItem = { id: string, status: string, revised_prompt?: string, result: string, saved_path?: string, metadata?: TurnItemMetadata, }; +export type ImageGenerationItem = { id: string, status: string, revised_prompt?: string, result: string, saved_path?: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/PlanItem.ts b/codex-rs/app-server-protocol/schema/typescript/PlanItem.ts index 1106bba11f..909ab40e64 100644 --- a/codex-rs/app-server-protocol/schema/typescript/PlanItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/PlanItem.ts @@ -1,6 +1,5 @@ // 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 { TurnItemMetadata } from "./TurnItemMetadata"; -export type PlanItem = { id: string, text: string, metadata?: TurnItemMetadata, }; +export type PlanItem = { id: string, text: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ReasoningItem.ts b/codex-rs/app-server-protocol/schema/typescript/ReasoningItem.ts index 5caf9178c2..80bcb65fd1 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ReasoningItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ReasoningItem.ts @@ -1,6 +1,5 @@ // 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 { TurnItemMetadata } from "./TurnItemMetadata"; -export type ReasoningItem = { id: string, summary_text: Array, raw_content: Array, metadata?: TurnItemMetadata, }; +export type ReasoningItem = { id: string, summary_text: Array, raw_content: Array, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts b/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts index 2464037a50..5ab15a069b 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/TurnItemMetadata.ts b/codex-rs/app-server-protocol/schema/typescript/ResponseItemMetadata.ts similarity index 73% rename from codex-rs/app-server-protocol/schema/typescript/TurnItemMetadata.ts rename to codex-rs/app-server-protocol/schema/typescript/ResponseItemMetadata.ts index 2444745fff..e7ce27e9af 100644 --- a/codex-rs/app-server-protocol/schema/typescript/TurnItemMetadata.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ResponseItemMetadata.ts @@ -3,4 +3,4 @@ // 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 TurnItemMetadata = { user_message_type?: UserMessageType, }; +export type ResponseItemMetadata = { user_message_type?: UserMessageType, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts b/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts index 93c953f1fc..df856287a5 100644 --- a/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts @@ -1,7 +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 { TurnItemMetadata } from "./TurnItemMetadata"; import type { UserInput } from "./UserInput"; -export type UserMessageItem = { id: string, content: Array, metadata?: TurnItemMetadata, }; +export type UserMessageItem = { id: string, content: Array, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/WebSearchItem.ts b/codex-rs/app-server-protocol/schema/typescript/WebSearchItem.ts index ad27970fac..46b1406519 100644 --- a/codex-rs/app-server-protocol/schema/typescript/WebSearchItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/WebSearchItem.ts @@ -1,7 +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 { TurnItemMetadata } from "./TurnItemMetadata"; import type { WebSearchAction } from "./WebSearchAction"; -export type WebSearchItem = { id: string, query: string, action: WebSearchAction, metadata?: TurnItemMetadata, }; +export type WebSearchItem = { id: string, query: string, action: WebSearchAction, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/index.ts b/codex-rs/app-server-protocol/schema/typescript/index.ts index 980f965f79..04a17c434d 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"; @@ -213,7 +214,6 @@ export type { TurnAbortedEvent } from "./TurnAbortedEvent"; export type { TurnCompleteEvent } from "./TurnCompleteEvent"; export type { TurnDiffEvent } from "./TurnDiffEvent"; export type { TurnItem } from "./TurnItem"; -export type { TurnItemMetadata } from "./TurnItemMetadata"; export type { TurnStartedEvent } from "./TurnStartedEvent"; export type { UndoCompletedEvent } from "./UndoCompletedEvent"; export type { UndoStartedEvent } from "./UndoStartedEvent"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ItemMetadata.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ItemMetadata.ts deleted file mode 100644 index 3e28bc2ca0..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ItemMetadata.ts +++ /dev/null @@ -1,6 +0,0 @@ -// 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 ItemMetadata = { user_message_type?: UserMessageType, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts index 1e0d2aedea..bcc81c0251 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts @@ -12,7 +12,6 @@ import type { CommandExecutionStatus } from "./CommandExecutionStatus"; import type { DynamicToolCallOutputContentItem } from "./DynamicToolCallOutputContentItem"; import type { DynamicToolCallStatus } from "./DynamicToolCallStatus"; import type { FileUpdateChange } from "./FileUpdateChange"; -import type { ItemMetadata } from "./ItemMetadata"; import type { McpToolCallError } from "./McpToolCallError"; import type { McpToolCallResult } from "./McpToolCallResult"; import type { McpToolCallStatus } from "./McpToolCallStatus"; @@ -20,7 +19,7 @@ import type { PatchApplyStatus } from "./PatchApplyStatus"; import type { UserInput } from "./UserInput"; import type { WebSearchAction } from "./WebSearchAction"; -export type ThreadItem = { "type": "userMessage", id: string, content: Array, metadata?: ItemMetadata, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, metadata?: ItemMetadata, } | { "type": "plan", id: string, text: string, metadata?: ItemMetadata, } | { "type": "reasoning", id: string, summary: Array, content: Array, metadata?: ItemMetadata, } | { "type": "commandExecution", id: string, +export type ThreadItem = { "type": "userMessage", id: string, content: Array, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array, content: Array, } | { "type": "commandExecution", id: string, /** * The command to be executed. */ @@ -50,15 +49,15 @@ exitCode: number | null, /** * The duration of the command execution in milliseconds. */ -durationMs: number | null, metadata?: ItemMetadata, } | { "type": "fileChange", id: string, changes: Array, status: PatchApplyStatus, metadata?: ItemMetadata, } | { "type": "mcpToolCall", id: string, server: string, tool: string, status: McpToolCallStatus, arguments: JsonValue, result: McpToolCallResult | null, error: McpToolCallError | null, +durationMs: number | null, } | { "type": "fileChange", id: string, changes: Array, status: PatchApplyStatus, } | { "type": "mcpToolCall", id: string, server: string, tool: string, status: McpToolCallStatus, arguments: JsonValue, result: McpToolCallResult | null, error: McpToolCallError | null, /** * The duration of the MCP tool call in milliseconds. */ -durationMs: number | null, metadata?: ItemMetadata, } | { "type": "dynamicToolCall", id: string, tool: string, arguments: JsonValue, status: DynamicToolCallStatus, contentItems: Array | null, success: boolean | null, +durationMs: number | null, } | { "type": "dynamicToolCall", id: string, tool: string, arguments: JsonValue, status: DynamicToolCallStatus, contentItems: Array | null, success: boolean | null, /** * The duration of the dynamic tool call in milliseconds. */ -durationMs: number | null, metadata?: ItemMetadata, } | { "type": "collabAgentToolCall", +durationMs: number | null, } | { "type": "collabAgentToolCall", /** * Unique identifier for this collab tool call. */ @@ -95,4 +94,4 @@ reasoningEffort: ReasoningEffort | null, /** * Last known status of the target agents, when available. */ -agentsStates: { [key in string]?: CollabAgentState }, metadata?: ItemMetadata, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, metadata?: ItemMetadata, } | { "type": "imageView", id: string, path: string, metadata?: ItemMetadata, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, metadata?: ItemMetadata, } | { "type": "enteredReviewMode", id: string, review: string, metadata?: ItemMetadata, } | { "type": "exitedReviewMode", id: string, review: string, metadata?: ItemMetadata, } | { "type": "contextCompaction", id: string, metadata?: ItemMetadata, }; +agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } | { "type": "imageView", id: string, path: string, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/UserMessageType.ts b/codex-rs/app-server-protocol/schema/typescript/v2/UserMessageType.ts deleted file mode 100644 index 154c4894bd..0000000000 --- a/codex-rs/app-server-protocol/schema/typescript/v2/UserMessageType.ts +++ /dev/null @@ -1,5 +0,0 @@ -// 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. - -export type UserMessageType = "prompt" | "prompt_steering" | "prompt_queued"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts index 7bf790390e..b57daaac3a 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -113,7 +113,6 @@ export type { HookRunSummary } from "./HookRunSummary"; export type { HookScope } from "./HookScope"; export type { HookStartedNotification } from "./HookStartedNotification"; export type { ItemCompletedNotification } from "./ItemCompletedNotification"; -export type { ItemMetadata } from "./ItemMetadata"; export type { ItemStartedNotification } from "./ItemStartedNotification"; export type { ListMcpServerStatusParams } from "./ListMcpServerStatusParams"; export type { ListMcpServerStatusResponse } from "./ListMcpServerStatusResponse"; @@ -301,7 +300,6 @@ export type { TurnStatus } from "./TurnStatus"; export type { TurnSteerParams } from "./TurnSteerParams"; export type { TurnSteerResponse } from "./TurnSteerResponse"; export type { UserInput } from "./UserInput"; -export type { UserMessageType } from "./UserMessageType"; export type { WebSearchAction } from "./WebSearchAction"; export type { WindowsSandboxSetupCompletedNotification } from "./WindowsSandboxSetupCompletedNotification"; export type { WindowsSandboxSetupMode } from "./WindowsSandboxSetupMode"; diff --git a/codex-rs/app-server-protocol/src/protocol/thread_history.rs b/codex-rs/app-server-protocol/src/protocol/thread_history.rs index 29d3041512..65f2d99ff5 100644 --- a/codex-rs/app-server-protocol/src/protocol/thread_history.rs +++ b/codex-rs/app-server-protocol/src/protocol/thread_history.rs @@ -2413,7 +2413,6 @@ mod tests { )] .into_iter() .collect(), - metadata: None, } ); } diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs index aaf0484a58..e5daf85684 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -3087,8 +3087,8 @@ pub struct PluginSummary { pub source: PluginSource, pub installed: bool, pub enabled: bool, - pub install_policy: Option, - pub auth_policy: Option, + pub install_policy: PluginInstallPolicy, + pub auth_policy: PluginAuthPolicy, pub interface: Option, } @@ -3149,7 +3149,7 @@ pub struct PluginInstallParams { #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] pub struct PluginInstallResponse { - pub auth_policy: Option, + pub auth_policy: PluginAuthPolicy, pub apps_needing_auth: Vec, } @@ -3946,6 +3946,10 @@ pub enum ThreadItem { receiver_thread_ids: Vec, /// Prompt text sent as part of the collab tool call, when available. prompt: Option, + /// Model requested for the spawned agent, when applicable. + model: Option, + /// Reasoning effort requested for the spawned agent, when applicable. + reasoning_effort: Option, /// Last known status of the target agents, when available. agents_states: HashMap, }, diff --git a/codex-rs/app-server/tests/suite/v2/compaction.rs b/codex-rs/app-server/tests/suite/v2/compaction.rs index 5b5faa02d6..6ebd661466 100644 --- a/codex-rs/app-server/tests/suite/v2/compaction.rs +++ b/codex-rs/app-server/tests/suite/v2/compaction.rs @@ -129,6 +129,7 @@ async fn auto_compaction_remote_emits_started_and_completed_items() -> Result<() content: vec![ContentItem::OutputText { text: "REMOTE_COMPACT_SUMMARY".to_string(), }], + metadata: None, end_turn: None, phase: None, }, diff --git a/codex-rs/app-server/tests/suite/v2/thread_resume.rs b/codex-rs/app-server/tests/suite/v2/thread_resume.rs index 12a74ed6e6..397a21da98 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_resume.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_resume.rs @@ -757,6 +757,7 @@ async fn thread_resume_rejects_history_when_thread_is_running() -> Result<()> { content: vec![ContentItem::InputText { text: "history override".to_string(), }], + metadata: None, end_turn: None, phase: None, }]), @@ -1493,6 +1494,7 @@ async fn thread_resume_supports_history_and_overrides() -> Result<()> { content: vec![ContentItem::InputText { text: history_text.to_string(), }], + metadata: None, end_turn: None, phase: None, }]; diff --git a/codex-rs/app-server/tests/suite/v2/turn_start.rs b/codex-rs/app-server/tests/suite/v2/turn_start.rs index 7cee3fd09d..1b2493b993 100644 --- a/codex-rs/app-server/tests/suite/v2/turn_start.rs +++ b/codex-rs/app-server/tests/suite/v2/turn_start.rs @@ -1780,7 +1780,6 @@ async fn turn_start_emits_spawn_agent_item_with_model_metadata_v2() -> Result<() model: Some(REQUESTED_MODEL.to_string()), reasoning_effort: Some(REQUESTED_REASONING_EFFORT), agents_states: HashMap::new(), - metadata: None, } ); @@ -1809,7 +1808,6 @@ async fn turn_start_emits_spawn_agent_item_with_model_metadata_v2() -> Result<() model, reasoning_effort, agents_states, - metadata: _, } = spawn_completed else { unreachable!("loop ensures we break on collab agent tool call items"); diff --git a/codex-rs/core/src/arc_monitor_tests.rs b/codex-rs/core/src/arc_monitor_tests.rs index 0b5cdf3029..cd0cb80b14 100644 --- a/codex-rs/core/src/arc_monitor_tests.rs +++ b/codex-rs/core/src/arc_monitor_tests.rs @@ -63,6 +63,7 @@ async fn build_arc_monitor_request_includes_relevant_history_and_null_policies() content: vec![ContentItem::InputText { text: "first request".to_string(), }], + metadata: None, end_turn: None, phase: None, }], @@ -87,6 +88,7 @@ async fn build_arc_monitor_request_includes_relevant_history_and_null_policies() content: vec![ContentItem::OutputText { text: "commentary".to_string(), }], + metadata: None, end_turn: None, phase: Some(MessagePhase::Commentary), }], @@ -101,6 +103,7 @@ async fn build_arc_monitor_request_includes_relevant_history_and_null_policies() content: vec![ContentItem::OutputText { text: "final response".to_string(), }], + metadata: None, end_turn: None, phase: Some(MessagePhase::FinalAnswer), }], @@ -115,6 +118,7 @@ async fn build_arc_monitor_request_includes_relevant_history_and_null_policies() content: vec![ContentItem::InputText { text: "latest request".to_string(), }], + metadata: None, end_turn: None, phase: None, }], @@ -269,6 +273,7 @@ async fn monitor_action_posts_expected_arc_request() { content: vec![ContentItem::InputText { text: "please run the tool".to_string(), }], + metadata: None, end_turn: None, phase: None, }], @@ -348,6 +353,7 @@ async fn monitor_action_uses_env_url_and_token_overrides() { content: vec![ContentItem::InputText { text: "please run the tool".to_string(), }], + metadata: None, end_turn: None, phase: None, }], @@ -417,6 +423,7 @@ async fn monitor_action_rejects_legacy_response_fields() { content: vec![ContentItem::InputText { text: "please run the tool".to_string(), }], + metadata: None, end_turn: None, phase: None, }], diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index 4a614ad5f6..7509510737 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -2670,6 +2670,7 @@ impl Session { .inject_response_items(vec![ResponseInputItem::Message { role: "developer".to_string(), content: vec![ContentItem::InputText { text }], + metadata: None, }]) .await .is_err() @@ -2767,6 +2768,7 @@ impl Session { .inject_response_items(vec![ResponseInputItem::Message { role: "developer".to_string(), content: vec![ContentItem::InputText { text }], + metadata: None, }]) .await .is_err() @@ -3241,6 +3243,7 @@ impl Session { content: vec![ContentItem::InputText { text: format!("Warning: {}", message.into()), }], + metadata: None, end_turn: None, phase: None, }; diff --git a/codex-rs/core/src/codex/rollout_reconstruction_tests.rs b/codex-rs/core/src/codex/rollout_reconstruction_tests.rs index 6cc99a2907..2736905390 100644 --- a/codex-rs/core/src/codex/rollout_reconstruction_tests.rs +++ b/codex-rs/core/src/codex/rollout_reconstruction_tests.rs @@ -16,6 +16,7 @@ fn user_message(text: &str) -> ResponseItem { content: vec![ContentItem::InputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -28,6 +29,7 @@ fn assistant_message(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } diff --git a/codex-rs/core/src/codex_tests.rs b/codex-rs/core/src/codex_tests.rs index 7e838642af..bde19cb334 100644 --- a/codex-rs/core/src/codex_tests.rs +++ b/codex-rs/core/src/codex_tests.rs @@ -107,6 +107,7 @@ fn user_message(text: &str) -> ResponseItem { content: vec![ContentItem::InputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -119,6 +120,7 @@ fn assistant_message(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -131,6 +133,7 @@ fn skill_message(text: &str) -> ResponseItem { content: vec![ContentItem::InputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -682,6 +685,7 @@ async fn reconstruct_history_uses_replacement_history_verbatim() { content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -693,6 +697,7 @@ async fn reconstruct_history_uses_replacement_history_verbatim() { content: vec![ContentItem::InputText { text: "stale developer instructions".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -3338,6 +3343,7 @@ async fn record_context_updates_and_set_reference_context_item_reinjects_full_co content: vec![ContentItem::InputText { text: format!("{}\nsummary", crate::compact::SUMMARY_PREFIX), }], + metadata: None, end_turn: None, phase: None, }; @@ -3701,6 +3707,7 @@ async fn task_finish_emits_turn_item_lifecycle_for_leftover_pending_user_input() content: vec![ContentItem::InputText { text: "late pending input".to_string(), }], + metadata: None, }]) .await .expect("inject pending input into active turn"); @@ -3714,6 +3721,7 @@ async fn task_finish_emits_turn_item_lifecycle_for_leftover_pending_user_input() content: vec![ContentItem::InputText { text: "late pending input".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -4056,6 +4064,7 @@ async fn sample_rollout( content: vec![ContentItem::InputText { text: "first user".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -4071,6 +4080,7 @@ async fn sample_rollout( content: vec![ContentItem::OutputText { text: "assistant reply one".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -4098,6 +4108,7 @@ async fn sample_rollout( content: vec![ContentItem::InputText { text: "second user".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -4113,6 +4124,7 @@ async fn sample_rollout( content: vec![ContentItem::OutputText { text: "assistant reply two".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -4140,6 +4152,7 @@ async fn sample_rollout( content: vec![ContentItem::InputText { text: "third user".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -4155,6 +4168,7 @@ async fn sample_rollout( content: vec![ContentItem::OutputText { text: "assistant reply three".to_string(), }], + metadata: None, end_turn: None, phase: None, }; diff --git a/codex-rs/core/src/codex_thread.rs b/codex-rs/core/src/codex_thread.rs index 7a243f9f74..fae60b6293 100644 --- a/codex-rs/core/src/codex_thread.rs +++ b/codex-rs/core/src/codex_thread.rs @@ -123,6 +123,7 @@ impl CodexThread { let pending_item = ResponseInputItem::Message { role: "user".to_string(), content: vec![ContentItem::InputText { text: message }], + metadata: None, }; let pending_items = vec![pending_item]; let Err(items_without_active_turn) = self diff --git a/codex-rs/core/src/compact.rs b/codex-rs/core/src/compact.rs index 4900051938..282558390e 100644 --- a/codex-rs/core/src/compact.rs +++ b/codex-rs/core/src/compact.rs @@ -367,6 +367,7 @@ fn build_compacted_history_with_limit( content: vec![ContentItem::InputText { text: message.clone(), }], + metadata: None, end_turn: None, phase: None, }); @@ -382,6 +383,7 @@ fn build_compacted_history_with_limit( id: None, role: "user".to_string(), content: vec![ContentItem::InputText { text: summary_text }], + metadata: None, end_turn: None, phase: None, }); diff --git a/codex-rs/core/src/compact_tests.rs b/codex-rs/core/src/compact_tests.rs index 92e889d647..762fa60020 100644 --- a/codex-rs/core/src/compact_tests.rs +++ b/codex-rs/core/src/compact_tests.rs @@ -59,6 +59,7 @@ fn collect_user_messages_extracts_user_text_only() { content: vec![ContentItem::OutputText { text: "ignored".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -68,6 +69,7 @@ fn collect_user_messages_extracts_user_text_only() { content: vec![ContentItem::InputText { text: "first".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -93,6 +95,7 @@ do things "# .to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -102,6 +105,7 @@ do things content: vec![ContentItem::InputText { text: "cwd=/tmp".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -111,6 +115,7 @@ do things content: vec![ContentItem::InputText { text: "real user message".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -194,6 +199,7 @@ async fn process_compacted_history_replaces_developer_messages() { content: vec![ContentItem::InputText { text: "stale permissions".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -203,6 +209,7 @@ async fn process_compacted_history_replaces_developer_messages() { content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -212,6 +219,7 @@ async fn process_compacted_history_replaces_developer_messages() { content: vec![ContentItem::InputText { text: "stale personality".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -224,6 +232,7 @@ async fn process_compacted_history_replaces_developer_messages() { content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }); @@ -238,6 +247,7 @@ async fn process_compacted_history_reinjects_full_initial_context() { content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }]; @@ -249,6 +259,7 @@ async fn process_compacted_history_reinjects_full_initial_context() { content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }); @@ -269,6 +280,7 @@ keep me updated "# .to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -282,6 +294,7 @@ keep me updated "# .to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -295,6 +308,7 @@ keep me updated "# .to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -304,6 +318,7 @@ keep me updated content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -313,6 +328,7 @@ keep me updated content: vec![ContentItem::InputText { text: "stale developer instructions".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -325,6 +341,7 @@ keep me updated content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }); @@ -340,6 +357,7 @@ async fn process_compacted_history_inserts_context_before_last_real_user_message content: vec![ContentItem::InputText { text: "older user".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -349,6 +367,7 @@ async fn process_compacted_history_inserts_context_before_last_real_user_message content: vec![ContentItem::InputText { text: format!("{SUMMARY_PREFIX}\nsummary text"), }], + metadata: None, end_turn: None, phase: None, }, @@ -358,6 +377,7 @@ async fn process_compacted_history_inserts_context_before_last_real_user_message content: vec![ContentItem::InputText { text: "latest user".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -372,6 +392,7 @@ async fn process_compacted_history_inserts_context_before_last_real_user_message content: vec![ContentItem::InputText { text: "older user".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -381,6 +402,7 @@ async fn process_compacted_history_inserts_context_before_last_real_user_message content: vec![ContentItem::InputText { text: format!("{SUMMARY_PREFIX}\nsummary text"), }], + metadata: None, end_turn: None, phase: None, }, @@ -392,6 +414,7 @@ async fn process_compacted_history_inserts_context_before_last_real_user_message content: vec![ContentItem::InputText { text: "latest user".to_string(), }], + metadata: None, end_turn: None, phase: None, }); @@ -406,6 +429,7 @@ async fn process_compacted_history_reinjects_model_switch_message() { content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }]; @@ -436,6 +460,7 @@ async fn process_compacted_history_reinjects_model_switch_message() { content: vec![ContentItem::InputText { text: "summary".to_string(), }], + metadata: None, end_turn: None, phase: None, }); @@ -451,6 +476,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_summary_last() content: vec![ContentItem::InputText { text: "older user".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -460,6 +486,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_summary_last() content: vec![ContentItem::InputText { text: "latest user".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -469,6 +496,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_summary_last() content: vec![ContentItem::InputText { text: format!("{SUMMARY_PREFIX}\nsummary text"), }], + metadata: None, end_turn: None, phase: None, }, @@ -479,6 +507,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_summary_last() content: vec![ContentItem::InputText { text: "fresh permissions".to_string(), }], + metadata: None, end_turn: None, phase: None, }]; @@ -492,6 +521,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_summary_last() content: vec![ContentItem::InputText { text: "older user".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -501,6 +531,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_summary_last() content: vec![ContentItem::InputText { text: "fresh permissions".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -510,6 +541,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_summary_last() content: vec![ContentItem::InputText { text: "latest user".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -519,6 +551,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_summary_last() content: vec![ContentItem::InputText { text: format!("{SUMMARY_PREFIX}\nsummary text"), }], + metadata: None, end_turn: None, phase: None, }, @@ -537,6 +570,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_compaction_last content: vec![ContentItem::InputText { text: "fresh permissions".to_string(), }], + metadata: None, end_turn: None, phase: None, }]; @@ -550,6 +584,7 @@ fn insert_initial_context_before_last_real_user_or_summary_keeps_compaction_last content: vec![ContentItem::InputText { text: "fresh permissions".to_string(), }], + metadata: None, end_turn: None, phase: None, }, diff --git a/codex-rs/core/src/context_manager/history_tests.rs b/codex-rs/core/src/context_manager/history_tests.rs index 29400ba31a..ea37b39477 100644 --- a/codex-rs/core/src/context_manager/history_tests.rs +++ b/codex-rs/core/src/context_manager/history_tests.rs @@ -33,6 +33,7 @@ fn assistant_msg(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -53,6 +54,7 @@ fn user_msg(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -65,6 +67,7 @@ fn user_input_text_msg(text: &str) -> ResponseItem { content: vec![ContentItem::InputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -120,6 +123,7 @@ fn filters_non_api_messages() { content: vec![ContentItem::OutputText { text: "ignored".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -151,6 +155,7 @@ fn filters_non_api_messages() { content: vec![ContentItem::OutputText { text: "hi".to_string() }], + metadata: None, end_turn: None, phase: None, }, @@ -160,6 +165,7 @@ fn filters_non_api_messages() { content: vec![ContentItem::OutputText { text: "hello".to_string() }], + metadata: None, end_turn: None, phase: None, } @@ -265,6 +271,7 @@ fn for_prompt_strips_images_when_model_does_not_support_images() { text: "caption".to_string(), }, ], + metadata: None, end_turn: None, phase: None, }, @@ -327,6 +334,7 @@ fn for_prompt_strips_images_when_model_does_not_support_images() { text: "caption".to_string(), }, ], + metadata: None, end_turn: None, phase: None, }, @@ -384,6 +392,7 @@ fn for_prompt_strips_images_when_model_does_not_support_images() { image_url: "https://example.com/img.png".to_string(), }, ], + metadata: None, end_turn: None, phase: None, }]); @@ -412,6 +421,7 @@ fn for_prompt_rewrites_image_generation_calls_when_images_are_supported() { content: vec![ContentItem::InputText { text: "hi".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -437,6 +447,7 @@ fn for_prompt_rewrites_image_generation_calls_when_images_are_supported() { image_url: "data:image/png;base64,Zm9v".to_string(), }, ], + metadata: None, end_turn: None, phase: None, }, @@ -446,6 +457,7 @@ fn for_prompt_rewrites_image_generation_calls_when_images_are_supported() { content: vec![ContentItem::InputText { text: "hi".to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -462,6 +474,7 @@ fn for_prompt_rewrites_image_generation_calls_when_images_are_unsupported() { content: vec![ContentItem::InputText { text: "generate a lobster".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -482,6 +495,7 @@ fn for_prompt_rewrites_image_generation_calls_when_images_are_unsupported() { content: vec![ContentItem::InputText { text: "generate a lobster".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -503,6 +517,7 @@ fn for_prompt_rewrites_image_generation_calls_when_images_are_unsupported() { .to_string(), }, ], + metadata: None, end_turn: None, phase: None, }, @@ -653,6 +668,7 @@ fn replace_last_turn_images_does_not_touch_user_images() { content: vec![ContentItem::InputImage { image_url: "data:image/png;base64,AAA".to_string(), }], + metadata: None, end_turn: None, phase: None, }]; @@ -1507,6 +1523,7 @@ fn image_data_url_payload_does_not_dominate_message_estimate() { }, ContentItem::InputImage { image_url }, ], + metadata: None, end_turn: None, phase: None, }; @@ -1516,6 +1533,7 @@ fn image_data_url_payload_does_not_dominate_message_estimate() { content: vec![ContentItem::InputText { text: "Here is the screenshot".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -1588,6 +1606,7 @@ fn non_base64_image_urls_are_unchanged() { content: vec![ContentItem::InputImage { image_url: "https://example.com/foo.png".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -1619,6 +1638,7 @@ fn data_url_without_base64_marker_is_unchanged() { content: vec![ContentItem::InputImage { image_url: "data:image/svg+xml,".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -1657,6 +1677,7 @@ fn mixed_case_data_url_markers_are_adjusted() { id: None, role: "user".to_string(), content: vec![ContentItem::InputImage { image_url }], + metadata: None, end_turn: None, phase: None, }; @@ -1688,6 +1709,7 @@ fn multiple_inline_images_apply_multiple_fixed_costs() { image_url: image_url_two, }, ], + metadata: None, end_turn: None, phase: None, }; @@ -1771,6 +1793,7 @@ fn text_only_items_unchanged() { content: vec![ContentItem::OutputText { text: "Hello world, this is a response.".to_string(), }], + metadata: None, end_turn: None, phase: None, }; diff --git a/codex-rs/core/src/context_manager/normalize.rs b/codex-rs/core/src/context_manager/normalize.rs index 3f13c5d9e5..0d17022fc1 100644 --- a/codex-rs/core/src/context_manager/normalize.rs +++ b/codex-rs/core/src/context_manager/normalize.rs @@ -322,6 +322,7 @@ pub(crate) fn rewrite_image_generation_calls_for_stateless_input(items: &mut Vec }, ContentItem::InputImage { image_url }, ], + metadata: None, end_turn: None, phase: None, } diff --git a/codex-rs/core/src/context_manager/updates.rs b/codex-rs/core/src/context_manager/updates.rs index 0d26c551ea..ba2a8c7bcc 100644 --- a/codex-rs/core/src/context_manager/updates.rs +++ b/codex-rs/core/src/context_manager/updates.rs @@ -178,6 +178,7 @@ fn build_text_message(role: &str, text_sections: Vec) -> Option\ntest_text\n".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -153,6 +157,7 @@ fn skips_user_instructions_and_env() { content: vec![ContentItem::InputText { text: "test_text".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -162,6 +167,7 @@ fn skips_user_instructions_and_env() { content: vec![ContentItem::InputText { text: "# AGENTS.md instructions for test_directory\n\n\ntest_text\n".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -172,6 +178,7 @@ fn skips_user_instructions_and_env() { text: "\ndemo\nskills/demo/SKILL.md\nbody\n" .to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -181,6 +188,7 @@ fn skips_user_instructions_and_env() { content: vec![ContentItem::InputText { text: "echo 42".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -197,6 +205,7 @@ fn skips_user_instructions_and_env() { .to_string(), }, ], + metadata: None, end_turn: None, phase: None, }, @@ -216,6 +225,7 @@ fn parses_agent_message() { content: vec![ContentItem::OutputText { text: "Hello from Codex".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -320,7 +330,6 @@ fn parses_web_search_call() { query: Some("weather".to_string()), queries: None, }, - metadata: None, } ), other => panic!("expected TurnItem::WebSearch, got {other:?}"), @@ -348,7 +357,6 @@ fn parses_web_search_open_page_call() { action: WebSearchAction::OpenPage { url: Some("https://example.com".to_string()), }, - metadata: None, } ), other => panic!("expected TurnItem::WebSearch, got {other:?}"), @@ -378,7 +386,6 @@ fn parses_web_search_find_in_page_call() { url: Some("https://example.com".to_string()), pattern: Some("needle".to_string()), }, - metadata: None, } ), other => panic!("expected TurnItem::WebSearch, got {other:?}"), @@ -401,7 +408,6 @@ fn parses_partial_web_search_call_without_action_as_other() { id: "ws_partial".to_string(), query: String::new(), action: WebSearchAction::Other, - metadata: None, } ), other => panic!("expected TurnItem::WebSearch, got {other:?}"), diff --git a/codex-rs/core/src/guardian_tests.rs b/codex-rs/core/src/guardian_tests.rs index ffe60ebe91..a387770b71 100644 --- a/codex-rs/core/src/guardian_tests.rs +++ b/codex-rs/core/src/guardian_tests.rs @@ -64,6 +64,7 @@ fn collect_guardian_transcript_entries_skips_contextual_user_messages() { content: vec![ContentItem::InputText { text: "\n/tmp\n".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -73,6 +74,7 @@ fn collect_guardian_transcript_entries_skips_contextual_user_messages() { content: vec![ContentItem::OutputText { text: "hello".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -99,6 +101,7 @@ fn collect_guardian_transcript_entries_includes_recent_tool_calls_and_output() { content: vec![ContentItem::InputText { text: "check the repo".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -121,6 +124,7 @@ fn collect_guardian_transcript_entries_includes_recent_tool_calls_and_output() { content: vec![ContentItem::OutputText { text: "I need to push a fix".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -314,6 +318,7 @@ async fn guardian_review_request_layout_matches_model_visible_request_snapshot() text: "Please check the repo visibility and push the docs fix if needed." .to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -337,6 +342,7 @@ async fn guardian_review_request_layout_matches_model_visible_request_snapshot() text: "The repo is public; I now need approval to push the docs fix." .to_string(), }], + metadata: None, end_turn: None, phase: None, }, diff --git a/codex-rs/core/src/memories/phase1.rs b/codex-rs/core/src/memories/phase1.rs index c7e88f07ef..f6cd3039fd 100644 --- a/codex-rs/core/src/memories/phase1.rs +++ b/codex-rs/core/src/memories/phase1.rs @@ -330,6 +330,7 @@ mod job { &rollout_contents, )?, }], + metadata: None, end_turn: None, phase: None, }], diff --git a/codex-rs/core/src/rollout/tests.rs b/codex-rs/core/src/rollout/tests.rs index 12af36b783..9c8bfacfc6 100644 --- a/codex-rs/core/src/rollout/tests.rs +++ b/codex-rs/core/src/rollout/tests.rs @@ -1134,6 +1134,7 @@ async fn test_updated_at_uses_file_mtime() -> Result<()> { content: vec![ContentItem::OutputText { text: format!("reply-{idx}"), }], + metadata: None, end_turn: None, phase: None, }), diff --git a/codex-rs/core/src/rollout/truncation_tests.rs b/codex-rs/core/src/rollout/truncation_tests.rs index f7dd206264..2550fd50c4 100644 --- a/codex-rs/core/src/rollout/truncation_tests.rs +++ b/codex-rs/core/src/rollout/truncation_tests.rs @@ -13,6 +13,7 @@ fn user_msg(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -25,6 +26,7 @@ fn assistant_msg(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } diff --git a/codex-rs/core/src/stream_events_utils_tests.rs b/codex-rs/core/src/stream_events_utils_tests.rs index b7f81be735..c7c919d1d9 100644 --- a/codex-rs/core/src/stream_events_utils_tests.rs +++ b/codex-rs/core/src/stream_events_utils_tests.rs @@ -16,6 +16,7 @@ fn assistant_output_text(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: Some(true), phase: None, } diff --git a/codex-rs/core/src/tasks/mod.rs b/codex-rs/core/src/tasks/mod.rs index 652f13525d..261ce8806a 100644 --- a/codex-rs/core/src/tasks/mod.rs +++ b/codex-rs/core/src/tasks/mod.rs @@ -433,6 +433,7 @@ impl Session { "{TURN_ABORTED_OPEN_TAG}\n{TURN_ABORTED_INTERRUPTED_GUIDANCE}\n" ), }], + metadata: None, end_turn: None, phase: None, }; diff --git a/codex-rs/core/src/tasks/review.rs b/codex-rs/core/src/tasks/review.rs index 0a72355b5b..217f5e50ea 100644 --- a/codex-rs/core/src/tasks/review.rs +++ b/codex-rs/core/src/tasks/review.rs @@ -239,6 +239,7 @@ pub(crate) async fn exit_review_mode( id: Some(REVIEW_USER_MESSAGE_ID.to_string()), role: "user".to_string(), content: vec![ContentItem::InputText { text: user_message }], + metadata: None, end_turn: None, phase: None, }], @@ -260,6 +261,7 @@ pub(crate) async fn exit_review_mode( content: vec![ContentItem::OutputText { text: assistant_message, }], + metadata: None, end_turn: None, phase: None, }, diff --git a/codex-rs/core/src/tasks/user_shell.rs b/codex-rs/core/src/tasks/user_shell.rs index 9357f154fc..91f11afdc6 100644 --- a/codex-rs/core/src/tasks/user_shell.rs +++ b/codex-rs/core/src/tasks/user_shell.rs @@ -326,7 +326,16 @@ async fn persist_user_shell_output( } let response_input_item = match output_item { - ResponseItem::Message { role, content, .. } => ResponseInputItem::Message { role, content }, + ResponseItem::Message { + role, + content, + metadata, + .. + } => ResponseInputItem::Message { + role, + content, + metadata, + }, _ => unreachable!("user shell command output record should always be a message"), }; diff --git a/codex-rs/core/src/thread_manager_tests.rs b/codex-rs/core/src/thread_manager_tests.rs index 0172f46a21..de11913d7c 100644 --- a/codex-rs/core/src/thread_manager_tests.rs +++ b/codex-rs/core/src/thread_manager_tests.rs @@ -16,6 +16,7 @@ fn user_msg(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } @@ -27,6 +28,7 @@ fn assistant_msg(text: &str) -> ResponseItem { content: vec![ContentItem::OutputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } diff --git a/codex-rs/core/src/tools/handlers/multi_agents_tests.rs b/codex-rs/core/src/tools/handlers/multi_agents_tests.rs index 1aee1fbf1c..844c0125d2 100644 --- a/codex-rs/core/src/tools/handlers/multi_agents_tests.rs +++ b/codex-rs/core/src/tools/handlers/multi_agents_tests.rs @@ -638,6 +638,7 @@ async fn resume_agent_restores_closed_agent_and_accepts_send_input() { content: vec![ContentItem::InputText { text: "materialized".to_string(), }], + metadata: None, end_turn: None, phase: None, })]), diff --git a/codex-rs/core/src/turn_timing_tests.rs b/codex-rs/core/src/turn_timing_tests.rs index 8a7fdf2e5f..513a85bd50 100644 --- a/codex-rs/core/src/turn_timing_tests.rs +++ b/codex-rs/core/src/turn_timing_tests.rs @@ -58,7 +58,6 @@ async fn turn_timing_state_records_ttfm_independently_of_ttft() { id: "msg-1".to_string(), content: Vec::new(), phase: None, - metadata: None, })) .await .is_some() @@ -69,7 +68,6 @@ async fn turn_timing_state_records_ttfm_independently_of_ttft() { id: "msg-2".to_string(), content: Vec::new(), phase: None, - metadata: None, })) .await, None @@ -102,6 +100,7 @@ fn response_item_records_turn_ttft_for_first_output_signals() { content: vec![ContentItem::OutputText { text: "hello".to_string(), }], + metadata: None, end_turn: None, phase: None, })); @@ -115,6 +114,7 @@ fn response_item_records_turn_ttft_ignores_empty_non_output_items() { content: vec![ContentItem::OutputText { text: String::new(), }], + metadata: None, end_turn: None, phase: None, })); diff --git a/codex-rs/core/tests/common/responses.rs b/codex-rs/core/tests/common/responses.rs index 0971c0284c..2baef5979a 100644 --- a/codex-rs/core/tests/common/responses.rs +++ b/codex-rs/core/tests/common/responses.rs @@ -637,6 +637,7 @@ pub fn user_message_item(text: &str) -> ResponseItem { content: vec![ContentItem::InputText { text: text.to_string(), }], + metadata: None, end_turn: None, phase: None, } diff --git a/codex-rs/core/tests/responses_headers.rs b/codex-rs/core/tests/responses_headers.rs index d5376fcd7d..91f75d6a7b 100644 --- a/codex-rs/core/tests/responses_headers.rs +++ b/codex-rs/core/tests/responses_headers.rs @@ -105,6 +105,7 @@ async fn responses_stream_includes_subagent_header_on_review() { content: vec![ContentItem::InputText { text: "hello".into(), }], + metadata: None, end_turn: None, phase: None, }]; @@ -218,6 +219,7 @@ async fn responses_stream_includes_subagent_header_on_other() { content: vec![ContentItem::InputText { text: "hello".into(), }], + metadata: None, end_turn: None, phase: None, }]; @@ -330,6 +332,7 @@ async fn responses_respects_model_info_overrides_from_config() { content: vec![ContentItem::InputText { text: "hello".into(), }], + metadata: None, end_turn: None, phase: None, }]; diff --git a/codex-rs/core/tests/suite/client.rs b/codex-rs/core/tests/suite/client.rs index f946e33586..436d7e9ba0 100644 --- a/codex-rs/core/tests/suite/client.rs +++ b/codex-rs/core/tests/suite/client.rs @@ -177,6 +177,7 @@ async fn resume_includes_initial_messages_and_sends_prior_items() { content: vec![codex_protocol::models::ContentItem::InputText { text: "resumed user message".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -199,6 +200,7 @@ async fn resume_includes_initial_messages_and_sends_prior_items() { content: vec![codex_protocol::models::ContentItem::OutputText { text: "resumed system instruction".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -221,6 +223,7 @@ async fn resume_includes_initial_messages_and_sends_prior_items() { content: vec![codex_protocol::models::ContentItem::OutputText { text: "resumed assistant message".to_string(), }], + metadata: None, end_turn: None, phase: Some(MessagePhase::Commentary), }; @@ -400,6 +403,7 @@ async fn resume_replays_legacy_js_repl_image_rollout_shapes() { content: vec![ContentItem::InputImage { image_url: legacy_image_url.to_string(), }], + metadata: None, end_turn: None, phase: None, }), @@ -1865,6 +1869,7 @@ async fn azure_responses_request_includes_store_and_reasoning_ids() { content: vec![ContentItem::OutputText { text: "message".into(), }], + metadata: None, end_turn: None, phase: None, }); diff --git a/codex-rs/core/tests/suite/client_websockets.rs b/codex-rs/core/tests/suite/client_websockets.rs index 2c7b4d48e1..82c956c3fc 100755 --- a/codex-rs/core/tests/suite/client_websockets.rs +++ b/codex-rs/core/tests/suite/client_websockets.rs @@ -1470,6 +1470,7 @@ fn message_item(text: &str) -> ResponseItem { id: None, role: "user".into(), content: vec![ContentItem::InputText { text: text.into() }], + metadata: None, end_turn: None, phase: None, } @@ -1480,6 +1481,7 @@ fn assistant_message_item(id: &str, text: &str) -> ResponseItem { id: Some(id.to_string()), role: "assistant".into(), content: vec![ContentItem::OutputText { text: text.into() }], + metadata: None, end_turn: None, phase: None, } diff --git a/codex-rs/core/tests/suite/compact.rs b/codex-rs/core/tests/suite/compact.rs index bb34789499..de4280801e 100644 --- a/codex-rs/core/tests/suite/compact.rs +++ b/codex-rs/core/tests/suite/compact.rs @@ -1586,6 +1586,7 @@ async fn auto_compact_runs_after_resume_when_token_usage_is_over_limit() { content: vec![codex_protocol::models::ContentItem::OutputText { text: remote_summary.to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -2795,6 +2796,7 @@ async fn auto_compact_counts_encrypted_reasoning_before_last_user() { content: vec![codex_protocol::models::ContentItem::OutputText { text: "REMOTE_COMPACT_SUMMARY".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -2915,6 +2917,7 @@ async fn auto_compact_runs_when_reasoning_header_clears_between_turns() { content: vec![codex_protocol::models::ContentItem::OutputText { text: "REMOTE_COMPACT_SUMMARY".to_string(), }], + metadata: None, end_turn: None, phase: None, }, diff --git a/codex-rs/core/tests/suite/compact_remote.rs b/codex-rs/core/tests/suite/compact_remote.rs index 683f8b945b..c448ffeff7 100644 --- a/codex-rs/core/tests/suite/compact_remote.rs +++ b/codex-rs/core/tests/suite/compact_remote.rs @@ -1101,6 +1101,7 @@ async fn remote_compact_persists_replacement_history_in_rollout() -> Result<()> content: vec![ContentItem::OutputText { text: "COMPACTED_ASSISTANT_NOTE".to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -1238,6 +1239,7 @@ async fn remote_compact_and_resume_refresh_stale_developer_instructions() -> Res content: vec![ContentItem::InputText { text: stale_developer_message.to_string(), }], + metadata: None, end_turn: None, phase: None, }, @@ -1370,6 +1372,7 @@ async fn remote_compact_refreshes_stale_developer_instructions_without_resume() content: vec![ContentItem::InputText { text: stale_developer_message.to_string(), }], + metadata: None, end_turn: None, phase: None, }, diff --git a/codex-rs/core/tests/suite/image_rollout.rs b/codex-rs/core/tests/suite/image_rollout.rs index 07b51c7629..dbbe1878bb 100644 --- a/codex-rs/core/tests/suite/image_rollout.rs +++ b/codex-rs/core/tests/suite/image_rollout.rs @@ -157,6 +157,7 @@ async fn copy_paste_local_image_persists_rollout_request_shape() -> anyhow::Resu text: "pasted image".to_string(), }, ], + metadata: None, end_turn: None, phase: None, }; @@ -240,6 +241,7 @@ async fn drag_drop_image_persists_rollout_request_shape() -> anyhow::Result<()> text: "dropped image".to_string(), }, ], + metadata: None, end_turn: None, phase: None, }; diff --git a/codex-rs/core/tests/suite/review.rs b/codex-rs/core/tests/suite/review.rs index 3a18cf157b..1676f6f8a9 100644 --- a/codex-rs/core/tests/suite/review.rs +++ b/codex-rs/core/tests/suite/review.rs @@ -530,6 +530,7 @@ async fn review_input_isolated_from_parent_history() { content: vec![codex_protocol::models::ContentItem::InputText { text: "parent: earlier user message".to_string(), }], + metadata: None, end_turn: None, phase: None, }; @@ -550,6 +551,7 @@ async fn review_input_isolated_from_parent_history() { content: vec![codex_protocol::models::ContentItem::OutputText { text: "parent: assistant reply".to_string(), }], + metadata: None, end_turn: None, phase: None, }; diff --git a/codex-rs/protocol/src/models.rs b/codex-rs/protocol/src/models.rs index 857ec14d42..0950de321e 100644 --- a/codex-rs/protocol/src/models.rs +++ b/codex-rs/protocol/src/models.rs @@ -227,6 +227,9 @@ pub enum ResponseInputItem { Message { role: String, content: Vec, + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + metadata: Option, }, FunctionCallOutput { call_id: String, @@ -249,6 +252,22 @@ pub enum ResponseInputItem { }, } +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "snake_case")] +#[ts(rename_all = "snake_case")] +pub enum UserMessageType { + Prompt, + PromptSteering, + PromptQueued, +} + +#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema, TS)] +pub struct ResponseItemMetadata { + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + pub user_message_type: Option, +} + #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, JsonSchema, TS)] #[serde(tag = "type", rename_all = "snake_case")] pub enum ContentItem { @@ -291,6 +310,9 @@ pub enum ResponseItem { id: Option, role: String, content: Vec, + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + metadata: Option, // Do not use directly, no available consistently across all providers. #[serde(default, skip_serializing_if = "Option::is_none")] #[ts(optional)] @@ -740,6 +762,7 @@ impl From for ResponseItem { content: vec![ContentItem::InputText { text: di.into_text(), }], + metadata: None, end_turn: None, phase: None, } @@ -895,9 +918,14 @@ pub fn local_image_content_items_with_label_number( impl From for ResponseItem { fn from(item: ResponseInputItem) -> Self { match item { - ResponseInputItem::Message { role, content } => Self::Message { + ResponseInputItem::Message { role, content, + metadata, + } => Self::Message { + role, + content, + metadata, id: None, end_turn: None, phase: None, @@ -1025,6 +1053,7 @@ impl From> for ResponseInputItem { UserInput::Skill { .. } | UserInput::Mention { .. } => Vec::new(), // Tool bodies are injected later in core }) .collect::>(), + metadata: None, } } } diff --git a/codex-rs/protocol/src/protocol.rs b/codex-rs/protocol/src/protocol.rs index e1efba859b..dc94b8a9cd 100644 --- a/codex-rs/protocol/src/protocol.rs +++ b/codex-rs/protocol/src/protocol.rs @@ -2365,6 +2365,7 @@ impl From for ResponseItem { content: vec![ContentItem::OutputText { text: value.message, }], + metadata: None, end_turn: None, phase: None, }