diff --git a/codex-rs/app-server-protocol/schema/json/EventMsg.json b/codex-rs/app-server-protocol/schema/json/EventMsg.json index 39af1ac96d..2cfbd74840 100644 --- a/codex-rs/app-server-protocol/schema/json/EventMsg.json +++ b/codex-rs/app-server-protocol/schema/json/EventMsg.json @@ -544,6 +544,13 @@ } ] }, + "EscalationStatus": { + "enum": [ + "approved", + "rejected" + ], + "type": "string" + }, "EventMsg": { "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.", "oneOf": [ @@ -5914,6 +5921,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "UserMessage" @@ -6236,6 +6253,90 @@ } ] }, + "UserMessageMetadata": { + "properties": { + "escalation_status": { + "anyOf": [ + { + "$ref": "#/definitions/EscalationStatus" + }, + { + "type": "null" + } + ] + }, + "is_plan_mode": { + "type": [ + "boolean", + "null" + ] + }, + "is_tool_call_escalated": { + "type": [ + "boolean", + "null" + ] + }, + "personality": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessagePersonality" + }, + { + "type": "null" + } + ] + }, + "sandbox_policy": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageSandboxPolicy" + }, + { + "type": "null" + } + ] + }, + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "UserMessagePersonality": { + "enum": [ + "friendly", + "pragmatic" + ], + "type": "string" + }, + "UserMessageSandboxPolicy": { + "enum": [ + "read_only", + "sandbox", + "full_access" + ], + "type": "string" + }, + "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 ff9f8d7d3b..15a5bdbadd 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 @@ -1774,6 +1774,13 @@ "title": "DynamicToolCallResponse", "type": "object" }, + "EscalationStatus": { + "enum": [ + "approved", + "rejected" + ], + "type": "string" + }, "EventMsg": { "$schema": "http://json-schema.org/draft-07/schema#", "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.", @@ -7290,6 +7297,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "UserMessage" @@ -7487,6 +7504,90 @@ } ] }, + "UserMessageMetadata": { + "properties": { + "escalation_status": { + "anyOf": [ + { + "$ref": "#/definitions/EscalationStatus" + }, + { + "type": "null" + } + ] + }, + "is_plan_mode": { + "type": [ + "boolean", + "null" + ] + }, + "is_tool_call_escalated": { + "type": [ + "boolean", + "null" + ] + }, + "personality": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessagePersonality" + }, + { + "type": "null" + } + ] + }, + "sandbox_policy": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageSandboxPolicy" + }, + { + "type": "null" + } + ] + }, + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "UserMessagePersonality": { + "enum": [ + "friendly", + "pragmatic" + ], + "type": "string" + }, + "UserMessageSandboxPolicy": { + "enum": [ + "read_only", + "sandbox", + "full_access" + ], + "type": "string" + }, + "UserMessageType": { + "enum": [ + "prompt", + "prompt_steering", + "prompt_queued", + "prompt_with_ide_context", + "agents_md_default", + "agents_md_custom", + "environment_context" + ], + "type": "string" + }, "W3cTraceContext": { "properties": { "traceparent": { 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 da523ea97c..d119bfbd89 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 @@ -3311,6 +3311,13 @@ "title": "ErrorNotification", "type": "object" }, + "EscalationStatus": { + "enum": [ + "approved", + "rejected" + ], + "type": "string" + }, "EventMsg": { "$schema": "http://json-schema.org/draft-07/schema#", "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.", @@ -13692,6 +13699,16 @@ "id": { "type": "string" }, + "metadata": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageMetadata" + }, + { + "type": "null" + } + ] + }, "type": { "enum": [ "UserMessage" @@ -14249,6 +14266,90 @@ } ] }, + "UserMessageMetadata": { + "properties": { + "escalation_status": { + "anyOf": [ + { + "$ref": "#/definitions/EscalationStatus" + }, + { + "type": "null" + } + ] + }, + "is_plan_mode": { + "type": [ + "boolean", + "null" + ] + }, + "is_tool_call_escalated": { + "type": [ + "boolean", + "null" + ] + }, + "personality": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessagePersonality" + }, + { + "type": "null" + } + ] + }, + "sandbox_policy": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageSandboxPolicy" + }, + { + "type": "null" + } + ] + }, + "user_message_type": { + "anyOf": [ + { + "$ref": "#/definitions/UserMessageType" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "UserMessagePersonality": { + "enum": [ + "friendly", + "pragmatic" + ], + "type": "string" + }, + "UserMessageSandboxPolicy": { + "enum": [ + "read_only", + "sandbox", + "full_access" + ], + "type": "string" + }, + "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/typescript/EscalationStatus.ts b/codex-rs/app-server-protocol/schema/typescript/EscalationStatus.ts new file mode 100644 index 0000000000..3d7fb95353 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/EscalationStatus.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 EscalationStatus = "approved" | "rejected"; diff --git a/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts b/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts index df856287a5..3c2b03bea7 100644 --- a/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/UserMessageItem.ts @@ -2,5 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { UserInput } from "./UserInput"; +import type { UserMessageMetadata } from "./UserMessageMetadata"; -export type UserMessageItem = { id: string, content: Array, }; +export type UserMessageItem = { id: string, content: Array, metadata?: UserMessageMetadata, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/UserMessageMetadata.ts b/codex-rs/app-server-protocol/schema/typescript/UserMessageMetadata.ts new file mode 100644 index 0000000000..b8803b5b1e --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/UserMessageMetadata.ts @@ -0,0 +1,9 @@ +// 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 { EscalationStatus } from "./EscalationStatus"; +import type { UserMessagePersonality } from "./UserMessagePersonality"; +import type { UserMessageSandboxPolicy } from "./UserMessageSandboxPolicy"; +import type { UserMessageType } from "./UserMessageType"; + +export type UserMessageMetadata = { is_plan_mode?: boolean, is_tool_call_escalated?: boolean, escalation_status?: EscalationStatus, sandbox_policy?: UserMessageSandboxPolicy, user_message_type?: UserMessageType, personality?: UserMessagePersonality, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/UserMessagePersonality.ts b/codex-rs/app-server-protocol/schema/typescript/UserMessagePersonality.ts new file mode 100644 index 0000000000..8d0df046e7 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/UserMessagePersonality.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 UserMessagePersonality = "friendly" | "pragmatic"; diff --git a/codex-rs/app-server-protocol/schema/typescript/UserMessageSandboxPolicy.ts b/codex-rs/app-server-protocol/schema/typescript/UserMessageSandboxPolicy.ts new file mode 100644 index 0000000000..797dbdf309 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/UserMessageSandboxPolicy.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 UserMessageSandboxPolicy = "read_only" | "sandbox" | "full_access"; 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/index.ts b/codex-rs/app-server-protocol/schema/typescript/index.ts index fd0d333e4a..8353f6fc83 100644 --- a/codex-rs/app-server-protocol/schema/typescript/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/index.ts @@ -50,6 +50,7 @@ export type { DynamicToolCallRequest } from "./DynamicToolCallRequest"; export type { DynamicToolCallResponseEvent } from "./DynamicToolCallResponseEvent"; export type { ElicitationRequestEvent } from "./ElicitationRequestEvent"; export type { ErrorEvent } from "./ErrorEvent"; +export type { EscalationStatus } from "./EscalationStatus"; export type { EventMsg } from "./EventMsg"; export type { ExecApprovalRequestEvent } from "./ExecApprovalRequestEvent"; export type { ExecCommandApprovalParams } from "./ExecCommandApprovalParams"; @@ -205,6 +206,10 @@ export type { UpdatePlanArgs } from "./UpdatePlanArgs"; export type { UserInput } from "./UserInput"; export type { UserMessageEvent } from "./UserMessageEvent"; export type { UserMessageItem } from "./UserMessageItem"; +export type { UserMessageMetadata } from "./UserMessageMetadata"; +export type { UserMessagePersonality } from "./UserMessagePersonality"; +export type { UserMessageSandboxPolicy } from "./UserMessageSandboxPolicy"; +export type { UserMessageType } from "./UserMessageType"; export type { Verbosity } from "./Verbosity"; export type { ViewImageToolCallEvent } from "./ViewImageToolCallEvent"; export type { WarningEvent } from "./WarningEvent";