Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

[mcp] Support MCP Apps part 3 - Add mcp tool call support. (#17364)

Matthew Zengb7139a7e8f68
diff --git a/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/codex-rs/app-server-protocol/schema/json/ClientRequest.json
index 9e0a87b5e3..4a69b4d8cc 100644
--- a/codex-rs/app-server-protocol/schema/json/ClientRequest.json
+++ b/codex-rs/app-server-protocol/schema/json/ClientRequest.json
@@ -1277,6 +1277,27 @@
],
"type": "string"
},
+ "McpServerToolCallParams": {
+ "properties": {
+ "_meta": true,
+ "arguments": true,
+ "server": {
+ "type": "string"
+ },
+ "threadId": {
+ "type": "string"
+ },
+ "tool": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "server",
+ "threadId",
+ "tool"
+ ],
+ "type": "object"
+ },
"MergeStrategy": {
"enum": [
"replace",
@@ -4569,6 +4590,30 @@
"title": "McpServer/resource/readRequest",
"type": "object"
},
+ {
+ "properties": {
+ "id": {
+ "$ref": "#/definitions/RequestId"
+ },
+ "method": {
+ "enum": [
+ "mcpServer/tool/call"
+ ],
+ "title": "McpServer/tool/callRequestMethod",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/definitions/McpServerToolCallParams"
+ }
+ },
+ "required": [
+ "id",
+ "method",
+ "params"
+ ],
+ "title": "McpServer/tool/callRequest",
+ "type": "object"
+ },
{
"properties": {
"id": {
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 4308f8e84a..95de3343a9 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
@@ -1225,6 +1225,30 @@
"title": "McpServer/resource/readRequest",
"type": "object"
},
+ {
+ "properties": {
+ "id": {
+ "$ref": "#/definitions/v2/RequestId"
+ },
+ "method": {
+ "enum": [
+ "mcpServer/tool/call"
+ ],
+ "title": "McpServer/tool/callRequestMethod",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/definitions/v2/McpServerToolCallParams"
+ }
+ },
+ "required": [
+ "id",
+ "method",
+ "params"
+ ],
+ "title": "McpServer/tool/callRequest",
+ "type": "object"
+ },
{
"properties": {
"id": {
@@ -9214,6 +9238,51 @@
"title": "McpServerStatusUpdatedNotification",
"type": "object"
},
+ "McpServerToolCallParams": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "_meta": true,
+ "arguments": true,
+ "server": {
+ "type": "string"
+ },
+ "threadId": {
+ "type": "string"
+ },
+ "tool": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "server",
+ "threadId",
+ "tool"
+ ],
+ "title": "McpServerToolCallParams",
+ "type": "object"
+ },
+ "McpServerToolCallResponse": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "_meta": true,
+ "content": {
+ "items": true,
+ "type": "array"
+ },
+ "isError": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "structuredContent": true
+ },
+ "required": [
+ "content"
+ ],
+ "title": "McpServerToolCallResponse",
+ "type": "object"
+ },
"McpToolCallError": {
"properties": {
"message": {
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 378e26dd6c..88df6dce4a 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
@@ -1807,6 +1807,30 @@
"title": "McpServer/resource/readRequest",
"type": "object"
},
+ {
+ "properties": {
+ "id": {
+ "$ref": "#/definitions/RequestId"
+ },
+ "method": {
+ "enum": [
+ "mcpServer/tool/call"
+ ],
+ "title": "McpServer/tool/callRequestMethod",
+ "type": "string"
+ },
+ "params": {
+ "$ref": "#/definitions/McpServerToolCallParams"
+ }
+ },
+ "required": [
+ "id",
+ "method",
+ "params"
+ ],
+ "title": "McpServer/tool/callRequest",
+ "type": "object"
+ },
{
"properties": {
"id": {
@@ -6010,6 +6034,51 @@
"title": "McpServerStatusUpdatedNotification",
"type": "object"
},
+ "McpServerToolCallParams": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "_meta": true,
+ "arguments": true,
+ "server": {
+ "type": "string"
+ },
+ "threadId": {
+ "type": "string"
+ },
+ "tool": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "server",
+ "threadId",
+ "tool"
+ ],
+ "title": "McpServerToolCallParams",
+ "type": "object"
+ },
+ "McpServerToolCallResponse": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "_meta": true,
+ "content": {
+ "items": true,
+ "type": "array"
+ },
+ "isError": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "structuredContent": true
+ },
+ "required": [
+ "content"
+ ],
+ "title": "McpServerToolCallResponse",
+ "type": "object"
+ },
"McpToolCallError": {
"properties": {
"message": {
diff --git a/codex-rs/app-server-protocol/schema/json/v2/McpServerToolCallParams.json b/codex-rs/app-server-protocol/schema/json/v2/McpServerToolCallParams.json
new file mode 100644
index 0000000000..3465e60c83
--- /dev/null
+++ b/codex-rs/app-server-protocol/schema/json/v2/McpServerToolCallParams.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "_meta": true,
+ "arguments": true,
+ "server": {
+ "type": "string"
+ },
+ "threadId": {
+ "type": "string"
+ },
+ "tool": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "server",
+ "threadId",
+ "tool"
+ ],
+ "title": "McpServerToolCallParams",
+ "type": "object"
+}
\ No newline at end of file
diff --git a/codex-rs/app-server-protocol/schema/json/v2/McpServerToolCallResponse.json b/codex-rs/app-server-protocol/schema/json/v2/McpServerToolCallResponse.json
new file mode 100644
index 0000000000..0e5ecdf78d
--- /dev/null
+++ b/codex-rs/app-server-protocol/schema/json/v2/McpServerToolCallResponse.json
@@ -0,0 +1,22 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "properties": {
+ "_meta": true,
+ "content": {
+ "items": true,
+ "type": "array"
+ },
+ "isError": {
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "structuredContent": true
+ },
+ "required": [
+ "content"
+ ],
+ "title": "McpServerToolCallResponse",
+ "type": "object"
+}
\ No newline at end of file
diff --git a/codex-rs/app-server-protocol/schema/typescript/ApplyPatchApprovalParams.ts b/codex-rs/app-server-protocol/schema/typescript/ApplyPatchApprovalParams.ts
index d04f7b75df..3406077256 100644
--- a/codex-rs/app-server-protocol/schema/typescript/ApplyPatchApprovalParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/ApplyPatchApprovalParams.ts
@@ -4,16 +4,16 @@
import type { FileChange } from "./FileChange";
import type { ThreadId } from "./ThreadId";
-export type ApplyPatchApprovalParams = { conversationId: ThreadId,
+export type ApplyPatchApprovalParams = { conversationId: ThreadId,
/**
* Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent]
* and [codex_protocol::protocol::PatchApplyEndEvent].
*/
-callId: string, fileChanges: { [key in string]?: FileChange },
+callId: string, fileChanges: { [key in string]?: FileChange },
/**
* Optional explanatory reason (e.g. request for extra write access).
*/
-reason: string | null,
+reason: string | null,
/**
* When set, the agent is asking the user to allow writes under this root
* for the remainder of the session (unclear if this is honored today).
diff --git a/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts b/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts
index d12599d7a9..1bbc9b7ac9 100644
--- a/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts
@@ -35,6 +35,7 @@ import type { ListMcpServerStatusParams } from "./v2/ListMcpServerStatusParams";
import type { LoginAccountParams } from "./v2/LoginAccountParams";
import type { McpResourceReadParams } from "./v2/McpResourceReadParams";
import type { McpServerOauthLoginParams } from "./v2/McpServerOauthLoginParams";
+import type { McpServerToolCallParams } from "./v2/McpServerToolCallParams";
import type { ModelListParams } from "./v2/ModelListParams";
import type { PluginInstallParams } from "./v2/PluginInstallParams";
import type { PluginListParams } from "./v2/PluginListParams";
@@ -65,4 +66,4 @@ import type { WindowsSandboxSetupStartParams } from "./v2/WindowsSandboxSetupSta
/**
* Request from the client to the server.
*/
-export type ClientRequest ={ "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/shellCommand", id: RequestId, params: ThreadShellCommandParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "fs/readFile", id: RequestId, params: FsReadFileParams, } | { "method": "fs/writeFile", id: RequestId, params: FsWriteFileParams, } | { "method": "fs/createDirectory", id: RequestId, params: FsCreateDirectoryParams, } | { "method": "fs/getMetadata", id: RequestId, params: FsGetMetadataParams, } | { "method": "fs/readDirectory", id: RequestId, params: FsReadDirectoryParams, } | { "method": "fs/remove", id: RequestId, params: FsRemoveParams, } | { "method": "fs/copy", id: RequestId, params: FsCopyParams, } | { "method": "fs/watch", id: RequestId, params: FsWatchParams, } | { "method": "fs/unwatch", id: RequestId, params: FsUnwatchParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "mcpServer/resource/read", id: RequestId, params: McpResourceReadParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, };
+export type ClientRequest ={ "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/shellCommand", id: RequestId, params: ThreadShellCommandParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "fs/readFile", id: RequestId, params: FsReadFileParams, } | { "method": "fs/writeFile", id: RequestId, params: FsWriteFileParams, } | { "method": "fs/createDirectory", id: RequestId, params: FsCreateDirectoryParams, } | { "method": "fs/getMetadata", id: RequestId, params: FsGetMetadataParams, } | { "method": "fs/readDirectory", id: RequestId, params: FsReadDirectoryParams, } | { "method": "fs/remove", id: RequestId, params: FsRemoveParams, } | { "method": "fs/copy", id: RequestId, params: FsCopyParams, } | { "method": "fs/watch", id: RequestId, params: FsWatchParams, } | { "method": "fs/unwatch", id: RequestId, params: FsUnwatchParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "experimentalFeature/enablement/set", id: RequestId, params: ExperimentalFeatureEnablementSetParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "mcpServer/resource/read", id: RequestId, params: McpResourceReadParams, } | { "method": "mcpServer/tool/call", id: RequestId, params: McpServerToolCallParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, };
diff --git a/codex-rs/app-server-protocol/schema/typescript/ExecCommandApprovalParams.ts b/codex-rs/app-server-protocol/schema/typescript/ExecCommandApprovalParams.ts
index f68872905d..b7470c15b7 100644
--- a/codex-rs/app-server-protocol/schema/typescript/ExecCommandApprovalParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/ExecCommandApprovalParams.ts
@@ -4,12 +4,12 @@
import type { ParsedCommand } from "./ParsedCommand";
import type { ThreadId } from "./ThreadId";
-export type ExecCommandApprovalParams = { conversationId: ThreadId,
+export type ExecCommandApprovalParams = { conversationId: ThreadId,
/**
* Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent]
* and [codex_protocol::protocol::ExecCommandEndEvent].
*/
-callId: string,
+callId: string,
/**
* Identifier for this specific approval callback.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/InitializeCapabilities.ts b/codex-rs/app-server-protocol/schema/typescript/InitializeCapabilities.ts
index 125b4b1f1c..5d42cc4852 100644
--- a/codex-rs/app-server-protocol/schema/typescript/InitializeCapabilities.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/InitializeCapabilities.ts
@@ -5,11 +5,11 @@
/**
* Client-declared capabilities negotiated during initialize.
*/
-export type InitializeCapabilities = {
+export type InitializeCapabilities = {
/**
* Opt into receiving experimental API methods and fields.
*/
-experimentalApi: boolean,
+experimentalApi: boolean,
/**
* Exact notification method names that should be suppressed for this
* connection (for example `thread/started`).
diff --git a/codex-rs/app-server-protocol/schema/typescript/InitializeResponse.ts b/codex-rs/app-server-protocol/schema/typescript/InitializeResponse.ts
index c1d0a822f2..f1f79d173c 100644
--- a/codex-rs/app-server-protocol/schema/typescript/InitializeResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/InitializeResponse.ts
@@ -3,16 +3,16 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AbsolutePathBuf } from "./AbsolutePathBuf";
-export type InitializeResponse = { userAgent: string,
+export type InitializeResponse = { userAgent: string,
/**
* Absolute path to the server's $CODEX_HOME directory.
*/
-codexHome: AbsolutePathBuf,
+codexHome: AbsolutePathBuf,
/**
* Platform family for the running app-server target, for example
* `"unix"` or `"windows"`.
*/
-platformFamily: string,
+platformFamily: string,
/**
* Operating system for the running app-server target, for example
* `"macos"`, `"linux"`, or `"windows"`.
diff --git a/codex-rs/app-server-protocol/schema/typescript/ParsedCommand.ts b/codex-rs/app-server-protocol/schema/typescript/ParsedCommand.ts
index 146d7816c2..092476e9ac 100644
--- a/codex-rs/app-server-protocol/schema/typescript/ParsedCommand.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/ParsedCommand.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ParsedCommand = { "type": "read", cmd: string, name: string,
+export type ParsedCommand = { "type": "read", cmd: string, name: string,
/**
* (Best effort) Path to the file being read by the command. When
* possible, this is an absolute path, though when relative, it should
diff --git a/codex-rs/app-server-protocol/schema/typescript/ResourceContent.ts b/codex-rs/app-server-protocol/schema/typescript/ResourceContent.ts
index 60fe239dc4..f5bcf2d512 100644
--- a/codex-rs/app-server-protocol/schema/typescript/ResourceContent.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/ResourceContent.ts
@@ -6,11 +6,11 @@ import type { JsonValue } from "./serde_json/JsonValue";
/**
* Contents returned when reading a resource from an MCP server.
*/
-export type ResourceContent = {
+export type ResourceContent = {
/**
* The URI of this resource.
*/
-uri: string, mimeType?: string, text: string, _meta?: JsonValue, } | {
+uri: string, mimeType?: string, text: string, _meta?: JsonValue, } | {
/**
* The URI of this resource.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts b/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts
index e9ab2a84f4..04b8bdcdad 100644
--- a/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts
@@ -11,7 +11,7 @@ import type { ReasoningItemContent } from "./ReasoningItemContent";
import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary";
import type { WebSearchAction } from "./WebSearchAction";
-export type ResponseItem = { "type": "message", role: string, content: Array<ContentItem>, end_turn?: boolean, phase?: MessagePhase, } | { "type": "reasoning", summary: Array<ReasoningItemReasoningSummary>, content?: Array<ReasoningItemContent>, encrypted_content: string | null, } | { "type": "local_shell_call",
+export type ResponseItem = { "type": "message", role: string, content: Array<ContentItem>, end_turn?: boolean, phase?: MessagePhase, } | { "type": "reasoning", summary: Array<ReasoningItemReasoningSummary>, content?: Array<ReasoningItemContent>, encrypted_content: string | null, } | { "type": "local_shell_call",
/**
* Set when using the Responses API.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AppInfo.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AppInfo.ts
index 5655213718..ef1f54aa68 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/AppInfo.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/AppInfo.ts
@@ -7,7 +7,7 @@ import type { AppMetadata } from "./AppMetadata";
/**
* EXPERIMENTAL - app metadata returned by app-list APIs.
*/
-export type AppInfo = { id: string, name: string, description: string | null, logoUrl: string | null, logoUrlDark: string | null, distributionChannel: string | null, branding: AppBranding | null, appMetadata: AppMetadata | null, labels: { [key in string]?: string } | null, installUrl: string | null, isAccessible: boolean,
+export type AppInfo = { id: string, name: string, description: string | null, logoUrl: string | null, logoUrlDark: string | null, distributionChannel: string | null, branding: AppBranding | null, appMetadata: AppMetadata | null, labels: { [key in string]?: string } | null, installUrl: string | null, isAccessible: boolean,
/**
* Whether this app is enabled in config.toml.
* Example:
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AppsListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AppsListParams.ts
index 7687144c53..b96829567b 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/AppsListParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/AppsListParams.ts
@@ -5,19 +5,19 @@
/**
* EXPERIMENTAL - list available apps/connectors.
*/
-export type AppsListParams = {
+export type AppsListParams = {
/**
* Opaque pagination cursor returned by a previous call.
*/
-cursor?: string | null,
+cursor?: string | null,
/**
* Optional page size; defaults to a reasonable server-side value.
*/
-limit?: number | null,
+limit?: number | null,
/**
* Optional thread id used to evaluate app feature gating from that thread's config.
*/
-threadId?: string | null,
+threadId?: string | null,
/**
* When true, bypass app caches and fetch the latest data from sources.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AppsListResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AppsListResponse.ts
index cb1e45f203..dabeded178 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/AppsListResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/AppsListResponse.ts
@@ -6,7 +6,7 @@ import type { AppInfo } from "./AppInfo";
/**
* EXPERIMENTAL - app list response.
*/
-export type AppsListResponse = { data: Array<AppInfo>,
+export type AppsListResponse = { data: Array<AppInfo>,
/**
* Opaque cursor to pass to the next call to continue after the last item.
* If None, there are no more items to return.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ChatgptAuthTokensRefreshParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ChatgptAuthTokensRefreshParams.ts
index 7358d80347..d59cc30d88 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ChatgptAuthTokensRefreshParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ChatgptAuthTokensRefreshParams.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ChatgptAuthTokensRefreshReason } from "./ChatgptAuthTokensRefreshReason";
-export type ChatgptAuthTokensRefreshParams = { reason: ChatgptAuthTokensRefreshReason,
+export type ChatgptAuthTokensRefreshParams = { reason: ChatgptAuthTokensRefreshReason,
/**
* Workspace/account identifier that Codex was previously using.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecOutputDeltaNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecOutputDeltaNotification.ts
index 9a4b728062..a6c2ea45dc 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecOutputDeltaNotification.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecOutputDeltaNotification.ts
@@ -9,20 +9,20 @@ import type { CommandExecOutputStream } from "./CommandExecOutputStream";
* These notifications are connection-scoped. If the originating connection
* closes, the server terminates the process.
*/
-export type CommandExecOutputDeltaNotification = {
+export type CommandExecOutputDeltaNotification = {
/**
* Client-supplied, connection-scoped `processId` from the original
* `command/exec` request.
*/
-processId: string,
+processId: string,
/**
* Output stream for this chunk.
*/
-stream: CommandExecOutputStream,
+stream: CommandExecOutputStream,
/**
* Base64-encoded output bytes.
*/
-deltaBase64: string,
+deltaBase64: string,
/**
* `true` on the final streamed chunk for a stream when `outputBytesCap`
* truncated later output on that stream.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecParams.ts
index 2e132f7818..097cfdfecc 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecParams.ts
@@ -12,11 +12,11 @@ import type { SandboxPolicy } from "./SandboxPolicy";
* sent only after all `command/exec/outputDelta` notifications for that
* connection have been emitted.
*/
-export type CommandExecParams = {
+export type CommandExecParams = {
/**
* Command argv vector. Empty arrays are rejected.
*/
-command: Array<string>,
+command: Array<string>,
/**
* Optional client-supplied, connection-scoped process id.
*
@@ -25,56 +25,56 @@ command: Array<string>,
* `command/exec/terminate` calls. When omitted, buffered execution gets an
* internal id that is not exposed to the client.
*/
-processId?: string | null,
+processId?: string | null,
/**
* Enable PTY mode.
*
* This implies `streamStdin` and `streamStdoutStderr`.
*/
-tty?: boolean,
+tty?: boolean,
/**
* Allow follow-up `command/exec/write` requests to write stdin bytes.
*
* Requires a client-supplied `processId`.
*/
-streamStdin?: boolean,
+streamStdin?: boolean,
/**
* Stream stdout/stderr via `command/exec/outputDelta` notifications.
*
* Streamed bytes are not duplicated into the final response and require a
* client-supplied `processId`.
*/
-streamStdoutStderr?: boolean,
+streamStdoutStderr?: boolean,
/**
* Optional per-stream stdout/stderr capture cap in bytes.
*
* When omitted, the server default applies. Cannot be combined with
* `disableOutputCap`.
*/
-outputBytesCap?: number | null,
+outputBytesCap?: number | null,
/**
* Disable stdout/stderr capture truncation for this request.
*
* Cannot be combined with `outputBytesCap`.
*/
-disableOutputCap?: boolean,
+disableOutputCap?: boolean,
/**
* Disable the timeout entirely for this request.
*
* Cannot be combined with `timeoutMs`.
*/
-disableTimeout?: boolean,
+disableTimeout?: boolean,
/**
* Optional timeout in milliseconds.
*
* When omitted, the server default applies. Cannot be combined with
* `disableTimeout`.
*/
-timeoutMs?: number | null,
+timeoutMs?: number | null,
/**
* Optional working directory. Defaults to the server cwd.
*/
-cwd?: string | null,
+cwd?: string | null,
/**
* Optional environment overrides merged into the server-computed
* environment.
@@ -82,12 +82,12 @@ cwd?: string | null,
* Matching names override inherited values. Set a key to `null` to unset
* an inherited variable.
*/
-env?: { [key in string]?: string | null } | null,
+env?: { [key in string]?: string | null } | null,
/**
* Optional initial PTY size in character cells. Only valid when `tty` is
* true.
*/
-size?: CommandExecTerminalSize | null,
+size?: CommandExecTerminalSize | null,
/**
* Optional sandbox policy for this command.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecResizeParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecResizeParams.ts
index dde1417c0a..40a05dc780 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecResizeParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecResizeParams.ts
@@ -6,12 +6,12 @@ import type { CommandExecTerminalSize } from "./CommandExecTerminalSize";
/**
* Resize a running PTY-backed `command/exec` session.
*/
-export type CommandExecResizeParams = {
+export type CommandExecResizeParams = {
/**
* Client-supplied, connection-scoped `processId` from the original
* `command/exec` request.
*/
-processId: string,
+processId: string,
/**
* New PTY size in character cells.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecResponse.ts
index c13efeffe6..25e01eb53b 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecResponse.ts
@@ -5,17 +5,17 @@
/**
* Final buffered result for `command/exec`.
*/
-export type CommandExecResponse = {
+export type CommandExecResponse = {
/**
* Process exit code.
*/
-exitCode: number,
+exitCode: number,
/**
* Buffered stdout capture.
*
* Empty when stdout was streamed via `command/exec/outputDelta`.
*/
-stdout: string,
+stdout: string,
/**
* Buffered stderr capture.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecTerminalSize.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecTerminalSize.ts
index 5181b154ff..0bfacb62c6 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecTerminalSize.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecTerminalSize.ts
@@ -5,11 +5,11 @@
/**
* PTY size in character cells for `command/exec` PTY sessions.
*/
-export type CommandExecTerminalSize = {
+export type CommandExecTerminalSize = {
/**
* Terminal height in character cells.
*/
-rows: number,
+rows: number,
/**
* Terminal width in character cells.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecTerminateParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecTerminateParams.ts
index 8012d29e41..cae9705752 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecTerminateParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecTerminateParams.ts
@@ -5,7 +5,7 @@
/**
* Terminate a running `command/exec` session.
*/
-export type CommandExecTerminateParams = {
+export type CommandExecTerminateParams = {
/**
* Client-supplied, connection-scoped `processId` from the original
* `command/exec` request.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecWriteParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecWriteParams.ts
index b4df50f1bf..2092c79381 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecWriteParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecWriteParams.ts
@@ -6,16 +6,16 @@
* Write stdin bytes to a running `command/exec` session, close stdin, or
* both.
*/
-export type CommandExecWriteParams = {
+export type CommandExecWriteParams = {
/**
* Client-supplied, connection-scoped `processId` from the original
* `command/exec` request.
*/
-processId: string,
+processId: string,
/**
* Optional base64-encoded stdin bytes to write.
*/
-deltaBase64?: string | null,
+deltaBase64?: string | null,
/**
* Close stdin after writing `deltaBase64`, if present.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts
index 8fb6375e69..e1330e2591 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts
@@ -8,7 +8,7 @@ import type { ExecPolicyAmendment } from "./ExecPolicyAmendment";
import type { NetworkApprovalContext } from "./NetworkApprovalContext";
import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment";
-export type CommandExecutionRequestApprovalParams = { threadId: string, turnId: string, itemId: string,
+export type CommandExecutionRequestApprovalParams = { threadId: string, turnId: string, itemId: string,
/**
* Unique identifier for this specific approval callback.
*
@@ -18,39 +18,39 @@ export type CommandExecutionRequestApprovalParams = { threadId: string, turnId:
* one parent `itemId`, so `approvalId` is a distinct opaque callback id
* (a UUID) used to disambiguate routing.
*/
-approvalId?: string | null,
+approvalId?: string | null,
/**
* Optional explanatory reason (e.g. request for network access).
*/
-reason?: string | null,
+reason?: string | null,
/**
* Optional context for a managed-network approval prompt.
*/
-networkApprovalContext?: NetworkApprovalContext | null,
+networkApprovalContext?: NetworkApprovalContext | null,
/**
* The command to be executed.
*/
-command?: string | null,
+command?: string | null,
/**
* The command's working directory.
*/
-cwd?: string | null,
+cwd?: string | null,
/**
* Best-effort parsed command actions for friendly display.
*/
-commandActions?: Array<CommandAction> | null,
+commandActions?: Array<CommandAction> | null,
/**
* Optional additional permissions requested for this command.
*/
-additionalPermissions?: AdditionalPermissionProfile | null,
+additionalPermissions?: AdditionalPermissionProfile | null,
/**
* Optional proposed execpolicy amendment to allow similar commands without prompting.
*/
-proposedExecpolicyAmendment?: ExecPolicyAmendment | null,
+proposedExecpolicyAmendment?: ExecPolicyAmendment | null,
/**
* Optional proposed network policy amendments (allow/deny host) for future requests.
*/
-proposedNetworkPolicyAmendments?: Array<NetworkPolicyAmendment> | null,
+proposedNetworkPolicyAmendments?: Array<NetworkPolicyAmendment> | null,
/**
* Ordered list of decisions the client may present for this prompt.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigBatchWriteParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigBatchWriteParams.ts
index 6103039ef6..352eac28e3 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigBatchWriteParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigBatchWriteParams.ts
@@ -3,11 +3,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ConfigEdit } from "./ConfigEdit";
-export type ConfigBatchWriteParams = { edits: Array<ConfigEdit>,
+export type ConfigBatchWriteParams = { edits: Array<ConfigEdit>,
/**
* Path to the config file to write; defaults to the user's `config.toml` when omitted.
*/
-filePath?: string | null, expectedVersion?: string | null,
+filePath?: string | null, expectedVersion?: string | null,
/**
* When true, hot-reload the updated user config into all loaded threads after writing.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigLayerSource.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigLayerSource.ts
index b20c373bcb..1fe19b6765 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigLayerSource.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigLayerSource.ts
@@ -3,12 +3,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AbsolutePathBuf } from "../AbsolutePathBuf";
-export type ConfigLayerSource = { "type": "mdm", domain: string, key: string, } | { "type": "system",
+export type ConfigLayerSource = { "type": "mdm", domain: string, key: string, } | { "type": "system",
/**
* This is the path to the system config.toml file, though it is not
* guaranteed to exist.
*/
-file: AbsolutePathBuf, } | { "type": "user",
+file: AbsolutePathBuf, } | { "type": "user",
/**
* This is the path to the user's config.toml file, though it is not
* guaranteed to exist.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigReadParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigReadParams.ts
index c5d5bc874c..1fd418d182 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigReadParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigReadParams.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ConfigReadParams = { includeLayers: boolean,
+export type ConfigReadParams = { includeLayers: boolean,
/**
* Optional working directory to resolve project config layers. If specified,
* return the effective config as seen from that directory (i.e., including any
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigRequirementsReadResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigRequirementsReadResponse.ts
index c2891d939e..f2de11d98e 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigRequirementsReadResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigRequirementsReadResponse.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ConfigRequirements } from "./ConfigRequirements";
-export type ConfigRequirementsReadResponse = {
+export type ConfigRequirementsReadResponse = {
/**
* Null if no requirements are configured (e.g. no requirements.toml/MDM entries).
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigValueWriteParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigValueWriteParams.ts
index 9204760f85..709173d795 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigValueWriteParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigValueWriteParams.ts
@@ -4,7 +4,7 @@
import type { JsonValue } from "../serde_json/JsonValue";
import type { MergeStrategy } from "./MergeStrategy";
-export type ConfigValueWriteParams = { keyPath: string, value: JsonValue, mergeStrategy: MergeStrategy,
+export type ConfigValueWriteParams = { keyPath: string, value: JsonValue, mergeStrategy: MergeStrategy,
/**
* Path to the config file to write; defaults to the user's `config.toml` when omitted.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigWarningNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigWarningNotification.ts
index fae64c7a2c..e0cdf392d9 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigWarningNotification.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigWarningNotification.ts
@@ -3,19 +3,19 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { TextRange } from "./TextRange";
-export type ConfigWarningNotification = {
+export type ConfigWarningNotification = {
/**
* Concise summary of the warning.
*/
-summary: string,
+summary: string,
/**
* Optional extra guidance or error details.
*/
-details: string | null,
+details: string | null,
/**
* Optional path to the config file that triggered the warning.
*/
-path?: string,
+path?: string,
/**
* Optional range for the error location inside the config file.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigWriteResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigWriteResponse.ts
index 536a680b20..55cdce3751 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigWriteResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigWriteResponse.ts
@@ -5,7 +5,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
import type { OverriddenMetadata } from "./OverriddenMetadata";
import type { WriteStatus } from "./WriteStatus";
-export type ConfigWriteResponse = { status: WriteStatus, version: string,
+export type ConfigWriteResponse = { status: WriteStatus, version: string,
/**
* Canonical path to the config file that was written.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/DeprecationNoticeNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/DeprecationNoticeNotification.ts
index e0d2e7d6e6..29b6117157 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/DeprecationNoticeNotification.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/DeprecationNoticeNotification.ts
@@ -2,11 +2,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type DeprecationNoticeNotification = {
+export type DeprecationNoticeNotification = {
/**
* Concise summary of what is deprecated.
*/
-summary: string,
+summary: string,
/**
* Optional extra guidance, such as migration steps or rationale.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeature.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeature.ts
index e17ef83138..2baf710080 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeature.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeature.ts
@@ -3,34 +3,34 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ExperimentalFeatureStage } from "./ExperimentalFeatureStage";
-export type ExperimentalFeature = {
+export type ExperimentalFeature = {
/**
* Stable key used in config.toml and CLI flag toggles.
*/
-name: string,
+name: string,
/**
* Lifecycle stage of this feature flag.
*/
-stage: ExperimentalFeatureStage,
+stage: ExperimentalFeatureStage,
/**
* User-facing display name shown in the experimental features UI.
* Null when this feature is not in beta.
*/
-displayName: string | null,
+displayName: string | null,
/**
* Short summary describing what the feature does.
* Null when this feature is not in beta.
*/
-description: string | null,
+description: string | null,
/**
* Announcement copy shown to users when the feature is introduced.
* Null when this feature is not in beta.
*/
-announcement: string | null,
+announcement: string | null,
/**
* Whether this feature is currently enabled in the loaded config.
*/
-enabled: boolean,
+enabled: boolean,
/**
* Whether this feature is enabled by default.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetParams.ts
index cd9ced0b3a..d96955bf3d 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetParams.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ExperimentalFeatureEnablementSetParams = {
+export type ExperimentalFeatureEnablementSetParams = {
/**
* Process-wide runtime feature enablement keyed by canonical feature name.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetResponse.ts
index 903576d9bc..d0a8975b81 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureEnablementSetResponse.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ExperimentalFeatureEnablementSetResponse = {
+export type ExperimentalFeatureEnablementSetResponse = {
/**
* Feature enablement entries updated by this request.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListParams.ts
index 1d4dc84e0d..0a1555d998 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListParams.ts
@@ -2,11 +2,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ExperimentalFeatureListParams = {
+export type ExperimentalFeatureListParams = {
/**
* Opaque pagination cursor returned by a previous call.
*/
-cursor?: string | null,
+cursor?: string | null,
/**
* Optional page size; defaults to a reasonable server-side value.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListResponse.ts
index 46b39ba019..4d055fa80b 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureListResponse.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ExperimentalFeature } from "./ExperimentalFeature";
-export type ExperimentalFeatureListResponse = { data: Array<ExperimentalFeature>,
+export type ExperimentalFeatureListResponse = { data: Array<ExperimentalFeature>,
/**
* Opaque cursor to pass to the next call to continue after the last item.
* If None, there are no more items to return.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigDetectParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigDetectParams.ts
index 2a79b8107a..163d961925 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigDetectParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigDetectParams.ts
@@ -2,11 +2,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ExternalAgentConfigDetectParams = {
+export type ExternalAgentConfigDetectParams = {
/**
* If true, include detection under the user's home (~/.claude, ~/.codex, etc.).
*/
-includeHome?: boolean,
+includeHome?: boolean,
/**
* Zero or more working directories to include for repo-scoped detection.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItem.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItem.ts
index 442143c81e..45e5585a77 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItem.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItem.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ExternalAgentConfigMigrationItemType } from "./ExternalAgentConfigMigrationItemType";
-export type ExternalAgentConfigMigrationItem = { itemType: ExternalAgentConfigMigrationItemType, description: string,
+export type ExternalAgentConfigMigrationItem = { itemType: ExternalAgentConfigMigrationItemType, description: string,
/**
* Null or empty means home-scoped migration; non-empty means repo-scoped migration.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FileChangeRequestApprovalParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FileChangeRequestApprovalParams.ts
index a7951b6858..c514ed6219 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FileChangeRequestApprovalParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FileChangeRequestApprovalParams.ts
@@ -2,11 +2,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type FileChangeRequestApprovalParams = { threadId: string, turnId: string, itemId: string,
+export type FileChangeRequestApprovalParams = { threadId: string, turnId: string, itemId: string,
/**
* Optional explanatory reason (e.g. request for extra write access).
*/
-reason?: string | null,
+reason?: string | null,
/**
* [UNSTABLE] When set, the agent is asking the user to allow writes under this root
* for the remainder of the session (unclear if this is honored today).
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsChangedNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsChangedNotification.ts
index fc0fa9cf6d..3f3be8ff3d 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsChangedNotification.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsChangedNotification.ts
@@ -6,11 +6,11 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Filesystem watch notification emitted for `fs/watch` subscribers.
*/
-export type FsChangedNotification = {
+export type FsChangedNotification = {
/**
* Watch identifier previously provided to `fs/watch`.
*/
-watchId: string,
+watchId: string,
/**
* File or directory paths associated with this event.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsCopyParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsCopyParams.ts
index 8f1ec8d4e0..d19aca9268 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsCopyParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsCopyParams.ts
@@ -6,15 +6,15 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Copy a file or directory tree on the host filesystem.
*/
-export type FsCopyParams = {
+export type FsCopyParams = {
/**
* Absolute source path.
*/
-sourcePath: AbsolutePathBuf,
+sourcePath: AbsolutePathBuf,
/**
* Absolute destination path.
*/
-destinationPath: AbsolutePathBuf,
+destinationPath: AbsolutePathBuf,
/**
* Required for directory copies; ignored for file copies.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsCreateDirectoryParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsCreateDirectoryParams.ts
index 2afc9950ba..b648d35029 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsCreateDirectoryParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsCreateDirectoryParams.ts
@@ -6,11 +6,11 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Create a directory on the host filesystem.
*/
-export type FsCreateDirectoryParams = {
+export type FsCreateDirectoryParams = {
/**
* Absolute directory path to create.
*/
-path: AbsolutePathBuf,
+path: AbsolutePathBuf,
/**
* Whether parent directories should also be created. Defaults to `true`.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsGetMetadataParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsGetMetadataParams.ts
index 38e46c7b1c..4ea0445cd6 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsGetMetadataParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsGetMetadataParams.ts
@@ -6,7 +6,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Request metadata for an absolute path.
*/
-export type FsGetMetadataParams = {
+export type FsGetMetadataParams = {
/**
* Absolute path to inspect.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsGetMetadataResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsGetMetadataResponse.ts
index 351c646224..14b4db7e3f 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsGetMetadataResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsGetMetadataResponse.ts
@@ -5,19 +5,19 @@
/**
* Metadata returned by `fs/getMetadata`.
*/
-export type FsGetMetadataResponse = {
+export type FsGetMetadataResponse = {
/**
* Whether the path currently resolves to a directory.
*/
-isDirectory: boolean,
+isDirectory: boolean,
/**
* Whether the path currently resolves to a regular file.
*/
-isFile: boolean,
+isFile: boolean,
/**
* File creation time in Unix milliseconds when available, otherwise `0`.
*/
-createdAtMs: number,
+createdAtMs: number,
/**
* File modification time in Unix milliseconds when available, otherwise `0`.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryEntry.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryEntry.ts
index 2696d7a4e2..197673d2bb 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryEntry.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryEntry.ts
@@ -5,15 +5,15 @@
/**
* A directory entry returned by `fs/readDirectory`.
*/
-export type FsReadDirectoryEntry = {
+export type FsReadDirectoryEntry = {
/**
* Direct child entry name only, not an absolute or relative path.
*/
-fileName: string,
+fileName: string,
/**
* Whether this entry resolves to a directory.
*/
-isDirectory: boolean,
+isDirectory: boolean,
/**
* Whether this entry resolves to a regular file.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryParams.ts
index 770eea3a35..94eaae4355 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryParams.ts
@@ -6,7 +6,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* List direct child names for a directory.
*/
-export type FsReadDirectoryParams = {
+export type FsReadDirectoryParams = {
/**
* Absolute directory path to read.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryResponse.ts
index 878e858f02..0ffb8acd4c 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadDirectoryResponse.ts
@@ -6,7 +6,7 @@ import type { FsReadDirectoryEntry } from "./FsReadDirectoryEntry";
/**
* Directory entries returned by `fs/readDirectory`.
*/
-export type FsReadDirectoryResponse = {
+export type FsReadDirectoryResponse = {
/**
* Direct child entries in the requested directory.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadFileParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadFileParams.ts
index f389b44fc5..d5bf22e33a 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadFileParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadFileParams.ts
@@ -6,7 +6,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Read a file from the host filesystem.
*/
-export type FsReadFileParams = {
+export type FsReadFileParams = {
/**
* Absolute path to read.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadFileResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadFileResponse.ts
index 075d126907..26b6126970 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsReadFileResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsReadFileResponse.ts
@@ -5,7 +5,7 @@
/**
* Base64-encoded file contents returned by `fs/readFile`.
*/
-export type FsReadFileResponse = {
+export type FsReadFileResponse = {
/**
* File contents encoded as base64.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsRemoveParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsRemoveParams.ts
index c9f02eb008..c95b860aca 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsRemoveParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsRemoveParams.ts
@@ -6,15 +6,15 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Remove a file or directory tree from the host filesystem.
*/
-export type FsRemoveParams = {
+export type FsRemoveParams = {
/**
* Absolute path to remove.
*/
-path: AbsolutePathBuf,
+path: AbsolutePathBuf,
/**
* Whether directory removal should recurse. Defaults to `true`.
*/
-recursive?: boolean | null,
+recursive?: boolean | null,
/**
* Whether missing paths should be ignored. Defaults to `true`.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsUnwatchParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsUnwatchParams.ts
index 34b70a9307..ff314814f0 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsUnwatchParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsUnwatchParams.ts
@@ -5,7 +5,7 @@
/**
* Stop filesystem watch notifications for a prior `fs/watch`.
*/
-export type FsUnwatchParams = {
+export type FsUnwatchParams = {
/**
* Watch identifier previously provided to `fs/watch`.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsWatchParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsWatchParams.ts
index 60755538cb..b990b8e0ec 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsWatchParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsWatchParams.ts
@@ -6,11 +6,11 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Start filesystem watch notifications for an absolute path.
*/
-export type FsWatchParams = {
+export type FsWatchParams = {
/**
* Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.
*/
-watchId: string,
+watchId: string,
/**
* Absolute file or directory path to watch.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsWatchResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsWatchResponse.ts
index b640306d82..82e6c7e9b3 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsWatchResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsWatchResponse.ts
@@ -6,7 +6,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Successful response for `fs/watch`.
*/
-export type FsWatchResponse = {
+export type FsWatchResponse = {
/**
* Canonicalized path associated with the watch.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FsWriteFileParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FsWriteFileParams.ts
index 7c22abdb3a..1e8672b529 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/FsWriteFileParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/FsWriteFileParams.ts
@@ -6,11 +6,11 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf";
/**
* Write a file on the host filesystem.
*/
-export type FsWriteFileParams = {
+export type FsWriteFileParams = {
/**
* Absolute path to write.
*/
-path: AbsolutePathBuf,
+path: AbsolutePathBuf,
/**
* File contents encoded as base64.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/GetAccountParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/GetAccountParams.ts
index efc646d16d..a5c5c25f66 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/GetAccountParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/GetAccountParams.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type GetAccountParams = {
+export type GetAccountParams = {
/**
* When `true`, requests a proactive token refresh before returning.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/GetAccountRateLimitsResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/GetAccountRateLimitsResponse.ts
index e75e9b8283..02cc777934 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/GetAccountRateLimitsResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/GetAccountRateLimitsResponse.ts
@@ -3,11 +3,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { RateLimitSnapshot } from "./RateLimitSnapshot";
-export type GetAccountRateLimitsResponse = {
+export type GetAccountRateLimitsResponse = {
/**
* Backward-compatible single-bucket view; mirrors the historical payload.
*/
-rateLimits: RateLimitSnapshot,
+rateLimits: RateLimitSnapshot,
/**
* Multi-bucket view keyed by metered `limit_id` (for example, `codex`).
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts
index a345e3d655..f5114ab675 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewCompletedNotification.ts
@@ -9,11 +9,11 @@ import type { GuardianApprovalReviewAction } from "./GuardianApprovalReviewActio
* [UNSTABLE] Temporary notification payload for guardian automatic approval
* review. This shape is expected to change soon.
*/
-export type ItemGuardianApprovalReviewCompletedNotification = { threadId: string, turnId: string,
+export type ItemGuardianApprovalReviewCompletedNotification = { threadId: string, turnId: string,
/**
* Stable identifier for this review.
*/
-reviewId: string,
+reviewId: string,
/**
* Identifier for the reviewed item or tool call when one exists.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts
index f917aa3ee7..e2330610a5 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ItemGuardianApprovalReviewStartedNotification.ts
@@ -8,11 +8,11 @@ import type { GuardianApprovalReviewAction } from "./GuardianApprovalReviewActio
* [UNSTABLE] Temporary notification payload for guardian automatic approval
* review. This shape is expected to change soon.
*/
-export type ItemGuardianApprovalReviewStartedNotification = { threadId: string, turnId: string,
+export type ItemGuardianApprovalReviewStartedNotification = { threadId: string, turnId: string,
/**
* Stable identifier for this review.
*/
-reviewId: string,
+reviewId: string,
/**
* Identifier for the reviewed item or tool call when one exists.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ListMcpServerStatusParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ListMcpServerStatusParams.ts
index 8225c462b1..fa00b8ea01 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ListMcpServerStatusParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ListMcpServerStatusParams.ts
@@ -3,15 +3,15 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { McpServerStatusDetail } from "./McpServerStatusDetail";
-export type ListMcpServerStatusParams = {
+export type ListMcpServerStatusParams = {
/**
* Opaque pagination cursor returned by a previous call.
*/
-cursor?: string | null,
+cursor?: string | null,
/**
* Optional page size; defaults to a server-defined value.
*/
-limit?: number | null,
+limit?: number | null,
/**
* Controls how much MCP inventory data to fetch for each server.
* Defaults to `Full` when omitted.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ListMcpServerStatusResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ListMcpServerStatusResponse.ts
index 35a92bdcb9..18696ed890 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ListMcpServerStatusResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ListMcpServerStatusResponse.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { McpServerStatus } from "./McpServerStatus";
-export type ListMcpServerStatusResponse = { data: Array<McpServerStatus>,
+export type ListMcpServerStatusResponse = { data: Array<McpServerStatus>,
/**
* Opaque cursor to pass to the next call to continue after the last item.
* If None, there are no more items to return.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountParams.ts
index 9fcb01f97c..4831a6b2de 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountParams.ts
@@ -2,16 +2,16 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type LoginAccountParams = { "type": "apiKey", apiKey: string, } | { "type": "chatgpt" } | { "type": "chatgptDeviceCode" } | { "type": "chatgptAuthTokens",
+export type LoginAccountParams = { "type": "apiKey", apiKey: string, } | { "type": "chatgpt" } | { "type": "chatgptDeviceCode" } | { "type": "chatgptAuthTokens",
/**
* Access token (JWT) supplied by the client.
* This token is used for backend API requests and email extraction.
*/
-accessToken: string,
+accessToken: string,
/**
* Workspace/account identifier supplied by the client.
*/
-chatgptAccountId: string,
+chatgptAccountId: string,
/**
* Optional plan type supplied by the client.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountResponse.ts
index 651f171e31..34bccd6578 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountResponse.ts
@@ -2,15 +2,15 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type LoginAccountResponse = { "type": "apiKey", } | { "type": "chatgpt", loginId: string,
+export type LoginAccountResponse = { "type": "apiKey", } | { "type": "chatgpt", loginId: string,
/**
* URL the client should open in a browser to initiate the OAuth flow.
*/
-authUrl: string, } | { "type": "chatgptDeviceCode", loginId: string,
+authUrl: string, } | { "type": "chatgptDeviceCode", loginId: string,
/**
* URL the client should open in a browser to complete device code authorization.
*/
-verificationUrl: string,
+verificationUrl: string,
/**
* One-time code the user must enter after signing in.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestParams.ts
index 13855adc3e..90d60f77c7 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestParams.ts
@@ -4,7 +4,7 @@
import type { JsonValue } from "../serde_json/JsonValue";
import type { McpElicitationSchema } from "./McpElicitationSchema";
-export type McpServerElicitationRequestParams = { threadId: string,
+export type McpServerElicitationRequestParams = { threadId: string,
/**
* Active Codex turn when this elicitation was observed, if app-server could correlate one.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestResponse.ts
index 054ef23f4a..a3d145744e 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationRequestResponse.ts
@@ -4,13 +4,13 @@
import type { JsonValue } from "../serde_json/JsonValue";
import type { McpServerElicitationAction } from "./McpServerElicitationAction";
-export type McpServerElicitationRequestResponse = { action: McpServerElicitationAction,
+export type McpServerElicitationRequestResponse = { action: McpServerElicitationAction,
/**
* Structured user input for accepted elicitations, mirroring RMCP `CreateElicitationResult`.
*
* This is nullable because decline/cancel responses have no content.
*/
-content: JsonValue | null,
+content: JsonValue | null,
/**
* Optional client metadata for form-mode action handling.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpServerToolCallParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerToolCallParams.ts
new file mode 100644
index 0000000000..046a3fdc28
--- /dev/null
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerToolCallParams.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 { JsonValue } from "../serde_json/JsonValue";
+
+export type McpServerToolCallParams = { threadId: string, server: string, tool: string, arguments?: JsonValue, _meta?: JsonValue, };
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpServerToolCallResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerToolCallResponse.ts
new file mode 100644
index 0000000000..fe14692ad2
--- /dev/null
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerToolCallResponse.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 { JsonValue } from "../serde_json/JsonValue";
+
+export type McpServerToolCallResponse = { content: Array<JsonValue>, structuredContent?: JsonValue, isError?: boolean, _meta?: JsonValue, };
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ModelListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ModelListParams.ts
index a1e7b8fa74..dae406dd2d 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ModelListParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ModelListParams.ts
@@ -2,15 +2,15 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ModelListParams = {
+export type ModelListParams = {
/**
* Opaque pagination cursor returned by a previous call.
*/
-cursor?: string | null,
+cursor?: string | null,
/**
* Optional page size; defaults to a reasonable server-side value.
*/
-limit?: number | null,
+limit?: number | null,
/**
* When true, include models that are hidden from the default picker list.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ModelListResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ModelListResponse.ts
index be5ba25dc8..b664b6c077 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ModelListResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ModelListResponse.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Model } from "./Model";
-export type ModelListResponse = { data: Array<Model>,
+export type ModelListResponse = { data: Array<Model>,
/**
* Opaque cursor to pass to the next call to continue after the last item.
* If None, there are no more items to return.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/NetworkRequirements.ts b/codex-rs/app-server-protocol/schema/typescript/v2/NetworkRequirements.ts
index c685b9539c..d1cd1ab298 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/NetworkRequirements.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/NetworkRequirements.ts
@@ -4,28 +4,28 @@
import type { NetworkDomainPermission } from "./NetworkDomainPermission";
import type { NetworkUnixSocketPermission } from "./NetworkUnixSocketPermission";
-export type NetworkRequirements = { enabled: boolean | null, httpPort: number | null, socksPort: number | null, allowUpstreamProxy: boolean | null, dangerouslyAllowNonLoopbackProxy: boolean | null, dangerouslyAllowAllUnixSockets: boolean | null,
+export type NetworkRequirements = { enabled: boolean | null, httpPort: number | null, socksPort: number | null, allowUpstreamProxy: boolean | null, dangerouslyAllowNonLoopbackProxy: boolean | null, dangerouslyAllowAllUnixSockets: boolean | null,
/**
* Canonical network permission map for `experimental_network`.
*/
-domains: { [key in string]?: NetworkDomainPermission } | null,
+domains: { [key in string]?: NetworkDomainPermission } | null,
/**
* When true, only managed allowlist entries are respected while managed
* network enforcement is active.
*/
-managedAllowedDomainsOnly: boolean | null,
+managedAllowedDomainsOnly: boolean | null,
/**
* Legacy compatibility view derived from `domains`.
*/
-allowedDomains: Array<string> | null,
+allowedDomains: Array<string> | null,
/**
* Legacy compatibility view derived from `domains`.
*/
-deniedDomains: Array<string> | null,
+deniedDomains: Array<string> | null,
/**
* Canonical unix socket permission map for `experimental_network`.
*/
-unixSockets: { [key in string]?: NetworkUnixSocketPermission } | null,
+unixSockets: { [key in string]?: NetworkUnixSocketPermission } | null,
/**
* Legacy compatibility view derived from `unix_sockets`.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PluginInstallParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PluginInstallParams.ts
index 190dee04c3..9ac1c50c1e 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/PluginInstallParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/PluginInstallParams.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AbsolutePathBuf } from "../AbsolutePathBuf";
-export type PluginInstallParams = { marketplacePath: AbsolutePathBuf, pluginName: string,
+export type PluginInstallParams = { marketplacePath: AbsolutePathBuf, pluginName: string,
/**
* When true, apply the remote plugin change before the local install flow.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PluginInterface.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PluginInterface.ts
index cea42d29e1..7e0a48aaec 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/PluginInterface.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/PluginInterface.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AbsolutePathBuf } from "../AbsolutePathBuf";
-export type PluginInterface = { displayName: string | null, shortDescription: string | null, longDescription: string | null, developerName: string | null, category: string | null, capabilities: Array<string>, websiteUrl: string | null, privacyPolicyUrl: string | null, termsOfServiceUrl: string | null,
+export type PluginInterface = { displayName: string | null, shortDescription: string | null, longDescription: string | null, developerName: string | null, category: string | null, capabilities: Array<string>, websiteUrl: string | null, privacyPolicyUrl: string | null, termsOfServiceUrl: string | null,
/**
* Starter prompts for the plugin. Capped at 3 entries with a maximum of
* 128 characters per entry.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PluginListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PluginListParams.ts
index 07ecee5e5f..cd2a0cde1e 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/PluginListParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/PluginListParams.ts
@@ -3,12 +3,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AbsolutePathBuf } from "../AbsolutePathBuf";
-export type PluginListParams = {
+export type PluginListParams = {
/**
* Optional working directories used to discover repo marketplaces. When omitted,
* only home-scoped marketplaces and the official curated marketplace are considered.
*/
-cwds?: Array<AbsolutePathBuf> | null,
+cwds?: Array<AbsolutePathBuf> | null,
/**
* When true, reconcile the official curated marketplace against the remote plugin state
* before listing marketplaces.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PluginUninstallParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PluginUninstallParams.ts
index b92a21c9bd..aa1d1bfef9 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/PluginUninstallParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/PluginUninstallParams.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type PluginUninstallParams = { pluginId: string,
+export type PluginUninstallParams = { pluginId: string,
/**
* When true, apply the remote plugin change before the local uninstall flow.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewStartParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewStartParams.ts
index 363e6dda37..9833e08a22 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewStartParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewStartParams.ts
@@ -4,7 +4,7 @@
import type { ReviewDelivery } from "./ReviewDelivery";
import type { ReviewTarget } from "./ReviewTarget";
-export type ReviewStartParams = { threadId: string, target: ReviewTarget,
+export type ReviewStartParams = { threadId: string, target: ReviewTarget,
/**
* Where to run the review: inline (default) on the current thread or
* detached on a new thread (returned in `reviewThreadId`).
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewStartResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewStartResponse.ts
index 25eb6f82fe..6d6c2bb74f 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewStartResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewStartResponse.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Turn } from "./Turn";
-export type ReviewStartResponse = { turn: Turn,
+export type ReviewStartResponse = { turn: Turn,
/**
* Identifies the thread where the review runs.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewTarget.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewTarget.ts
index a79f1e993c..a69b68c056 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewTarget.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewTarget.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ReviewTarget = { "type": "uncommittedChanges" } | { "type": "baseBranch", branch: string, } | { "type": "commit", sha: string,
+export type ReviewTarget = { "type": "uncommittedChanges" } | { "type": "baseBranch", branch: string, } | { "type": "commit", sha: string,
/**
* Optional human-readable label (e.g., commit subject) for UIs.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/SkillMetadata.ts b/codex-rs/app-server-protocol/schema/typescript/v2/SkillMetadata.ts
index 52c0cd4945..b620fffbdb 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/SkillMetadata.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/SkillMetadata.ts
@@ -5,7 +5,7 @@ import type { SkillDependencies } from "./SkillDependencies";
import type { SkillInterface } from "./SkillInterface";
import type { SkillScope } from "./SkillScope";
-export type SkillMetadata = { name: string, description: string,
+export type SkillMetadata = { name: string, description: string,
/**
* Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/SkillsConfigWriteParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/SkillsConfigWriteParams.ts
index 273d593cfd..39192e075e 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/SkillsConfigWriteParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/SkillsConfigWriteParams.ts
@@ -3,11 +3,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AbsolutePathBuf } from "../AbsolutePathBuf";
-export type SkillsConfigWriteParams = {
+export type SkillsConfigWriteParams = {
/**
* Path-based selector.
*/
-path?: AbsolutePathBuf | null,
+path?: AbsolutePathBuf | null,
/**
* Name-based selector.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListParams.ts
index f584443810..ad714a3297 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/SkillsListParams.ts
@@ -3,15 +3,15 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { SkillsListExtraRootsForCwd } from "./SkillsListExtraRootsForCwd";
-export type SkillsListParams = {
+export type SkillsListParams = {
/**
* When empty, defaults to the current session working directory.
*/
-cwds?: Array<string>,
+cwds?: Array<string>,
/**
* When true, bypass the skills cache and re-scan skills from disk.
*/
-forceReload?: boolean,
+forceReload?: boolean,
/**
* Optional per-cwd extra roots to scan as user-scoped skills.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/TextElement.ts b/codex-rs/app-server-protocol/schema/typescript/v2/TextElement.ts
index 8841d00499..535e0a1dde 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/TextElement.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/TextElement.ts
@@ -3,11 +3,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ByteRange } from "./ByteRange";
-export type TextElement = {
+export type TextElement = {
/**
* Byte range in the parent `text` buffer that this element occupies.
*/
-byteRange: ByteRange,
+byteRange: ByteRange,
/**
* Optional human-readable placeholder for the element, displayed in the UI.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/TextPosition.ts b/codex-rs/app-server-protocol/schema/typescript/v2/TextPosition.ts
index e0a6d11a01..0e6eeb1376 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/TextPosition.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/TextPosition.ts
@@ -2,11 +2,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type TextPosition = {
+export type TextPosition = {
/**
* 1-based line number.
*/
-line: number,
+line: number,
/**
* 1-based column number (in Unicode scalar values).
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts b/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts
index 7a8bf4aca4..57ef3c1075 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts
@@ -6,67 +6,67 @@ import type { SessionSource } from "./SessionSource";
import type { ThreadStatus } from "./ThreadStatus";
import type { Turn } from "./Turn";
-export type Thread = { id: string,
+export type Thread = { id: string,
/**
* Source thread id when this thread was created by forking another thread.
*/
-forkedFromId: string | null,
+forkedFromId: string | null,
/**
* Usually the first user message in the thread, if available.
*/
-preview: string,
+preview: string,
/**
* Whether the thread is ephemeral and should not be materialized on disk.
*/
-ephemeral: boolean,
+ephemeral: boolean,
/**
* Model provider used for this thread (for example, 'openai').
*/
-modelProvider: string,
+modelProvider: string,
/**
* Unix timestamp (in seconds) when the thread was created.
*/
-createdAt: number,
+createdAt: number,
/**
* Unix timestamp (in seconds) when the thread was last updated.
*/
-updatedAt: number,
+updatedAt: number,
/**
* Current runtime status for the thread.
*/
-status: ThreadStatus,
+status: ThreadStatus,
/**
* [UNSTABLE] Path to the thread on disk.
*/
-path: string | null,
+path: string | null,
/**
* Working directory captured for the thread.
*/
-cwd: string,
+cwd: string,
/**
* Version of the CLI that created the thread.
*/
-cliVersion: string,
+cliVersion: string,
/**
* Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).
*/
-source: SessionSource,
+source: SessionSource,
/**
* Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
*/
-agentNickname: string | null,
+agentNickname: string | null,
/**
* Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.
*/
-agentRole: string | null,
+agentRole: string | null,
/**
* Optional Git metadata captured when the thread was created.
*/
-gitInfo: GitInfo | null,
+gitInfo: GitInfo | null,
/**
* Optional user-facing thread title.
*/
-name: string | null,
+name: string | null,
/**
* Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read`
* (when `includeTurns` is true) responses.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadForkResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadForkResponse.ts
index 00dade9f1f..5e9d460a9a 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadForkResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadForkResponse.ts
@@ -8,7 +8,7 @@ import type { AskForApproval } from "./AskForApproval";
import type { SandboxPolicy } from "./SandboxPolicy";
import type { Thread } from "./Thread";
-export type ThreadForkResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: ServiceTier | null, cwd: string, approvalPolicy: AskForApproval,
+export type ThreadForkResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: ServiceTier | null, cwd: string, approvalPolicy: AskForApproval,
/**
* Reviewer currently used for approval requests on this thread.
*/
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 9202f3728f..54d3eaaa8b 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts
@@ -22,78 +22,78 @@ import type { PatchApplyStatus } from "./PatchApplyStatus";
import type { UserInput } from "./UserInput";
import type { WebSearchAction } from "./WebSearchAction";
-export type ThreadItem = { "type": "userMessage", id: string, content: Array<UserInput>, } | { "type": "hookPrompt", id: string, fragments: Array<HookPromptFragment>, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, memoryCitation: MemoryCitation | null, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array<string>, content: Array<string>, } | { "type": "commandExecution", id: string,
+export type ThreadItem = { "type": "userMessage", id: string, content: Array<UserInput>, } | { "type": "hookPrompt", id: string, fragments: Array<HookPromptFragment>, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, memoryCitation: MemoryCitation | null, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array<string>, content: Array<string>, } | { "type": "commandExecution", id: string,
/**
* The command to be executed.
*/
-command: string,
+command: string,
/**
* The command's working directory.
*/
-cwd: string,
+cwd: string,
/**
* Identifier for the underlying PTY process (when available).
*/
-processId: string | null, source: CommandExecutionSource, status: CommandExecutionStatus,
+processId: string | null, source: CommandExecutionSource, status: CommandExecutionStatus,
/**
* A best-effort parsing of the command to understand the action(s) it will perform.
* This returns a list of CommandAction objects because a single shell command may
* be composed of many commands piped together.
*/
-commandActions: Array<CommandAction>,
+commandActions: Array<CommandAction>,
/**
* The command's output, aggregated from stdout and stderr.
*/
-aggregatedOutput: string | null,
+aggregatedOutput: string | null,
/**
* The command's exit code.
*/
-exitCode: number | null,
+exitCode: number | null,
/**
* The duration of the command execution in milliseconds.
*/
-durationMs: number | null, } | { "type": "fileChange", id: string, changes: Array<FileUpdateChange>, status: PatchApplyStatus, } | { "type": "mcpToolCall", id: string, server: string, tool: string, status: McpToolCallStatus, arguments: JsonValue, result: McpToolCallResult | null, error: McpToolCallError | null,
+durationMs: number | null, } | { "type": "fileChange", id: string, changes: Array<FileUpdateChange>, status: PatchApplyStatus, } | { "type": "mcpToolCall", id: string, server: string, tool: string, status: McpToolCallStatus, arguments: JsonValue, result: McpToolCallResult | null, error: McpToolCallError | null,
/**
* The duration of the MCP tool call in milliseconds.
*/
-durationMs: number | null, } | { "type": "dynamicToolCall", id: string, tool: string, arguments: JsonValue, status: DynamicToolCallStatus, contentItems: Array<DynamicToolCallOutputContentItem> | null, success: boolean | null,
+durationMs: number | null, } | { "type": "dynamicToolCall", id: string, tool: string, arguments: JsonValue, status: DynamicToolCallStatus, contentItems: Array<DynamicToolCallOutputContentItem> | null, success: boolean | null,
/**
* The duration of the dynamic tool call in milliseconds.
*/
-durationMs: number | null, } | { "type": "collabAgentToolCall",
+durationMs: number | null, } | { "type": "collabAgentToolCall",
/**
* Unique identifier for this collab tool call.
*/
-id: string,
+id: string,
/**
* Name of the collab tool that was invoked.
*/
-tool: CollabAgentTool,
+tool: CollabAgentTool,
/**
* Current status of the collab tool call.
*/
-status: CollabAgentToolCallStatus,
+status: CollabAgentToolCallStatus,
/**
* Thread ID of the agent issuing the collab request.
*/
-senderThreadId: string,
+senderThreadId: string,
/**
* Thread ID of the receiving agent, when applicable. In case of spawn operation,
* this corresponds to the newly spawned agent.
*/
-receiverThreadIds: Array<string>,
+receiverThreadIds: Array<string>,
/**
* Prompt text sent as part of the collab tool call, when available.
*/
-prompt: string | null,
+prompt: string | null,
/**
* Model requested for the spawned agent, when applicable.
*/
-model: string | null,
+model: string | null,
/**
* Reasoning effort requested for the spawned agent, when applicable.
*/
-reasoningEffort: ReasoningEffort | null,
+reasoningEffort: ReasoningEffort | null,
/**
* Last known status of the target agents, when available.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadListParams.ts
index ea14ec3d45..87857b7f73 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadListParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadListParams.ts
@@ -4,39 +4,39 @@
import type { ThreadSortKey } from "./ThreadSortKey";
import type { ThreadSourceKind } from "./ThreadSourceKind";
-export type ThreadListParams = {
+export type ThreadListParams = {
/**
* Opaque pagination cursor returned by a previous call.
*/
-cursor?: string | null,
+cursor?: string | null,
/**
* Optional page size; defaults to a reasonable server-side value.
*/
-limit?: number | null,
+limit?: number | null,
/**
* Optional sort key; defaults to created_at.
*/
-sortKey?: ThreadSortKey | null,
+sortKey?: ThreadSortKey | null,
/**
* Optional provider filter; when set, only sessions recorded under these
* providers are returned. When present but empty, includes all providers.
*/
-modelProviders?: Array<string> | null,
+modelProviders?: Array<string> | null,
/**
* Optional source filter; when set, only sessions from these source kinds
* are returned. When omitted or empty, defaults to interactive sources.
*/
-sourceKinds?: Array<ThreadSourceKind> | null,
+sourceKinds?: Array<ThreadSourceKind> | null,
/**
* Optional archived filter; when set to true, only archived threads are returned.
* If false or null, only non-archived threads are returned.
*/
-archived?: boolean | null,
+archived?: boolean | null,
/**
* Optional cwd filter; when set, only threads whose session cwd exactly
* matches this path are returned.
*/
-cwd?: string | null,
+cwd?: string | null,
/**
* Optional substring filter for the extracted thread title.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadListResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadListResponse.ts
index 3c0296e5e0..3e4d4f57a4 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadListResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadListResponse.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Thread } from "./Thread";
-export type ThreadListResponse = { data: Array<Thread>,
+export type ThreadListResponse = { data: Array<Thread>,
/**
* Opaque cursor to pass to the next call to continue after the last item.
* if None, there are no more items to return.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadLoadedListParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadLoadedListParams.ts
index ef1e0ac085..a7889e4f09 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadLoadedListParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadLoadedListParams.ts
@@ -2,11 +2,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ThreadLoadedListParams = {
+export type ThreadLoadedListParams = {
/**
* Opaque pagination cursor returned by a previous call.
*/
-cursor?: string | null,
+cursor?: string | null,
/**
* Optional page size; defaults to no limit.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadLoadedListResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadLoadedListResponse.ts
index d215a45d01..21a48c37e9 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadLoadedListResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadLoadedListResponse.ts
@@ -2,11 +2,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ThreadLoadedListResponse = {
+export type ThreadLoadedListResponse = {
/**
* Thread ids for sessions currently loaded in memory.
*/
-data: Array<string>,
+data: Array<string>,
/**
* Opaque cursor to pass to the next call to continue after the last item.
* if None, there are no more items to return.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadMetadataGitInfoUpdateParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadMetadataGitInfoUpdateParams.ts
index 7424ae3606..865b534622 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadMetadataGitInfoUpdateParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadMetadataGitInfoUpdateParams.ts
@@ -2,17 +2,17 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ThreadMetadataGitInfoUpdateParams = {
+export type ThreadMetadataGitInfoUpdateParams = {
/**
* Omit to leave the stored commit unchanged, set to `null` to clear it,
* or provide a non-empty string to replace it.
*/
-sha?: string | null,
+sha?: string | null,
/**
* Omit to leave the stored branch unchanged, set to `null` to clear it,
* or provide a non-empty string to replace it.
*/
-branch?: string | null,
+branch?: string | null,
/**
* Omit to leave the stored origin URL unchanged, set to `null` to clear it,
* or provide a non-empty string to replace it.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadMetadataUpdateParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadMetadataUpdateParams.ts
index 5b6eb8a05f..bec4bc1284 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadMetadataUpdateParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadMetadataUpdateParams.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ThreadMetadataGitInfoUpdateParams } from "./ThreadMetadataGitInfoUpdateParams";
-export type ThreadMetadataUpdateParams = { threadId: string,
+export type ThreadMetadataUpdateParams = { threadId: string,
/**
* Patch the stored Git metadata for this thread.
* Omit a field to leave it unchanged, set it to `null` to clear it, or
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadReadParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadReadParams.ts
index b274d1e774..64169d2bf6 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadReadParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadReadParams.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ThreadReadParams = { threadId: string,
+export type ThreadReadParams = { threadId: string,
/**
* When true, include turns and their items from rollout history.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRealtimeStartTransport.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRealtimeStartTransport.ts
index e6450a6690..339e1b1b17 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRealtimeStartTransport.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRealtimeStartTransport.ts
@@ -5,7 +5,7 @@
/**
* EXPERIMENTAL - transport used by thread realtime.
*/
-export type ThreadRealtimeStartTransport = { "type": "websocket" } | { "type": "webrtc",
+export type ThreadRealtimeStartTransport = { "type": "websocket" } | { "type": "webrtc",
/**
* SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the
* realtime events data channel.
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadResumeResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadResumeResponse.ts
index ba70bd8f57..9c7ec4527b 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadResumeResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadResumeResponse.ts
@@ -8,7 +8,7 @@ import type { AskForApproval } from "./AskForApproval";
import type { SandboxPolicy } from "./SandboxPolicy";
import type { Thread } from "./Thread";
-export type ThreadResumeResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: ServiceTier | null, cwd: string, approvalPolicy: AskForApproval,
+export type ThreadResumeResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: ServiceTier | null, cwd: string, approvalPolicy: AskForApproval,
/**
* Reviewer currently used for approval requests on this thread.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRollbackParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRollbackParams.ts
index b867978202..1c938e3bfd 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRollbackParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRollbackParams.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ThreadRollbackParams = { threadId: string,
+export type ThreadRollbackParams = { threadId: string,
/**
* The number of turns to drop from the end of the thread. Must be >= 1.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRollbackResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRollbackResponse.ts
index 1f88f17630..6597cc8178 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRollbackResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadRollbackResponse.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Thread } from "./Thread";
-export type ThreadRollbackResponse = {
+export type ThreadRollbackResponse = {
/**
* The updated thread after applying the rollback, with `turns` populated.
*
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadShellCommandParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadShellCommandParams.ts
index 8c50612cab..2761dee2d0 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadShellCommandParams.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadShellCommandParams.ts
@@ -2,7 +2,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
-export type ThreadShellCommandParams = { threadId: string,
+export type ThreadShellCommandParams = { threadId: string,
/**
* Shell command string evaluated by the thread's configured shell.
* Unlike `command/exec`, this intentionally preserves shell syntax
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStartResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStartResponse.ts
index ee97bdf401..c85f81f52b 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStartResponse.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStartResponse.ts
@@ -8,7 +8,7 @@ import type { AskForApproval } from "./AskForApproval";
import type { SandboxPolicy } from "./SandboxPolicy";
import type { Thread } from "./Thread";
-export type ThreadStartResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: ServiceTier | null, cwd: string, approvalPolicy: AskForApproval,
+export type ThreadStartResponse = { thread: Thread, model: string, modelProvider: string, serviceTier: ServiceTier | null, cwd: string, approvalPolicy: AskForApproval,
/**
* Reviewer currently used for approval requests on this thread.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/Turn.ts b/codex-rs/app-server-protocol/schema/typescript/v2/Turn.ts
index 074ac215fd..844c09c4fd 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/Turn.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/Turn.ts
@@ -5,25 +5,25 @@ import type { ThreadItem } from "./ThreadItem";
import type { TurnError } from "./TurnError";
import type { TurnStatus } from "./TurnStatus";
-export type Turn = { id: string,
+export type Turn = { id: string,
/**
* Only populated on a `thread/resume` or `thread/fork` response.
* For all other responses and notifications returning a Turn,
* the items field will be an empty list.
*/
-items: Array<ThreadItem>, status: TurnStatus,
+items: Array<ThreadItem>, status: TurnStatus,
/**
* Only populated when the Turn's status is failed.
*/
-error: TurnError | null,
+error: TurnError | null,
/**
* Unix timestamp (in seconds) when the turn started.
*/
-startedAt: number | null,
+startedAt: number | null,
/**
* Unix timestamp (in seconds) when the turn completed.
*/
-completedAt: number | null,
+completedAt: number | null,
/**
* Duration between turn start and completion in milliseconds, if known.
*/
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/UserInput.ts b/codex-rs/app-server-protocol/schema/typescript/v2/UserInput.ts
index 65196fe5d9..38abc2338b 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/UserInput.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/UserInput.ts
@@ -3,7 +3,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { TextElement } from "./TextElement";
-export type UserInput = { "type": "text", text: string,
+export type UserInput = { "type": "text", text: string,
/**
* UI-defined spans within `text` used to render or persist special elements.
*/
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 7803355794..f815fee3e9 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts
@@ -187,6 +187,8 @@ export type { McpServerStartupState } from "./McpServerStartupState";
export type { McpServerStatus } from "./McpServerStatus";
export type { McpServerStatusDetail } from "./McpServerStatusDetail";
export type { McpServerStatusUpdatedNotification } from "./McpServerStatusUpdatedNotification";
+export type { McpServerToolCallParams } from "./McpServerToolCallParams";
+export type { McpServerToolCallResponse } from "./McpServerToolCallResponse";
export type { McpToolCallError } from "./McpToolCallError";
export type { McpToolCallProgressNotification } from "./McpToolCallProgressNotification";
export type { McpToolCallResult } from "./McpToolCallResult";
diff --git a/codex-rs/app-server-protocol/src/export.rs b/codex-rs/app-server-protocol/src/export.rs
index 358bb5c2df..96bb8d17a9 100644
--- a/codex-rs/app-server-protocol/src/export.rs
+++ b/codex-rs/app-server-protocol/src/export.rs
@@ -129,12 +129,7 @@ pub fn generate_ts_with_options(
}
// Ensure our header is present on all TS files (root + subdirs like v2/).
- let mut ts_files = Vec::new();
- let should_collect_ts_files =
- options.ensure_headers || (options.run_prettier && prettier.is_some());
- if should_collect_ts_files {
- ts_files = ts_files_in_recursive(out_dir)?;
- }
+ let ts_files = ts_files_in_recursive(out_dir)?;
if options.ensure_headers {
let worker_count = thread::available_parallelism()
@@ -179,6 +174,8 @@ pub fn generate_ts_with_options(
}
}
+ trim_trailing_whitespace_in_ts_files(&ts_files)?;
+
Ok(())
}
@@ -1942,6 +1939,32 @@ fn ts_files_in_recursive(dir: &Path) -> Result<Vec<PathBuf>> {
Ok(files)
}
+fn trim_trailing_whitespace_in_ts_files(paths: &[PathBuf]) -> Result<()> {
+ for path in paths {
+ let content = fs::read_to_string(path)
+ .with_context(|| format!("Failed to read {}", path.display()))?;
+ let trimmed = trim_trailing_line_whitespace(&content);
+ if trimmed != content {
+ fs::write(path, trimmed)
+ .with_context(|| format!("Failed to write {}", path.display()))?;
+ }
+ }
+ Ok(())
+}
+
+pub(crate) fn trim_trailing_line_whitespace(content: &str) -> String {
+ let mut trimmed = String::with_capacity(content.len());
+ for line in content.split_inclusive('\n') {
+ if let Some(line_without_newline) = line.strip_suffix('\n') {
+ trimmed.push_str(line_without_newline.trim_end_matches([' ', '\t']));
+ trimmed.push('\n');
+ } else {
+ trimmed.push_str(line.trim_end_matches([' ', '\t']));
+ }
+ }
+ trimmed
+}
+
/// Generate an index.ts file that re-exports all generated types.
/// This allows consumers to import all types from a single file.
fn generate_index_ts(out_dir: &Path) -> Result<PathBuf> {
diff --git a/codex-rs/app-server-protocol/src/protocol/common.rs b/codex-rs/app-server-protocol/src/protocol/common.rs
index 731288272b..3f9ba7bfdf 100644
--- a/codex-rs/app-server-protocol/src/protocol/common.rs
+++ b/codex-rs/app-server-protocol/src/protocol/common.rs
@@ -470,6 +470,11 @@ client_request_definitions! {
response: v2::McpResourceReadResponse,
},
+ McpServerToolCall => "mcpServer/tool/call" {
+ params: v2::McpServerToolCallParams,
+ response: v2::McpServerToolCallResponse,
+ },
+
WindowsSandboxSetupStart => "windowsSandbox/setupStart" {
params: v2::WindowsSandboxSetupStartParams,
response: v2::WindowsSandboxSetupStartResponse,
diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs
index d0a280ff8b..e562981f0a 100644
--- a/codex-rs/app-server-protocol/src/protocol/v2.rs
+++ b/codex-rs/app-server-protocol/src/protocol/v2.rs
@@ -29,6 +29,7 @@ use codex_protocol::config_types::WebSearchMode;
use codex_protocol::config_types::WebSearchToolConfig;
use codex_protocol::items::AgentMessageContent as CoreAgentMessageContent;
use codex_protocol::items::TurnItem as CoreTurnItem;
+use codex_protocol::mcp::CallToolResult as CoreMcpCallToolResult;
use codex_protocol::mcp::Resource as McpResource;
pub use codex_protocol::mcp::ResourceContent as McpResourceContent;
use codex_protocol::mcp::ResourceTemplate as McpResourceTemplate;
@@ -2017,6 +2018,48 @@ pub struct McpResourceReadResponse {
pub contents: Vec<McpResourceContent>,
}
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
+#[serde(rename_all = "camelCase")]
+#[ts(export_to = "v2/")]
+pub struct McpServerToolCallParams {
+ pub thread_id: String,
+ pub server: String,
+ pub tool: String,
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ #[ts(optional)]
+ pub arguments: Option<JsonValue>,
+ #[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
+ #[ts(optional)]
+ pub meta: Option<JsonValue>,
+}
+
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
+#[serde(rename_all = "camelCase")]
+#[ts(export_to = "v2/")]
+pub struct McpServerToolCallResponse {
+ pub content: Vec<JsonValue>,
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ #[ts(optional)]
+ pub structured_content: Option<JsonValue>,
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ #[ts(optional)]
+ pub is_error: Option<bool>,
+ #[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
+ #[ts(optional)]
+ pub meta: Option<JsonValue>,
+}
+
+impl From<CoreMcpCallToolResult> for McpServerToolCallResponse {
+ fn from(result: CoreMcpCallToolResult) -> Self {
+ Self {
+ content: result.content,
+ structured_content: result.structured_content,
+ is_error: result.is_error,
+ meta: result.meta,
+ }
+ }
+}
+
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
diff --git a/codex-rs/app-server-protocol/src/schema_fixtures.rs b/codex-rs/app-server-protocol/src/schema_fixtures.rs
index 56dcf33a4d..447fcf8cfe 100644
--- a/codex-rs/app-server-protocol/src/schema_fixtures.rs
+++ b/codex-rs/app-server-protocol/src/schema_fixtures.rs
@@ -5,6 +5,7 @@ use crate::ServerRequest;
use crate::export::GENERATED_TS_HEADER;
use crate::export::filter_experimental_ts_tree;
use crate::export::generate_index_ts_tree;
+use crate::export::trim_trailing_line_whitespace;
use crate::protocol::common::visit_client_response_types;
use crate::protocol::common::visit_server_response_types;
use anyhow::Context;
@@ -68,6 +69,9 @@ pub fn generate_typescript_schema_fixture_subtree_for_tests() -> Result<BTreeMap
filter_experimental_ts_tree(&mut files)?;
generate_index_ts_tree(&mut files);
+ for content in files.values_mut() {
+ *content = trim_trailing_line_whitespace(content);
+ }
Ok(files
.into_iter()
diff --git a/codex-rs/app-server/README.md b/codex-rs/app-server/README.md
index 19fbb0702c..94f86c7ebb 100644
--- a/codex-rs/app-server/README.md
+++ b/codex-rs/app-server/README.md
@@ -189,6 +189,7 @@ Example with notification opt-out:
- `config/mcpServer/reload` — reload MCP server config from disk and queue a refresh for loaded threads (applied on each thread's next active turn); returns `{}`. Use this after editing `config.toml` without restarting the server.
- `mcpServerStatus/list` — enumerate configured MCP servers with their tools and auth status, plus resources/resource templates for `full` detail; supports cursor+limit pagination. If `detail` is omitted, the server defaults to `full`.
- `mcpServer/resource/read` — read a resource from a thread's configured MCP server by `threadId`, `server`, and `uri`, returning text/blob resource `contents`.
+- `mcpServer/tool/call` — call a tool on a thread's configured MCP server by `threadId`, `server`, `tool`, optional `arguments`, and optional `_meta`, returning the MCP tool result.
- `windowsSandbox/setupStart` — start Windows sandbox setup for the selected mode (`elevated` or `unelevated`); accepts an optional absolute `cwd` to target setup for a specific workspace, returns `{ started: true }` immediately, and later emits `windowsSandbox/setupCompleted`.
- `feedback/upload` — submit a feedback report (classification + optional reason/logs, conversation_id, and optional `extraLogFiles` attachments array); returns the tracking thread id.
- `config/read` — fetch the effective config on disk after resolving config layering.
diff --git a/codex-rs/app-server/src/codex_message_processor.rs b/codex-rs/app-server/src/codex_message_processor.rs
index e0509907b9..a71abc4003 100644
--- a/codex-rs/app-server/src/codex_message_processor.rs
+++ b/codex-rs/app-server/src/codex_message_processor.rs
@@ -85,6 +85,8 @@ use codex_app_server_protocol::McpServerOauthLoginResponse;
use codex_app_server_protocol::McpServerRefreshResponse;
use codex_app_server_protocol::McpServerStatus;
use codex_app_server_protocol::McpServerStatusDetail;
+use codex_app_server_protocol::McpServerToolCallParams;
+use codex_app_server_protocol::McpServerToolCallResponse;
use codex_app_server_protocol::MockExperimentalMethodParams;
use codex_app_server_protocol::MockExperimentalMethodResponse;
use codex_app_server_protocol::ModelListParams;
@@ -901,6 +903,10 @@ impl CodexMessageProcessor {
self.read_mcp_resource(to_connection_request_id(request_id), params)
.await;
}
+ ClientRequest::McpServerToolCall { request_id, params } => {
+ self.call_mcp_server_tool(to_connection_request_id(request_id), params)
+ .await;
+ }
ClientRequest::WindowsSandboxSetupStart { request_id, params } => {
self.windows_sandbox_setup_start(to_connection_request_id(request_id), params)
.await;
@@ -5350,6 +5356,46 @@ impl CodexMessageProcessor {
});
}
+ async fn call_mcp_server_tool(
+ &self,
+ request_id: ConnectionRequestId,
+ params: McpServerToolCallParams,
+ ) {
+ let outgoing = Arc::clone(&self.outgoing);
+ let (_, thread) = match self.load_thread(&params.thread_id).await {
+ Ok(thread) => thread,
+ Err(error) => {
+ self.outgoing.send_error(request_id, error).await;
+ return;
+ }
+ };
+
+ tokio::spawn(async move {
+ let result = thread
+ .call_mcp_tool(&params.server, &params.tool, params.arguments, params.meta)
+ .await;
+ match result {
+ Ok(result) => {
+ outgoing
+ .send_response(request_id, McpServerToolCallResponse::from(result))
+ .await;
+ }
+ Err(error) => {
+ outgoing
+ .send_error(
+ request_id,
+ JSONRPCErrorError {
+ code: INTERNAL_ERROR_CODE,
+ message: format!("{error:#}"),
+ data: None,
+ },
+ )
+ .await;
+ }
+ }
+ });
+ }
+
async fn send_invalid_request_error(&self, request_id: ConnectionRequestId, message: String) {
let error = JSONRPCErrorError {
code: INVALID_REQUEST_ERROR_CODE,
diff --git a/codex-rs/app-server/tests/common/mcp_process.rs b/codex-rs/app-server/tests/common/mcp_process.rs
index 03c2284b84..76bb7bff43 100644
--- a/codex-rs/app-server/tests/common/mcp_process.rs
+++ b/codex-rs/app-server/tests/common/mcp_process.rs
@@ -48,6 +48,7 @@ use codex_app_server_protocol::JSONRPCResponse;
use codex_app_server_protocol::ListMcpServerStatusParams;
use codex_app_server_protocol::LoginAccountParams;
use codex_app_server_protocol::McpResourceReadParams;
+use codex_app_server_protocol::McpServerToolCallParams;
use codex_app_server_protocol::MockExperimentalMethodParams;
use codex_app_server_protocol::ModelListParams;
use codex_app_server_protocol::PluginInstallParams;
@@ -493,6 +494,15 @@ impl McpProcess {
self.send_request("mcpServer/resource/read", params).await
}
+ /// Send an `mcpServer/tool/call` JSON-RPC request.
+ pub async fn send_mcp_server_tool_call_request(
+ &mut self,
+ params: McpServerToolCallParams,
+ ) -> anyhow::Result<i64> {
+ let params = Some(serde_json::to_value(params)?);
+ self.send_request("mcpServer/tool/call", params).await
+ }
+
/// Send a `skills/list` JSON-RPC request.
pub async fn send_skills_list_request(
&mut self,
diff --git a/codex-rs/app-server/tests/suite/v2/mcp_tool.rs b/codex-rs/app-server/tests/suite/v2/mcp_tool.rs
new file mode 100644
index 0000000000..87556c8364
--- /dev/null
+++ b/codex-rs/app-server/tests/suite/v2/mcp_tool.rs
@@ -0,0 +1,243 @@
+use std::borrow::Cow;
+use std::collections::BTreeMap;
+use std::sync::Arc;
+use std::time::Duration;
+
+use anyhow::Result;
+use app_test_support::McpProcess;
+use app_test_support::to_response;
+use app_test_support::write_mock_responses_config_toml;
+use axum::Router;
+use codex_app_server_protocol::JSONRPCError;
+use codex_app_server_protocol::JSONRPCResponse;
+use codex_app_server_protocol::McpServerToolCallParams;
+use codex_app_server_protocol::McpServerToolCallResponse;
+use codex_app_server_protocol::RequestId;
+use codex_app_server_protocol::ThreadStartParams;
+use codex_app_server_protocol::ThreadStartResponse;
+use core_test_support::responses;
+use pretty_assertions::assert_eq;
+use rmcp::handler::server::ServerHandler;
+use rmcp::model::CallToolRequestParams;
+use rmcp::model::CallToolResult;
+use rmcp::model::Content;
+use rmcp::model::JsonObject;
+use rmcp::model::ListToolsResult;
+use rmcp::model::Meta;
+use rmcp::model::ServerCapabilities;
+use rmcp::model::ServerInfo;
+use rmcp::model::Tool;
+use rmcp::model::ToolAnnotations;
+use rmcp::service::RequestContext;
+use rmcp::service::RoleServer;
+use rmcp::transport::StreamableHttpServerConfig;
+use rmcp::transport::StreamableHttpService;
+use rmcp::transport::streamable_http_server::session::local::LocalSessionManager;
+use serde_json::json;
+use tempfile::TempDir;
+use tokio::net::TcpListener;
+use tokio::task::JoinHandle;
+use tokio::time::timeout;
+
+const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(10);
+const TEST_SERVER_NAME: &str = "tool_server";
+const TEST_TOOL_NAME: &str = "echo_tool";
+
+#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+async fn mcp_server_tool_call_returns_tool_result() -> Result<()> {
+ let responses_server = responses::start_mock_server().await;
+ let (mcp_server_url, mcp_server_handle) = start_mcp_server().await?;
+ let codex_home = TempDir::new()?;
+ write_mock_responses_config_toml(
+ codex_home.path(),
+ &responses_server.uri(),
+ &BTreeMap::new(),
+ /*auto_compact_limit*/ 1024,
+ /*requires_openai_auth*/ None,
+ "mock_provider",
+ "compact",
+ )?;
+
+ let config_path = codex_home.path().join("config.toml");
+ let mut config_toml = std::fs::read_to_string(&config_path)?;
+ config_toml.push_str(&format!(
+ r#"
+[mcp_servers.{TEST_SERVER_NAME}]
+url = "{mcp_server_url}/mcp"
+"#
+ ));
+ std::fs::write(config_path, config_toml)?;
+
+ let mut mcp = McpProcess::new(codex_home.path()).await?;
+ timeout(DEFAULT_READ_TIMEOUT, mcp.initialize()).await??;
+
+ let thread_start_id = mcp
+ .send_thread_start_request(ThreadStartParams {
+ model: Some("mock-model".to_string()),
+ ..Default::default()
+ })
+ .await?;
+ let thread_start_resp: JSONRPCResponse = timeout(
+ DEFAULT_READ_TIMEOUT,
+ mcp.read_stream_until_response_message(RequestId::Integer(thread_start_id)),
+ )
+ .await??;
+ let ThreadStartResponse { thread, .. } = to_response(thread_start_resp)?;
+
+ let tool_call_request_id = mcp
+ .send_mcp_server_tool_call_request(McpServerToolCallParams {
+ thread_id: thread.id,
+ server: TEST_SERVER_NAME.to_string(),
+ tool: TEST_TOOL_NAME.to_string(),
+ arguments: Some(json!({
+ "message": "hello from app",
+ })),
+ meta: Some(json!({
+ "source": "mcp-app",
+ })),
+ })
+ .await?;
+ let tool_call_response: JSONRPCResponse = timeout(
+ DEFAULT_READ_TIMEOUT,
+ mcp.read_stream_until_response_message(RequestId::Integer(tool_call_request_id)),
+ )
+ .await??;
+ let response: McpServerToolCallResponse = to_response(tool_call_response)?;
+
+ assert_eq!(response.content.len(), 1);
+ assert_eq!(response.content[0].get("type"), Some(&json!("text")));
+ assert_eq!(
+ response.content[0].get("text"),
+ Some(&json!("echo: hello from app"))
+ );
+ assert_eq!(
+ response.structured_content,
+ Some(json!({
+ "echoed": "hello from app",
+ }))
+ );
+ assert_eq!(response.is_error, Some(false));
+ assert_eq!(
+ response.meta,
+ Some(json!({
+ "calledBy": "mcp-app",
+ }))
+ );
+
+ mcp_server_handle.abort();
+ let _ = mcp_server_handle.await;
+
+ Ok(())
+}
+
+#[tokio::test]
+async fn mcp_server_tool_call_returns_error_for_unknown_thread() -> Result<()> {
+ let codex_home = TempDir::new()?;
+ let mut mcp = McpProcess::new(codex_home.path()).await?;
+ timeout(DEFAULT_READ_TIMEOUT, mcp.initialize()).await??;
+
+ let request_id = mcp
+ .send_mcp_server_tool_call_request(McpServerToolCallParams {
+ thread_id: "00000000-0000-4000-8000-000000000000".to_string(),
+ server: TEST_SERVER_NAME.to_string(),
+ tool: TEST_TOOL_NAME.to_string(),
+ arguments: Some(json!({})),
+ meta: None,
+ })
+ .await?;
+ let error: JSONRPCError = timeout(
+ DEFAULT_READ_TIMEOUT,
+ mcp.read_stream_until_error_message(RequestId::Integer(request_id)),
+ )
+ .await??;
+
+ assert!(
+ error.error.message.contains("thread not found"),
+ "expected thread-not-found error, got: {error:?}"
+ );
+
+ Ok(())
+}
+
+#[derive(Clone, Default)]
+struct ToolAppsMcpServer;
+
+impl ServerHandler for ToolAppsMcpServer {
+ fn get_info(&self) -> ServerInfo {
+ ServerInfo {
+ capabilities: ServerCapabilities::builder().enable_tools().build(),
+ ..ServerInfo::default()
+ }
+ }
+
+ async fn list_tools(
+ &self,
+ _request: Option<rmcp::model::PaginatedRequestParams>,
+ _context: RequestContext<RoleServer>,
+ ) -> Result<ListToolsResult, rmcp::ErrorData> {
+ let input_schema: JsonObject = serde_json::from_value(json!({
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ }))
+ .map_err(|err| rmcp::ErrorData::internal_error(err.to_string(), None))?;
+
+ let mut tool = Tool::new(
+ Cow::Borrowed(TEST_TOOL_NAME),
+ Cow::Borrowed("Echo a message."),
+ Arc::new(input_schema),
+ );
+ tool.annotations = Some(ToolAnnotations::new().read_only(true));
+
+ Ok(ListToolsResult {
+ tools: vec![tool],
+ next_cursor: None,
+ meta: None,
+ })
+ }
+
+ async fn call_tool(
+ &self,
+ request: CallToolRequestParams,
+ _context: RequestContext<RoleServer>,
+ ) -> Result<CallToolResult, rmcp::ErrorData> {
+ assert_eq!(request.name.as_ref(), TEST_TOOL_NAME);
+ let message = request
+ .arguments
+ .as_ref()
+ .and_then(|arguments| arguments.get("message"))
+ .and_then(|value| value.as_str())
+ .unwrap_or_default();
+
+ let mut meta = Meta::new();
+ meta.0.insert("calledBy".to_string(), json!("mcp-app"));
+
+ let mut result = CallToolResult::structured(json!({
+ "echoed": message,
+ }));
+ result.content = vec![Content::text(format!("echo: {message}"))];
+ result.meta = Some(meta);
+ Ok(result)
+ }
+}
+
+async fn start_mcp_server() -> Result<(String, JoinHandle<()>)> {
+ let listener = TcpListener::bind("127.0.0.1:0").await?;
+ let addr = listener.local_addr()?;
+ let mcp_service = StreamableHttpService::new(
+ || Ok(ToolAppsMcpServer),
+ Arc::new(LocalSessionManager::default()),
+ StreamableHttpServerConfig::default(),
+ );
+ let router = Router::new().nest_service("/mcp", mcp_service);
+
+ let handle = tokio::spawn(async move {
+ let _ = axum::serve(listener, router).await;
+ });
+
+ Ok((format!("http://{addr}"), handle))
+}
diff --git a/codex-rs/app-server/tests/suite/v2/mod.rs b/codex-rs/app-server/tests/suite/v2/mod.rs
index 1bb74ccc6b..db82c1368f 100644
--- a/codex-rs/app-server/tests/suite/v2/mod.rs
+++ b/codex-rs/app-server/tests/suite/v2/mod.rs
@@ -18,6 +18,7 @@ mod initialize;
mod mcp_resource;
mod mcp_server_elicitation;
mod mcp_server_status;
+mod mcp_tool;
mod model_list;
mod output_schema;
mod plan_item;
diff --git a/codex-rs/core/src/codex_thread.rs b/codex-rs/core/src/codex_thread.rs
index e90dd0f80a..86decbe6b2 100644
--- a/codex-rs/core/src/codex_thread.rs
+++ b/codex-rs/core/src/codex_thread.rs
@@ -9,6 +9,7 @@ use codex_protocol::config_types::Personality;
use codex_protocol::config_types::ServiceTier;
use codex_protocol::error::CodexErr;
use codex_protocol::error::Result as CodexResult;
+use codex_protocol::mcp::CallToolResult;
use codex_protocol::models::ContentItem;
use codex_protocol::models::ResponseInputItem;
use codex_protocol::models::ResponseItem;
@@ -224,6 +225,19 @@ impl CodexThread {
Ok(serde_json::to_value(result)?)
}
+ pub async fn call_mcp_tool(
+ &self,
+ server: &str,
+ tool: &str,
+ arguments: Option<serde_json::Value>,
+ meta: Option<serde_json::Value>,
+ ) -> anyhow::Result<CallToolResult> {
+ self.codex
+ .session
+ .call_tool(server, tool, arguments, meta)
+ .await
+ }
+
pub fn enabled(&self, feature: Feature) -> bool {
self.codex.enabled(feature)
}