From 95027497d475367e0c0cd344a55e2314ddc09c89 Mon Sep 17 00:00:00 2001 From: Roy Han Date: Wed, 11 Mar 2026 16:00:56 -0700 Subject: [PATCH] app-server-schema --- .../schema/json/EventMsg.json | 97 +++++++ .../schema/json/ServerNotification.json | 177 ++++++++++++ .../codex_app_server_protocol.schemas.json | 262 ++++++++++++++++++ .../codex_app_server_protocol.v2.schemas.json | 262 ++++++++++++++++++ .../json/v2/ItemCompletedNotification.json | 177 ++++++++++++ .../json/v2/ItemStartedNotification.json | 177 ++++++++++++ .../schema/json/v2/ReviewStartResponse.json | 177 ++++++++++++ .../schema/json/v2/ThreadForkResponse.json | 177 ++++++++++++ .../schema/json/v2/ThreadListResponse.json | 177 ++++++++++++ .../json/v2/ThreadMetadataUpdateResponse.json | 177 ++++++++++++ .../schema/json/v2/ThreadReadResponse.json | 177 ++++++++++++ .../schema/json/v2/ThreadResumeResponse.json | 177 ++++++++++++ .../json/v2/ThreadRollbackResponse.json | 177 ++++++++++++ .../schema/json/v2/ThreadStartResponse.json | 177 ++++++++++++ .../json/v2/ThreadStartedNotification.json | 177 ++++++++++++ .../json/v2/ThreadUnarchiveResponse.json | 177 ++++++++++++ .../json/v2/TurnCompletedNotification.json | 177 ++++++++++++ .../schema/json/v2/TurnStartResponse.json | 177 ++++++++++++ .../json/v2/TurnStartedNotification.json | 177 ++++++++++++ .../schema/typescript/AgentMessageItem.ts | 3 +- .../typescript/ContextCompactionItem.ts | 3 +- .../schema/typescript/ImageGenerationItem.ts | 3 +- .../schema/typescript/PlanItem.ts | 3 +- .../schema/typescript/ReasoningItem.ts | 3 +- .../schema/typescript/TurnItemMetadata.ts | 6 + .../schema/typescript/UserMessageItem.ts | 3 +- .../schema/typescript/UserMessageType.ts | 5 + .../schema/typescript/WebSearchItem.ts | 3 +- .../schema/typescript/index.ts | 2 + .../schema/typescript/v2/ItemMetadata.ts | 6 + .../schema/typescript/v2/ThreadItem.ts | 11 +- .../schema/typescript/v2/UserMessageType.ts | 5 + .../schema/typescript/v2/index.ts | 2 + 33 files changed, 3499 insertions(+), 12 deletions(-) create mode 100644 codex-rs/app-server-protocol/schema/typescript/TurnItemMetadata.ts create mode 100644 codex-rs/app-server-protocol/schema/typescript/UserMessageType.ts create mode 100644 codex-rs/app-server-protocol/schema/typescript/v2/ItemMetadata.ts create mode 100644 codex-rs/app-server-protocol/schema/typescript/v2/UserMessageType.ts diff --git a/codex-rs/app-server-protocol/schema/json/EventMsg.json b/codex-rs/app-server-protocol/schema/json/EventMsg.json index dbf9fc8e9f..61e347bbe9 100644 --- a/codex-rs/app-server-protocol/schema/json/EventMsg.json +++ b/codex-rs/app-server-protocol/schema/json/EventMsg.json @@ -6405,6 +6405,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "UserMessage" @@ -6433,6 +6443,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -6465,6 +6485,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -6489,6 +6519,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "raw_content": { "default": [], "items": { @@ -6526,6 +6566,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -6551,6 +6601,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -6591,6 +6651,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "ContextCompaction" @@ -6608,6 +6678,21 @@ } ] }, + "TurnItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "UserInput": { "description": "User input", "oneOf": [ @@ -6732,6 +6817,18 @@ "type": "object" } ] + }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "type": "string" } }, "description": "Response event from the agent NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.", diff --git a/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/codex-rs/app-server-protocol/schema/json/ServerNotification.json index a3836b48f3..1d29a0fd63 100644 --- a/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -1253,6 +1253,21 @@ ], "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "ItemStartedNotification": { "properties": { "item": { @@ -2034,6 +2049,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -2055,6 +2080,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -2091,6 +2126,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -2122,6 +2167,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -2187,6 +2242,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -2227,6 +2292,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -2271,6 +2346,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -2332,6 +2417,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -2375,6 +2470,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -2444,6 +2549,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -2468,6 +2583,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -2492,6 +2617,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -2526,6 +2661,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -2550,6 +2695,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -2574,6 +2729,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -3199,6 +3364,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 421423bbc0..f7b8bfbbeb 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 @@ -8574,6 +8574,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "UserMessage" @@ -8602,6 +8612,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -8634,6 +8654,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -8658,6 +8688,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "raw_content": { "default": [], "items": { @@ -8695,6 +8735,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -8720,6 +8770,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -8760,6 +8820,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "ContextCompaction" @@ -8777,6 +8847,21 @@ } ] }, + "TurnItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/v2/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "W3cTraceContext": { "properties": { "traceparent": { @@ -11841,6 +11926,21 @@ "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": { @@ -15379,6 +15479,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -15400,6 +15510,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -15436,6 +15556,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -15467,6 +15597,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -15532,6 +15672,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -15572,6 +15722,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/v2/PatchApplyStatus" }, @@ -15616,6 +15776,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -15677,6 +15847,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/v2/DynamicToolCallStatus" }, @@ -15720,6 +15900,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -15789,6 +15979,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -15813,6 +16013,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -15837,6 +16047,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -15871,6 +16091,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -15895,6 +16125,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -15919,6 +16159,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/v2/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -17501,6 +17751,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "type": "string" + }, "Verbosity": { "description": "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.", "enum": [ 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 f7a0dbb478..34f2a4ea8a 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 @@ -7780,6 +7780,21 @@ "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": { @@ -13146,6 +13161,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -13167,6 +13192,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -13203,6 +13238,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -13234,6 +13279,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -13299,6 +13354,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -13339,6 +13404,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -13383,6 +13458,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -13444,6 +13529,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -13487,6 +13582,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -13556,6 +13661,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -13580,6 +13695,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -13604,6 +13729,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -13638,6 +13773,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -13662,6 +13807,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -13686,6 +13841,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -14983,6 +15148,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "UserMessage" @@ -15011,6 +15186,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -15043,6 +15228,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -15067,6 +15262,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "raw_content": { "default": [], "items": { @@ -15104,6 +15309,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -15129,6 +15344,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -15169,6 +15394,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/TurnItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "ContextCompaction" @@ -15186,6 +15421,21 @@ } ] }, + "TurnItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "TurnPlanStep": { "properties": { "status": { @@ -15546,6 +15796,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "type": "string" + }, "Verbosity": { "description": "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.", "enum": [ 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 8f5fcc3674..fba7d7bf69 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json @@ -256,6 +256,21 @@ ], "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -410,6 +425,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -431,6 +456,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -467,6 +502,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -498,6 +543,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -563,6 +618,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -603,6 +668,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -647,6 +722,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -708,6 +793,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -751,6 +846,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -820,6 +925,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -844,6 +959,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -868,6 +993,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -902,6 +1037,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -926,6 +1071,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -950,6 +1105,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1087,6 +1252,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 0108ff5d7c..b9fbdefc49 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json @@ -256,6 +256,21 @@ ], "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -410,6 +425,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -431,6 +456,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -467,6 +502,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -498,6 +543,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -563,6 +618,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -603,6 +668,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -647,6 +722,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -708,6 +793,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -751,6 +846,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -820,6 +925,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -844,6 +959,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -868,6 +993,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -902,6 +1037,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -926,6 +1071,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -950,6 +1105,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1087,6 +1252,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "type": "string" + }, "WebSearchAction": { "oneOf": [ { 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 3c5d11cad4..0799f0db6e 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json @@ -370,6 +370,21 @@ ], "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -524,6 +539,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -545,6 +570,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -581,6 +616,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -612,6 +657,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -677,6 +732,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -717,6 +782,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -761,6 +836,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -822,6 +907,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -865,6 +960,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -934,6 +1039,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -958,6 +1073,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -982,6 +1107,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1016,6 +1151,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1040,6 +1185,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1064,6 +1219,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1272,6 +1437,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 aa8017080e..cfc24243da 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json @@ -447,6 +447,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -1008,6 +1023,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -1029,6 +1054,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -1065,6 +1100,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -1096,6 +1141,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -1161,6 +1216,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1201,6 +1266,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1245,6 +1320,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1306,6 +1391,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1349,6 +1444,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1418,6 +1523,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1442,6 +1557,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1466,6 +1591,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1500,6 +1635,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1524,6 +1669,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1548,6 +1703,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1831,6 +1996,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 3965739d1a..0df1f1cc74 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json @@ -393,6 +393,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -762,6 +777,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -783,6 +808,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -819,6 +854,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -850,6 +895,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -915,6 +970,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -955,6 +1020,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -999,6 +1074,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1060,6 +1145,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1103,6 +1198,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1172,6 +1277,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1196,6 +1311,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1220,6 +1345,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1254,6 +1389,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1278,6 +1423,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1302,6 +1457,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1585,6 +1750,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 a74ee5d63c..9bf99b1d86 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json @@ -393,6 +393,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -762,6 +777,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -783,6 +808,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -819,6 +854,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -850,6 +895,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -915,6 +970,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -955,6 +1020,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -999,6 +1074,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1060,6 +1145,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1103,6 +1198,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1172,6 +1277,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1196,6 +1311,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1220,6 +1345,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1254,6 +1389,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1278,6 +1423,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1302,6 +1457,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1585,6 +1750,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 f00275398f..5771ff1b89 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json @@ -393,6 +393,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -762,6 +777,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -783,6 +808,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -819,6 +854,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -850,6 +895,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -915,6 +970,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -955,6 +1020,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -999,6 +1074,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1060,6 +1145,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1103,6 +1198,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1172,6 +1277,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1196,6 +1311,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1220,6 +1345,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1254,6 +1389,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1278,6 +1423,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1302,6 +1457,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1585,6 +1750,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "type": "string" + }, "WebSearchAction": { "oneOf": [ { 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 3db3e5e96d..cbe3c7e5e6 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json @@ -447,6 +447,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -1008,6 +1023,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -1029,6 +1054,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -1065,6 +1100,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -1096,6 +1141,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -1161,6 +1216,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1201,6 +1266,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1245,6 +1320,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1306,6 +1391,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1349,6 +1444,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1418,6 +1523,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1442,6 +1557,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1466,6 +1591,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1500,6 +1635,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1524,6 +1669,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1548,6 +1703,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1831,6 +1996,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 e95b2d850f..edf3ec5528 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json @@ -393,6 +393,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -762,6 +777,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -783,6 +808,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -819,6 +854,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -850,6 +895,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -915,6 +970,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -955,6 +1020,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -999,6 +1074,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1060,6 +1145,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1103,6 +1198,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1172,6 +1277,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1196,6 +1311,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1220,6 +1345,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1254,6 +1389,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1278,6 +1423,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1302,6 +1457,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1585,6 +1750,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 eca31f4446..1249c5af39 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json @@ -447,6 +447,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -1008,6 +1023,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -1029,6 +1054,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -1065,6 +1100,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -1096,6 +1141,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -1161,6 +1216,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -1201,6 +1266,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -1245,6 +1320,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1306,6 +1391,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1349,6 +1444,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1418,6 +1523,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1442,6 +1557,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1466,6 +1591,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1500,6 +1635,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1524,6 +1669,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1548,6 +1703,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1831,6 +1996,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 698793bbdc..1ec4669fda 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json @@ -393,6 +393,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -762,6 +777,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -783,6 +808,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -819,6 +854,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -850,6 +895,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -915,6 +970,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -955,6 +1020,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -999,6 +1074,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1060,6 +1145,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1103,6 +1198,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1172,6 +1277,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1196,6 +1311,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1220,6 +1345,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1254,6 +1389,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1278,6 +1423,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1302,6 +1457,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1585,6 +1750,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 30d1e2841f..d3260de04d 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json @@ -393,6 +393,21 @@ }, "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -762,6 +777,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -783,6 +808,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -819,6 +854,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -850,6 +895,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -915,6 +970,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -955,6 +1020,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -999,6 +1074,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -1060,6 +1145,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -1103,6 +1198,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -1172,6 +1277,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -1196,6 +1311,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -1220,6 +1345,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1254,6 +1389,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1278,6 +1423,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1302,6 +1457,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1585,6 +1750,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 89a9e580de..52544d814e 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json @@ -370,6 +370,21 @@ ], "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -524,6 +539,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -545,6 +570,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -581,6 +616,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -612,6 +657,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -677,6 +732,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -717,6 +782,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -761,6 +836,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -822,6 +907,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -865,6 +960,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -934,6 +1039,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -958,6 +1073,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -982,6 +1107,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1016,6 +1151,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1040,6 +1185,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1064,6 +1219,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1272,6 +1437,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 dbe082c3b0..b2aae5223e 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json @@ -370,6 +370,21 @@ ], "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -524,6 +539,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -545,6 +570,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -581,6 +616,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -612,6 +657,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -677,6 +732,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -717,6 +782,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -761,6 +836,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -822,6 +907,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -865,6 +960,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -934,6 +1039,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -958,6 +1073,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -982,6 +1107,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1016,6 +1151,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1040,6 +1185,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1064,6 +1219,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1272,6 +1437,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 07323f2026..737e47882c 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json @@ -370,6 +370,21 @@ ], "type": "object" }, + "ItemMetadata": { + "properties": { + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, "McpToolCallError": { "properties": { "message": { @@ -524,6 +539,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "userMessage" @@ -545,6 +570,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "phase": { "anyOf": [ { @@ -581,6 +616,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "text": { "type": "string" }, @@ -612,6 +657,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "summary": { "default": [], "items": { @@ -677,6 +732,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "processId": { "description": "Identifier for the underlying PTY process (when available).", "type": [ @@ -717,6 +782,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/PatchApplyStatus" }, @@ -761,6 +836,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "anyOf": [ { @@ -822,6 +907,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "status": { "$ref": "#/definitions/DynamicToolCallStatus" }, @@ -865,6 +960,16 @@ "description": "Unique identifier for this collab tool call.", "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "prompt": { "description": "Prompt text sent as part of the collab tool call, when available.", "type": [ @@ -934,6 +1039,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "query": { "type": "string" }, @@ -958,6 +1073,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "path": { "type": "string" }, @@ -982,6 +1107,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "result": { "type": "string" }, @@ -1016,6 +1151,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1040,6 +1185,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "review": { "type": "string" }, @@ -1064,6 +1219,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/ItemMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "contextCompaction" @@ -1272,6 +1437,18 @@ } ] }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "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 ee67a3e23b..549a026fc5 100644 --- a/codex-rs/app-server-protocol/schema/typescript/AgentMessageItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/AgentMessageItem.ts @@ -3,6 +3,7 @@ // 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. @@ -18,4 +19,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, }; +phase?: MessagePhase, metadata?: TurnItemMetadata, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ContextCompactionItem.ts b/codex-rs/app-server-protocol/schema/typescript/ContextCompactionItem.ts index dc3ab6388e..ac8ab6effa 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ContextCompactionItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ContextCompactionItem.ts @@ -1,5 +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"; -export type ContextCompactionItem = { id: string, }; +export type ContextCompactionItem = { id: string, metadata?: TurnItemMetadata, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ImageGenerationItem.ts b/codex-rs/app-server-protocol/schema/typescript/ImageGenerationItem.ts index 0edb7c22e6..179622b18b 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ImageGenerationItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ImageGenerationItem.ts @@ -1,5 +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"; -export type ImageGenerationItem = { id: string, status: string, revised_prompt?: string, result: string, saved_path?: string, }; +export type ImageGenerationItem = { id: string, status: string, revised_prompt?: string, result: string, saved_path?: string, metadata?: TurnItemMetadata, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/PlanItem.ts b/codex-rs/app-server-protocol/schema/typescript/PlanItem.ts index 909ab40e64..1106bba11f 100644 --- a/codex-rs/app-server-protocol/schema/typescript/PlanItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/PlanItem.ts @@ -1,5 +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"; -export type PlanItem = { id: string, text: string, }; +export type PlanItem = { id: string, text: string, metadata?: TurnItemMetadata, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ReasoningItem.ts b/codex-rs/app-server-protocol/schema/typescript/ReasoningItem.ts index 80bcb65fd1..5caf9178c2 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ReasoningItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ReasoningItem.ts @@ -1,5 +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"; -export type ReasoningItem = { id: string, summary_text: Array, raw_content: Array, }; +export type ReasoningItem = { id: string, summary_text: Array, raw_content: Array, metadata?: TurnItemMetadata, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/TurnItemMetadata.ts b/codex-rs/app-server-protocol/schema/typescript/TurnItemMetadata.ts new file mode 100644 index 0000000000..2444745fff --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/TurnItemMetadata.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { UserMessageType } from "./UserMessageType"; + +export type TurnItemMetadata = { 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 df856287a5..93c953f1fc 100644 --- a/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts @@ -1,6 +1,7 @@ // 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, }; +export type UserMessageItem = { id: string, content: Array, metadata?: TurnItemMetadata, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/UserMessageType.ts b/codex-rs/app-server-protocol/schema/typescript/UserMessageType.ts new file mode 100644 index 0000000000..ad1cac24ea --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/UserMessageType.ts @@ -0,0 +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. + +export type UserMessageType = "prompt" | "prompt_steering" | "prompt_queued" | "prompt_with_ide_context" | "agents_md_default" | "agents_md_custom" | "environment_context"; diff --git a/codex-rs/app-server-protocol/schema/typescript/WebSearchItem.ts b/codex-rs/app-server-protocol/schema/typescript/WebSearchItem.ts index 46b1406519..ad27970fac 100644 --- a/codex-rs/app-server-protocol/schema/typescript/WebSearchItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/WebSearchItem.ts @@ -1,6 +1,7 @@ // 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, }; +export type WebSearchItem = { id: string, query: string, action: WebSearchAction, metadata?: TurnItemMetadata, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/index.ts b/codex-rs/app-server-protocol/schema/typescript/index.ts index a1209c75bc..980f965f79 100644 --- a/codex-rs/app-server-protocol/schema/typescript/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/index.ts @@ -213,6 +213,7 @@ 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"; @@ -220,6 +221,7 @@ export type { UpdatePlanArgs } from "./UpdatePlanArgs"; export type { UserInput } from "./UserInput"; export type { UserMessageEvent } from "./UserMessageEvent"; export type { UserMessageItem } from "./UserMessageItem"; +export type { UserMessageType } from "./UserMessageType"; export type { Verbosity } from "./Verbosity"; export type { ViewImageToolCallEvent } from "./ViewImageToolCallEvent"; export type { WarningEvent } from "./WarningEvent"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ItemMetadata.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ItemMetadata.ts new file mode 100644 index 0000000000..3e28bc2ca0 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ItemMetadata.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { UserMessageType } from "./UserMessageType"; + +export type 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 488c07e548..18ed8322d5 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts @@ -11,6 +11,7 @@ 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"; @@ -18,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, } | { "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, +export type ThreadItem = { "type": "userMessage", id: string, content: Array, metadata?: ItemMetadata | null, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, metadata?: ItemMetadata | null, } | { "type": "plan", id: string, text: string, metadata?: ItemMetadata | null, } | { "type": "reasoning", id: string, summary: Array, content: Array, metadata?: ItemMetadata | null, } | { "type": "commandExecution", id: string, /** * The command to be executed. */ @@ -48,15 +49,15 @@ exitCode: number | null, /** * The duration of the command execution in milliseconds. */ -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, +durationMs: number | null, metadata?: ItemMetadata | null, } | { "type": "fileChange", id: string, changes: Array, status: PatchApplyStatus, metadata?: ItemMetadata | null, } | { "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, } | { "type": "dynamicToolCall", id: string, tool: string, arguments: JsonValue, status: DynamicToolCallStatus, contentItems: Array | null, success: boolean | null, +durationMs: number | null, metadata?: ItemMetadata | 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, } | { "type": "collabAgentToolCall", +durationMs: number | null, metadata?: ItemMetadata | null, } | { "type": "collabAgentToolCall", /** * Unique identifier for this collab tool call. */ @@ -85,4 +86,4 @@ prompt: string | null, /** * Last known status of the target agents, when available. */ -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, }; +agentsStates: { [key in string]?: CollabAgentState }, metadata?: ItemMetadata | null, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, metadata?: ItemMetadata | null, } | { "type": "imageView", id: string, path: string, metadata?: ItemMetadata | null, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, metadata?: ItemMetadata | null, } | { "type": "enteredReviewMode", id: string, review: string, metadata?: ItemMetadata | null, } | { "type": "exitedReviewMode", id: string, review: string, metadata?: ItemMetadata | null, } | { "type": "contextCompaction", id: string, metadata?: ItemMetadata | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/UserMessageType.ts b/codex-rs/app-server-protocol/schema/typescript/v2/UserMessageType.ts new file mode 100644 index 0000000000..ad1cac24ea --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/UserMessageType.ts @@ -0,0 +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. + +export type UserMessageType = "prompt" | "prompt_steering" | "prompt_queued" | "prompt_with_ide_context" | "agents_md_default" | "agents_md_custom" | "environment_context"; 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 b57daaac3a..7bf790390e 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -113,6 +113,7 @@ 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"; @@ -300,6 +301,7 @@ 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";