From d522a18971495ad85583d6d5866b9949278ffb3a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 5 May 2026 00:43:07 +0100 Subject: [PATCH] fix: sync Codex app-server protocol (#77578) * fix: sync codex app-server protocol * docs: add codex protocol changelog * fix: refresh codex protocol schemas --- CHANGELOG.md | 1 + extensions/codex/src/app-server/config.ts | 3 +- .../json/DynamicToolCallParams.json | 8 +- .../json/v2/ErrorNotification.json | 128 +- .../json/v2/GetAccountResponse.json | 136 +- .../json/v2/ModelListResponse.json | 98 +- .../json/v2/ThreadResumeResponse.json | 1463 +++++++++-------- .../json/v2/ThreadStartResponse.json | 1463 +++++++++-------- .../json/v2/TurnCompletedNotification.json | 738 ++++----- .../json/v2/TurnStartResponse.json | 732 ++++----- .../typescript/ClientRequest.ts | 81 +- .../FuzzyFileSearchSessionStartParams.ts | 5 + .../FuzzyFileSearchSessionStartResponse.ts | 5 + .../FuzzyFileSearchSessionStopParams.ts | 5 + .../FuzzyFileSearchSessionStopResponse.ts | 5 + .../FuzzyFileSearchSessionUpdateParams.ts | 5 + .../FuzzyFileSearchSessionUpdateResponse.ts | 5 + .../typescript/GhostCommit.ts | 13 - .../typescript/InternalSessionSource.ts | 5 + .../typescript/ResponseItem.ts | 11 +- .../typescript/ServerNotification.ts | 6 + .../typescript/SessionSource.ts | 2 + .../protocol-generated/typescript/index.ts | 8 +- .../typescript/v2/ActivePermissionProfile.ts | 22 + ...=> ActivePermissionProfileModification.ts} | 7 +- .../v2/AdditionalPermissionProfile.ts | 3 + .../v2/CollaborationModeListParams.ts | 8 + .../v2/CollaborationModeListResponse.ts | 9 + .../typescript/v2/CommandMigration.ts | 5 + .../typescript/v2/Config.ts | 7 +- .../typescript/v2/ConfigRequirements.ts | 6 + .../ExternalAgentConfigMigrationItemType.ts | 6 +- .../v2/FileChangeOutputDeltaNotification.ts | 5 + .../typescript/v2/FileSystemSpecialPath.ts | 1 - .../typescript/v2/HookErrorInfo.ts | 5 + .../typescript/v2/HookMetadata.ts | 23 + .../typescript/v2/HookMigration.ts | 5 + .../typescript/v2/HookSource.ts | 2 + .../typescript/v2/HooksListEntry.ts | 12 + .../typescript/v2/HooksListParams.ts | 10 + .../typescript/v2/HooksListResponse.ts | 6 + .../v2/ItemCompletedNotification.ts | 10 +- .../typescript/v2/ItemStartedNotification.ts | 10 +- .../typescript/v2/LoginAccountParams.ts | 2 +- .../typescript/v2/McpServerMigration.ts | 5 + .../typescript/v2/MemoryResetResponse.ts | 5 + .../typescript/v2/MigrationDetails.ts | 14 +- .../v2/MockExperimentalMethodParams.ts | 10 + .../v2/MockExperimentalMethodResponse.ts | 10 + .../v2/ModelProviderCapabilitiesReadParams.ts | 5 + .../ModelProviderCapabilitiesReadResponse.ts | 9 + .../typescript/v2/PermissionProfile.ts | 12 +- .../PermissionProfileFileSystemPermissions.ts | 7 +- .../v2/PermissionProfileModificationParams.ts | 9 + .../v2/PermissionProfileNetworkPermissions.ts | 2 +- .../v2/PermissionProfileSelectionParams.ts | 10 + .../typescript/v2/PluginAvailability.ts | 5 + .../typescript/v2/PluginShareDeleteParams.ts | 5 + .../v2/PluginShareDeleteResponse.ts | 5 + .../typescript/v2/PluginShareListItem.ts | 11 + .../typescript/v2/PluginShareListParams.ts | 5 + .../typescript/v2/PluginShareListResponse.ts | 6 + .../typescript/v2/PluginShareSaveParams.ts | 6 + .../typescript/v2/PluginShareSaveResponse.ts | 5 + .../typescript/v2/PluginSkillReadParams.ts | 9 + .../typescript/v2/PluginSkillReadResponse.ts | 5 + .../typescript/v2/PluginSummary.ts | 5 + .../typescript/v2/ProfileV2.ts | 5 +- .../v2/RemoteControlConnectionStatus.ts | 5 + .../RemoteControlStatusChangedNotification.ts | 12 + .../typescript/v2/SandboxPolicy.ts | 4 +- .../typescript/v2/SessionMigration.ts | 5 + .../typescript/v2/SubagentMigration.ts | 5 + .../ThreadBackgroundTerminalsCleanParams.ts | 5 + .../ThreadBackgroundTerminalsCleanResponse.ts | 5 + .../v2/ThreadDecrementElicitationParams.ts | 13 + .../v2/ThreadDecrementElicitationResponse.ts | 17 + .../typescript/v2/ThreadForkParams.ts | 44 +- .../typescript/v2/ThreadForkResponse.ts | 17 +- .../typescript/v2/ThreadGoal.ts | 15 + .../typescript/v2/ThreadGoalClearParams.ts | 5 + .../typescript/v2/ThreadGoalClearResponse.ts | 5 + .../v2/ThreadGoalClearedNotification.ts | 5 + .../typescript/v2/ThreadGoalGetParams.ts | 5 + .../typescript/v2/ThreadGoalGetResponse.ts | 6 + .../typescript/v2/ThreadGoalSetParams.ts | 11 + .../typescript/v2/ThreadGoalSetResponse.ts | 6 + .../typescript/v2/ThreadGoalStatus.ts | 5 + .../v2/ThreadGoalUpdatedNotification.ts | 10 + .../v2/ThreadIncrementElicitationParams.ts | 13 + .../v2/ThreadIncrementElicitationResponse.ts | 17 + .../v2/ThreadMemoryModeSetParams.ts | 6 + .../v2/ThreadMemoryModeSetResponse.ts | 5 + .../v2/ThreadRealtimeAppendAudioParams.ts | 9 + .../v2/ThreadRealtimeAppendAudioResponse.ts | 8 + .../v2/ThreadRealtimeAppendTextParams.ts | 8 + .../v2/ThreadRealtimeAppendTextResponse.ts | 8 + .../v2/ThreadRealtimeListVoicesParams.ts | 8 + .../v2/ThreadRealtimeListVoicesResponse.ts | 9 + .../v2/ThreadRealtimeStartParams.ts | 22 + .../v2/ThreadRealtimeStartResponse.ts | 8 + .../v2/ThreadRealtimeStartedNotification.ts | 2 +- .../typescript/v2/ThreadRealtimeStopParams.ts | 8 + .../v2/ThreadRealtimeStopResponse.ts | 8 + .../typescript/v2/ThreadResumeParams.ts | 49 +- .../typescript/v2/ThreadResumeResponse.ts | 17 +- .../typescript/v2/ThreadStartParams.ts | 51 +- .../typescript/v2/ThreadStartResponse.ts | 17 +- .../typescript/v2/TurnStartParams.ts | 81 +- .../typescript/v2/TurnSteerParams.ts | 9 +- .../protocol-generated/typescript/v2/index.ts | 62 +- extensions/diagnostics-otel/src/service.ts | 30 + scripts/check-codex-app-server-protocol.ts | 89 +- .../lib/codex-app-server-protocol-source.ts | 124 ++ scripts/sync-codex-app-server-protocol.ts | 65 +- 115 files changed, 3604 insertions(+), 2594 deletions(-) create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateResponse.ts delete mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/GhostCommit.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/InternalSessionSource.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfile.ts rename extensions/codex/src/app-server/protocol-generated/typescript/v2/{ReadOnlyAccess.ts => ActivePermissionProfileModification.ts} (57%) create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandMigration.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookErrorInfo.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMetadata.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMigration.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListEntry.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerMigration.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryResetResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileModificationParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileSelectionParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAvailability.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListItem.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlConnectionStatus.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlStatusChangedNotification.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionMigration.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/SubagentMigration.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoal.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearedNotification.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalStatus.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalUpdatedNotification.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartResponse.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopParams.ts create mode 100644 extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopResponse.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index a75c3485298..eb50ae2da9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Codex plugin: mirror the experimental upstream app-server protocol and format generated TypeScript before drift checks, keeping OpenClaw's `experimentalApi` bridge compatible with latest Codex while preserving formatter gates. - Gateway/startup: include resolved thinking and fast-mode defaults in the `agent model` startup log line, defaulting unset startup thinking to `medium` without mixing in reasoning visibility. - Gateway/watch: suppress sync-I/O trace output during `pnpm gateway:watch --benchmark` unless explicitly requested, so CPU profiling no longer floods the terminal with stack traces. - Gateway/watch: when benchmark sync-I/O tracing is explicitly enabled, tee trace blocks to the benchmark output log and filter them from the terminal pane while keeping normal Gateway logs visible. diff --git a/extensions/codex/src/app-server/config.ts b/extensions/codex/src/app-server/config.ts index b8f5ac47aab..ca784a4d432 100644 --- a/extensions/codex/src/app-server/config.ts +++ b/extensions/codex/src/app-server/config.ts @@ -331,12 +331,11 @@ export function codexSandboxPolicyForTurn( return { type: "dangerFullAccess" }; } if (mode === "read-only") { - return { type: "readOnly", access: { type: "fullAccess" }, networkAccess: false }; + return { type: "readOnly", networkAccess: false }; } return { type: "workspaceWrite", writableRoots: [cwd], - readOnlyAccess: { type: "fullAccess" }, networkAccess: false, excludeTmpdirEnvVar: false, excludeSlashTmp: false, diff --git a/extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json b/extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json index 870ba1a9513..7b884b6f205 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json +++ b/extensions/codex/src/app-server/protocol-generated/json/DynamicToolCallParams.json @@ -1,5 +1,8 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "title": "DynamicToolCallParams", + "type": "object", + "required": ["arguments", "callId", "threadId", "tool", "turnId"], "properties": { "arguments": true, "callId": { @@ -17,8 +20,5 @@ "turnId": { "type": "string" } - }, - "required": ["arguments", "callId", "threadId", "tool", "turnId"], - "title": "DynamicToolCallParams", - "type": "object" + } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json b/extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json index 7778e473cba..0ec20b64cf4 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/ErrorNotification.json @@ -1,10 +1,28 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ErrorNotification", + "type": "object", + "required": ["error", "threadId", "turnId", "willRetry"], + "properties": { + "error": { + "$ref": "#/definitions/TurnError" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + }, + "willRetry": { + "type": "boolean" + } + }, "definitions": { "CodexErrorInfo": { "description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.", "oneOf": [ { + "type": "string", "enum": [ "contextWindowExceeded", "usageLimitExceeded", @@ -16,109 +34,110 @@ "threadRollbackFailed", "sandboxError", "other" - ], - "type": "string" + ] }, { - "additionalProperties": false, + "type": "object", + "required": ["httpConnectionFailed"], "properties": { "httpConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["httpConnectionFailed"], - "title": "HttpConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "HttpConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Failed to connect to the response SSE stream.", + "type": "object", + "required": ["responseStreamConnectionFailed"], "properties": { "responseStreamConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamConnectionFailed"], - "title": "ResponseStreamConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "The response SSE stream disconnected in the middle of a turn before completion.", + "type": "object", + "required": ["responseStreamDisconnected"], "properties": { "responseStreamDisconnected": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamDisconnected"], - "title": "ResponseStreamDisconnectedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamDisconnectedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Reached the retry limit for responses.", + "type": "object", + "required": ["responseTooManyFailedAttempts"], "properties": { "responseTooManyFailedAttempts": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseTooManyFailedAttempts"], - "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseTooManyFailedAttemptsCodexErrorInfo" }, { - "additionalProperties": false, "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", + "type": "object", + "required": ["activeTurnNotSteerable"], "properties": { "activeTurnNotSteerable": { + "type": "object", + "required": ["turnKind"], "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } - }, - "required": ["turnKind"], - "type": "object" + } } }, - "required": ["activeTurnNotSteerable"], - "title": "ActiveTurnNotSteerableCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ActiveTurnNotSteerableCodexErrorInfo" } ] }, "NonSteerableTurnKind": { - "enum": ["review", "compact"], - "type": "string" + "type": "string", + "enum": ["review", "compact"] }, "TurnError": { + "type": "object", + "required": ["message"], "properties": { "additionalDetails": { "default": null, @@ -137,26 +156,7 @@ "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } } - }, - "properties": { - "error": { - "$ref": "#/definitions/TurnError" - }, - "threadId": { - "type": "string" - }, - "turnId": { - "type": "string" - }, - "willRetry": { - "type": "boolean" - } - }, - "required": ["error", "threadId", "turnId", "willRetry"], - "title": "ErrorNotification", - "type": "object" + } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json index 66c3191ba0c..0dea51020f8 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/GetAccountResponse.json @@ -1,70 +1,8 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "Account": { - "oneOf": [ - { - "properties": { - "type": { - "enum": ["apiKey"], - "title": "ApiKeyAccountType", - "type": "string" - } - }, - "required": ["type"], - "title": "ApiKeyAccount", - "type": "object" - }, - { - "properties": { - "email": { - "type": "string" - }, - "planType": { - "$ref": "#/definitions/PlanType" - }, - "type": { - "enum": ["chatgpt"], - "title": "ChatgptAccountType", - "type": "string" - } - }, - "required": ["email", "planType", "type"], - "title": "ChatgptAccount", - "type": "object" - }, - { - "properties": { - "type": { - "enum": ["amazonBedrock"], - "title": "AmazonBedrockAccountType", - "type": "string" - } - }, - "required": ["type"], - "title": "AmazonBedrockAccount", - "type": "object" - } - ] - }, - "PlanType": { - "enum": [ - "free", - "go", - "plus", - "pro", - "prolite", - "team", - "self_serve_business_usage_based", - "business", - "enterprise_cbp_usage_based", - "enterprise", - "edu", - "unknown" - ], - "type": "string" - } - }, + "title": "GetAccountResponse", + "type": "object", + "required": ["requiresOpenaiAuth"], "properties": { "account": { "anyOf": [ @@ -80,7 +18,69 @@ "type": "boolean" } }, - "required": ["requiresOpenaiAuth"], - "title": "GetAccountResponse", - "type": "object" + "definitions": { + "Account": { + "oneOf": [ + { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "type": "string", + "enum": ["apiKey"], + "title": "ApiKeyAccountType" + } + }, + "title": "ApiKeyAccount" + }, + { + "type": "object", + "required": ["email", "planType", "type"], + "properties": { + "email": { + "type": "string" + }, + "planType": { + "$ref": "#/definitions/PlanType" + }, + "type": { + "type": "string", + "enum": ["chatgpt"], + "title": "ChatgptAccountType" + } + }, + "title": "ChatgptAccount" + }, + { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "type": "string", + "enum": ["amazonBedrock"], + "title": "AmazonBedrockAccountType" + } + }, + "title": "AmazonBedrockAccount" + } + ] + }, + "PlanType": { + "type": "string", + "enum": [ + "free", + "go", + "plus", + "pro", + "prolite", + "team", + "self_serve_business_usage_based", + "business", + "enterprise_cbp_usage_based", + "enterprise", + "edu", + "unknown" + ] + } + } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json index b9cfbecce32..e5fdee037ca 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/ModelListResponse.json @@ -1,29 +1,55 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModelListResponse", + "type": "object", + "required": ["data"], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Model" + } + }, + "nextCursor": { + "description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.", + "type": ["string", "null"] + } + }, "definitions": { "InputModality": { "description": "Canonical user-input modality tags advertised by a model.", "oneOf": [ { "description": "Plain text turns and tool payloads.", - "enum": ["text"], - "type": "string" + "type": "string", + "enum": ["text"] }, { "description": "Image attachments included in user turns.", - "enum": ["image"], - "type": "string" + "type": "string", + "enum": ["image"] } ] }, "Model": { + "type": "object", + "required": [ + "defaultReasoningEffort", + "description", + "displayName", + "hidden", + "id", + "isDefault", + "model", + "supportedReasoningEfforts" + ], "properties": { "additionalSpeedTiers": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "availabilityNux": { "anyOf": [ @@ -52,10 +78,10 @@ }, "inputModalities": { "default": ["text", "image"], + "type": "array", "items": { "$ref": "#/definitions/InputModality" - }, - "type": "array" + } }, "isDefault": { "type": "boolean" @@ -64,10 +90,10 @@ "type": "string" }, "supportedReasoningEfforts": { + "type": "array", "items": { "$ref": "#/definitions/ReasoningEffortOption" - }, - "type": "array" + } }, "supportsPersonality": { "default": false, @@ -86,29 +112,20 @@ } ] } - }, - "required": [ - "defaultReasoningEffort", - "description", - "displayName", - "hidden", - "id", - "isDefault", - "model", - "supportedReasoningEfforts" - ], - "type": "object" + } }, "ModelAvailabilityNux": { + "type": "object", + "required": ["message"], "properties": { "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "ModelUpgradeInfo": { + "type": "object", + "required": ["model"], "properties": { "migrationMarkdown": { "type": ["string", "null"] @@ -122,16 +139,16 @@ "upgradeCopy": { "type": ["string", "null"] } - }, - "required": ["model"], - "type": "object" + } }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"], - "type": "string" + "type": "string", + "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] }, "ReasoningEffortOption": { + "type": "object", + "required": ["description", "reasoningEffort"], "properties": { "description": { "type": "string" @@ -139,24 +156,7 @@ "reasoningEffort": { "$ref": "#/definitions/ReasoningEffort" } - }, - "required": ["description", "reasoningEffort"], - "type": "object" + } } - }, - "properties": { - "data": { - "items": { - "$ref": "#/definitions/Model" - }, - "type": "array" - }, - "nextCursor": { - "description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.", - "type": ["string", "null"] - } - }, - "required": ["data"], - "title": "ModelListResponse", - "type": "object" + } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json index 0222801f8ab..9792e37d2d5 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadResumeResponse.json @@ -1,28 +1,170 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadResumeResponse", + "type": "object", + "required": [ + "approvalPolicy", + "approvalsReviewer", + "cwd", + "model", + "modelProvider", + "sandbox", + "thread" + ], + "properties": { + "activePermissionProfile": { + "description": "Named or implicit built-in profile that produced the active permissions, when known.", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/ActivePermissionProfile" + }, + { + "type": "null" + } + ] + }, + "approvalPolicy": { + "$ref": "#/definitions/AskForApproval" + }, + "approvalsReviewer": { + "description": "Reviewer currently used for approval requests on this thread.", + "allOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + } + ] + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "instructionSources": { + "description": "Instruction source files currently loaded for this thread.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + }, + "model": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "permissionProfile": { + "description": "Full active permissions for this thread. `activePermissionProfile` carries display/provenance metadata for this runtime profile.", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/PermissionProfile" + }, + { + "type": "null" + } + ] + }, + "reasoningEffort": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + "sandbox": { + "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `permissionProfile` when they need exact runtime permissions.", + "allOf": [ + { + "$ref": "#/definitions/SandboxPolicy" + } + ] + }, + "serviceTier": { + "anyOf": [ + { + "$ref": "#/definitions/ServiceTier" + }, + { + "type": "null" + } + ] + }, + "thread": { + "$ref": "#/definitions/Thread" + } + }, "definitions": { "AbsolutePathBuf": { "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", "type": "string" }, + "ActivePermissionProfile": { + "type": "object", + "required": ["id"], + "properties": { + "extends": { + "description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", + "default": null, + "type": ["string", "null"] + }, + "id": { + "description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", + "type": "string" + }, + "modifications": { + "description": "Bounded user-requested modifications applied on top of the named profile, if any.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ActivePermissionProfileModification" + } + } + } + }, + "ActivePermissionProfileModification": { + "oneOf": [ + { + "description": "Additional concrete directory that should be writable.", + "type": "object", + "required": ["path", "type"], + "properties": { + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": ["additionalWritableRoot"], + "title": "AdditionalWritableRootActivePermissionProfileModificationType" + } + }, + "title": "AdditionalWritableRootActivePermissionProfileModification" + } + ] + }, "AgentPath": { "type": "string" }, "ApprovalsReviewer": { "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", - "enum": ["user", "auto_review", "guardian_subagent"], - "type": "string" + "type": "string", + "enum": ["user", "auto_review", "guardian_subagent"] }, "AskForApproval": { "oneOf": [ { - "enum": ["untrusted", "on-failure", "on-request", "never"], - "type": "string" + "type": "string", + "enum": ["untrusted", "on-failure", "on-request", "never"] }, { - "additionalProperties": false, + "type": "object", + "required": ["granular"], "properties": { "granular": { + "type": "object", + "required": ["mcp_elicitations", "rules", "sandbox_approval"], "properties": { "mcp_elicitations": { "type": "boolean" @@ -41,37 +183,35 @@ "default": false, "type": "boolean" } - }, - "required": ["mcp_elicitations", "rules", "sandbox_approval"], - "type": "object" + } } }, - "required": ["granular"], - "title": "GranularAskForApproval", - "type": "object" + "additionalProperties": false, + "title": "GranularAskForApproval" } ] }, "ByteRange": { + "type": "object", + "required": ["end", "start"], "properties": { "end": { + "type": "integer", "format": "uint", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "start": { + "type": "integer", "format": "uint", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 } - }, - "required": ["end", "start"], - "type": "object" + } }, "CodexErrorInfo": { "description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.", "oneOf": [ { + "type": "string", "enum": [ "contextWindowExceeded", "usageLimitExceeded", @@ -83,105 +223,106 @@ "threadRollbackFailed", "sandboxError", "other" - ], - "type": "string" + ] }, { - "additionalProperties": false, + "type": "object", + "required": ["httpConnectionFailed"], "properties": { "httpConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["httpConnectionFailed"], - "title": "HttpConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "HttpConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Failed to connect to the response SSE stream.", + "type": "object", + "required": ["responseStreamConnectionFailed"], "properties": { "responseStreamConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamConnectionFailed"], - "title": "ResponseStreamConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "The response SSE stream disconnected in the middle of a turn before completion.", + "type": "object", + "required": ["responseStreamDisconnected"], "properties": { "responseStreamDisconnected": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamDisconnected"], - "title": "ResponseStreamDisconnectedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamDisconnectedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Reached the retry limit for responses.", + "type": "object", + "required": ["responseTooManyFailedAttempts"], "properties": { "responseTooManyFailedAttempts": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseTooManyFailedAttempts"], - "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseTooManyFailedAttemptsCodexErrorInfo" }, { - "additionalProperties": false, "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", + "type": "object", + "required": ["activeTurnNotSteerable"], "properties": { "activeTurnNotSteerable": { + "type": "object", + "required": ["turnKind"], "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } - }, - "required": ["turnKind"], - "type": "object" + } } }, - "required": ["activeTurnNotSteerable"], - "title": "ActiveTurnNotSteerableCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ActiveTurnNotSteerableCodexErrorInfo" } ] }, "CollabAgentState": { + "type": "object", + "required": ["status"], "properties": { "message": { "type": ["string", "null"] @@ -189,11 +330,10 @@ "status": { "$ref": "#/definitions/CollabAgentStatus" } - }, - "required": ["status"], - "type": "object" + } }, "CollabAgentStatus": { + "type": "string", "enum": [ "pendingInit", "running", @@ -202,20 +342,21 @@ "errored", "shutdown", "notFound" - ], - "type": "string" + ] }, "CollabAgentTool": { - "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"], - "type": "string" + "type": "string", + "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"] }, "CollabAgentToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "CommandAction": { "oneOf": [ { + "type": "object", + "required": ["command", "name", "path", "type"], "properties": { "command": { "type": "string" @@ -227,16 +368,16 @@ "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["read"], - "title": "ReadCommandActionType", - "type": "string" + "title": "ReadCommandActionType" } }, - "required": ["command", "name", "path", "type"], - "title": "ReadCommandAction", - "type": "object" + "title": "ReadCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" @@ -245,16 +386,16 @@ "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["listFiles"], - "title": "ListFilesCommandActionType", - "type": "string" + "title": "ListFilesCommandActionType" } }, - "required": ["command", "type"], - "title": "ListFilesCommandAction", - "type": "object" + "title": "ListFilesCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" @@ -266,132 +407,132 @@ "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["search"], - "title": "SearchCommandActionType", - "type": "string" + "title": "SearchCommandActionType" } }, - "required": ["command", "type"], - "title": "SearchCommandAction", - "type": "object" + "title": "SearchCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" }, "type": { + "type": "string", "enum": ["unknown"], - "title": "UnknownCommandActionType", - "type": "string" + "title": "UnknownCommandActionType" } }, - "required": ["command", "type"], - "title": "UnknownCommandAction", - "type": "object" + "title": "UnknownCommandAction" } ] }, "CommandExecutionSource": { - "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"], - "type": "string" + "type": "string", + "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"] }, "CommandExecutionStatus": { - "enum": ["inProgress", "completed", "failed", "declined"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed", "declined"] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { + "type": "object", + "required": ["text", "type"], "properties": { "text": { "type": "string" }, "type": { + "type": "string", "enum": ["inputText"], - "title": "InputTextDynamicToolCallOutputContentItemType", - "type": "string" + "title": "InputTextDynamicToolCallOutputContentItemType" } }, - "required": ["text", "type"], - "title": "InputTextDynamicToolCallOutputContentItem", - "type": "object" + "title": "InputTextDynamicToolCallOutputContentItem" }, { + "type": "object", + "required": ["imageUrl", "type"], "properties": { "imageUrl": { "type": "string" }, "type": { + "type": "string", "enum": ["inputImage"], - "title": "InputImageDynamicToolCallOutputContentItemType", - "type": "string" + "title": "InputImageDynamicToolCallOutputContentItemType" } }, - "required": ["imageUrl", "type"], - "title": "InputImageDynamicToolCallOutputContentItem", - "type": "object" + "title": "InputImageDynamicToolCallOutputContentItem" } ] }, "DynamicToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "FileSystemAccessMode": { - "enum": ["read", "write", "none"], - "type": "string" + "type": "string", + "enum": ["read", "write", "none"] }, "FileSystemPath": { "oneOf": [ { + "type": "object", + "required": ["path", "type"], "properties": { "path": { "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["path"], - "title": "PathFileSystemPathType", - "type": "string" + "title": "PathFileSystemPathType" } }, - "required": ["path", "type"], - "title": "PathFileSystemPath", - "type": "object" + "title": "PathFileSystemPath" }, { + "type": "object", + "required": ["pattern", "type"], "properties": { "pattern": { "type": "string" }, "type": { + "type": "string", "enum": ["glob_pattern"], - "title": "GlobPatternFileSystemPathType", - "type": "string" + "title": "GlobPatternFileSystemPathType" } }, - "required": ["pattern", "type"], - "title": "GlobPatternFileSystemPath", - "type": "object" + "title": "GlobPatternFileSystemPath" }, { + "type": "object", + "required": ["type", "value"], "properties": { "type": { + "type": "string", "enum": ["special"], - "title": "SpecialFileSystemPathType", - "type": "string" + "title": "SpecialFileSystemPathType" }, "value": { "$ref": "#/definitions/FileSystemSpecialPath" } }, - "required": ["type", "value"], - "title": "SpecialFileSystemPath", - "type": "object" + "title": "SpecialFileSystemPath" } ] }, "FileSystemSandboxEntry": { + "type": "object", + "required": ["access", "path"], "properties": { "access": { "$ref": "#/definitions/FileSystemAccessMode" @@ -399,86 +540,75 @@ "path": { "$ref": "#/definitions/FileSystemPath" } - }, - "required": ["access", "path"], - "type": "object" + } }, "FileSystemSpecialPath": { "oneOf": [ { + "type": "object", + "required": ["kind"], "properties": { "kind": { - "enum": ["root"], - "type": "string" + "type": "string", + "enum": ["root"] } }, - "required": ["kind"], - "title": "RootFileSystemSpecialPath", - "type": "object" + "title": "RootFileSystemSpecialPath" }, { + "type": "object", + "required": ["kind"], "properties": { "kind": { - "enum": ["minimal"], - "type": "string" + "type": "string", + "enum": ["minimal"] } }, - "required": ["kind"], - "title": "MinimalFileSystemSpecialPath", - "type": "object" + "title": "MinimalFileSystemSpecialPath" }, { - "properties": { - "kind": { - "enum": ["current_working_directory"], - "type": "string" - } - }, + "type": "object", "required": ["kind"], - "title": "CurrentWorkingDirectoryFileSystemSpecialPath", - "type": "object" - }, - { "properties": { "kind": { - "enum": ["project_roots"], - "type": "string" + "type": "string", + "enum": ["project_roots"] }, "subpath": { "type": ["string", "null"] } }, - "required": ["kind"], - "title": "KindFileSystemSpecialPath", - "type": "object" + "title": "KindFileSystemSpecialPath" }, { + "type": "object", + "required": ["kind"], "properties": { "kind": { - "enum": ["tmpdir"], - "type": "string" + "type": "string", + "enum": ["tmpdir"] } }, - "required": ["kind"], - "title": "TmpdirFileSystemSpecialPath", - "type": "object" + "title": "TmpdirFileSystemSpecialPath" }, { + "type": "object", + "required": ["kind"], "properties": { "kind": { - "enum": ["slash_tmp"], - "type": "string" + "type": "string", + "enum": ["slash_tmp"] } }, - "required": ["kind"], - "title": "SlashTmpFileSystemSpecialPath", - "type": "object" + "title": "SlashTmpFileSystemSpecialPath" }, { + "type": "object", + "required": ["kind", "path"], "properties": { "kind": { - "enum": ["unknown"], - "type": "string" + "type": "string", + "enum": ["unknown"] }, "path": { "type": "string" @@ -486,13 +616,13 @@ "subpath": { "type": ["string", "null"] } - }, - "required": ["kind", "path"], - "type": "object" + } } ] }, "FileUpdateChange": { + "type": "object", + "required": ["diff", "kind", "path"], "properties": { "diff": { "type": "string" @@ -503,11 +633,10 @@ "path": { "type": "string" } - }, - "required": ["diff", "kind", "path"], - "type": "object" + } }, "GitInfo": { + "type": "object", "properties": { "branch": { "type": ["string", "null"] @@ -518,10 +647,11 @@ "sha": { "type": ["string", "null"] } - }, - "type": "object" + } }, "HookPromptFragment": { + "type": "object", + "required": ["hookRunId", "text"], "properties": { "hookRunId": { "type": "string" @@ -529,64 +659,64 @@ "text": { "type": "string" } - }, - "required": ["hookRunId", "text"], - "type": "object" + } }, "McpToolCallError": { + "type": "object", + "required": ["message"], "properties": { "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "McpToolCallResult": { + "type": "object", + "required": ["content"], "properties": { "_meta": true, "content": { - "items": true, - "type": "array" + "type": "array", + "items": true }, "structuredContent": true - }, - "required": ["content"], - "type": "object" + } }, "McpToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "MemoryCitation": { + "type": "object", + "required": ["entries", "threadIds"], "properties": { "entries": { + "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" - }, - "type": "array" + } }, "threadIds": { + "type": "array", "items": { "type": "string" - }, - "type": "array" + } } - }, - "required": ["entries", "threadIds"], - "type": "object" + } }, "MemoryCitationEntry": { + "type": "object", + "required": ["lineEnd", "lineStart", "note", "path"], "properties": { "lineEnd": { + "type": "integer", "format": "uint32", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "lineStart": { + "type": "integer", "format": "uint32", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "note": { "type": "string" @@ -594,235 +724,236 @@ "path": { "type": "string" } - }, - "required": ["lineEnd", "lineStart", "note", "path"], - "type": "object" + } }, "MessagePhase": { "description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.", "oneOf": [ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", - "enum": ["commentary"], - "type": "string" + "type": "string", + "enum": ["commentary"] }, { "description": "The assistant's terminal answer text for the current turn.", - "enum": ["final_answer"], - "type": "string" + "type": "string", + "enum": ["final_answer"] } ] }, "NetworkAccess": { - "enum": ["restricted", "enabled"], - "type": "string" + "type": "string", + "enum": ["restricted", "enabled"] }, "NonSteerableTurnKind": { - "enum": ["review", "compact"], - "type": "string" + "type": "string", + "enum": ["review", "compact"] }, "PatchApplyStatus": { - "enum": ["inProgress", "completed", "failed", "declined"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed", "declined"] }, "PatchChangeKind": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["add"], - "title": "AddPatchChangeKindType", - "type": "string" + "title": "AddPatchChangeKindType" } }, - "required": ["type"], - "title": "AddPatchChangeKind", - "type": "object" + "title": "AddPatchChangeKind" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["delete"], - "title": "DeletePatchChangeKindType", - "type": "string" + "title": "DeletePatchChangeKindType" } }, - "required": ["type"], - "title": "DeletePatchChangeKind", - "type": "object" + "title": "DeletePatchChangeKind" }, { + "type": "object", + "required": ["type"], "properties": { "move_path": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["update"], - "title": "UpdatePatchChangeKindType", - "type": "string" + "title": "UpdatePatchChangeKindType" } }, - "required": ["type"], - "title": "UpdatePatchChangeKind", - "type": "object" + "title": "UpdatePatchChangeKind" } ] }, "PermissionProfile": { - "properties": { - "fileSystem": { - "anyOf": [ - { - "$ref": "#/definitions/PermissionProfileFileSystemPermissions" - }, - { - "type": "null" - } - ] - }, - "network": { - "anyOf": [ - { - "$ref": "#/definitions/PermissionProfileNetworkPermissions" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, - "PermissionProfileFileSystemPermissions": { - "properties": { - "entries": { - "items": { - "$ref": "#/definitions/FileSystemSandboxEntry" - }, - "type": "array" - }, - "globScanMaxDepth": { - "format": "uint", - "minimum": 1.0, - "type": ["integer", "null"] - } - }, - "required": ["entries"], - "type": "object" - }, - "PermissionProfileNetworkPermissions": { - "properties": { - "enabled": { - "type": ["boolean", "null"] - } - }, - "type": "object" - }, - "ReadOnlyAccess": { "oneOf": [ { + "description": "Codex owns sandbox construction for this profile.", + "type": "object", + "required": ["fileSystem", "network", "type"], "properties": { - "includePlatformDefaults": { - "default": true, - "type": "boolean" + "fileSystem": { + "$ref": "#/definitions/PermissionProfileFileSystemPermissions" }, - "readableRoots": { - "default": [], - "items": { - "$ref": "#/definitions/AbsolutePathBuf" - }, - "type": "array" + "network": { + "$ref": "#/definitions/PermissionProfileNetworkPermissions" }, "type": { - "enum": ["restricted"], - "title": "RestrictedReadOnlyAccessType", - "type": "string" + "type": "string", + "enum": ["managed"], + "title": "ManagedPermissionProfileType" } }, - "required": ["type"], - "title": "RestrictedReadOnlyAccess", - "type": "object" + "title": "ManagedPermissionProfile" }, { + "description": "Do not apply an outer sandbox.", + "type": "object", + "required": ["type"], "properties": { "type": { - "enum": ["fullAccess"], - "title": "FullAccessReadOnlyAccessType", - "type": "string" + "type": "string", + "enum": ["disabled"], + "title": "DisabledPermissionProfileType" } }, - "required": ["type"], - "title": "FullAccessReadOnlyAccess", - "type": "object" + "title": "DisabledPermissionProfile" + }, + { + "description": "Filesystem isolation is enforced by an external caller.", + "type": "object", + "required": ["network", "type"], + "properties": { + "network": { + "$ref": "#/definitions/PermissionProfileNetworkPermissions" + }, + "type": { + "type": "string", + "enum": ["external"], + "title": "ExternalPermissionProfileType" + } + }, + "title": "ExternalPermissionProfile" } ] }, + "PermissionProfileFileSystemPermissions": { + "oneOf": [ + { + "type": "object", + "required": ["entries", "type"], + "properties": { + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/FileSystemSandboxEntry" + } + }, + "globScanMaxDepth": { + "type": ["integer", "null"], + "format": "uint", + "minimum": 1.0 + }, + "type": { + "type": "string", + "enum": ["restricted"], + "title": "RestrictedPermissionProfileFileSystemPermissionsType" + } + }, + "title": "RestrictedPermissionProfileFileSystemPermissions" + }, + { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "type": "string", + "enum": ["unrestricted"], + "title": "UnrestrictedPermissionProfileFileSystemPermissionsType" + } + }, + "title": "UnrestrictedPermissionProfileFileSystemPermissions" + } + ] + }, + "PermissionProfileNetworkPermissions": { + "type": "object", + "required": ["enabled"], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"], - "type": "string" + "type": "string", + "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] }, "SandboxPolicy": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["dangerFullAccess"], - "title": "DangerFullAccessSandboxPolicyType", - "type": "string" + "title": "DangerFullAccessSandboxPolicyType" } }, - "required": ["type"], - "title": "DangerFullAccessSandboxPolicy", - "type": "object" + "title": "DangerFullAccessSandboxPolicy" }, { + "type": "object", + "required": ["type"], "properties": { - "access": { - "allOf": [ - { - "$ref": "#/definitions/ReadOnlyAccess" - } - ], - "default": { - "type": "fullAccess" - } - }, "networkAccess": { "default": false, "type": "boolean" }, "type": { + "type": "string", "enum": ["readOnly"], - "title": "ReadOnlySandboxPolicyType", - "type": "string" + "title": "ReadOnlySandboxPolicyType" } }, - "required": ["type"], - "title": "ReadOnlySandboxPolicy", - "type": "object" + "title": "ReadOnlySandboxPolicy" }, { + "type": "object", + "required": ["type"], "properties": { "networkAccess": { + "default": "restricted", "allOf": [ { "$ref": "#/definitions/NetworkAccess" } - ], - "default": "restricted" + ] }, "type": { + "type": "string", "enum": ["externalSandbox"], - "title": "ExternalSandboxSandboxPolicyType", - "type": "string" + "title": "ExternalSandboxSandboxPolicyType" } }, - "required": ["type"], - "title": "ExternalSandboxSandboxPolicy", - "type": "object" + "title": "ExternalSandboxSandboxPolicy" }, { + "type": "object", + "required": ["type"], "properties": { "excludeSlashTmp": { "default": false, @@ -836,85 +967,77 @@ "default": false, "type": "boolean" }, - "readOnlyAccess": { - "allOf": [ - { - "$ref": "#/definitions/ReadOnlyAccess" - } - ], - "default": { - "type": "fullAccess" - } - }, "type": { + "type": "string", "enum": ["workspaceWrite"], - "title": "WorkspaceWriteSandboxPolicyType", - "type": "string" + "title": "WorkspaceWriteSandboxPolicyType" }, "writableRoots": { "default": [], + "type": "array", "items": { "$ref": "#/definitions/AbsolutePathBuf" - }, - "type": "array" + } } }, - "required": ["type"], - "title": "WorkspaceWriteSandboxPolicy", - "type": "object" + "title": "WorkspaceWriteSandboxPolicy" } ] }, "ServiceTier": { - "enum": ["fast", "flex"], - "type": "string" + "type": "string", + "enum": ["fast", "flex"] }, "SessionSource": { "oneOf": [ { - "enum": ["cli", "vscode", "exec", "appServer", "unknown"], - "type": "string" + "type": "string", + "enum": ["cli", "vscode", "exec", "appServer", "unknown"] }, { - "additionalProperties": false, + "type": "object", + "required": ["custom"], "properties": { "custom": { "type": "string" } }, - "required": ["custom"], - "title": "CustomSessionSource", - "type": "object" + "additionalProperties": false, + "title": "CustomSessionSource" }, { - "additionalProperties": false, + "type": "object", + "required": ["subAgent"], "properties": { "subAgent": { "$ref": "#/definitions/SubAgentSource" } }, - "required": ["subAgent"], - "title": "SubAgentSessionSource", - "type": "object" + "additionalProperties": false, + "title": "SubAgentSessionSource" } ] }, "SubAgentSource": { "oneOf": [ { - "enum": ["review", "compact", "memory_consolidation"], - "type": "string" + "type": "string", + "enum": ["review", "compact", "memory_consolidation"] }, { - "additionalProperties": false, + "type": "object", + "required": ["thread_spawn"], "properties": { "thread_spawn": { + "type": "object", + "required": ["depth", "parent_thread_id"], "properties": { "agent_nickname": { "default": null, "type": ["string", "null"] }, "agent_path": { + "default": null, "anyOf": [ { "$ref": "#/definitions/AgentPath" @@ -922,61 +1045,71 @@ { "type": "null" } - ], - "default": null + ] }, "agent_role": { "default": null, "type": ["string", "null"] }, "depth": { - "format": "int32", - "type": "integer" + "type": "integer", + "format": "int32" }, "parent_thread_id": { "$ref": "#/definitions/ThreadId" } - }, - "required": ["depth", "parent_thread_id"], - "type": "object" + } } }, - "required": ["thread_spawn"], - "title": "ThreadSpawnSubAgentSource", - "type": "object" + "additionalProperties": false, + "title": "ThreadSpawnSubAgentSource" }, { - "additionalProperties": false, + "type": "object", + "required": ["other"], "properties": { "other": { "type": "string" } }, - "required": ["other"], - "title": "OtherSubAgentSource", - "type": "object" + "additionalProperties": false, + "title": "OtherSubAgentSource" } ] }, "TextElement": { + "type": "object", + "required": ["byteRange"], "properties": { "byteRange": { + "description": "Byte range in the parent `text` buffer that this element occupies.", "allOf": [ { "$ref": "#/definitions/ByteRange" } - ], - "description": "Byte range in the parent `text` buffer that this element occupies." + ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", "type": ["string", "null"] } - }, - "required": ["byteRange"], - "type": "object" + } }, "Thread": { + "type": "object", + "required": [ + "cliVersion", + "createdAt", + "cwd", + "ephemeral", + "id", + "modelProvider", + "preview", + "source", + "status", + "turns", + "updatedAt" + ], "properties": { "agentNickname": { "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.", @@ -992,16 +1125,16 @@ }, "createdAt": { "description": "Unix timestamp (in seconds) when the thread was created.", - "format": "int64", - "type": "integer" + "type": "integer", + "format": "int64" }, "cwd": { + "description": "Working directory captured for the thread.", "allOf": [ { "$ref": "#/definitions/AbsolutePathBuf" } - ], - "description": "Working directory captured for the thread." + ] }, "ephemeral": { "description": "Whether the thread is ephemeral and should not be materialized on disk.", @@ -1012,6 +1145,7 @@ "type": ["string", "null"] }, "gitInfo": { + "description": "Optional Git metadata captured when the thread was created.", "anyOf": [ { "$ref": "#/definitions/GitInfo" @@ -1019,8 +1153,7 @@ { "type": "null" } - ], - "description": "Optional Git metadata captured when the thread was created." + ] }, "id": { "type": "string" @@ -1042,52 +1175,38 @@ "type": "string" }, "source": { + "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).", "allOf": [ { "$ref": "#/definitions/SessionSource" } - ], - "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." + ] }, "status": { + "description": "Current runtime status for the thread.", "allOf": [ { "$ref": "#/definitions/ThreadStatus" } - ], - "description": "Current runtime status for the thread." + ] }, "turns": { "description": "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", + "type": "array", "items": { "$ref": "#/definitions/Turn" - }, - "type": "array" + } }, "updatedAt": { "description": "Unix timestamp (in seconds) when the thread was last updated.", - "format": "int64", - "type": "integer" + "type": "integer", + "format": "int64" } - }, - "required": [ - "cliVersion", - "createdAt", - "cwd", - "ephemeral", - "id", - "modelProvider", - "preview", - "source", - "status", - "turns", - "updatedAt" - ], - "type": "object" + } }, "ThreadActiveFlag": { - "enum": ["waitingOnApproval", "waitingOnUserInput"], - "type": "string" + "type": "string", + "enum": ["waitingOnApproval", "waitingOnUserInput"] }, "ThreadId": { "type": "string" @@ -1095,53 +1214,56 @@ "ThreadItem": { "oneOf": [ { + "type": "object", + "required": ["content", "id", "type"], "properties": { "content": { + "type": "array", "items": { "$ref": "#/definitions/UserInput" - }, - "type": "array" + } }, "id": { "type": "string" }, "type": { + "type": "string", "enum": ["userMessage"], - "title": "UserMessageThreadItemType", - "type": "string" + "title": "UserMessageThreadItemType" } }, - "required": ["content", "id", "type"], - "title": "UserMessageThreadItem", - "type": "object" + "title": "UserMessageThreadItem" }, { + "type": "object", + "required": ["fragments", "id", "type"], "properties": { "fragments": { + "type": "array", "items": { "$ref": "#/definitions/HookPromptFragment" - }, - "type": "array" + } }, "id": { "type": "string" }, "type": { + "type": "string", "enum": ["hookPrompt"], - "title": "HookPromptThreadItemType", - "type": "string" + "title": "HookPromptThreadItemType" } }, - "required": ["fragments", "id", "type"], - "title": "HookPromptThreadItem", - "type": "object" + "title": "HookPromptThreadItem" }, { + "type": "object", + "required": ["id", "text", "type"], "properties": { "id": { "type": "string" }, "memoryCitation": { + "default": null, "anyOf": [ { "$ref": "#/definitions/MemoryCitation" @@ -1149,10 +1271,10 @@ { "type": "null" } - ], - "default": null + ] }, "phase": { + "default": null, "anyOf": [ { "$ref": "#/definitions/MessagePhase" @@ -1160,24 +1282,23 @@ { "type": "null" } - ], - "default": null + ] }, "text": { "type": "string" }, "type": { + "type": "string", "enum": ["agentMessage"], - "title": "AgentMessageThreadItemType", - "type": "string" + "title": "AgentMessageThreadItemType" } }, - "required": ["id", "text", "type"], - "title": "AgentMessageThreadItem", - "type": "object" + "title": "AgentMessageThreadItem" }, { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", + "type": "object", + "required": ["id", "text", "type"], "properties": { "id": { "type": "string" @@ -1186,45 +1307,45 @@ "type": "string" }, "type": { + "type": "string", "enum": ["plan"], - "title": "PlanThreadItemType", - "type": "string" + "title": "PlanThreadItemType" } }, - "required": ["id", "text", "type"], - "title": "PlanThreadItem", - "type": "object" + "title": "PlanThreadItem" }, { + "type": "object", + "required": ["id", "type"], "properties": { "content": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "id": { "type": "string" }, "summary": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["reasoning"], - "title": "ReasoningThreadItemType", - "type": "string" + "title": "ReasoningThreadItemType" } }, - "required": ["id", "type"], - "title": "ReasoningThreadItem", - "type": "object" + "title": "ReasoningThreadItem" }, { + "type": "object", + "required": ["command", "commandActions", "cwd", "id", "status", "type"], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", @@ -1236,28 +1357,28 @@ }, "commandActions": { "description": "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.", + "type": "array", "items": { "$ref": "#/definitions/CommandAction" - }, - "type": "array" + } }, "cwd": { + "description": "The command's working directory.", "allOf": [ { "$ref": "#/definitions/AbsolutePathBuf" } - ], - "description": "The command's working directory." + ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "exitCode": { "description": "The command's exit code.", - "format": "int32", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int32" }, "id": { "type": "string" @@ -1267,33 +1388,33 @@ "type": ["string", "null"] }, "source": { + "default": "agent", "allOf": [ { "$ref": "#/definitions/CommandExecutionSource" } - ], - "default": "agent" + ] }, "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { + "type": "string", "enum": ["commandExecution"], - "title": "CommandExecutionThreadItemType", - "type": "string" + "title": "CommandExecutionThreadItemType" } }, - "required": ["command", "commandActions", "cwd", "id", "status", "type"], - "title": "CommandExecutionThreadItem", - "type": "object" + "title": "CommandExecutionThreadItem" }, { + "type": "object", + "required": ["changes", "id", "status", "type"], "properties": { "changes": { + "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" - }, - "type": "array" + } }, "id": { "type": "string" @@ -1302,22 +1423,22 @@ "$ref": "#/definitions/PatchApplyStatus" }, "type": { + "type": "string", "enum": ["fileChange"], - "title": "FileChangeThreadItemType", - "type": "string" + "title": "FileChangeThreadItemType" } }, - "required": ["changes", "id", "status", "type"], - "title": "FileChangeThreadItem", - "type": "object" + "title": "FileChangeThreadItem" }, { + "type": "object", + "required": ["arguments", "id", "server", "status", "tool", "type"], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "error": { "anyOf": [ @@ -1355,28 +1476,28 @@ "type": "string" }, "type": { + "type": "string", "enum": ["mcpToolCall"], - "title": "McpToolCallThreadItemType", - "type": "string" + "title": "McpToolCallThreadItemType" } }, - "required": ["arguments", "id", "server", "status", "tool", "type"], - "title": "McpToolCallThreadItem", - "type": "object" + "title": "McpToolCallThreadItem" }, { + "type": "object", + "required": ["arguments", "id", "status", "tool", "type"], "properties": { "arguments": true, "contentItems": { + "type": ["array", "null"], "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" - }, - "type": ["array", "null"] + } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "id": { "type": "string" @@ -1394,23 +1515,31 @@ "type": "string" }, "type": { + "type": "string", "enum": ["dynamicToolCall"], - "title": "DynamicToolCallThreadItemType", - "type": "string" + "title": "DynamicToolCallThreadItemType" } }, - "required": ["arguments", "id", "status", "tool", "type"], - "title": "DynamicToolCallThreadItem", - "type": "object" + "title": "DynamicToolCallThreadItem" }, { + "type": "object", + "required": [ + "agentsStates", + "id", + "receiverThreadIds", + "senderThreadId", + "status", + "tool", + "type" + ], "properties": { "agentsStates": { + "description": "Last known status of the target agents, when available.", + "type": "object", "additionalProperties": { "$ref": "#/definitions/CollabAgentState" - }, - "description": "Last known status of the target agents, when available.", - "type": "object" + } }, "id": { "description": "Unique identifier for this collab tool call.", @@ -1425,6 +1554,7 @@ "type": ["string", "null"] }, "reasoningEffort": { + "description": "Reasoning effort requested for the spawned agent, when applicable.", "anyOf": [ { "$ref": "#/definitions/ReasoningEffort" @@ -1432,55 +1562,46 @@ { "type": "null" } - ], - "description": "Reasoning effort requested for the spawned agent, when applicable." + ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", "type": "string" }, "status": { + "description": "Current status of the collab tool call.", "allOf": [ { "$ref": "#/definitions/CollabAgentToolCallStatus" } - ], - "description": "Current status of the collab tool call." + ] }, "tool": { + "description": "Name of the collab tool that was invoked.", "allOf": [ { "$ref": "#/definitions/CollabAgentTool" } - ], - "description": "Name of the collab tool that was invoked." + ] }, "type": { + "type": "string", "enum": ["collabAgentToolCall"], - "title": "CollabAgentToolCallThreadItemType", - "type": "string" + "title": "CollabAgentToolCallThreadItemType" } }, - "required": [ - "agentsStates", - "id", - "receiverThreadIds", - "senderThreadId", - "status", - "tool", - "type" - ], - "title": "CollabAgentToolCallThreadItem", - "type": "object" + "title": "CollabAgentToolCallThreadItem" }, { + "type": "object", + "required": ["id", "query", "type"], "properties": { "action": { "anyOf": [ @@ -1499,16 +1620,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["webSearch"], - "title": "WebSearchThreadItemType", - "type": "string" + "title": "WebSearchThreadItemType" } }, - "required": ["id", "query", "type"], - "title": "WebSearchThreadItem", - "type": "object" + "title": "WebSearchThreadItem" }, { + "type": "object", + "required": ["id", "path", "type"], "properties": { "id": { "type": "string" @@ -1517,16 +1638,16 @@ "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["imageView"], - "title": "ImageViewThreadItemType", - "type": "string" + "title": "ImageViewThreadItemType" } }, - "required": ["id", "path", "type"], - "title": "ImageViewThreadItem", - "type": "object" + "title": "ImageViewThreadItem" }, { + "type": "object", + "required": ["id", "result", "status", "type"], "properties": { "id": { "type": "string" @@ -1551,16 +1672,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["imageGeneration"], - "title": "ImageGenerationThreadItemType", - "type": "string" + "title": "ImageGenerationThreadItemType" } }, - "required": ["id", "result", "status", "type"], - "title": "ImageGenerationThreadItem", - "type": "object" + "title": "ImageGenerationThreadItem" }, { + "type": "object", + "required": ["id", "review", "type"], "properties": { "id": { "type": "string" @@ -1569,16 +1690,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["enteredReviewMode"], - "title": "EnteredReviewModeThreadItemType", - "type": "string" + "title": "EnteredReviewModeThreadItemType" } }, - "required": ["id", "review", "type"], - "title": "EnteredReviewModeThreadItem", - "type": "object" + "title": "EnteredReviewModeThreadItem" }, { + "type": "object", + "required": ["id", "review", "type"], "properties": { "id": { "type": "string" @@ -1587,103 +1708,104 @@ "type": "string" }, "type": { + "type": "string", "enum": ["exitedReviewMode"], - "title": "ExitedReviewModeThreadItemType", - "type": "string" + "title": "ExitedReviewModeThreadItemType" } }, - "required": ["id", "review", "type"], - "title": "ExitedReviewModeThreadItem", - "type": "object" + "title": "ExitedReviewModeThreadItem" }, { + "type": "object", + "required": ["id", "type"], "properties": { "id": { "type": "string" }, "type": { + "type": "string", "enum": ["contextCompaction"], - "title": "ContextCompactionThreadItemType", - "type": "string" + "title": "ContextCompactionThreadItemType" } }, - "required": ["id", "type"], - "title": "ContextCompactionThreadItem", - "type": "object" + "title": "ContextCompactionThreadItem" } ] }, "ThreadStatus": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["notLoaded"], - "title": "NotLoadedThreadStatusType", - "type": "string" + "title": "NotLoadedThreadStatusType" } }, - "required": ["type"], - "title": "NotLoadedThreadStatus", - "type": "object" + "title": "NotLoadedThreadStatus" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["idle"], - "title": "IdleThreadStatusType", - "type": "string" + "title": "IdleThreadStatusType" } }, - "required": ["type"], - "title": "IdleThreadStatus", - "type": "object" + "title": "IdleThreadStatus" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["systemError"], - "title": "SystemErrorThreadStatusType", - "type": "string" + "title": "SystemErrorThreadStatusType" } }, - "required": ["type"], - "title": "SystemErrorThreadStatus", - "type": "object" + "title": "SystemErrorThreadStatus" }, { + "type": "object", + "required": ["activeFlags", "type"], "properties": { "activeFlags": { + "type": "array", "items": { "$ref": "#/definitions/ThreadActiveFlag" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["active"], - "title": "ActiveThreadStatusType", - "type": "string" + "title": "ActiveThreadStatusType" } }, - "required": ["activeFlags", "type"], - "title": "ActiveThreadStatus", - "type": "object" + "title": "ActiveThreadStatus" } ] }, "Turn": { + "type": "object", + "required": ["id", "items", "status"], "properties": { "completedAt": { "description": "Unix timestamp (in seconds) when the turn completed.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "durationMs": { "description": "Duration between turn start and completion in milliseconds, if known.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "error": { + "description": "Only populated when the Turn's status is failed.", "anyOf": [ { "$ref": "#/definitions/TurnError" @@ -1691,32 +1813,31 @@ { "type": "null" } - ], - "description": "Only populated when the Turn's status is failed." + ] }, "id": { "type": "string" }, "items": { "description": "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.", + "type": "array", "items": { "$ref": "#/definitions/ThreadItem" - }, - "type": "array" + } }, "startedAt": { "description": "Unix timestamp (in seconds) when the turn started.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "status": { "$ref": "#/definitions/TurnStatus" } - }, - "required": ["id", "items", "status"], - "type": "object" + } }, "TurnError": { + "type": "object", + "required": ["message"], "properties": { "additionalDetails": { "default": null, @@ -1735,70 +1856,70 @@ "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "TurnStatus": { - "enum": ["completed", "interrupted", "failed", "inProgress"], - "type": "string" + "type": "string", + "enum": ["completed", "interrupted", "failed", "inProgress"] }, "UserInput": { "oneOf": [ { + "type": "object", + "required": ["text", "type"], "properties": { "text": { "type": "string" }, "text_elements": { - "default": [], "description": "UI-defined spans within `text` used to render or persist special elements.", + "default": [], + "type": "array", "items": { "$ref": "#/definitions/TextElement" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["text"], - "title": "TextUserInputType", - "type": "string" + "title": "TextUserInputType" } }, - "required": ["text", "type"], - "title": "TextUserInput", - "type": "object" + "title": "TextUserInput" }, { + "type": "object", + "required": ["type", "url"], "properties": { "type": { + "type": "string", "enum": ["image"], - "title": "ImageUserInputType", - "type": "string" + "title": "ImageUserInputType" }, "url": { "type": "string" } }, - "required": ["type", "url"], - "title": "ImageUserInput", - "type": "object" + "title": "ImageUserInput" }, { - "properties": { - "path": { - "type": "string" - }, - "type": { - "enum": ["localImage"], - "title": "LocalImageUserInputType", - "type": "string" - } - }, + "type": "object", "required": ["path", "type"], - "title": "LocalImageUserInput", - "type": "object" + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["localImage"], + "title": "LocalImageUserInputType" + } + }, + "title": "LocalImageUserInput" }, { + "type": "object", + "required": ["name", "path", "type"], "properties": { "name": { "type": "string" @@ -1807,16 +1928,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["skill"], - "title": "SkillUserInputType", - "type": "string" + "title": "SkillUserInputType" } }, - "required": ["name", "path", "type"], - "title": "SkillUserInput", - "type": "object" + "title": "SkillUserInput" }, { + "type": "object", + "required": ["name", "path", "type"], "properties": { "name": { "type": "string" @@ -1825,170 +1946,84 @@ "type": "string" }, "type": { + "type": "string", "enum": ["mention"], - "title": "MentionUserInputType", - "type": "string" + "title": "MentionUserInputType" } }, - "required": ["name", "path", "type"], - "title": "MentionUserInput", - "type": "object" + "title": "MentionUserInput" } ] }, "WebSearchAction": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "queries": { + "type": ["array", "null"], "items": { "type": "string" - }, - "type": ["array", "null"] + } }, "query": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["search"], - "title": "SearchWebSearchActionType", - "type": "string" + "title": "SearchWebSearchActionType" } }, - "required": ["type"], - "title": "SearchWebSearchAction", - "type": "object" + "title": "SearchWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["openPage"], - "title": "OpenPageWebSearchActionType", - "type": "string" + "title": "OpenPageWebSearchActionType" }, "url": { "type": ["string", "null"] } }, - "required": ["type"], - "title": "OpenPageWebSearchAction", - "type": "object" + "title": "OpenPageWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "pattern": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["findInPage"], - "title": "FindInPageWebSearchActionType", - "type": "string" + "title": "FindInPageWebSearchActionType" }, "url": { "type": ["string", "null"] } }, - "required": ["type"], - "title": "FindInPageWebSearchAction", - "type": "object" + "title": "FindInPageWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["other"], - "title": "OtherWebSearchActionType", - "type": "string" + "title": "OtherWebSearchActionType" } }, - "required": ["type"], - "title": "OtherWebSearchAction", - "type": "object" + "title": "OtherWebSearchAction" } ] } - }, - "properties": { - "approvalPolicy": { - "$ref": "#/definitions/AskForApproval" - }, - "approvalsReviewer": { - "allOf": [ - { - "$ref": "#/definitions/ApprovalsReviewer" - } - ], - "description": "Reviewer currently used for approval requests on this thread." - }, - "cwd": { - "$ref": "#/definitions/AbsolutePathBuf" - }, - "instructionSources": { - "default": [], - "description": "Instruction source files currently loaded for this thread.", - "items": { - "$ref": "#/definitions/AbsolutePathBuf" - }, - "type": "array" - }, - "model": { - "type": "string" - }, - "modelProvider": { - "type": "string" - }, - "permissionProfile": { - "anyOf": [ - { - "$ref": "#/definitions/PermissionProfile" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Canonical active permissions view for this thread when representable. This is `null` for external sandbox policies because external enforcement cannot be round-tripped as a `PermissionProfile`." - }, - "reasoningEffort": { - "anyOf": [ - { - "$ref": "#/definitions/ReasoningEffort" - }, - { - "type": "null" - } - ] - }, - "sandbox": { - "allOf": [ - { - "$ref": "#/definitions/SandboxPolicy" - } - ], - "description": "Legacy sandbox policy retained for compatibility. New clients should use `permissionProfile` when present as the canonical active permissions view." - }, - "serviceTier": { - "anyOf": [ - { - "$ref": "#/definitions/ServiceTier" - }, - { - "type": "null" - } - ] - }, - "thread": { - "$ref": "#/definitions/Thread" - } - }, - "required": [ - "approvalPolicy", - "approvalsReviewer", - "cwd", - "model", - "modelProvider", - "sandbox", - "thread" - ], - "title": "ThreadResumeResponse", - "type": "object" + } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json index c5da03b3ea8..37cc6b49fd4 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/ThreadStartResponse.json @@ -1,28 +1,170 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadStartResponse", + "type": "object", + "required": [ + "approvalPolicy", + "approvalsReviewer", + "cwd", + "model", + "modelProvider", + "sandbox", + "thread" + ], + "properties": { + "activePermissionProfile": { + "description": "Named or implicit built-in profile that produced the active permissions, when known.", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/ActivePermissionProfile" + }, + { + "type": "null" + } + ] + }, + "approvalPolicy": { + "$ref": "#/definitions/AskForApproval" + }, + "approvalsReviewer": { + "description": "Reviewer currently used for approval requests on this thread.", + "allOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + } + ] + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "instructionSources": { + "description": "Instruction source files currently loaded for this thread.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + }, + "model": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "permissionProfile": { + "description": "Full active permissions for this thread. `activePermissionProfile` carries display/provenance metadata for this runtime profile.", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/PermissionProfile" + }, + { + "type": "null" + } + ] + }, + "reasoningEffort": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + "sandbox": { + "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `permissionProfile` when they need exact runtime permissions.", + "allOf": [ + { + "$ref": "#/definitions/SandboxPolicy" + } + ] + }, + "serviceTier": { + "anyOf": [ + { + "$ref": "#/definitions/ServiceTier" + }, + { + "type": "null" + } + ] + }, + "thread": { + "$ref": "#/definitions/Thread" + } + }, "definitions": { "AbsolutePathBuf": { "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", "type": "string" }, + "ActivePermissionProfile": { + "type": "object", + "required": ["id"], + "properties": { + "extends": { + "description": "Parent profile identifier once permissions profiles support inheritance. This is currently always `null`.", + "default": null, + "type": ["string", "null"] + }, + "id": { + "description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", + "type": "string" + }, + "modifications": { + "description": "Bounded user-requested modifications applied on top of the named profile, if any.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ActivePermissionProfileModification" + } + } + } + }, + "ActivePermissionProfileModification": { + "oneOf": [ + { + "description": "Additional concrete directory that should be writable.", + "type": "object", + "required": ["path", "type"], + "properties": { + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": ["additionalWritableRoot"], + "title": "AdditionalWritableRootActivePermissionProfileModificationType" + } + }, + "title": "AdditionalWritableRootActivePermissionProfileModification" + } + ] + }, "AgentPath": { "type": "string" }, "ApprovalsReviewer": { "description": "Configures who approval requests are routed to for review. Examples include sandbox escapes, blocked network access, MCP approval prompts, and ARC escalations. Defaults to `user`. `auto_review` uses a carefully prompted subagent to gather relevant context and apply a risk-based decision framework before approving or denying the request. The legacy value `guardian_subagent` is accepted for compatibility.", - "enum": ["user", "auto_review", "guardian_subagent"], - "type": "string" + "type": "string", + "enum": ["user", "auto_review", "guardian_subagent"] }, "AskForApproval": { "oneOf": [ { - "enum": ["untrusted", "on-failure", "on-request", "never"], - "type": "string" + "type": "string", + "enum": ["untrusted", "on-failure", "on-request", "never"] }, { - "additionalProperties": false, + "type": "object", + "required": ["granular"], "properties": { "granular": { + "type": "object", + "required": ["mcp_elicitations", "rules", "sandbox_approval"], "properties": { "mcp_elicitations": { "type": "boolean" @@ -41,37 +183,35 @@ "default": false, "type": "boolean" } - }, - "required": ["mcp_elicitations", "rules", "sandbox_approval"], - "type": "object" + } } }, - "required": ["granular"], - "title": "GranularAskForApproval", - "type": "object" + "additionalProperties": false, + "title": "GranularAskForApproval" } ] }, "ByteRange": { + "type": "object", + "required": ["end", "start"], "properties": { "end": { + "type": "integer", "format": "uint", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "start": { + "type": "integer", "format": "uint", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 } - }, - "required": ["end", "start"], - "type": "object" + } }, "CodexErrorInfo": { "description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.", "oneOf": [ { + "type": "string", "enum": [ "contextWindowExceeded", "usageLimitExceeded", @@ -83,105 +223,106 @@ "threadRollbackFailed", "sandboxError", "other" - ], - "type": "string" + ] }, { - "additionalProperties": false, + "type": "object", + "required": ["httpConnectionFailed"], "properties": { "httpConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["httpConnectionFailed"], - "title": "HttpConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "HttpConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Failed to connect to the response SSE stream.", + "type": "object", + "required": ["responseStreamConnectionFailed"], "properties": { "responseStreamConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamConnectionFailed"], - "title": "ResponseStreamConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "The response SSE stream disconnected in the middle of a turn before completion.", + "type": "object", + "required": ["responseStreamDisconnected"], "properties": { "responseStreamDisconnected": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamDisconnected"], - "title": "ResponseStreamDisconnectedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamDisconnectedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Reached the retry limit for responses.", + "type": "object", + "required": ["responseTooManyFailedAttempts"], "properties": { "responseTooManyFailedAttempts": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseTooManyFailedAttempts"], - "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseTooManyFailedAttemptsCodexErrorInfo" }, { - "additionalProperties": false, "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", + "type": "object", + "required": ["activeTurnNotSteerable"], "properties": { "activeTurnNotSteerable": { + "type": "object", + "required": ["turnKind"], "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } - }, - "required": ["turnKind"], - "type": "object" + } } }, - "required": ["activeTurnNotSteerable"], - "title": "ActiveTurnNotSteerableCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ActiveTurnNotSteerableCodexErrorInfo" } ] }, "CollabAgentState": { + "type": "object", + "required": ["status"], "properties": { "message": { "type": ["string", "null"] @@ -189,11 +330,10 @@ "status": { "$ref": "#/definitions/CollabAgentStatus" } - }, - "required": ["status"], - "type": "object" + } }, "CollabAgentStatus": { + "type": "string", "enum": [ "pendingInit", "running", @@ -202,20 +342,21 @@ "errored", "shutdown", "notFound" - ], - "type": "string" + ] }, "CollabAgentTool": { - "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"], - "type": "string" + "type": "string", + "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"] }, "CollabAgentToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "CommandAction": { "oneOf": [ { + "type": "object", + "required": ["command", "name", "path", "type"], "properties": { "command": { "type": "string" @@ -227,16 +368,16 @@ "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["read"], - "title": "ReadCommandActionType", - "type": "string" + "title": "ReadCommandActionType" } }, - "required": ["command", "name", "path", "type"], - "title": "ReadCommandAction", - "type": "object" + "title": "ReadCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" @@ -245,16 +386,16 @@ "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["listFiles"], - "title": "ListFilesCommandActionType", - "type": "string" + "title": "ListFilesCommandActionType" } }, - "required": ["command", "type"], - "title": "ListFilesCommandAction", - "type": "object" + "title": "ListFilesCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" @@ -266,132 +407,132 @@ "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["search"], - "title": "SearchCommandActionType", - "type": "string" + "title": "SearchCommandActionType" } }, - "required": ["command", "type"], - "title": "SearchCommandAction", - "type": "object" + "title": "SearchCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" }, "type": { + "type": "string", "enum": ["unknown"], - "title": "UnknownCommandActionType", - "type": "string" + "title": "UnknownCommandActionType" } }, - "required": ["command", "type"], - "title": "UnknownCommandAction", - "type": "object" + "title": "UnknownCommandAction" } ] }, "CommandExecutionSource": { - "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"], - "type": "string" + "type": "string", + "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"] }, "CommandExecutionStatus": { - "enum": ["inProgress", "completed", "failed", "declined"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed", "declined"] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { + "type": "object", + "required": ["text", "type"], "properties": { "text": { "type": "string" }, "type": { + "type": "string", "enum": ["inputText"], - "title": "InputTextDynamicToolCallOutputContentItemType", - "type": "string" + "title": "InputTextDynamicToolCallOutputContentItemType" } }, - "required": ["text", "type"], - "title": "InputTextDynamicToolCallOutputContentItem", - "type": "object" + "title": "InputTextDynamicToolCallOutputContentItem" }, { + "type": "object", + "required": ["imageUrl", "type"], "properties": { "imageUrl": { "type": "string" }, "type": { + "type": "string", "enum": ["inputImage"], - "title": "InputImageDynamicToolCallOutputContentItemType", - "type": "string" + "title": "InputImageDynamicToolCallOutputContentItemType" } }, - "required": ["imageUrl", "type"], - "title": "InputImageDynamicToolCallOutputContentItem", - "type": "object" + "title": "InputImageDynamicToolCallOutputContentItem" } ] }, "DynamicToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "FileSystemAccessMode": { - "enum": ["read", "write", "none"], - "type": "string" + "type": "string", + "enum": ["read", "write", "none"] }, "FileSystemPath": { "oneOf": [ { + "type": "object", + "required": ["path", "type"], "properties": { "path": { "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["path"], - "title": "PathFileSystemPathType", - "type": "string" + "title": "PathFileSystemPathType" } }, - "required": ["path", "type"], - "title": "PathFileSystemPath", - "type": "object" + "title": "PathFileSystemPath" }, { + "type": "object", + "required": ["pattern", "type"], "properties": { "pattern": { "type": "string" }, "type": { + "type": "string", "enum": ["glob_pattern"], - "title": "GlobPatternFileSystemPathType", - "type": "string" + "title": "GlobPatternFileSystemPathType" } }, - "required": ["pattern", "type"], - "title": "GlobPatternFileSystemPath", - "type": "object" + "title": "GlobPatternFileSystemPath" }, { + "type": "object", + "required": ["type", "value"], "properties": { "type": { + "type": "string", "enum": ["special"], - "title": "SpecialFileSystemPathType", - "type": "string" + "title": "SpecialFileSystemPathType" }, "value": { "$ref": "#/definitions/FileSystemSpecialPath" } }, - "required": ["type", "value"], - "title": "SpecialFileSystemPath", - "type": "object" + "title": "SpecialFileSystemPath" } ] }, "FileSystemSandboxEntry": { + "type": "object", + "required": ["access", "path"], "properties": { "access": { "$ref": "#/definitions/FileSystemAccessMode" @@ -399,86 +540,75 @@ "path": { "$ref": "#/definitions/FileSystemPath" } - }, - "required": ["access", "path"], - "type": "object" + } }, "FileSystemSpecialPath": { "oneOf": [ { + "type": "object", + "required": ["kind"], "properties": { "kind": { - "enum": ["root"], - "type": "string" + "type": "string", + "enum": ["root"] } }, - "required": ["kind"], - "title": "RootFileSystemSpecialPath", - "type": "object" + "title": "RootFileSystemSpecialPath" }, { + "type": "object", + "required": ["kind"], "properties": { "kind": { - "enum": ["minimal"], - "type": "string" + "type": "string", + "enum": ["minimal"] } }, - "required": ["kind"], - "title": "MinimalFileSystemSpecialPath", - "type": "object" + "title": "MinimalFileSystemSpecialPath" }, { - "properties": { - "kind": { - "enum": ["current_working_directory"], - "type": "string" - } - }, + "type": "object", "required": ["kind"], - "title": "CurrentWorkingDirectoryFileSystemSpecialPath", - "type": "object" - }, - { "properties": { "kind": { - "enum": ["project_roots"], - "type": "string" + "type": "string", + "enum": ["project_roots"] }, "subpath": { "type": ["string", "null"] } }, - "required": ["kind"], - "title": "KindFileSystemSpecialPath", - "type": "object" + "title": "KindFileSystemSpecialPath" }, { + "type": "object", + "required": ["kind"], "properties": { "kind": { - "enum": ["tmpdir"], - "type": "string" + "type": "string", + "enum": ["tmpdir"] } }, - "required": ["kind"], - "title": "TmpdirFileSystemSpecialPath", - "type": "object" + "title": "TmpdirFileSystemSpecialPath" }, { + "type": "object", + "required": ["kind"], "properties": { "kind": { - "enum": ["slash_tmp"], - "type": "string" + "type": "string", + "enum": ["slash_tmp"] } }, - "required": ["kind"], - "title": "SlashTmpFileSystemSpecialPath", - "type": "object" + "title": "SlashTmpFileSystemSpecialPath" }, { + "type": "object", + "required": ["kind", "path"], "properties": { "kind": { - "enum": ["unknown"], - "type": "string" + "type": "string", + "enum": ["unknown"] }, "path": { "type": "string" @@ -486,13 +616,13 @@ "subpath": { "type": ["string", "null"] } - }, - "required": ["kind", "path"], - "type": "object" + } } ] }, "FileUpdateChange": { + "type": "object", + "required": ["diff", "kind", "path"], "properties": { "diff": { "type": "string" @@ -503,11 +633,10 @@ "path": { "type": "string" } - }, - "required": ["diff", "kind", "path"], - "type": "object" + } }, "GitInfo": { + "type": "object", "properties": { "branch": { "type": ["string", "null"] @@ -518,10 +647,11 @@ "sha": { "type": ["string", "null"] } - }, - "type": "object" + } }, "HookPromptFragment": { + "type": "object", + "required": ["hookRunId", "text"], "properties": { "hookRunId": { "type": "string" @@ -529,64 +659,64 @@ "text": { "type": "string" } - }, - "required": ["hookRunId", "text"], - "type": "object" + } }, "McpToolCallError": { + "type": "object", + "required": ["message"], "properties": { "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "McpToolCallResult": { + "type": "object", + "required": ["content"], "properties": { "_meta": true, "content": { - "items": true, - "type": "array" + "type": "array", + "items": true }, "structuredContent": true - }, - "required": ["content"], - "type": "object" + } }, "McpToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "MemoryCitation": { + "type": "object", + "required": ["entries", "threadIds"], "properties": { "entries": { + "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" - }, - "type": "array" + } }, "threadIds": { + "type": "array", "items": { "type": "string" - }, - "type": "array" + } } - }, - "required": ["entries", "threadIds"], - "type": "object" + } }, "MemoryCitationEntry": { + "type": "object", + "required": ["lineEnd", "lineStart", "note", "path"], "properties": { "lineEnd": { + "type": "integer", "format": "uint32", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "lineStart": { + "type": "integer", "format": "uint32", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "note": { "type": "string" @@ -594,235 +724,236 @@ "path": { "type": "string" } - }, - "required": ["lineEnd", "lineStart", "note", "path"], - "type": "object" + } }, "MessagePhase": { "description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.", "oneOf": [ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", - "enum": ["commentary"], - "type": "string" + "type": "string", + "enum": ["commentary"] }, { "description": "The assistant's terminal answer text for the current turn.", - "enum": ["final_answer"], - "type": "string" + "type": "string", + "enum": ["final_answer"] } ] }, "NetworkAccess": { - "enum": ["restricted", "enabled"], - "type": "string" + "type": "string", + "enum": ["restricted", "enabled"] }, "NonSteerableTurnKind": { - "enum": ["review", "compact"], - "type": "string" + "type": "string", + "enum": ["review", "compact"] }, "PatchApplyStatus": { - "enum": ["inProgress", "completed", "failed", "declined"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed", "declined"] }, "PatchChangeKind": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["add"], - "title": "AddPatchChangeKindType", - "type": "string" + "title": "AddPatchChangeKindType" } }, - "required": ["type"], - "title": "AddPatchChangeKind", - "type": "object" + "title": "AddPatchChangeKind" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["delete"], - "title": "DeletePatchChangeKindType", - "type": "string" + "title": "DeletePatchChangeKindType" } }, - "required": ["type"], - "title": "DeletePatchChangeKind", - "type": "object" + "title": "DeletePatchChangeKind" }, { + "type": "object", + "required": ["type"], "properties": { "move_path": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["update"], - "title": "UpdatePatchChangeKindType", - "type": "string" + "title": "UpdatePatchChangeKindType" } }, - "required": ["type"], - "title": "UpdatePatchChangeKind", - "type": "object" + "title": "UpdatePatchChangeKind" } ] }, "PermissionProfile": { - "properties": { - "fileSystem": { - "anyOf": [ - { - "$ref": "#/definitions/PermissionProfileFileSystemPermissions" - }, - { - "type": "null" - } - ] - }, - "network": { - "anyOf": [ - { - "$ref": "#/definitions/PermissionProfileNetworkPermissions" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, - "PermissionProfileFileSystemPermissions": { - "properties": { - "entries": { - "items": { - "$ref": "#/definitions/FileSystemSandboxEntry" - }, - "type": "array" - }, - "globScanMaxDepth": { - "format": "uint", - "minimum": 1.0, - "type": ["integer", "null"] - } - }, - "required": ["entries"], - "type": "object" - }, - "PermissionProfileNetworkPermissions": { - "properties": { - "enabled": { - "type": ["boolean", "null"] - } - }, - "type": "object" - }, - "ReadOnlyAccess": { "oneOf": [ { + "description": "Codex owns sandbox construction for this profile.", + "type": "object", + "required": ["fileSystem", "network", "type"], "properties": { - "includePlatformDefaults": { - "default": true, - "type": "boolean" + "fileSystem": { + "$ref": "#/definitions/PermissionProfileFileSystemPermissions" }, - "readableRoots": { - "default": [], - "items": { - "$ref": "#/definitions/AbsolutePathBuf" - }, - "type": "array" + "network": { + "$ref": "#/definitions/PermissionProfileNetworkPermissions" }, "type": { - "enum": ["restricted"], - "title": "RestrictedReadOnlyAccessType", - "type": "string" + "type": "string", + "enum": ["managed"], + "title": "ManagedPermissionProfileType" } }, - "required": ["type"], - "title": "RestrictedReadOnlyAccess", - "type": "object" + "title": "ManagedPermissionProfile" }, { + "description": "Do not apply an outer sandbox.", + "type": "object", + "required": ["type"], "properties": { "type": { - "enum": ["fullAccess"], - "title": "FullAccessReadOnlyAccessType", - "type": "string" + "type": "string", + "enum": ["disabled"], + "title": "DisabledPermissionProfileType" } }, - "required": ["type"], - "title": "FullAccessReadOnlyAccess", - "type": "object" + "title": "DisabledPermissionProfile" + }, + { + "description": "Filesystem isolation is enforced by an external caller.", + "type": "object", + "required": ["network", "type"], + "properties": { + "network": { + "$ref": "#/definitions/PermissionProfileNetworkPermissions" + }, + "type": { + "type": "string", + "enum": ["external"], + "title": "ExternalPermissionProfileType" + } + }, + "title": "ExternalPermissionProfile" } ] }, + "PermissionProfileFileSystemPermissions": { + "oneOf": [ + { + "type": "object", + "required": ["entries", "type"], + "properties": { + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/FileSystemSandboxEntry" + } + }, + "globScanMaxDepth": { + "type": ["integer", "null"], + "format": "uint", + "minimum": 1.0 + }, + "type": { + "type": "string", + "enum": ["restricted"], + "title": "RestrictedPermissionProfileFileSystemPermissionsType" + } + }, + "title": "RestrictedPermissionProfileFileSystemPermissions" + }, + { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "type": "string", + "enum": ["unrestricted"], + "title": "UnrestrictedPermissionProfileFileSystemPermissionsType" + } + }, + "title": "UnrestrictedPermissionProfileFileSystemPermissions" + } + ] + }, + "PermissionProfileNetworkPermissions": { + "type": "object", + "required": ["enabled"], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"], - "type": "string" + "type": "string", + "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] }, "SandboxPolicy": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["dangerFullAccess"], - "title": "DangerFullAccessSandboxPolicyType", - "type": "string" + "title": "DangerFullAccessSandboxPolicyType" } }, - "required": ["type"], - "title": "DangerFullAccessSandboxPolicy", - "type": "object" + "title": "DangerFullAccessSandboxPolicy" }, { + "type": "object", + "required": ["type"], "properties": { - "access": { - "allOf": [ - { - "$ref": "#/definitions/ReadOnlyAccess" - } - ], - "default": { - "type": "fullAccess" - } - }, "networkAccess": { "default": false, "type": "boolean" }, "type": { + "type": "string", "enum": ["readOnly"], - "title": "ReadOnlySandboxPolicyType", - "type": "string" + "title": "ReadOnlySandboxPolicyType" } }, - "required": ["type"], - "title": "ReadOnlySandboxPolicy", - "type": "object" + "title": "ReadOnlySandboxPolicy" }, { + "type": "object", + "required": ["type"], "properties": { "networkAccess": { + "default": "restricted", "allOf": [ { "$ref": "#/definitions/NetworkAccess" } - ], - "default": "restricted" + ] }, "type": { + "type": "string", "enum": ["externalSandbox"], - "title": "ExternalSandboxSandboxPolicyType", - "type": "string" + "title": "ExternalSandboxSandboxPolicyType" } }, - "required": ["type"], - "title": "ExternalSandboxSandboxPolicy", - "type": "object" + "title": "ExternalSandboxSandboxPolicy" }, { + "type": "object", + "required": ["type"], "properties": { "excludeSlashTmp": { "default": false, @@ -836,85 +967,77 @@ "default": false, "type": "boolean" }, - "readOnlyAccess": { - "allOf": [ - { - "$ref": "#/definitions/ReadOnlyAccess" - } - ], - "default": { - "type": "fullAccess" - } - }, "type": { + "type": "string", "enum": ["workspaceWrite"], - "title": "WorkspaceWriteSandboxPolicyType", - "type": "string" + "title": "WorkspaceWriteSandboxPolicyType" }, "writableRoots": { "default": [], + "type": "array", "items": { "$ref": "#/definitions/AbsolutePathBuf" - }, - "type": "array" + } } }, - "required": ["type"], - "title": "WorkspaceWriteSandboxPolicy", - "type": "object" + "title": "WorkspaceWriteSandboxPolicy" } ] }, "ServiceTier": { - "enum": ["fast", "flex"], - "type": "string" + "type": "string", + "enum": ["fast", "flex"] }, "SessionSource": { "oneOf": [ { - "enum": ["cli", "vscode", "exec", "appServer", "unknown"], - "type": "string" + "type": "string", + "enum": ["cli", "vscode", "exec", "appServer", "unknown"] }, { - "additionalProperties": false, + "type": "object", + "required": ["custom"], "properties": { "custom": { "type": "string" } }, - "required": ["custom"], - "title": "CustomSessionSource", - "type": "object" + "additionalProperties": false, + "title": "CustomSessionSource" }, { - "additionalProperties": false, + "type": "object", + "required": ["subAgent"], "properties": { "subAgent": { "$ref": "#/definitions/SubAgentSource" } }, - "required": ["subAgent"], - "title": "SubAgentSessionSource", - "type": "object" + "additionalProperties": false, + "title": "SubAgentSessionSource" } ] }, "SubAgentSource": { "oneOf": [ { - "enum": ["review", "compact", "memory_consolidation"], - "type": "string" + "type": "string", + "enum": ["review", "compact", "memory_consolidation"] }, { - "additionalProperties": false, + "type": "object", + "required": ["thread_spawn"], "properties": { "thread_spawn": { + "type": "object", + "required": ["depth", "parent_thread_id"], "properties": { "agent_nickname": { "default": null, "type": ["string", "null"] }, "agent_path": { + "default": null, "anyOf": [ { "$ref": "#/definitions/AgentPath" @@ -922,61 +1045,71 @@ { "type": "null" } - ], - "default": null + ] }, "agent_role": { "default": null, "type": ["string", "null"] }, "depth": { - "format": "int32", - "type": "integer" + "type": "integer", + "format": "int32" }, "parent_thread_id": { "$ref": "#/definitions/ThreadId" } - }, - "required": ["depth", "parent_thread_id"], - "type": "object" + } } }, - "required": ["thread_spawn"], - "title": "ThreadSpawnSubAgentSource", - "type": "object" + "additionalProperties": false, + "title": "ThreadSpawnSubAgentSource" }, { - "additionalProperties": false, + "type": "object", + "required": ["other"], "properties": { "other": { "type": "string" } }, - "required": ["other"], - "title": "OtherSubAgentSource", - "type": "object" + "additionalProperties": false, + "title": "OtherSubAgentSource" } ] }, "TextElement": { + "type": "object", + "required": ["byteRange"], "properties": { "byteRange": { + "description": "Byte range in the parent `text` buffer that this element occupies.", "allOf": [ { "$ref": "#/definitions/ByteRange" } - ], - "description": "Byte range in the parent `text` buffer that this element occupies." + ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", "type": ["string", "null"] } - }, - "required": ["byteRange"], - "type": "object" + } }, "Thread": { + "type": "object", + "required": [ + "cliVersion", + "createdAt", + "cwd", + "ephemeral", + "id", + "modelProvider", + "preview", + "source", + "status", + "turns", + "updatedAt" + ], "properties": { "agentNickname": { "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.", @@ -992,16 +1125,16 @@ }, "createdAt": { "description": "Unix timestamp (in seconds) when the thread was created.", - "format": "int64", - "type": "integer" + "type": "integer", + "format": "int64" }, "cwd": { + "description": "Working directory captured for the thread.", "allOf": [ { "$ref": "#/definitions/AbsolutePathBuf" } - ], - "description": "Working directory captured for the thread." + ] }, "ephemeral": { "description": "Whether the thread is ephemeral and should not be materialized on disk.", @@ -1012,6 +1145,7 @@ "type": ["string", "null"] }, "gitInfo": { + "description": "Optional Git metadata captured when the thread was created.", "anyOf": [ { "$ref": "#/definitions/GitInfo" @@ -1019,8 +1153,7 @@ { "type": "null" } - ], - "description": "Optional Git metadata captured when the thread was created." + ] }, "id": { "type": "string" @@ -1042,52 +1175,38 @@ "type": "string" }, "source": { + "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).", "allOf": [ { "$ref": "#/definitions/SessionSource" } - ], - "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)." + ] }, "status": { + "description": "Current runtime status for the thread.", "allOf": [ { "$ref": "#/definitions/ThreadStatus" } - ], - "description": "Current runtime status for the thread." + ] }, "turns": { "description": "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", + "type": "array", "items": { "$ref": "#/definitions/Turn" - }, - "type": "array" + } }, "updatedAt": { "description": "Unix timestamp (in seconds) when the thread was last updated.", - "format": "int64", - "type": "integer" + "type": "integer", + "format": "int64" } - }, - "required": [ - "cliVersion", - "createdAt", - "cwd", - "ephemeral", - "id", - "modelProvider", - "preview", - "source", - "status", - "turns", - "updatedAt" - ], - "type": "object" + } }, "ThreadActiveFlag": { - "enum": ["waitingOnApproval", "waitingOnUserInput"], - "type": "string" + "type": "string", + "enum": ["waitingOnApproval", "waitingOnUserInput"] }, "ThreadId": { "type": "string" @@ -1095,53 +1214,56 @@ "ThreadItem": { "oneOf": [ { + "type": "object", + "required": ["content", "id", "type"], "properties": { "content": { + "type": "array", "items": { "$ref": "#/definitions/UserInput" - }, - "type": "array" + } }, "id": { "type": "string" }, "type": { + "type": "string", "enum": ["userMessage"], - "title": "UserMessageThreadItemType", - "type": "string" + "title": "UserMessageThreadItemType" } }, - "required": ["content", "id", "type"], - "title": "UserMessageThreadItem", - "type": "object" + "title": "UserMessageThreadItem" }, { + "type": "object", + "required": ["fragments", "id", "type"], "properties": { "fragments": { + "type": "array", "items": { "$ref": "#/definitions/HookPromptFragment" - }, - "type": "array" + } }, "id": { "type": "string" }, "type": { + "type": "string", "enum": ["hookPrompt"], - "title": "HookPromptThreadItemType", - "type": "string" + "title": "HookPromptThreadItemType" } }, - "required": ["fragments", "id", "type"], - "title": "HookPromptThreadItem", - "type": "object" + "title": "HookPromptThreadItem" }, { + "type": "object", + "required": ["id", "text", "type"], "properties": { "id": { "type": "string" }, "memoryCitation": { + "default": null, "anyOf": [ { "$ref": "#/definitions/MemoryCitation" @@ -1149,10 +1271,10 @@ { "type": "null" } - ], - "default": null + ] }, "phase": { + "default": null, "anyOf": [ { "$ref": "#/definitions/MessagePhase" @@ -1160,24 +1282,23 @@ { "type": "null" } - ], - "default": null + ] }, "text": { "type": "string" }, "type": { + "type": "string", "enum": ["agentMessage"], - "title": "AgentMessageThreadItemType", - "type": "string" + "title": "AgentMessageThreadItemType" } }, - "required": ["id", "text", "type"], - "title": "AgentMessageThreadItem", - "type": "object" + "title": "AgentMessageThreadItem" }, { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", + "type": "object", + "required": ["id", "text", "type"], "properties": { "id": { "type": "string" @@ -1186,45 +1307,45 @@ "type": "string" }, "type": { + "type": "string", "enum": ["plan"], - "title": "PlanThreadItemType", - "type": "string" + "title": "PlanThreadItemType" } }, - "required": ["id", "text", "type"], - "title": "PlanThreadItem", - "type": "object" + "title": "PlanThreadItem" }, { + "type": "object", + "required": ["id", "type"], "properties": { "content": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "id": { "type": "string" }, "summary": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["reasoning"], - "title": "ReasoningThreadItemType", - "type": "string" + "title": "ReasoningThreadItemType" } }, - "required": ["id", "type"], - "title": "ReasoningThreadItem", - "type": "object" + "title": "ReasoningThreadItem" }, { + "type": "object", + "required": ["command", "commandActions", "cwd", "id", "status", "type"], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", @@ -1236,28 +1357,28 @@ }, "commandActions": { "description": "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.", + "type": "array", "items": { "$ref": "#/definitions/CommandAction" - }, - "type": "array" + } }, "cwd": { + "description": "The command's working directory.", "allOf": [ { "$ref": "#/definitions/AbsolutePathBuf" } - ], - "description": "The command's working directory." + ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "exitCode": { "description": "The command's exit code.", - "format": "int32", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int32" }, "id": { "type": "string" @@ -1267,33 +1388,33 @@ "type": ["string", "null"] }, "source": { + "default": "agent", "allOf": [ { "$ref": "#/definitions/CommandExecutionSource" } - ], - "default": "agent" + ] }, "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { + "type": "string", "enum": ["commandExecution"], - "title": "CommandExecutionThreadItemType", - "type": "string" + "title": "CommandExecutionThreadItemType" } }, - "required": ["command", "commandActions", "cwd", "id", "status", "type"], - "title": "CommandExecutionThreadItem", - "type": "object" + "title": "CommandExecutionThreadItem" }, { + "type": "object", + "required": ["changes", "id", "status", "type"], "properties": { "changes": { + "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" - }, - "type": "array" + } }, "id": { "type": "string" @@ -1302,22 +1423,22 @@ "$ref": "#/definitions/PatchApplyStatus" }, "type": { + "type": "string", "enum": ["fileChange"], - "title": "FileChangeThreadItemType", - "type": "string" + "title": "FileChangeThreadItemType" } }, - "required": ["changes", "id", "status", "type"], - "title": "FileChangeThreadItem", - "type": "object" + "title": "FileChangeThreadItem" }, { + "type": "object", + "required": ["arguments", "id", "server", "status", "tool", "type"], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "error": { "anyOf": [ @@ -1355,28 +1476,28 @@ "type": "string" }, "type": { + "type": "string", "enum": ["mcpToolCall"], - "title": "McpToolCallThreadItemType", - "type": "string" + "title": "McpToolCallThreadItemType" } }, - "required": ["arguments", "id", "server", "status", "tool", "type"], - "title": "McpToolCallThreadItem", - "type": "object" + "title": "McpToolCallThreadItem" }, { + "type": "object", + "required": ["arguments", "id", "status", "tool", "type"], "properties": { "arguments": true, "contentItems": { + "type": ["array", "null"], "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" - }, - "type": ["array", "null"] + } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "id": { "type": "string" @@ -1394,23 +1515,31 @@ "type": "string" }, "type": { + "type": "string", "enum": ["dynamicToolCall"], - "title": "DynamicToolCallThreadItemType", - "type": "string" + "title": "DynamicToolCallThreadItemType" } }, - "required": ["arguments", "id", "status", "tool", "type"], - "title": "DynamicToolCallThreadItem", - "type": "object" + "title": "DynamicToolCallThreadItem" }, { + "type": "object", + "required": [ + "agentsStates", + "id", + "receiverThreadIds", + "senderThreadId", + "status", + "tool", + "type" + ], "properties": { "agentsStates": { + "description": "Last known status of the target agents, when available.", + "type": "object", "additionalProperties": { "$ref": "#/definitions/CollabAgentState" - }, - "description": "Last known status of the target agents, when available.", - "type": "object" + } }, "id": { "description": "Unique identifier for this collab tool call.", @@ -1425,6 +1554,7 @@ "type": ["string", "null"] }, "reasoningEffort": { + "description": "Reasoning effort requested for the spawned agent, when applicable.", "anyOf": [ { "$ref": "#/definitions/ReasoningEffort" @@ -1432,55 +1562,46 @@ { "type": "null" } - ], - "description": "Reasoning effort requested for the spawned agent, when applicable." + ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", "type": "string" }, "status": { + "description": "Current status of the collab tool call.", "allOf": [ { "$ref": "#/definitions/CollabAgentToolCallStatus" } - ], - "description": "Current status of the collab tool call." + ] }, "tool": { + "description": "Name of the collab tool that was invoked.", "allOf": [ { "$ref": "#/definitions/CollabAgentTool" } - ], - "description": "Name of the collab tool that was invoked." + ] }, "type": { + "type": "string", "enum": ["collabAgentToolCall"], - "title": "CollabAgentToolCallThreadItemType", - "type": "string" + "title": "CollabAgentToolCallThreadItemType" } }, - "required": [ - "agentsStates", - "id", - "receiverThreadIds", - "senderThreadId", - "status", - "tool", - "type" - ], - "title": "CollabAgentToolCallThreadItem", - "type": "object" + "title": "CollabAgentToolCallThreadItem" }, { + "type": "object", + "required": ["id", "query", "type"], "properties": { "action": { "anyOf": [ @@ -1499,16 +1620,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["webSearch"], - "title": "WebSearchThreadItemType", - "type": "string" + "title": "WebSearchThreadItemType" } }, - "required": ["id", "query", "type"], - "title": "WebSearchThreadItem", - "type": "object" + "title": "WebSearchThreadItem" }, { + "type": "object", + "required": ["id", "path", "type"], "properties": { "id": { "type": "string" @@ -1517,16 +1638,16 @@ "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["imageView"], - "title": "ImageViewThreadItemType", - "type": "string" + "title": "ImageViewThreadItemType" } }, - "required": ["id", "path", "type"], - "title": "ImageViewThreadItem", - "type": "object" + "title": "ImageViewThreadItem" }, { + "type": "object", + "required": ["id", "result", "status", "type"], "properties": { "id": { "type": "string" @@ -1551,16 +1672,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["imageGeneration"], - "title": "ImageGenerationThreadItemType", - "type": "string" + "title": "ImageGenerationThreadItemType" } }, - "required": ["id", "result", "status", "type"], - "title": "ImageGenerationThreadItem", - "type": "object" + "title": "ImageGenerationThreadItem" }, { + "type": "object", + "required": ["id", "review", "type"], "properties": { "id": { "type": "string" @@ -1569,16 +1690,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["enteredReviewMode"], - "title": "EnteredReviewModeThreadItemType", - "type": "string" + "title": "EnteredReviewModeThreadItemType" } }, - "required": ["id", "review", "type"], - "title": "EnteredReviewModeThreadItem", - "type": "object" + "title": "EnteredReviewModeThreadItem" }, { + "type": "object", + "required": ["id", "review", "type"], "properties": { "id": { "type": "string" @@ -1587,103 +1708,104 @@ "type": "string" }, "type": { + "type": "string", "enum": ["exitedReviewMode"], - "title": "ExitedReviewModeThreadItemType", - "type": "string" + "title": "ExitedReviewModeThreadItemType" } }, - "required": ["id", "review", "type"], - "title": "ExitedReviewModeThreadItem", - "type": "object" + "title": "ExitedReviewModeThreadItem" }, { + "type": "object", + "required": ["id", "type"], "properties": { "id": { "type": "string" }, "type": { + "type": "string", "enum": ["contextCompaction"], - "title": "ContextCompactionThreadItemType", - "type": "string" + "title": "ContextCompactionThreadItemType" } }, - "required": ["id", "type"], - "title": "ContextCompactionThreadItem", - "type": "object" + "title": "ContextCompactionThreadItem" } ] }, "ThreadStatus": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["notLoaded"], - "title": "NotLoadedThreadStatusType", - "type": "string" + "title": "NotLoadedThreadStatusType" } }, - "required": ["type"], - "title": "NotLoadedThreadStatus", - "type": "object" + "title": "NotLoadedThreadStatus" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["idle"], - "title": "IdleThreadStatusType", - "type": "string" + "title": "IdleThreadStatusType" } }, - "required": ["type"], - "title": "IdleThreadStatus", - "type": "object" + "title": "IdleThreadStatus" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["systemError"], - "title": "SystemErrorThreadStatusType", - "type": "string" + "title": "SystemErrorThreadStatusType" } }, - "required": ["type"], - "title": "SystemErrorThreadStatus", - "type": "object" + "title": "SystemErrorThreadStatus" }, { + "type": "object", + "required": ["activeFlags", "type"], "properties": { "activeFlags": { + "type": "array", "items": { "$ref": "#/definitions/ThreadActiveFlag" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["active"], - "title": "ActiveThreadStatusType", - "type": "string" + "title": "ActiveThreadStatusType" } }, - "required": ["activeFlags", "type"], - "title": "ActiveThreadStatus", - "type": "object" + "title": "ActiveThreadStatus" } ] }, "Turn": { + "type": "object", + "required": ["id", "items", "status"], "properties": { "completedAt": { "description": "Unix timestamp (in seconds) when the turn completed.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "durationMs": { "description": "Duration between turn start and completion in milliseconds, if known.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "error": { + "description": "Only populated when the Turn's status is failed.", "anyOf": [ { "$ref": "#/definitions/TurnError" @@ -1691,32 +1813,31 @@ { "type": "null" } - ], - "description": "Only populated when the Turn's status is failed." + ] }, "id": { "type": "string" }, "items": { "description": "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.", + "type": "array", "items": { "$ref": "#/definitions/ThreadItem" - }, - "type": "array" + } }, "startedAt": { "description": "Unix timestamp (in seconds) when the turn started.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "status": { "$ref": "#/definitions/TurnStatus" } - }, - "required": ["id", "items", "status"], - "type": "object" + } }, "TurnError": { + "type": "object", + "required": ["message"], "properties": { "additionalDetails": { "default": null, @@ -1735,70 +1856,70 @@ "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "TurnStatus": { - "enum": ["completed", "interrupted", "failed", "inProgress"], - "type": "string" + "type": "string", + "enum": ["completed", "interrupted", "failed", "inProgress"] }, "UserInput": { "oneOf": [ { + "type": "object", + "required": ["text", "type"], "properties": { "text": { "type": "string" }, "text_elements": { - "default": [], "description": "UI-defined spans within `text` used to render or persist special elements.", + "default": [], + "type": "array", "items": { "$ref": "#/definitions/TextElement" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["text"], - "title": "TextUserInputType", - "type": "string" + "title": "TextUserInputType" } }, - "required": ["text", "type"], - "title": "TextUserInput", - "type": "object" + "title": "TextUserInput" }, { + "type": "object", + "required": ["type", "url"], "properties": { "type": { + "type": "string", "enum": ["image"], - "title": "ImageUserInputType", - "type": "string" + "title": "ImageUserInputType" }, "url": { "type": "string" } }, - "required": ["type", "url"], - "title": "ImageUserInput", - "type": "object" + "title": "ImageUserInput" }, { - "properties": { - "path": { - "type": "string" - }, - "type": { - "enum": ["localImage"], - "title": "LocalImageUserInputType", - "type": "string" - } - }, + "type": "object", "required": ["path", "type"], - "title": "LocalImageUserInput", - "type": "object" + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["localImage"], + "title": "LocalImageUserInputType" + } + }, + "title": "LocalImageUserInput" }, { + "type": "object", + "required": ["name", "path", "type"], "properties": { "name": { "type": "string" @@ -1807,16 +1928,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["skill"], - "title": "SkillUserInputType", - "type": "string" + "title": "SkillUserInputType" } }, - "required": ["name", "path", "type"], - "title": "SkillUserInput", - "type": "object" + "title": "SkillUserInput" }, { + "type": "object", + "required": ["name", "path", "type"], "properties": { "name": { "type": "string" @@ -1825,170 +1946,84 @@ "type": "string" }, "type": { + "type": "string", "enum": ["mention"], - "title": "MentionUserInputType", - "type": "string" + "title": "MentionUserInputType" } }, - "required": ["name", "path", "type"], - "title": "MentionUserInput", - "type": "object" + "title": "MentionUserInput" } ] }, "WebSearchAction": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "queries": { + "type": ["array", "null"], "items": { "type": "string" - }, - "type": ["array", "null"] + } }, "query": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["search"], - "title": "SearchWebSearchActionType", - "type": "string" + "title": "SearchWebSearchActionType" } }, - "required": ["type"], - "title": "SearchWebSearchAction", - "type": "object" + "title": "SearchWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["openPage"], - "title": "OpenPageWebSearchActionType", - "type": "string" + "title": "OpenPageWebSearchActionType" }, "url": { "type": ["string", "null"] } }, - "required": ["type"], - "title": "OpenPageWebSearchAction", - "type": "object" + "title": "OpenPageWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "pattern": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["findInPage"], - "title": "FindInPageWebSearchActionType", - "type": "string" + "title": "FindInPageWebSearchActionType" }, "url": { "type": ["string", "null"] } }, - "required": ["type"], - "title": "FindInPageWebSearchAction", - "type": "object" + "title": "FindInPageWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["other"], - "title": "OtherWebSearchActionType", - "type": "string" + "title": "OtherWebSearchActionType" } }, - "required": ["type"], - "title": "OtherWebSearchAction", - "type": "object" + "title": "OtherWebSearchAction" } ] } - }, - "properties": { - "approvalPolicy": { - "$ref": "#/definitions/AskForApproval" - }, - "approvalsReviewer": { - "allOf": [ - { - "$ref": "#/definitions/ApprovalsReviewer" - } - ], - "description": "Reviewer currently used for approval requests on this thread." - }, - "cwd": { - "$ref": "#/definitions/AbsolutePathBuf" - }, - "instructionSources": { - "default": [], - "description": "Instruction source files currently loaded for this thread.", - "items": { - "$ref": "#/definitions/AbsolutePathBuf" - }, - "type": "array" - }, - "model": { - "type": "string" - }, - "modelProvider": { - "type": "string" - }, - "permissionProfile": { - "anyOf": [ - { - "$ref": "#/definitions/PermissionProfile" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Canonical active permissions view for this thread when representable. This is `null` for external sandbox policies because external enforcement cannot be round-tripped as a `PermissionProfile`." - }, - "reasoningEffort": { - "anyOf": [ - { - "$ref": "#/definitions/ReasoningEffort" - }, - { - "type": "null" - } - ] - }, - "sandbox": { - "allOf": [ - { - "$ref": "#/definitions/SandboxPolicy" - } - ], - "description": "Legacy sandbox policy retained for compatibility. New clients should use `permissionProfile` when present as the canonical active permissions view." - }, - "serviceTier": { - "anyOf": [ - { - "$ref": "#/definitions/ServiceTier" - }, - { - "type": "null" - } - ] - }, - "thread": { - "$ref": "#/definitions/Thread" - } - }, - "required": [ - "approvalPolicy", - "approvalsReviewer", - "cwd", - "model", - "modelProvider", - "sandbox", - "thread" - ], - "title": "ThreadStartResponse", - "type": "object" + } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json b/extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json index a27f840705f..d048766fd02 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/TurnCompletedNotification.json @@ -1,30 +1,42 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnCompletedNotification", + "type": "object", + "required": ["threadId", "turn"], + "properties": { + "threadId": { + "type": "string" + }, + "turn": { + "$ref": "#/definitions/Turn" + } + }, "definitions": { "AbsolutePathBuf": { "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", "type": "string" }, "ByteRange": { + "type": "object", + "required": ["end", "start"], "properties": { "end": { + "type": "integer", "format": "uint", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "start": { + "type": "integer", "format": "uint", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 } - }, - "required": ["end", "start"], - "type": "object" + } }, "CodexErrorInfo": { "description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.", "oneOf": [ { + "type": "string", "enum": [ "contextWindowExceeded", "usageLimitExceeded", @@ -36,105 +48,106 @@ "threadRollbackFailed", "sandboxError", "other" - ], - "type": "string" + ] }, { - "additionalProperties": false, + "type": "object", + "required": ["httpConnectionFailed"], "properties": { "httpConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["httpConnectionFailed"], - "title": "HttpConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "HttpConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Failed to connect to the response SSE stream.", + "type": "object", + "required": ["responseStreamConnectionFailed"], "properties": { "responseStreamConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamConnectionFailed"], - "title": "ResponseStreamConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "The response SSE stream disconnected in the middle of a turn before completion.", + "type": "object", + "required": ["responseStreamDisconnected"], "properties": { "responseStreamDisconnected": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamDisconnected"], - "title": "ResponseStreamDisconnectedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamDisconnectedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Reached the retry limit for responses.", + "type": "object", + "required": ["responseTooManyFailedAttempts"], "properties": { "responseTooManyFailedAttempts": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseTooManyFailedAttempts"], - "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseTooManyFailedAttemptsCodexErrorInfo" }, { - "additionalProperties": false, "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", + "type": "object", + "required": ["activeTurnNotSteerable"], "properties": { "activeTurnNotSteerable": { + "type": "object", + "required": ["turnKind"], "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } - }, - "required": ["turnKind"], - "type": "object" + } } }, - "required": ["activeTurnNotSteerable"], - "title": "ActiveTurnNotSteerableCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ActiveTurnNotSteerableCodexErrorInfo" } ] }, "CollabAgentState": { + "type": "object", + "required": ["status"], "properties": { "message": { "type": ["string", "null"] @@ -142,11 +155,10 @@ "status": { "$ref": "#/definitions/CollabAgentStatus" } - }, - "required": ["status"], - "type": "object" + } }, "CollabAgentStatus": { + "type": "string", "enum": [ "pendingInit", "running", @@ -155,20 +167,21 @@ "errored", "shutdown", "notFound" - ], - "type": "string" + ] }, "CollabAgentTool": { - "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"], - "type": "string" + "type": "string", + "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"] }, "CollabAgentToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "CommandAction": { "oneOf": [ { + "type": "object", + "required": ["command", "name", "path", "type"], "properties": { "command": { "type": "string" @@ -180,16 +193,16 @@ "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["read"], - "title": "ReadCommandActionType", - "type": "string" + "title": "ReadCommandActionType" } }, - "required": ["command", "name", "path", "type"], - "title": "ReadCommandAction", - "type": "object" + "title": "ReadCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" @@ -198,16 +211,16 @@ "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["listFiles"], - "title": "ListFilesCommandActionType", - "type": "string" + "title": "ListFilesCommandActionType" } }, - "required": ["command", "type"], - "title": "ListFilesCommandAction", - "type": "object" + "title": "ListFilesCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" @@ -219,79 +232,79 @@ "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["search"], - "title": "SearchCommandActionType", - "type": "string" + "title": "SearchCommandActionType" } }, - "required": ["command", "type"], - "title": "SearchCommandAction", - "type": "object" + "title": "SearchCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" }, "type": { + "type": "string", "enum": ["unknown"], - "title": "UnknownCommandActionType", - "type": "string" + "title": "UnknownCommandActionType" } }, - "required": ["command", "type"], - "title": "UnknownCommandAction", - "type": "object" + "title": "UnknownCommandAction" } ] }, "CommandExecutionSource": { - "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"], - "type": "string" + "type": "string", + "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"] }, "CommandExecutionStatus": { - "enum": ["inProgress", "completed", "failed", "declined"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed", "declined"] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { + "type": "object", + "required": ["text", "type"], "properties": { "text": { "type": "string" }, "type": { + "type": "string", "enum": ["inputText"], - "title": "InputTextDynamicToolCallOutputContentItemType", - "type": "string" + "title": "InputTextDynamicToolCallOutputContentItemType" } }, - "required": ["text", "type"], - "title": "InputTextDynamicToolCallOutputContentItem", - "type": "object" + "title": "InputTextDynamicToolCallOutputContentItem" }, { + "type": "object", + "required": ["imageUrl", "type"], "properties": { "imageUrl": { "type": "string" }, "type": { + "type": "string", "enum": ["inputImage"], - "title": "InputImageDynamicToolCallOutputContentItemType", - "type": "string" + "title": "InputImageDynamicToolCallOutputContentItemType" } }, - "required": ["imageUrl", "type"], - "title": "InputImageDynamicToolCallOutputContentItem", - "type": "object" + "title": "InputImageDynamicToolCallOutputContentItem" } ] }, "DynamicToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "FileUpdateChange": { + "type": "object", + "required": ["diff", "kind", "path"], "properties": { "diff": { "type": "string" @@ -302,11 +315,11 @@ "path": { "type": "string" } - }, - "required": ["diff", "kind", "path"], - "type": "object" + } }, "HookPromptFragment": { + "type": "object", + "required": ["hookRunId", "text"], "properties": { "hookRunId": { "type": "string" @@ -314,64 +327,64 @@ "text": { "type": "string" } - }, - "required": ["hookRunId", "text"], - "type": "object" + } }, "McpToolCallError": { + "type": "object", + "required": ["message"], "properties": { "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "McpToolCallResult": { + "type": "object", + "required": ["content"], "properties": { "_meta": true, "content": { - "items": true, - "type": "array" + "type": "array", + "items": true }, "structuredContent": true - }, - "required": ["content"], - "type": "object" + } }, "McpToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "MemoryCitation": { + "type": "object", + "required": ["entries", "threadIds"], "properties": { "entries": { + "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" - }, - "type": "array" + } }, "threadIds": { + "type": "array", "items": { "type": "string" - }, - "type": "array" + } } - }, - "required": ["entries", "threadIds"], - "type": "object" + } }, "MemoryCitationEntry": { + "type": "object", + "required": ["lineEnd", "lineStart", "note", "path"], "properties": { "lineEnd": { + "type": "integer", "format": "uint32", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "lineStart": { + "type": "integer", "format": "uint32", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "note": { "type": "string" @@ -379,149 +392,150 @@ "path": { "type": "string" } - }, - "required": ["lineEnd", "lineStart", "note", "path"], - "type": "object" + } }, "MessagePhase": { "description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.", "oneOf": [ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", - "enum": ["commentary"], - "type": "string" + "type": "string", + "enum": ["commentary"] }, { "description": "The assistant's terminal answer text for the current turn.", - "enum": ["final_answer"], - "type": "string" + "type": "string", + "enum": ["final_answer"] } ] }, "NonSteerableTurnKind": { - "enum": ["review", "compact"], - "type": "string" + "type": "string", + "enum": ["review", "compact"] }, "PatchApplyStatus": { - "enum": ["inProgress", "completed", "failed", "declined"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed", "declined"] }, "PatchChangeKind": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["add"], - "title": "AddPatchChangeKindType", - "type": "string" + "title": "AddPatchChangeKindType" } }, - "required": ["type"], - "title": "AddPatchChangeKind", - "type": "object" + "title": "AddPatchChangeKind" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["delete"], - "title": "DeletePatchChangeKindType", - "type": "string" + "title": "DeletePatchChangeKindType" } }, - "required": ["type"], - "title": "DeletePatchChangeKind", - "type": "object" + "title": "DeletePatchChangeKind" }, { + "type": "object", + "required": ["type"], "properties": { "move_path": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["update"], - "title": "UpdatePatchChangeKindType", - "type": "string" + "title": "UpdatePatchChangeKindType" } }, - "required": ["type"], - "title": "UpdatePatchChangeKind", - "type": "object" + "title": "UpdatePatchChangeKind" } ] }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"], - "type": "string" + "type": "string", + "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] }, "TextElement": { + "type": "object", + "required": ["byteRange"], "properties": { "byteRange": { + "description": "Byte range in the parent `text` buffer that this element occupies.", "allOf": [ { "$ref": "#/definitions/ByteRange" } - ], - "description": "Byte range in the parent `text` buffer that this element occupies." + ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", "type": ["string", "null"] } - }, - "required": ["byteRange"], - "type": "object" + } }, "ThreadItem": { "oneOf": [ { + "type": "object", + "required": ["content", "id", "type"], "properties": { "content": { + "type": "array", "items": { "$ref": "#/definitions/UserInput" - }, - "type": "array" + } }, "id": { "type": "string" }, "type": { + "type": "string", "enum": ["userMessage"], - "title": "UserMessageThreadItemType", - "type": "string" + "title": "UserMessageThreadItemType" } }, - "required": ["content", "id", "type"], - "title": "UserMessageThreadItem", - "type": "object" + "title": "UserMessageThreadItem" }, { + "type": "object", + "required": ["fragments", "id", "type"], "properties": { "fragments": { + "type": "array", "items": { "$ref": "#/definitions/HookPromptFragment" - }, - "type": "array" + } }, "id": { "type": "string" }, "type": { + "type": "string", "enum": ["hookPrompt"], - "title": "HookPromptThreadItemType", - "type": "string" + "title": "HookPromptThreadItemType" } }, - "required": ["fragments", "id", "type"], - "title": "HookPromptThreadItem", - "type": "object" + "title": "HookPromptThreadItem" }, { + "type": "object", + "required": ["id", "text", "type"], "properties": { "id": { "type": "string" }, "memoryCitation": { + "default": null, "anyOf": [ { "$ref": "#/definitions/MemoryCitation" @@ -529,10 +543,10 @@ { "type": "null" } - ], - "default": null + ] }, "phase": { + "default": null, "anyOf": [ { "$ref": "#/definitions/MessagePhase" @@ -540,24 +554,23 @@ { "type": "null" } - ], - "default": null + ] }, "text": { "type": "string" }, "type": { + "type": "string", "enum": ["agentMessage"], - "title": "AgentMessageThreadItemType", - "type": "string" + "title": "AgentMessageThreadItemType" } }, - "required": ["id", "text", "type"], - "title": "AgentMessageThreadItem", - "type": "object" + "title": "AgentMessageThreadItem" }, { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", + "type": "object", + "required": ["id", "text", "type"], "properties": { "id": { "type": "string" @@ -566,45 +579,45 @@ "type": "string" }, "type": { + "type": "string", "enum": ["plan"], - "title": "PlanThreadItemType", - "type": "string" + "title": "PlanThreadItemType" } }, - "required": ["id", "text", "type"], - "title": "PlanThreadItem", - "type": "object" + "title": "PlanThreadItem" }, { + "type": "object", + "required": ["id", "type"], "properties": { "content": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "id": { "type": "string" }, "summary": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["reasoning"], - "title": "ReasoningThreadItemType", - "type": "string" + "title": "ReasoningThreadItemType" } }, - "required": ["id", "type"], - "title": "ReasoningThreadItem", - "type": "object" + "title": "ReasoningThreadItem" }, { + "type": "object", + "required": ["command", "commandActions", "cwd", "id", "status", "type"], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", @@ -616,28 +629,28 @@ }, "commandActions": { "description": "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.", + "type": "array", "items": { "$ref": "#/definitions/CommandAction" - }, - "type": "array" + } }, "cwd": { + "description": "The command's working directory.", "allOf": [ { "$ref": "#/definitions/AbsolutePathBuf" } - ], - "description": "The command's working directory." + ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "exitCode": { "description": "The command's exit code.", - "format": "int32", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int32" }, "id": { "type": "string" @@ -647,33 +660,33 @@ "type": ["string", "null"] }, "source": { + "default": "agent", "allOf": [ { "$ref": "#/definitions/CommandExecutionSource" } - ], - "default": "agent" + ] }, "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { + "type": "string", "enum": ["commandExecution"], - "title": "CommandExecutionThreadItemType", - "type": "string" + "title": "CommandExecutionThreadItemType" } }, - "required": ["command", "commandActions", "cwd", "id", "status", "type"], - "title": "CommandExecutionThreadItem", - "type": "object" + "title": "CommandExecutionThreadItem" }, { + "type": "object", + "required": ["changes", "id", "status", "type"], "properties": { "changes": { + "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" - }, - "type": "array" + } }, "id": { "type": "string" @@ -682,22 +695,22 @@ "$ref": "#/definitions/PatchApplyStatus" }, "type": { + "type": "string", "enum": ["fileChange"], - "title": "FileChangeThreadItemType", - "type": "string" + "title": "FileChangeThreadItemType" } }, - "required": ["changes", "id", "status", "type"], - "title": "FileChangeThreadItem", - "type": "object" + "title": "FileChangeThreadItem" }, { + "type": "object", + "required": ["arguments", "id", "server", "status", "tool", "type"], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "error": { "anyOf": [ @@ -735,28 +748,28 @@ "type": "string" }, "type": { + "type": "string", "enum": ["mcpToolCall"], - "title": "McpToolCallThreadItemType", - "type": "string" + "title": "McpToolCallThreadItemType" } }, - "required": ["arguments", "id", "server", "status", "tool", "type"], - "title": "McpToolCallThreadItem", - "type": "object" + "title": "McpToolCallThreadItem" }, { + "type": "object", + "required": ["arguments", "id", "status", "tool", "type"], "properties": { "arguments": true, "contentItems": { + "type": ["array", "null"], "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" - }, - "type": ["array", "null"] + } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "id": { "type": "string" @@ -774,23 +787,31 @@ "type": "string" }, "type": { + "type": "string", "enum": ["dynamicToolCall"], - "title": "DynamicToolCallThreadItemType", - "type": "string" + "title": "DynamicToolCallThreadItemType" } }, - "required": ["arguments", "id", "status", "tool", "type"], - "title": "DynamicToolCallThreadItem", - "type": "object" + "title": "DynamicToolCallThreadItem" }, { + "type": "object", + "required": [ + "agentsStates", + "id", + "receiverThreadIds", + "senderThreadId", + "status", + "tool", + "type" + ], "properties": { "agentsStates": { + "description": "Last known status of the target agents, when available.", + "type": "object", "additionalProperties": { "$ref": "#/definitions/CollabAgentState" - }, - "description": "Last known status of the target agents, when available.", - "type": "object" + } }, "id": { "description": "Unique identifier for this collab tool call.", @@ -805,6 +826,7 @@ "type": ["string", "null"] }, "reasoningEffort": { + "description": "Reasoning effort requested for the spawned agent, when applicable.", "anyOf": [ { "$ref": "#/definitions/ReasoningEffort" @@ -812,55 +834,46 @@ { "type": "null" } - ], - "description": "Reasoning effort requested for the spawned agent, when applicable." + ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", "type": "string" }, "status": { + "description": "Current status of the collab tool call.", "allOf": [ { "$ref": "#/definitions/CollabAgentToolCallStatus" } - ], - "description": "Current status of the collab tool call." + ] }, "tool": { + "description": "Name of the collab tool that was invoked.", "allOf": [ { "$ref": "#/definitions/CollabAgentTool" } - ], - "description": "Name of the collab tool that was invoked." + ] }, "type": { + "type": "string", "enum": ["collabAgentToolCall"], - "title": "CollabAgentToolCallThreadItemType", - "type": "string" + "title": "CollabAgentToolCallThreadItemType" } }, - "required": [ - "agentsStates", - "id", - "receiverThreadIds", - "senderThreadId", - "status", - "tool", - "type" - ], - "title": "CollabAgentToolCallThreadItem", - "type": "object" + "title": "CollabAgentToolCallThreadItem" }, { + "type": "object", + "required": ["id", "query", "type"], "properties": { "action": { "anyOf": [ @@ -879,16 +892,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["webSearch"], - "title": "WebSearchThreadItemType", - "type": "string" + "title": "WebSearchThreadItemType" } }, - "required": ["id", "query", "type"], - "title": "WebSearchThreadItem", - "type": "object" + "title": "WebSearchThreadItem" }, { + "type": "object", + "required": ["id", "path", "type"], "properties": { "id": { "type": "string" @@ -897,16 +910,16 @@ "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["imageView"], - "title": "ImageViewThreadItemType", - "type": "string" + "title": "ImageViewThreadItemType" } }, - "required": ["id", "path", "type"], - "title": "ImageViewThreadItem", - "type": "object" + "title": "ImageViewThreadItem" }, { + "type": "object", + "required": ["id", "result", "status", "type"], "properties": { "id": { "type": "string" @@ -931,16 +944,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["imageGeneration"], - "title": "ImageGenerationThreadItemType", - "type": "string" + "title": "ImageGenerationThreadItemType" } }, - "required": ["id", "result", "status", "type"], - "title": "ImageGenerationThreadItem", - "type": "object" + "title": "ImageGenerationThreadItem" }, { + "type": "object", + "required": ["id", "review", "type"], "properties": { "id": { "type": "string" @@ -949,16 +962,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["enteredReviewMode"], - "title": "EnteredReviewModeThreadItemType", - "type": "string" + "title": "EnteredReviewModeThreadItemType" } }, - "required": ["id", "review", "type"], - "title": "EnteredReviewModeThreadItem", - "type": "object" + "title": "EnteredReviewModeThreadItem" }, { + "type": "object", + "required": ["id", "review", "type"], "properties": { "id": { "type": "string" @@ -967,45 +980,46 @@ "type": "string" }, "type": { + "type": "string", "enum": ["exitedReviewMode"], - "title": "ExitedReviewModeThreadItemType", - "type": "string" + "title": "ExitedReviewModeThreadItemType" } }, - "required": ["id", "review", "type"], - "title": "ExitedReviewModeThreadItem", - "type": "object" + "title": "ExitedReviewModeThreadItem" }, { + "type": "object", + "required": ["id", "type"], "properties": { "id": { "type": "string" }, "type": { + "type": "string", "enum": ["contextCompaction"], - "title": "ContextCompactionThreadItemType", - "type": "string" + "title": "ContextCompactionThreadItemType" } }, - "required": ["id", "type"], - "title": "ContextCompactionThreadItem", - "type": "object" + "title": "ContextCompactionThreadItem" } ] }, "Turn": { + "type": "object", + "required": ["id", "items", "status"], "properties": { "completedAt": { "description": "Unix timestamp (in seconds) when the turn completed.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "durationMs": { "description": "Duration between turn start and completion in milliseconds, if known.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "error": { + "description": "Only populated when the Turn's status is failed.", "anyOf": [ { "$ref": "#/definitions/TurnError" @@ -1013,32 +1027,31 @@ { "type": "null" } - ], - "description": "Only populated when the Turn's status is failed." + ] }, "id": { "type": "string" }, "items": { "description": "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.", + "type": "array", "items": { "$ref": "#/definitions/ThreadItem" - }, - "type": "array" + } }, "startedAt": { "description": "Unix timestamp (in seconds) when the turn started.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "status": { "$ref": "#/definitions/TurnStatus" } - }, - "required": ["id", "items", "status"], - "type": "object" + } }, "TurnError": { + "type": "object", + "required": ["message"], "properties": { "additionalDetails": { "default": null, @@ -1057,70 +1070,70 @@ "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "TurnStatus": { - "enum": ["completed", "interrupted", "failed", "inProgress"], - "type": "string" + "type": "string", + "enum": ["completed", "interrupted", "failed", "inProgress"] }, "UserInput": { "oneOf": [ { + "type": "object", + "required": ["text", "type"], "properties": { "text": { "type": "string" }, "text_elements": { - "default": [], "description": "UI-defined spans within `text` used to render or persist special elements.", + "default": [], + "type": "array", "items": { "$ref": "#/definitions/TextElement" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["text"], - "title": "TextUserInputType", - "type": "string" + "title": "TextUserInputType" } }, - "required": ["text", "type"], - "title": "TextUserInput", - "type": "object" + "title": "TextUserInput" }, { + "type": "object", + "required": ["type", "url"], "properties": { "type": { + "type": "string", "enum": ["image"], - "title": "ImageUserInputType", - "type": "string" + "title": "ImageUserInputType" }, "url": { "type": "string" } }, - "required": ["type", "url"], - "title": "ImageUserInput", - "type": "object" + "title": "ImageUserInput" }, { - "properties": { - "path": { - "type": "string" - }, - "type": { - "enum": ["localImage"], - "title": "LocalImageUserInputType", - "type": "string" - } - }, + "type": "object", "required": ["path", "type"], - "title": "LocalImageUserInput", - "type": "object" + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["localImage"], + "title": "LocalImageUserInputType" + } + }, + "title": "LocalImageUserInput" }, { + "type": "object", + "required": ["name", "path", "type"], "properties": { "name": { "type": "string" @@ -1129,16 +1142,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["skill"], - "title": "SkillUserInputType", - "type": "string" + "title": "SkillUserInputType" } }, - "required": ["name", "path", "type"], - "title": "SkillUserInput", - "type": "object" + "title": "SkillUserInput" }, { + "type": "object", + "required": ["name", "path", "type"], "properties": { "name": { "type": "string" @@ -1147,97 +1160,84 @@ "type": "string" }, "type": { + "type": "string", "enum": ["mention"], - "title": "MentionUserInputType", - "type": "string" + "title": "MentionUserInputType" } }, - "required": ["name", "path", "type"], - "title": "MentionUserInput", - "type": "object" + "title": "MentionUserInput" } ] }, "WebSearchAction": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "queries": { + "type": ["array", "null"], "items": { "type": "string" - }, - "type": ["array", "null"] + } }, "query": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["search"], - "title": "SearchWebSearchActionType", - "type": "string" + "title": "SearchWebSearchActionType" } }, - "required": ["type"], - "title": "SearchWebSearchAction", - "type": "object" + "title": "SearchWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["openPage"], - "title": "OpenPageWebSearchActionType", - "type": "string" + "title": "OpenPageWebSearchActionType" }, "url": { "type": ["string", "null"] } }, - "required": ["type"], - "title": "OpenPageWebSearchAction", - "type": "object" + "title": "OpenPageWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "pattern": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["findInPage"], - "title": "FindInPageWebSearchActionType", - "type": "string" + "title": "FindInPageWebSearchActionType" }, "url": { "type": ["string", "null"] } }, - "required": ["type"], - "title": "FindInPageWebSearchAction", - "type": "object" + "title": "FindInPageWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["other"], - "title": "OtherWebSearchActionType", - "type": "string" + "title": "OtherWebSearchActionType" } }, - "required": ["type"], - "title": "OtherWebSearchAction", - "type": "object" + "title": "OtherWebSearchAction" } ] } - }, - "properties": { - "threadId": { - "type": "string" - }, - "turn": { - "$ref": "#/definitions/Turn" - } - }, - "required": ["threadId", "turn"], - "title": "TurnCompletedNotification", - "type": "object" + } } diff --git a/extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json b/extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json index d568a32ecc5..4e0933cfb23 100644 --- a/extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json +++ b/extensions/codex/src/app-server/protocol-generated/json/v2/TurnStartResponse.json @@ -1,30 +1,39 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnStartResponse", + "type": "object", + "required": ["turn"], + "properties": { + "turn": { + "$ref": "#/definitions/Turn" + } + }, "definitions": { "AbsolutePathBuf": { "description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.", "type": "string" }, "ByteRange": { + "type": "object", + "required": ["end", "start"], "properties": { "end": { + "type": "integer", "format": "uint", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "start": { + "type": "integer", "format": "uint", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 } - }, - "required": ["end", "start"], - "type": "object" + } }, "CodexErrorInfo": { "description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.", "oneOf": [ { + "type": "string", "enum": [ "contextWindowExceeded", "usageLimitExceeded", @@ -36,105 +45,106 @@ "threadRollbackFailed", "sandboxError", "other" - ], - "type": "string" + ] }, { - "additionalProperties": false, + "type": "object", + "required": ["httpConnectionFailed"], "properties": { "httpConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["httpConnectionFailed"], - "title": "HttpConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "HttpConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Failed to connect to the response SSE stream.", + "type": "object", + "required": ["responseStreamConnectionFailed"], "properties": { "responseStreamConnectionFailed": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamConnectionFailed"], - "title": "ResponseStreamConnectionFailedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamConnectionFailedCodexErrorInfo" }, { - "additionalProperties": false, "description": "The response SSE stream disconnected in the middle of a turn before completion.", + "type": "object", + "required": ["responseStreamDisconnected"], "properties": { "responseStreamDisconnected": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseStreamDisconnected"], - "title": "ResponseStreamDisconnectedCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseStreamDisconnectedCodexErrorInfo" }, { - "additionalProperties": false, "description": "Reached the retry limit for responses.", + "type": "object", + "required": ["responseTooManyFailedAttempts"], "properties": { "responseTooManyFailedAttempts": { + "type": "object", "properties": { "httpStatusCode": { + "type": ["integer", "null"], "format": "uint16", - "minimum": 0.0, - "type": ["integer", "null"] + "minimum": 0.0 } - }, - "type": "object" + } } }, - "required": ["responseTooManyFailedAttempts"], - "title": "ResponseTooManyFailedAttemptsCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ResponseTooManyFailedAttemptsCodexErrorInfo" }, { - "additionalProperties": false, "description": "Returned when `turn/start` or `turn/steer` is submitted while the current active turn cannot accept same-turn steering, for example `/review` or manual `/compact`.", + "type": "object", + "required": ["activeTurnNotSteerable"], "properties": { "activeTurnNotSteerable": { + "type": "object", + "required": ["turnKind"], "properties": { "turnKind": { "$ref": "#/definitions/NonSteerableTurnKind" } - }, - "required": ["turnKind"], - "type": "object" + } } }, - "required": ["activeTurnNotSteerable"], - "title": "ActiveTurnNotSteerableCodexErrorInfo", - "type": "object" + "additionalProperties": false, + "title": "ActiveTurnNotSteerableCodexErrorInfo" } ] }, "CollabAgentState": { + "type": "object", + "required": ["status"], "properties": { "message": { "type": ["string", "null"] @@ -142,11 +152,10 @@ "status": { "$ref": "#/definitions/CollabAgentStatus" } - }, - "required": ["status"], - "type": "object" + } }, "CollabAgentStatus": { + "type": "string", "enum": [ "pendingInit", "running", @@ -155,20 +164,21 @@ "errored", "shutdown", "notFound" - ], - "type": "string" + ] }, "CollabAgentTool": { - "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"], - "type": "string" + "type": "string", + "enum": ["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"] }, "CollabAgentToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "CommandAction": { "oneOf": [ { + "type": "object", + "required": ["command", "name", "path", "type"], "properties": { "command": { "type": "string" @@ -180,16 +190,16 @@ "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["read"], - "title": "ReadCommandActionType", - "type": "string" + "title": "ReadCommandActionType" } }, - "required": ["command", "name", "path", "type"], - "title": "ReadCommandAction", - "type": "object" + "title": "ReadCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" @@ -198,16 +208,16 @@ "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["listFiles"], - "title": "ListFilesCommandActionType", - "type": "string" + "title": "ListFilesCommandActionType" } }, - "required": ["command", "type"], - "title": "ListFilesCommandAction", - "type": "object" + "title": "ListFilesCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" @@ -219,79 +229,79 @@ "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["search"], - "title": "SearchCommandActionType", - "type": "string" + "title": "SearchCommandActionType" } }, - "required": ["command", "type"], - "title": "SearchCommandAction", - "type": "object" + "title": "SearchCommandAction" }, { + "type": "object", + "required": ["command", "type"], "properties": { "command": { "type": "string" }, "type": { + "type": "string", "enum": ["unknown"], - "title": "UnknownCommandActionType", - "type": "string" + "title": "UnknownCommandActionType" } }, - "required": ["command", "type"], - "title": "UnknownCommandAction", - "type": "object" + "title": "UnknownCommandAction" } ] }, "CommandExecutionSource": { - "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"], - "type": "string" + "type": "string", + "enum": ["agent", "userShell", "unifiedExecStartup", "unifiedExecInteraction"] }, "CommandExecutionStatus": { - "enum": ["inProgress", "completed", "failed", "declined"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed", "declined"] }, "DynamicToolCallOutputContentItem": { "oneOf": [ { + "type": "object", + "required": ["text", "type"], "properties": { "text": { "type": "string" }, "type": { + "type": "string", "enum": ["inputText"], - "title": "InputTextDynamicToolCallOutputContentItemType", - "type": "string" + "title": "InputTextDynamicToolCallOutputContentItemType" } }, - "required": ["text", "type"], - "title": "InputTextDynamicToolCallOutputContentItem", - "type": "object" + "title": "InputTextDynamicToolCallOutputContentItem" }, { + "type": "object", + "required": ["imageUrl", "type"], "properties": { "imageUrl": { "type": "string" }, "type": { + "type": "string", "enum": ["inputImage"], - "title": "InputImageDynamicToolCallOutputContentItemType", - "type": "string" + "title": "InputImageDynamicToolCallOutputContentItemType" } }, - "required": ["imageUrl", "type"], - "title": "InputImageDynamicToolCallOutputContentItem", - "type": "object" + "title": "InputImageDynamicToolCallOutputContentItem" } ] }, "DynamicToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "FileUpdateChange": { + "type": "object", + "required": ["diff", "kind", "path"], "properties": { "diff": { "type": "string" @@ -302,11 +312,11 @@ "path": { "type": "string" } - }, - "required": ["diff", "kind", "path"], - "type": "object" + } }, "HookPromptFragment": { + "type": "object", + "required": ["hookRunId", "text"], "properties": { "hookRunId": { "type": "string" @@ -314,64 +324,64 @@ "text": { "type": "string" } - }, - "required": ["hookRunId", "text"], - "type": "object" + } }, "McpToolCallError": { + "type": "object", + "required": ["message"], "properties": { "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "McpToolCallResult": { + "type": "object", + "required": ["content"], "properties": { "_meta": true, "content": { - "items": true, - "type": "array" + "type": "array", + "items": true }, "structuredContent": true - }, - "required": ["content"], - "type": "object" + } }, "McpToolCallStatus": { - "enum": ["inProgress", "completed", "failed"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed"] }, "MemoryCitation": { + "type": "object", + "required": ["entries", "threadIds"], "properties": { "entries": { + "type": "array", "items": { "$ref": "#/definitions/MemoryCitationEntry" - }, - "type": "array" + } }, "threadIds": { + "type": "array", "items": { "type": "string" - }, - "type": "array" + } } - }, - "required": ["entries", "threadIds"], - "type": "object" + } }, "MemoryCitationEntry": { + "type": "object", + "required": ["lineEnd", "lineStart", "note", "path"], "properties": { "lineEnd": { + "type": "integer", "format": "uint32", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "lineStart": { + "type": "integer", "format": "uint32", - "minimum": 0.0, - "type": "integer" + "minimum": 0.0 }, "note": { "type": "string" @@ -379,149 +389,150 @@ "path": { "type": "string" } - }, - "required": ["lineEnd", "lineStart", "note", "path"], - "type": "object" + } }, "MessagePhase": { "description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.", "oneOf": [ { "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", - "enum": ["commentary"], - "type": "string" + "type": "string", + "enum": ["commentary"] }, { "description": "The assistant's terminal answer text for the current turn.", - "enum": ["final_answer"], - "type": "string" + "type": "string", + "enum": ["final_answer"] } ] }, "NonSteerableTurnKind": { - "enum": ["review", "compact"], - "type": "string" + "type": "string", + "enum": ["review", "compact"] }, "PatchApplyStatus": { - "enum": ["inProgress", "completed", "failed", "declined"], - "type": "string" + "type": "string", + "enum": ["inProgress", "completed", "failed", "declined"] }, "PatchChangeKind": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["add"], - "title": "AddPatchChangeKindType", - "type": "string" + "title": "AddPatchChangeKindType" } }, - "required": ["type"], - "title": "AddPatchChangeKind", - "type": "object" + "title": "AddPatchChangeKind" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["delete"], - "title": "DeletePatchChangeKindType", - "type": "string" + "title": "DeletePatchChangeKindType" } }, - "required": ["type"], - "title": "DeletePatchChangeKind", - "type": "object" + "title": "DeletePatchChangeKind" }, { + "type": "object", + "required": ["type"], "properties": { "move_path": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["update"], - "title": "UpdatePatchChangeKindType", - "type": "string" + "title": "UpdatePatchChangeKindType" } }, - "required": ["type"], - "title": "UpdatePatchChangeKind", - "type": "object" + "title": "UpdatePatchChangeKind" } ] }, "ReasoningEffort": { "description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning", - "enum": ["none", "minimal", "low", "medium", "high", "xhigh"], - "type": "string" + "type": "string", + "enum": ["none", "minimal", "low", "medium", "high", "xhigh"] }, "TextElement": { + "type": "object", + "required": ["byteRange"], "properties": { "byteRange": { + "description": "Byte range in the parent `text` buffer that this element occupies.", "allOf": [ { "$ref": "#/definitions/ByteRange" } - ], - "description": "Byte range in the parent `text` buffer that this element occupies." + ] }, "placeholder": { "description": "Optional human-readable placeholder for the element, displayed in the UI.", "type": ["string", "null"] } - }, - "required": ["byteRange"], - "type": "object" + } }, "ThreadItem": { "oneOf": [ { + "type": "object", + "required": ["content", "id", "type"], "properties": { "content": { + "type": "array", "items": { "$ref": "#/definitions/UserInput" - }, - "type": "array" + } }, "id": { "type": "string" }, "type": { + "type": "string", "enum": ["userMessage"], - "title": "UserMessageThreadItemType", - "type": "string" + "title": "UserMessageThreadItemType" } }, - "required": ["content", "id", "type"], - "title": "UserMessageThreadItem", - "type": "object" + "title": "UserMessageThreadItem" }, { + "type": "object", + "required": ["fragments", "id", "type"], "properties": { "fragments": { + "type": "array", "items": { "$ref": "#/definitions/HookPromptFragment" - }, - "type": "array" + } }, "id": { "type": "string" }, "type": { + "type": "string", "enum": ["hookPrompt"], - "title": "HookPromptThreadItemType", - "type": "string" + "title": "HookPromptThreadItemType" } }, - "required": ["fragments", "id", "type"], - "title": "HookPromptThreadItem", - "type": "object" + "title": "HookPromptThreadItem" }, { + "type": "object", + "required": ["id", "text", "type"], "properties": { "id": { "type": "string" }, "memoryCitation": { + "default": null, "anyOf": [ { "$ref": "#/definitions/MemoryCitation" @@ -529,10 +540,10 @@ { "type": "null" } - ], - "default": null + ] }, "phase": { + "default": null, "anyOf": [ { "$ref": "#/definitions/MessagePhase" @@ -540,24 +551,23 @@ { "type": "null" } - ], - "default": null + ] }, "text": { "type": "string" }, "type": { + "type": "string", "enum": ["agentMessage"], - "title": "AgentMessageThreadItemType", - "type": "string" + "title": "AgentMessageThreadItemType" } }, - "required": ["id", "text", "type"], - "title": "AgentMessageThreadItem", - "type": "object" + "title": "AgentMessageThreadItem" }, { "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", + "type": "object", + "required": ["id", "text", "type"], "properties": { "id": { "type": "string" @@ -566,45 +576,45 @@ "type": "string" }, "type": { + "type": "string", "enum": ["plan"], - "title": "PlanThreadItemType", - "type": "string" + "title": "PlanThreadItemType" } }, - "required": ["id", "text", "type"], - "title": "PlanThreadItem", - "type": "object" + "title": "PlanThreadItem" }, { + "type": "object", + "required": ["id", "type"], "properties": { "content": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "id": { "type": "string" }, "summary": { "default": [], + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["reasoning"], - "title": "ReasoningThreadItemType", - "type": "string" + "title": "ReasoningThreadItemType" } }, - "required": ["id", "type"], - "title": "ReasoningThreadItem", - "type": "object" + "title": "ReasoningThreadItem" }, { + "type": "object", + "required": ["command", "commandActions", "cwd", "id", "status", "type"], "properties": { "aggregatedOutput": { "description": "The command's output, aggregated from stdout and stderr.", @@ -616,28 +626,28 @@ }, "commandActions": { "description": "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.", + "type": "array", "items": { "$ref": "#/definitions/CommandAction" - }, - "type": "array" + } }, "cwd": { + "description": "The command's working directory.", "allOf": [ { "$ref": "#/definitions/AbsolutePathBuf" } - ], - "description": "The command's working directory." + ] }, "durationMs": { "description": "The duration of the command execution in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "exitCode": { "description": "The command's exit code.", - "format": "int32", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int32" }, "id": { "type": "string" @@ -647,33 +657,33 @@ "type": ["string", "null"] }, "source": { + "default": "agent", "allOf": [ { "$ref": "#/definitions/CommandExecutionSource" } - ], - "default": "agent" + ] }, "status": { "$ref": "#/definitions/CommandExecutionStatus" }, "type": { + "type": "string", "enum": ["commandExecution"], - "title": "CommandExecutionThreadItemType", - "type": "string" + "title": "CommandExecutionThreadItemType" } }, - "required": ["command", "commandActions", "cwd", "id", "status", "type"], - "title": "CommandExecutionThreadItem", - "type": "object" + "title": "CommandExecutionThreadItem" }, { + "type": "object", + "required": ["changes", "id", "status", "type"], "properties": { "changes": { + "type": "array", "items": { "$ref": "#/definitions/FileUpdateChange" - }, - "type": "array" + } }, "id": { "type": "string" @@ -682,22 +692,22 @@ "$ref": "#/definitions/PatchApplyStatus" }, "type": { + "type": "string", "enum": ["fileChange"], - "title": "FileChangeThreadItemType", - "type": "string" + "title": "FileChangeThreadItemType" } }, - "required": ["changes", "id", "status", "type"], - "title": "FileChangeThreadItem", - "type": "object" + "title": "FileChangeThreadItem" }, { + "type": "object", + "required": ["arguments", "id", "server", "status", "tool", "type"], "properties": { "arguments": true, "durationMs": { "description": "The duration of the MCP tool call in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "error": { "anyOf": [ @@ -735,28 +745,28 @@ "type": "string" }, "type": { + "type": "string", "enum": ["mcpToolCall"], - "title": "McpToolCallThreadItemType", - "type": "string" + "title": "McpToolCallThreadItemType" } }, - "required": ["arguments", "id", "server", "status", "tool", "type"], - "title": "McpToolCallThreadItem", - "type": "object" + "title": "McpToolCallThreadItem" }, { + "type": "object", + "required": ["arguments", "id", "status", "tool", "type"], "properties": { "arguments": true, "contentItems": { + "type": ["array", "null"], "items": { "$ref": "#/definitions/DynamicToolCallOutputContentItem" - }, - "type": ["array", "null"] + } }, "durationMs": { "description": "The duration of the dynamic tool call in milliseconds.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "id": { "type": "string" @@ -774,23 +784,31 @@ "type": "string" }, "type": { + "type": "string", "enum": ["dynamicToolCall"], - "title": "DynamicToolCallThreadItemType", - "type": "string" + "title": "DynamicToolCallThreadItemType" } }, - "required": ["arguments", "id", "status", "tool", "type"], - "title": "DynamicToolCallThreadItem", - "type": "object" + "title": "DynamicToolCallThreadItem" }, { + "type": "object", + "required": [ + "agentsStates", + "id", + "receiverThreadIds", + "senderThreadId", + "status", + "tool", + "type" + ], "properties": { "agentsStates": { + "description": "Last known status of the target agents, when available.", + "type": "object", "additionalProperties": { "$ref": "#/definitions/CollabAgentState" - }, - "description": "Last known status of the target agents, when available.", - "type": "object" + } }, "id": { "description": "Unique identifier for this collab tool call.", @@ -805,6 +823,7 @@ "type": ["string", "null"] }, "reasoningEffort": { + "description": "Reasoning effort requested for the spawned agent, when applicable.", "anyOf": [ { "$ref": "#/definitions/ReasoningEffort" @@ -812,55 +831,46 @@ { "type": "null" } - ], - "description": "Reasoning effort requested for the spawned agent, when applicable." + ] }, "receiverThreadIds": { "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", + "type": "array", "items": { "type": "string" - }, - "type": "array" + } }, "senderThreadId": { "description": "Thread ID of the agent issuing the collab request.", "type": "string" }, "status": { + "description": "Current status of the collab tool call.", "allOf": [ { "$ref": "#/definitions/CollabAgentToolCallStatus" } - ], - "description": "Current status of the collab tool call." + ] }, "tool": { + "description": "Name of the collab tool that was invoked.", "allOf": [ { "$ref": "#/definitions/CollabAgentTool" } - ], - "description": "Name of the collab tool that was invoked." + ] }, "type": { + "type": "string", "enum": ["collabAgentToolCall"], - "title": "CollabAgentToolCallThreadItemType", - "type": "string" + "title": "CollabAgentToolCallThreadItemType" } }, - "required": [ - "agentsStates", - "id", - "receiverThreadIds", - "senderThreadId", - "status", - "tool", - "type" - ], - "title": "CollabAgentToolCallThreadItem", - "type": "object" + "title": "CollabAgentToolCallThreadItem" }, { + "type": "object", + "required": ["id", "query", "type"], "properties": { "action": { "anyOf": [ @@ -879,16 +889,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["webSearch"], - "title": "WebSearchThreadItemType", - "type": "string" + "title": "WebSearchThreadItemType" } }, - "required": ["id", "query", "type"], - "title": "WebSearchThreadItem", - "type": "object" + "title": "WebSearchThreadItem" }, { + "type": "object", + "required": ["id", "path", "type"], "properties": { "id": { "type": "string" @@ -897,16 +907,16 @@ "$ref": "#/definitions/AbsolutePathBuf" }, "type": { + "type": "string", "enum": ["imageView"], - "title": "ImageViewThreadItemType", - "type": "string" + "title": "ImageViewThreadItemType" } }, - "required": ["id", "path", "type"], - "title": "ImageViewThreadItem", - "type": "object" + "title": "ImageViewThreadItem" }, { + "type": "object", + "required": ["id", "result", "status", "type"], "properties": { "id": { "type": "string" @@ -931,16 +941,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["imageGeneration"], - "title": "ImageGenerationThreadItemType", - "type": "string" + "title": "ImageGenerationThreadItemType" } }, - "required": ["id", "result", "status", "type"], - "title": "ImageGenerationThreadItem", - "type": "object" + "title": "ImageGenerationThreadItem" }, { + "type": "object", + "required": ["id", "review", "type"], "properties": { "id": { "type": "string" @@ -949,16 +959,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["enteredReviewMode"], - "title": "EnteredReviewModeThreadItemType", - "type": "string" + "title": "EnteredReviewModeThreadItemType" } }, - "required": ["id", "review", "type"], - "title": "EnteredReviewModeThreadItem", - "type": "object" + "title": "EnteredReviewModeThreadItem" }, { + "type": "object", + "required": ["id", "review", "type"], "properties": { "id": { "type": "string" @@ -967,45 +977,46 @@ "type": "string" }, "type": { + "type": "string", "enum": ["exitedReviewMode"], - "title": "ExitedReviewModeThreadItemType", - "type": "string" + "title": "ExitedReviewModeThreadItemType" } }, - "required": ["id", "review", "type"], - "title": "ExitedReviewModeThreadItem", - "type": "object" + "title": "ExitedReviewModeThreadItem" }, { + "type": "object", + "required": ["id", "type"], "properties": { "id": { "type": "string" }, "type": { + "type": "string", "enum": ["contextCompaction"], - "title": "ContextCompactionThreadItemType", - "type": "string" + "title": "ContextCompactionThreadItemType" } }, - "required": ["id", "type"], - "title": "ContextCompactionThreadItem", - "type": "object" + "title": "ContextCompactionThreadItem" } ] }, "Turn": { + "type": "object", + "required": ["id", "items", "status"], "properties": { "completedAt": { "description": "Unix timestamp (in seconds) when the turn completed.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "durationMs": { "description": "Duration between turn start and completion in milliseconds, if known.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "error": { + "description": "Only populated when the Turn's status is failed.", "anyOf": [ { "$ref": "#/definitions/TurnError" @@ -1013,32 +1024,31 @@ { "type": "null" } - ], - "description": "Only populated when the Turn's status is failed." + ] }, "id": { "type": "string" }, "items": { "description": "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.", + "type": "array", "items": { "$ref": "#/definitions/ThreadItem" - }, - "type": "array" + } }, "startedAt": { "description": "Unix timestamp (in seconds) when the turn started.", - "format": "int64", - "type": ["integer", "null"] + "type": ["integer", "null"], + "format": "int64" }, "status": { "$ref": "#/definitions/TurnStatus" } - }, - "required": ["id", "items", "status"], - "type": "object" + } }, "TurnError": { + "type": "object", + "required": ["message"], "properties": { "additionalDetails": { "default": null, @@ -1057,70 +1067,70 @@ "message": { "type": "string" } - }, - "required": ["message"], - "type": "object" + } }, "TurnStatus": { - "enum": ["completed", "interrupted", "failed", "inProgress"], - "type": "string" + "type": "string", + "enum": ["completed", "interrupted", "failed", "inProgress"] }, "UserInput": { "oneOf": [ { + "type": "object", + "required": ["text", "type"], "properties": { "text": { "type": "string" }, "text_elements": { - "default": [], "description": "UI-defined spans within `text` used to render or persist special elements.", + "default": [], + "type": "array", "items": { "$ref": "#/definitions/TextElement" - }, - "type": "array" + } }, "type": { + "type": "string", "enum": ["text"], - "title": "TextUserInputType", - "type": "string" + "title": "TextUserInputType" } }, - "required": ["text", "type"], - "title": "TextUserInput", - "type": "object" + "title": "TextUserInput" }, { + "type": "object", + "required": ["type", "url"], "properties": { "type": { + "type": "string", "enum": ["image"], - "title": "ImageUserInputType", - "type": "string" + "title": "ImageUserInputType" }, "url": { "type": "string" } }, - "required": ["type", "url"], - "title": "ImageUserInput", - "type": "object" + "title": "ImageUserInput" }, { - "properties": { - "path": { - "type": "string" - }, - "type": { - "enum": ["localImage"], - "title": "LocalImageUserInputType", - "type": "string" - } - }, + "type": "object", "required": ["path", "type"], - "title": "LocalImageUserInput", - "type": "object" + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["localImage"], + "title": "LocalImageUserInputType" + } + }, + "title": "LocalImageUserInput" }, { + "type": "object", + "required": ["name", "path", "type"], "properties": { "name": { "type": "string" @@ -1129,16 +1139,16 @@ "type": "string" }, "type": { + "type": "string", "enum": ["skill"], - "title": "SkillUserInputType", - "type": "string" + "title": "SkillUserInputType" } }, - "required": ["name", "path", "type"], - "title": "SkillUserInput", - "type": "object" + "title": "SkillUserInput" }, { + "type": "object", + "required": ["name", "path", "type"], "properties": { "name": { "type": "string" @@ -1147,94 +1157,84 @@ "type": "string" }, "type": { + "type": "string", "enum": ["mention"], - "title": "MentionUserInputType", - "type": "string" + "title": "MentionUserInputType" } }, - "required": ["name", "path", "type"], - "title": "MentionUserInput", - "type": "object" + "title": "MentionUserInput" } ] }, "WebSearchAction": { "oneOf": [ { + "type": "object", + "required": ["type"], "properties": { "queries": { + "type": ["array", "null"], "items": { "type": "string" - }, - "type": ["array", "null"] + } }, "query": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["search"], - "title": "SearchWebSearchActionType", - "type": "string" + "title": "SearchWebSearchActionType" } }, - "required": ["type"], - "title": "SearchWebSearchAction", - "type": "object" + "title": "SearchWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["openPage"], - "title": "OpenPageWebSearchActionType", - "type": "string" + "title": "OpenPageWebSearchActionType" }, "url": { "type": ["string", "null"] } }, - "required": ["type"], - "title": "OpenPageWebSearchAction", - "type": "object" + "title": "OpenPageWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "pattern": { "type": ["string", "null"] }, "type": { + "type": "string", "enum": ["findInPage"], - "title": "FindInPageWebSearchActionType", - "type": "string" + "title": "FindInPageWebSearchActionType" }, "url": { "type": ["string", "null"] } }, - "required": ["type"], - "title": "FindInPageWebSearchAction", - "type": "object" + "title": "FindInPageWebSearchAction" }, { + "type": "object", + "required": ["type"], "properties": { "type": { + "type": "string", "enum": ["other"], - "title": "OtherWebSearchActionType", - "type": "string" + "title": "OtherWebSearchActionType" } }, - "required": ["type"], - "title": "OtherWebSearchAction", - "type": "object" + "title": "OtherWebSearchAction" } ] } - }, - "properties": { - "turn": { - "$ref": "#/definitions/Turn" - } - }, - "required": ["turn"], - "title": "TurnStartResponse", - "type": "object" + } } diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ClientRequest.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ClientRequest.ts index 98b13802b9c..1f2fc108e3c 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ClientRequest.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/ClientRequest.ts @@ -2,6 +2,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { FuzzyFileSearchParams } from "./FuzzyFileSearchParams.js"; +import type { FuzzyFileSearchSessionStartParams } from "./FuzzyFileSearchSessionStartParams.js"; +import type { FuzzyFileSearchSessionStopParams } from "./FuzzyFileSearchSessionStopParams.js"; +import type { FuzzyFileSearchSessionUpdateParams } from "./FuzzyFileSearchSessionUpdateParams.js"; import type { GetAuthStatusParams } from "./GetAuthStatusParams.js"; import type { GetConversationSummaryParams } from "./GetConversationSummaryParams.js"; import type { GitDiffToRemoteParams } from "./GitDiffToRemoteParams.js"; @@ -9,6 +12,7 @@ import type { InitializeParams } from "./InitializeParams.js"; import type { RequestId } from "./RequestId.js"; import type { AppsListParams } from "./v2/AppsListParams.js"; import type { CancelLoginAccountParams } from "./v2/CancelLoginAccountParams.js"; +import type { CollaborationModeListParams } from "./v2/CollaborationModeListParams.js"; import type { CommandExecParams } from "./v2/CommandExecParams.js"; import type { CommandExecResizeParams } from "./v2/CommandExecResizeParams.js"; import type { CommandExecTerminateParams } from "./v2/CommandExecTerminateParams.js"; @@ -34,6 +38,7 @@ import type { FsUnwatchParams } from "./v2/FsUnwatchParams.js"; import type { FsWatchParams } from "./v2/FsWatchParams.js"; import type { FsWriteFileParams } from "./v2/FsWriteFileParams.js"; import type { GetAccountParams } from "./v2/GetAccountParams.js"; +import type { HooksListParams } from "./v2/HooksListParams.js"; import type { ListMcpServerStatusParams } from "./v2/ListMcpServerStatusParams.js"; import type { LoginAccountParams } from "./v2/LoginAccountParams.js"; import type { MarketplaceAddParams } from "./v2/MarketplaceAddParams.js"; @@ -42,10 +47,16 @@ import type { MarketplaceUpgradeParams } from "./v2/MarketplaceUpgradeParams.js" import type { McpResourceReadParams } from "./v2/McpResourceReadParams.js"; import type { McpServerOauthLoginParams } from "./v2/McpServerOauthLoginParams.js"; import type { McpServerToolCallParams } from "./v2/McpServerToolCallParams.js"; +import type { MockExperimentalMethodParams } from "./v2/MockExperimentalMethodParams.js"; import type { ModelListParams } from "./v2/ModelListParams.js"; +import type { ModelProviderCapabilitiesReadParams } from "./v2/ModelProviderCapabilitiesReadParams.js"; import type { PluginInstallParams } from "./v2/PluginInstallParams.js"; import type { PluginListParams } from "./v2/PluginListParams.js"; import type { PluginReadParams } from "./v2/PluginReadParams.js"; +import type { PluginShareDeleteParams } from "./v2/PluginShareDeleteParams.js"; +import type { PluginShareListParams } from "./v2/PluginShareListParams.js"; +import type { PluginShareSaveParams } from "./v2/PluginShareSaveParams.js"; +import type { PluginSkillReadParams } from "./v2/PluginSkillReadParams.js"; import type { PluginUninstallParams } from "./v2/PluginUninstallParams.js"; import type { ReviewStartParams } from "./v2/ReviewStartParams.js"; import type { SendAddCreditsNudgeEmailParams } from "./v2/SendAddCreditsNudgeEmailParams.js"; @@ -53,13 +64,25 @@ import type { SkillsConfigWriteParams } from "./v2/SkillsConfigWriteParams.js"; import type { SkillsListParams } from "./v2/SkillsListParams.js"; import type { ThreadApproveGuardianDeniedActionParams } from "./v2/ThreadApproveGuardianDeniedActionParams.js"; import type { ThreadArchiveParams } from "./v2/ThreadArchiveParams.js"; +import type { ThreadBackgroundTerminalsCleanParams } from "./v2/ThreadBackgroundTerminalsCleanParams.js"; import type { ThreadCompactStartParams } from "./v2/ThreadCompactStartParams.js"; +import type { ThreadDecrementElicitationParams } from "./v2/ThreadDecrementElicitationParams.js"; import type { ThreadForkParams } from "./v2/ThreadForkParams.js"; +import type { ThreadGoalClearParams } from "./v2/ThreadGoalClearParams.js"; +import type { ThreadGoalGetParams } from "./v2/ThreadGoalGetParams.js"; +import type { ThreadGoalSetParams } from "./v2/ThreadGoalSetParams.js"; +import type { ThreadIncrementElicitationParams } from "./v2/ThreadIncrementElicitationParams.js"; import type { ThreadInjectItemsParams } from "./v2/ThreadInjectItemsParams.js"; import type { ThreadListParams } from "./v2/ThreadListParams.js"; import type { ThreadLoadedListParams } from "./v2/ThreadLoadedListParams.js"; +import type { ThreadMemoryModeSetParams } from "./v2/ThreadMemoryModeSetParams.js"; import type { ThreadMetadataUpdateParams } from "./v2/ThreadMetadataUpdateParams.js"; import type { ThreadReadParams } from "./v2/ThreadReadParams.js"; +import type { ThreadRealtimeAppendAudioParams } from "./v2/ThreadRealtimeAppendAudioParams.js"; +import type { ThreadRealtimeAppendTextParams } from "./v2/ThreadRealtimeAppendTextParams.js"; +import type { ThreadRealtimeListVoicesParams } from "./v2/ThreadRealtimeListVoicesParams.js"; +import type { ThreadRealtimeStartParams } from "./v2/ThreadRealtimeStartParams.js"; +import type { ThreadRealtimeStopParams } from "./v2/ThreadRealtimeStopParams.js"; import type { ThreadResumeParams } from "./v2/ThreadResumeParams.js"; import type { ThreadRollbackParams } from "./v2/ThreadRollbackParams.js"; import type { ThreadSetNameParams } from "./v2/ThreadSetNameParams.js"; @@ -83,8 +106,23 @@ export type ClientRequest = | { method: "thread/fork"; id: RequestId; params: ThreadForkParams } | { method: "thread/archive"; id: RequestId; params: ThreadArchiveParams } | { method: "thread/unsubscribe"; id: RequestId; params: ThreadUnsubscribeParams } + | { + method: "thread/increment_elicitation"; + id: RequestId; + params: ThreadIncrementElicitationParams; + } + | { + method: "thread/decrement_elicitation"; + id: RequestId; + params: ThreadDecrementElicitationParams; + } | { method: "thread/name/set"; id: RequestId; params: ThreadSetNameParams } + | { method: "thread/goal/set"; id: RequestId; params: ThreadGoalSetParams } + | { method: "thread/goal/get"; id: RequestId; params: ThreadGoalGetParams } + | { method: "thread/goal/clear"; id: RequestId; params: ThreadGoalClearParams } | { method: "thread/metadata/update"; id: RequestId; params: ThreadMetadataUpdateParams } + | { method: "thread/memoryMode/set"; id: RequestId; params: ThreadMemoryModeSetParams } + | { method: "memory/reset"; id: RequestId; params: undefined } | { method: "thread/unarchive"; id: RequestId; params: ThreadUnarchiveParams } | { method: "thread/compact/start"; id: RequestId; params: ThreadCompactStartParams } | { method: "thread/shellCommand"; id: RequestId; params: ThreadShellCommandParams } @@ -93,6 +131,11 @@ export type ClientRequest = id: RequestId; params: ThreadApproveGuardianDeniedActionParams; } + | { + method: "thread/backgroundTerminals/clean"; + id: RequestId; + params: ThreadBackgroundTerminalsCleanParams; + } | { method: "thread/rollback"; id: RequestId; params: ThreadRollbackParams } | { method: "thread/list"; id: RequestId; params: ThreadListParams } | { method: "thread/loaded/list"; id: RequestId; params: ThreadLoadedListParams } @@ -100,11 +143,16 @@ export type ClientRequest = | { method: "thread/turns/list"; id: RequestId; params: ThreadTurnsListParams } | { method: "thread/inject_items"; id: RequestId; params: ThreadInjectItemsParams } | { method: "skills/list"; id: RequestId; params: SkillsListParams } + | { method: "hooks/list"; id: RequestId; params: HooksListParams } | { method: "marketplace/add"; id: RequestId; params: MarketplaceAddParams } | { method: "marketplace/remove"; id: RequestId; params: MarketplaceRemoveParams } | { method: "marketplace/upgrade"; id: RequestId; params: MarketplaceUpgradeParams } | { method: "plugin/list"; id: RequestId; params: PluginListParams } | { method: "plugin/read"; id: RequestId; params: PluginReadParams } + | { method: "plugin/skill/read"; id: RequestId; params: PluginSkillReadParams } + | { method: "plugin/share/save"; id: RequestId; params: PluginShareSaveParams } + | { method: "plugin/share/list"; id: RequestId; params: PluginShareListParams } + | { method: "plugin/share/delete"; id: RequestId; params: PluginShareDeleteParams } | { method: "app/list"; id: RequestId; params: AppsListParams } | { method: "device/key/create"; id: RequestId; params: DeviceKeyCreateParams } | { method: "device/key/public"; id: RequestId; params: DeviceKeyPublicParams } @@ -124,14 +172,30 @@ export type ClientRequest = | { method: "turn/start"; id: RequestId; params: TurnStartParams } | { method: "turn/steer"; id: RequestId; params: TurnSteerParams } | { method: "turn/interrupt"; id: RequestId; params: TurnInterruptParams } + | { method: "thread/realtime/start"; id: RequestId; params: ThreadRealtimeStartParams } + | { + method: "thread/realtime/appendAudio"; + id: RequestId; + params: ThreadRealtimeAppendAudioParams; + } + | { method: "thread/realtime/appendText"; id: RequestId; params: ThreadRealtimeAppendTextParams } + | { method: "thread/realtime/stop"; id: RequestId; params: ThreadRealtimeStopParams } + | { method: "thread/realtime/listVoices"; id: RequestId; params: ThreadRealtimeListVoicesParams } | { method: "review/start"; id: RequestId; params: ReviewStartParams } | { method: "model/list"; id: RequestId; params: ModelListParams } + | { + method: "modelProvider/capabilities/read"; + id: RequestId; + params: ModelProviderCapabilitiesReadParams; + } | { method: "experimentalFeature/list"; id: RequestId; params: ExperimentalFeatureListParams } | { method: "experimentalFeature/enablement/set"; id: RequestId; params: ExperimentalFeatureEnablementSetParams; } + | { method: "collaborationMode/list"; id: RequestId; params: CollaborationModeListParams } + | { method: "mock/experimentalMethod"; id: RequestId; params: MockExperimentalMethodParams } | { method: "mcpServer/oauth/login"; id: RequestId; params: McpServerOauthLoginParams } | { method: "config/mcpServer/reload"; id: RequestId; params: undefined } | { method: "mcpServerStatus/list"; id: RequestId; params: ListMcpServerStatusParams } @@ -162,4 +226,19 @@ export type ClientRequest = | { method: "getConversationSummary"; id: RequestId; params: GetConversationSummaryParams } | { method: "gitDiffToRemote"; id: RequestId; params: GitDiffToRemoteParams } | { method: "getAuthStatus"; id: RequestId; params: GetAuthStatusParams } - | { method: "fuzzyFileSearch"; id: RequestId; params: FuzzyFileSearchParams }; + | { method: "fuzzyFileSearch"; id: RequestId; params: FuzzyFileSearchParams } + | { + method: "fuzzyFileSearch/sessionStart"; + id: RequestId; + params: FuzzyFileSearchSessionStartParams; + } + | { + method: "fuzzyFileSearch/sessionUpdate"; + id: RequestId; + params: FuzzyFileSearchSessionUpdateParams; + } + | { + method: "fuzzyFileSearch/sessionStop"; + id: RequestId; + params: FuzzyFileSearchSessionStopParams; + }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartParams.ts new file mode 100644 index 00000000000..f746734f004 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type FuzzyFileSearchSessionStartParams = { sessionId: string; roots: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartResponse.ts new file mode 100644 index 00000000000..cfe1399b75c --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStartResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type FuzzyFileSearchSessionStartResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopParams.ts new file mode 100644 index 00000000000..72da3c89454 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type FuzzyFileSearchSessionStopParams = { sessionId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopResponse.ts new file mode 100644 index 00000000000..a3500fb00c6 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionStopResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type FuzzyFileSearchSessionStopResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateParams.ts new file mode 100644 index 00000000000..53542ea6c75 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type FuzzyFileSearchSessionUpdateParams = { sessionId: string; query: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateResponse.ts new file mode 100644 index 00000000000..54b8701656d --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/FuzzyFileSearchSessionUpdateResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type FuzzyFileSearchSessionUpdateResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/GhostCommit.ts b/extensions/codex/src/app-server/protocol-generated/typescript/GhostCommit.ts deleted file mode 100644 index fa11f89b0cf..00000000000 --- a/extensions/codex/src/app-server/protocol-generated/typescript/GhostCommit.ts +++ /dev/null @@ -1,13 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Details of a ghost commit created from a repository state. - */ -export type GhostCommit = { - id: string; - parent: string | null; - preexisting_untracked_files: Array; - preexisting_untracked_dirs: Array; -}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/InternalSessionSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/InternalSessionSource.ts new file mode 100644 index 00000000000..47417c51679 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/InternalSessionSource.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type InternalSessionSource = "memory_consolidation"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ResponseItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ResponseItem.ts index e18fb78b2f7..fe3c211c75e 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ResponseItem.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/ResponseItem.ts @@ -3,7 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ContentItem } from "./ContentItem.js"; import type { FunctionCallOutputBody } from "./FunctionCallOutputBody.js"; -import type { GhostCommit } from "./GhostCommit.js"; import type { LocalShellAction } from "./LocalShellAction.js"; import type { LocalShellStatus } from "./LocalShellStatus.js"; import type { MessagePhase } from "./MessagePhase.js"; @@ -12,13 +11,7 @@ import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSumm import type { WebSearchAction } from "./WebSearchAction.js"; export type ResponseItem = - | { - type: "message"; - role: string; - content: Array; - end_turn?: boolean; - phase?: MessagePhase; - } + | { type: "message"; role: string; content: Array; phase?: MessagePhase } | { type: "reasoning"; summary: Array; @@ -65,6 +58,6 @@ export type ResponseItem = revised_prompt?: string; result: string; } - | { type: "ghost_snapshot"; ghost_commit: GhostCommit } | { type: "compaction"; encrypted_content: string } + | { type: "context_compaction"; encrypted_content?: string } | { type: "other" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/ServerNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/ServerNotification.ts index 5a3d1737e3e..04d8301bcc3 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/ServerNotification.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/ServerNotification.ts @@ -35,11 +35,14 @@ import type { RawResponseItemCompletedNotification } from "./v2/RawResponseItemC import type { ReasoningSummaryPartAddedNotification } from "./v2/ReasoningSummaryPartAddedNotification.js"; import type { ReasoningSummaryTextDeltaNotification } from "./v2/ReasoningSummaryTextDeltaNotification.js"; import type { ReasoningTextDeltaNotification } from "./v2/ReasoningTextDeltaNotification.js"; +import type { RemoteControlStatusChangedNotification } from "./v2/RemoteControlStatusChangedNotification.js"; import type { ServerRequestResolvedNotification } from "./v2/ServerRequestResolvedNotification.js"; import type { SkillsChangedNotification } from "./v2/SkillsChangedNotification.js"; import type { TerminalInteractionNotification } from "./v2/TerminalInteractionNotification.js"; import type { ThreadArchivedNotification } from "./v2/ThreadArchivedNotification.js"; import type { ThreadClosedNotification } from "./v2/ThreadClosedNotification.js"; +import type { ThreadGoalClearedNotification } from "./v2/ThreadGoalClearedNotification.js"; +import type { ThreadGoalUpdatedNotification } from "./v2/ThreadGoalUpdatedNotification.js"; import type { ThreadNameUpdatedNotification } from "./v2/ThreadNameUpdatedNotification.js"; import type { ThreadRealtimeClosedNotification } from "./v2/ThreadRealtimeClosedNotification.js"; import type { ThreadRealtimeErrorNotification } from "./v2/ThreadRealtimeErrorNotification.js"; @@ -73,6 +76,8 @@ export type ServerNotification = | { method: "thread/closed"; params: ThreadClosedNotification } | { method: "skills/changed"; params: SkillsChangedNotification } | { method: "thread/name/updated"; params: ThreadNameUpdatedNotification } + | { method: "thread/goal/updated"; params: ThreadGoalUpdatedNotification } + | { method: "thread/goal/cleared"; params: ThreadGoalClearedNotification } | { method: "thread/tokenUsage/updated"; params: ThreadTokenUsageUpdatedNotification } | { method: "turn/started"; params: TurnStartedNotification } | { method: "hook/started"; params: HookStartedNotification } @@ -105,6 +110,7 @@ export type ServerNotification = | { method: "account/updated"; params: AccountUpdatedNotification } | { method: "account/rateLimits/updated"; params: AccountRateLimitsUpdatedNotification } | { method: "app/list/updated"; params: AppListUpdatedNotification } + | { method: "remoteControl/status/changed"; params: RemoteControlStatusChangedNotification } | { method: "externalAgentConfig/import/completed"; params: ExternalAgentConfigImportCompletedNotification; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/SessionSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/SessionSource.ts index 66d6dfe3977..4ff2e10411a 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/SessionSource.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/SessionSource.ts @@ -1,6 +1,7 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { InternalSessionSource } from "./InternalSessionSource.js"; import type { SubAgentSource } from "./SubAgentSource.js"; export type SessionSource = @@ -9,5 +10,6 @@ export type SessionSource = | "exec" | "mcp" | { custom: string } + | { internal: InternalSessionSource } | { subagent: SubAgentSource } | "unknown"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/index.ts b/extensions/codex/src/app-server/protocol-generated/typescript/index.ts index c66e5e8045c..55cb96c4993 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/index.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/index.ts @@ -24,12 +24,17 @@ export type { FuzzyFileSearchParams } from "./FuzzyFileSearchParams.js"; export type { FuzzyFileSearchResponse } from "./FuzzyFileSearchResponse.js"; export type { FuzzyFileSearchResult } from "./FuzzyFileSearchResult.js"; export type { FuzzyFileSearchSessionCompletedNotification } from "./FuzzyFileSearchSessionCompletedNotification.js"; +export type { FuzzyFileSearchSessionStartParams } from "./FuzzyFileSearchSessionStartParams.js"; +export type { FuzzyFileSearchSessionStartResponse } from "./FuzzyFileSearchSessionStartResponse.js"; +export type { FuzzyFileSearchSessionStopParams } from "./FuzzyFileSearchSessionStopParams.js"; +export type { FuzzyFileSearchSessionStopResponse } from "./FuzzyFileSearchSessionStopResponse.js"; +export type { FuzzyFileSearchSessionUpdateParams } from "./FuzzyFileSearchSessionUpdateParams.js"; +export type { FuzzyFileSearchSessionUpdateResponse } from "./FuzzyFileSearchSessionUpdateResponse.js"; export type { FuzzyFileSearchSessionUpdatedNotification } from "./FuzzyFileSearchSessionUpdatedNotification.js"; export type { GetAuthStatusParams } from "./GetAuthStatusParams.js"; export type { GetAuthStatusResponse } from "./GetAuthStatusResponse.js"; export type { GetConversationSummaryParams } from "./GetConversationSummaryParams.js"; export type { GetConversationSummaryResponse } from "./GetConversationSummaryResponse.js"; -export type { GhostCommit } from "./GhostCommit.js"; export type { GitDiffToRemoteParams } from "./GitDiffToRemoteParams.js"; export type { GitDiffToRemoteResponse } from "./GitDiffToRemoteResponse.js"; export type { GitSha } from "./GitSha.js"; @@ -38,6 +43,7 @@ export type { InitializeCapabilities } from "./InitializeCapabilities.js"; export type { InitializeParams } from "./InitializeParams.js"; export type { InitializeResponse } from "./InitializeResponse.js"; export type { InputModality } from "./InputModality.js"; +export type { InternalSessionSource } from "./InternalSessionSource.js"; export type { LocalShellAction } from "./LocalShellAction.js"; export type { LocalShellExecAction } from "./LocalShellExecAction.js"; export type { LocalShellStatus } from "./LocalShellStatus.js"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfile.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfile.ts new file mode 100644 index 00000000000..ec5b5af7d93 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfile.ts @@ -0,0 +1,22 @@ +// 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 { ActivePermissionProfileModification } from "./ActivePermissionProfileModification.js"; + +export type ActivePermissionProfile = { + /** + * Identifier from `default_permissions` or the implicit built-in default, + * such as `:workspace` or a user-defined `[permissions.]` profile. + */ + id: string; + /** + * Parent profile identifier once permissions profiles support + * inheritance. This is currently always `null`. + */ + extends: string | null; + /** + * Bounded user-requested modifications applied on top of the named + * profile, if any. + */ + modifications: Array; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReadOnlyAccess.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfileModification.ts similarity index 57% rename from extensions/codex/src/app-server/protocol-generated/typescript/v2/ReadOnlyAccess.ts rename to extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfileModification.ts index ecc4b3d25fb..69cf70ce53e 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ReadOnlyAccess.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ActivePermissionProfileModification.ts @@ -3,6 +3,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; -export type ReadOnlyAccess = - | { type: "restricted"; includePlatformDefaults: boolean; readableRoots: Array } - | { type: "fullAccess" }; +export type ActivePermissionProfileModification = { + type: "additionalWritableRoot"; + path: AbsolutePathBuf; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalPermissionProfile.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalPermissionProfile.ts index 41d1986a301..75c176bec81 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalPermissionProfile.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/AdditionalPermissionProfile.ts @@ -5,6 +5,9 @@ import type { AdditionalFileSystemPermissions } from "./AdditionalFileSystemPerm import type { AdditionalNetworkPermissions } from "./AdditionalNetworkPermissions.js"; export type AdditionalPermissionProfile = { + /** + * Partial overlay used for per-command permission requests. + */ network: AdditionalNetworkPermissions | null; fileSystem: AdditionalFileSystemPermissions | null; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListParams.ts new file mode 100644 index 00000000000..37e8f792d95 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListParams.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - list collaboration mode presets. + */ +export type CollaborationModeListParams = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListResponse.ts new file mode 100644 index 00000000000..479f76a8c20 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CollaborationModeListResponse.ts @@ -0,0 +1,9 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { CollaborationModeMask } from "./CollaborationModeMask.js"; + +/** + * EXPERIMENTAL - collaboration mode presets response. + */ +export type CollaborationModeListResponse = { data: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandMigration.ts new file mode 100644 index 00000000000..8f2bee05871 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/CommandMigration.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type CommandMigration = { name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Config.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/Config.ts index 03208042402..fff341ae2f9 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/Config.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/Config.ts @@ -10,6 +10,7 @@ import type { Verbosity } from "../Verbosity.js"; import type { WebSearchMode } from "../WebSearchMode.js"; import type { AnalyticsConfig } from "./AnalyticsConfig.js"; import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; +import type { AppsConfig } from "./AppsConfig.js"; import type { AskForApproval } from "./AskForApproval.js"; import type { ProfileV2 } from "./ProfileV2.js"; import type { SandboxMode } from "./SandboxMode.js"; @@ -22,10 +23,11 @@ export type Config = { model_context_window: bigint | null; model_auto_compact_token_limit: bigint | null; model_provider: string | null; - approval_policy: AskForApproval | null /** + approval_policy: AskForApproval | null; + /** * [UNSTABLE] Optional default for where approval requests are routed for * review. - */; + */ approvals_reviewer: ApprovalsReviewer | null; sandbox_mode: SandboxMode | null; sandbox_workspace_write: SandboxWorkspaceWrite | null; @@ -43,6 +45,7 @@ export type Config = { model_verbosity: Verbosity | null; service_tier: ServiceTier | null; analytics: AnalyticsConfig | null; + apps: AppsConfig | null; } & { [key in string]?: | number diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirements.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirements.ts index e4e59b77958..7b977d9bea9 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirements.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ConfigRequirements.ts @@ -2,14 +2,20 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { WebSearchMode } from "../WebSearchMode.js"; +import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; import type { AskForApproval } from "./AskForApproval.js"; +import type { ManagedHooksRequirements } from "./ManagedHooksRequirements.js"; +import type { NetworkRequirements } from "./NetworkRequirements.js"; import type { ResidencyRequirement } from "./ResidencyRequirement.js"; import type { SandboxMode } from "./SandboxMode.js"; export type ConfigRequirements = { allowedApprovalPolicies: Array | null; + allowedApprovalsReviewers: Array | null; allowedSandboxModes: Array | null; allowedWebSearchModes: Array | null; featureRequirements: { [key in string]?: boolean } | null; + hooks: ManagedHooksRequirements | null; enforceResidency: ResidencyRequirement | null; + network: NetworkRequirements | null; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItemType.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItemType.ts index 6e34dcae7a5..5a2ee5fc783 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItemType.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ExternalAgentConfigMigrationItemType.ts @@ -7,4 +7,8 @@ export type ExternalAgentConfigMigrationItemType = | "CONFIG" | "SKILLS" | "PLUGINS" - | "MCP_SERVER_CONFIG"; + | "MCP_SERVER_CONFIG" + | "SUBAGENTS" + | "HOOKS" + | "COMMANDS" + | "SESSIONS"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeOutputDeltaNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeOutputDeltaNotification.ts index 3e20ccd51d1..abd645ca2f6 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeOutputDeltaNotification.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileChangeOutputDeltaNotification.ts @@ -2,6 +2,11 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +/** + * Deprecated legacy notification for `apply_patch` textual output. + * + * The server no longer emits this notification. + */ export type FileChangeOutputDeltaNotification = { threadId: string; turnId: string; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSpecialPath.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSpecialPath.ts index 587971263c4..05827f26554 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSpecialPath.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/FileSystemSpecialPath.ts @@ -5,7 +5,6 @@ export type FileSystemSpecialPath = | { kind: "root" } | { kind: "minimal" } - | { kind: "current_working_directory" } | { kind: "project_roots"; subpath: string | null } | { kind: "tmpdir" } | { kind: "slash_tmp" } diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookErrorInfo.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookErrorInfo.ts new file mode 100644 index 00000000000..9d6607387f1 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookErrorInfo.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type HookErrorInfo = { path: string; message: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMetadata.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMetadata.ts new file mode 100644 index 00000000000..a57110fbb73 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMetadata.ts @@ -0,0 +1,23 @@ +// 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 { AbsolutePathBuf } from "../AbsolutePathBuf.js"; +import type { HookEventName } from "./HookEventName.js"; +import type { HookHandlerType } from "./HookHandlerType.js"; +import type { HookSource } from "./HookSource.js"; + +export type HookMetadata = { + key: string; + eventName: HookEventName; + handlerType: HookHandlerType; + matcher: string | null; + command: string | null; + timeoutSec: bigint; + statusMessage: string | null; + sourcePath: AbsolutePathBuf; + source: HookSource; + pluginId: string | null; + displayOrder: bigint; + enabled: boolean; + isManaged: boolean; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMigration.ts new file mode 100644 index 00000000000..4f4b3f34443 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookMigration.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type HookMigration = { name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookSource.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookSource.ts index d06fda4c736..c33572010d6 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookSource.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HookSource.ts @@ -8,6 +8,8 @@ export type HookSource = | "project" | "mdm" | "sessionFlags" + | "plugin" + | "cloudRequirements" | "legacyManagedConfigFile" | "legacyManagedConfigMdm" | "unknown"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListEntry.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListEntry.ts new file mode 100644 index 00000000000..7fe1fc27e97 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListEntry.ts @@ -0,0 +1,12 @@ +// 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 { HookErrorInfo } from "./HookErrorInfo.js"; +import type { HookMetadata } from "./HookMetadata.js"; + +export type HooksListEntry = { + cwd: string; + hooks: Array; + warnings: Array; + errors: Array; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListParams.ts new file mode 100644 index 00000000000..3f85dcb5a2c --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListParams.ts @@ -0,0 +1,10 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type HooksListParams = { + /** + * When empty, defaults to the current session working directory. + */ + cwds?: Array; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListResponse.ts new file mode 100644 index 00000000000..8371d011394 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/HooksListResponse.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 { HooksListEntry } from "./HooksListEntry.js"; + +export type HooksListResponse = { data: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemCompletedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemCompletedNotification.ts index c9b29fd20c1..91fbc4cdac7 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemCompletedNotification.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemCompletedNotification.ts @@ -3,4 +3,12 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ThreadItem } from "./ThreadItem.js"; -export type ItemCompletedNotification = { item: ThreadItem; threadId: string; turnId: string }; +export type ItemCompletedNotification = { + item: ThreadItem; + threadId: string; + turnId: string; + /** + * Unix timestamp (in milliseconds) when this item lifecycle completed. + */ + completedAtMs: number; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemStartedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemStartedNotification.ts index adcb2f76f0b..a13ab1998c0 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemStartedNotification.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ItemStartedNotification.ts @@ -3,4 +3,12 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ThreadItem } from "./ThreadItem.js"; -export type ItemStartedNotification = { item: ThreadItem; threadId: string; turnId: string }; +export type ItemStartedNotification = { + item: ThreadItem; + threadId: string; + turnId: string; + /** + * Unix timestamp (in milliseconds) when this item lifecycle started. + */ + startedAtMs: number; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountParams.ts index fa279eb240c..daab1239b7b 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountParams.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/LoginAccountParams.ts @@ -4,7 +4,7 @@ export type LoginAccountParams = | { type: "apiKey"; apiKey: string } - | { type: "chatgpt" } + | { type: "chatgpt"; codexStreamlinedLogin?: boolean } | { type: "chatgptDeviceCode" } | { type: "chatgptAuthTokens"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerMigration.ts new file mode 100644 index 00000000000..fe7f2009478 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/McpServerMigration.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type McpServerMigration = { name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryResetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryResetResponse.ts new file mode 100644 index 00000000000..d9507945a06 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MemoryResetResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type MemoryResetResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MigrationDetails.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MigrationDetails.ts index 51c3ee5c85a..0f53c4d2a1d 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MigrationDetails.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MigrationDetails.ts @@ -1,6 +1,18 @@ // 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 { CommandMigration } from "./CommandMigration.js"; +import type { HookMigration } from "./HookMigration.js"; +import type { McpServerMigration } from "./McpServerMigration.js"; import type { PluginsMigration } from "./PluginsMigration.js"; +import type { SessionMigration } from "./SessionMigration.js"; +import type { SubagentMigration } from "./SubagentMigration.js"; -export type MigrationDetails = { plugins: Array }; +export type MigrationDetails = { + plugins: Array; + sessions: Array; + mcpServers: Array; + hooks: Array; + subagents: Array; + commands: Array; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodParams.ts new file mode 100644 index 00000000000..f48f7968476 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodParams.ts @@ -0,0 +1,10 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type MockExperimentalMethodParams = { + /** + * Test-only payload field. + */ + value?: string | null; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodResponse.ts new file mode 100644 index 00000000000..02ad93098f6 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/MockExperimentalMethodResponse.ts @@ -0,0 +1,10 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type MockExperimentalMethodResponse = { + /** + * Echoes the input `value`. + */ + echoed: string | null; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadParams.ts new file mode 100644 index 00000000000..00cbe470b3c --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ModelProviderCapabilitiesReadParams = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadResponse.ts new file mode 100644 index 00000000000..f831613025c --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ModelProviderCapabilitiesReadResponse.ts @@ -0,0 +1,9 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ModelProviderCapabilitiesReadResponse = { + namespaceTools: boolean; + imageGeneration: boolean; + webSearch: boolean; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfile.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfile.ts index 35b893834a4..3a4ba02bd06 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfile.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfile.ts @@ -4,7 +4,11 @@ import type { PermissionProfileFileSystemPermissions } from "./PermissionProfileFileSystemPermissions.js"; import type { PermissionProfileNetworkPermissions } from "./PermissionProfileNetworkPermissions.js"; -export type PermissionProfile = { - network: PermissionProfileNetworkPermissions | null; - fileSystem: PermissionProfileFileSystemPermissions | null; -}; +export type PermissionProfile = + | { + type: "managed"; + network: PermissionProfileNetworkPermissions; + fileSystem: PermissionProfileFileSystemPermissions; + } + | { type: "disabled" } + | { type: "external"; network: PermissionProfileNetworkPermissions }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileFileSystemPermissions.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileFileSystemPermissions.ts index 23604b4a909..e528056b57e 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileFileSystemPermissions.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileFileSystemPermissions.ts @@ -3,7 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { FileSystemSandboxEntry } from "./FileSystemSandboxEntry.js"; -export type PermissionProfileFileSystemPermissions = { - entries: Array; - globScanMaxDepth?: number; -}; +export type PermissionProfileFileSystemPermissions = + | { type: "restricted"; entries: Array; globScanMaxDepth?: number } + | { type: "unrestricted" }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileModificationParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileModificationParams.ts new file mode 100644 index 00000000000..ad980413f7f --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileModificationParams.ts @@ -0,0 +1,9 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; + +export type PermissionProfileModificationParams = { + type: "additionalWritableRoot"; + path: AbsolutePathBuf; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileNetworkPermissions.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileNetworkPermissions.ts index 008fa9c233f..12217e5374a 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileNetworkPermissions.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileNetworkPermissions.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PermissionProfileNetworkPermissions = { enabled: boolean | null }; +export type PermissionProfileNetworkPermissions = { enabled: boolean }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileSelectionParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileSelectionParams.ts new file mode 100644 index 00000000000..fe6bff93b47 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PermissionProfileSelectionParams.ts @@ -0,0 +1,10 @@ +// 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 { PermissionProfileModificationParams } from "./PermissionProfileModificationParams.js"; + +export type PermissionProfileSelectionParams = { + type: "profile"; + id: string; + modifications?: Array | null; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAvailability.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAvailability.ts new file mode 100644 index 00000000000..bec0b88cc20 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginAvailability.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type PluginAvailability = "AVAILABLE" | "DISABLED_BY_ADMIN"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteParams.ts new file mode 100644 index 00000000000..092ac6c126e --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type PluginShareDeleteParams = { remotePluginId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteResponse.ts new file mode 100644 index 00000000000..23102683645 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareDeleteResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type PluginShareDeleteResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListItem.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListItem.ts new file mode 100644 index 00000000000..3b5176c6da1 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListItem.ts @@ -0,0 +1,11 @@ +// 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 { AbsolutePathBuf } from "../AbsolutePathBuf.js"; +import type { PluginSummary } from "./PluginSummary.js"; + +export type PluginShareListItem = { + plugin: PluginSummary; + shareUrl: string; + localPluginPath: AbsolutePathBuf | null; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListParams.ts new file mode 100644 index 00000000000..167ace7ac2c --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type PluginShareListParams = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListResponse.ts new file mode 100644 index 00000000000..eca6c2bbf7c --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareListResponse.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 { PluginShareListItem } from "./PluginShareListItem.js"; + +export type PluginShareListResponse = { data: Array }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveParams.ts new file mode 100644 index 00000000000..1720cddfbf8 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveParams.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 { AbsolutePathBuf } from "../AbsolutePathBuf.js"; + +export type PluginShareSaveParams = { pluginPath: AbsolutePathBuf; remotePluginId?: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveResponse.ts new file mode 100644 index 00000000000..27abc82e06b --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginShareSaveResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type PluginShareSaveResponse = { remotePluginId: string; shareUrl: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadParams.ts new file mode 100644 index 00000000000..5145b2ceabc --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadParams.ts @@ -0,0 +1,9 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type PluginSkillReadParams = { + remoteMarketplaceName: string; + remotePluginId: string; + skillName: string; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadResponse.ts new file mode 100644 index 00000000000..98007bdb9ac --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSkillReadResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type PluginSkillReadResponse = { contents: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSummary.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSummary.ts index a5be591805c..9d724b10ae7 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSummary.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/PluginSummary.ts @@ -2,6 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { PluginAuthPolicy } from "./PluginAuthPolicy.js"; +import type { PluginAvailability } from "./PluginAvailability.js"; import type { PluginInstallPolicy } from "./PluginInstallPolicy.js"; import type { PluginInterface } from "./PluginInterface.js"; import type { PluginSource } from "./PluginSource.js"; @@ -14,5 +15,9 @@ export type PluginSummary = { enabled: boolean; installPolicy: PluginInstallPolicy; authPolicy: PluginAuthPolicy; + /** + * Availability state for installing and using the plugin. + */ + availability: PluginAvailability; interface: PluginInterface | null; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ProfileV2.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ProfileV2.ts index c02e98ab8a4..c9fbdf28c56 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ProfileV2.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ProfileV2.ts @@ -14,11 +14,12 @@ import type { ToolsV2 } from "./ToolsV2.js"; export type ProfileV2 = { model: string | null; model_provider: string | null; - approval_policy: AskForApproval | null /** + approval_policy: AskForApproval | null; + /** * [UNSTABLE] Optional profile-level override for where approval requests * are routed for review. If omitted, the enclosing config default is * used. - */; + */ approvals_reviewer: ApprovalsReviewer | null; service_tier: ServiceTier | null; model_reasoning_effort: ReasoningEffort | null; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlConnectionStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlConnectionStatus.ts new file mode 100644 index 00000000000..3e6197f5b55 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlConnectionStatus.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type RemoteControlConnectionStatus = "disabled" | "connecting" | "connected" | "errored"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlStatusChangedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlStatusChangedNotification.ts new file mode 100644 index 00000000000..923edb23434 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/RemoteControlStatusChangedNotification.ts @@ -0,0 +1,12 @@ +// 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 { RemoteControlConnectionStatus } from "./RemoteControlConnectionStatus.js"; + +/** + * Current remote-control connection status and environment id exposed to clients. + */ +export type RemoteControlStatusChangedNotification = { + status: RemoteControlConnectionStatus; + environmentId: string | null; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxPolicy.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxPolicy.ts index 14efec19b3e..7afe44eb15a 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxPolicy.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SandboxPolicy.ts @@ -3,16 +3,14 @@ // 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.js"; import type { NetworkAccess } from "./NetworkAccess.js"; -import type { ReadOnlyAccess } from "./ReadOnlyAccess.js"; export type SandboxPolicy = | { type: "dangerFullAccess" } - | { type: "readOnly"; access: ReadOnlyAccess; networkAccess: boolean } + | { type: "readOnly"; networkAccess: boolean } | { type: "externalSandbox"; networkAccess: NetworkAccess } | { type: "workspaceWrite"; writableRoots: Array; - readOnlyAccess: ReadOnlyAccess; networkAccess: boolean; excludeTmpdirEnvVar: boolean; excludeSlashTmp: boolean; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionMigration.ts new file mode 100644 index 00000000000..79a08cb8143 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SessionMigration.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type SessionMigration = { path: string; cwd: string; title: string | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/SubagentMigration.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SubagentMigration.ts new file mode 100644 index 00000000000..b361f8be921 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/SubagentMigration.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type SubagentMigration = { name: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanParams.ts new file mode 100644 index 00000000000..0b8f1811274 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadBackgroundTerminalsCleanParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanResponse.ts new file mode 100644 index 00000000000..f531fe0e24d --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadBackgroundTerminalsCleanResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadBackgroundTerminalsCleanResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationParams.ts new file mode 100644 index 00000000000..3dcdceb26c3 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationParams.ts @@ -0,0 +1,13 @@ +// 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. + +/** + * Parameters for `thread/decrement_elicitation`. + */ +export type ThreadDecrementElicitationParams = { + /** + * Thread whose out-of-band elicitation counter should be decremented. + */ + threadId: string; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationResponse.ts new file mode 100644 index 00000000000..d0f20a25456 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadDecrementElicitationResponse.ts @@ -0,0 +1,17 @@ +// 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. + +/** + * Response for `thread/decrement_elicitation`. + */ +export type ThreadDecrementElicitationResponse = { + /** + * Current out-of-band elicitation count after the decrement. + */ + count: bigint; + /** + * Whether timeout accounting remains paused after applying the decrement. + */ + paused: boolean; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkParams.ts index 0bd9860d3ed..928b244589c 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkParams.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkParams.ts @@ -5,7 +5,7 @@ import type { JsonValue } from "../serde_json/JsonValue.js"; import type { ServiceTier } from "../ServiceTier.js"; import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfile } from "./PermissionProfile.js"; +import type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; import type { SandboxMode } from "./SandboxMode.js"; /** @@ -18,38 +18,46 @@ import type { SandboxMode } from "./SandboxMode.js"; * Prefer using thread_id whenever possible. */ export type ThreadForkParams = { - threadId: string /** + threadId: string; + /** * [UNSTABLE] Specify the rollout path to fork from. * If specified, the thread_id param will be ignored. - */; - path?: string | null /** + */ + path?: string | null; + /** * Configuration overrides for the forked thread, if any. - */; + */ model?: string | null; modelProvider?: string | null; serviceTier?: ServiceTier | null; cwd?: string | null; - approvalPolicy?: AskForApproval | null /** + approvalPolicy?: AskForApproval | null; + /** * Override where approval requests are routed for review on this thread * and subsequent turns. - */; + */ approvalsReviewer?: ApprovalsReviewer | null; - sandbox?: SandboxMode | null /** - * Full permissions override for the forked thread. Cannot be combined - * with `sandbox`. - */; - permissionProfile?: PermissionProfile | null; + sandbox?: SandboxMode | null; + /** + * Named profile selection for the forked thread. Cannot be combined with + * `sandbox`. Use bounded `modifications` for supported thread + * adjustments instead of replacing the full permissions profile. + */ + permissions?: PermissionProfileSelectionParams | null; config?: { [key in string]?: JsonValue } | null; baseInstructions?: string | null; developerInstructions?: string | null; - ephemeral?: boolean /** + ephemeral?: boolean; + /** * When true, return only thread metadata and live fork state without * populating `thread.turns`. This is useful when the client plans to call * `thread/turns/list` immediately after forking. - */; - excludeTurns?: boolean /** - * If true, persist additional rollout EventMsg variants required to - * reconstruct a richer thread history on subsequent resume/fork/read. - */; + */ + excludeTurns?: boolean; + /** + * If true, persist additional EventMsg variants to the rollout file. + * However, `thread/read`, `thread/resume`, and `thread/fork` still only + * return the limited form of thread history for scalability reasons. + */ persistExtendedHistory: boolean; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkResponse.ts index 22eac9f3c37..742aad989dd 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkResponse.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadForkResponse.ts @@ -4,6 +4,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; import type { ReasoningEffort } from "../ReasoningEffort.js"; import type { ServiceTier } from "../ServiceTier.js"; +import type { ActivePermissionProfile } from "./ActivePermissionProfile.js"; import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; import type { AskForApproval } from "./AskForApproval.js"; import type { PermissionProfile } from "./PermissionProfile.js"; @@ -26,16 +27,20 @@ export type ThreadForkResponse = { */ approvalsReviewer: ApprovalsReviewer; /** - * Legacy sandbox policy retained for compatibility. New clients should use - * `permissionProfile` when present as the canonical active permissions - * view. + * Legacy sandbox policy retained for compatibility. Experimental clients + * should prefer `permissionProfile` when they need exact runtime + * permissions. */ sandbox: SandboxPolicy; /** - * Canonical active permissions view for this thread when representable. - * This is `null` for external sandbox policies because external - * enforcement cannot be round-tripped as a `PermissionProfile`. + * Full active permissions for this thread. `activePermissionProfile` + * carries display/provenance metadata for this runtime profile. */ permissionProfile: PermissionProfile | null; + /** + * Named or implicit built-in profile that produced the active + * permissions, when known. + */ + activePermissionProfile: ActivePermissionProfile | null; reasoningEffort: ReasoningEffort | null; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoal.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoal.ts new file mode 100644 index 00000000000..12605c385c4 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoal.ts @@ -0,0 +1,15 @@ +// 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 { ThreadGoalStatus } from "./ThreadGoalStatus.js"; + +export type ThreadGoal = { + threadId: string; + objective: string; + status: ThreadGoalStatus; + tokenBudget: number | null; + tokensUsed: number; + timeUsedSeconds: number; + createdAt: number; + updatedAt: number; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearParams.ts new file mode 100644 index 00000000000..f12b4b8c126 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadGoalClearParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearResponse.ts new file mode 100644 index 00000000000..3d17dd9925f --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadGoalClearResponse = { cleared: boolean }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearedNotification.ts new file mode 100644 index 00000000000..ecb15e4e77d --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalClearedNotification.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadGoalClearedNotification = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetParams.ts new file mode 100644 index 00000000000..334444e1a65 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetParams.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadGoalGetParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetResponse.ts new file mode 100644 index 00000000000..98820d18b52 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalGetResponse.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 { ThreadGoal } from "./ThreadGoal.js"; + +export type ThreadGoalGetResponse = { goal: ThreadGoal | null }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetParams.ts new file mode 100644 index 00000000000..834aded532b --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetParams.ts @@ -0,0 +1,11 @@ +// 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 { ThreadGoalStatus } from "./ThreadGoalStatus.js"; + +export type ThreadGoalSetParams = { + threadId: string; + objective?: string | null; + status?: ThreadGoalStatus | null; + tokenBudget?: number | null; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetResponse.ts new file mode 100644 index 00000000000..9b369f4a88e --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalSetResponse.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 { ThreadGoal } from "./ThreadGoal.js"; + +export type ThreadGoalSetResponse = { goal: ThreadGoal }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalStatus.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalStatus.ts new file mode 100644 index 00000000000..7a4bf332fb0 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalStatus.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadGoalStatus = "active" | "paused" | "budgetLimited" | "complete"; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalUpdatedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalUpdatedNotification.ts new file mode 100644 index 00000000000..80276692ecb --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadGoalUpdatedNotification.ts @@ -0,0 +1,10 @@ +// 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 { ThreadGoal } from "./ThreadGoal.js"; + +export type ThreadGoalUpdatedNotification = { + threadId: string; + turnId: string | null; + goal: ThreadGoal; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationParams.ts new file mode 100644 index 00000000000..12208cc34ac --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationParams.ts @@ -0,0 +1,13 @@ +// 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. + +/** + * Parameters for `thread/increment_elicitation`. + */ +export type ThreadIncrementElicitationParams = { + /** + * Thread whose out-of-band elicitation counter should be incremented. + */ + threadId: string; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationResponse.ts new file mode 100644 index 00000000000..eed5c35dcbb --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadIncrementElicitationResponse.ts @@ -0,0 +1,17 @@ +// 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. + +/** + * Response for `thread/increment_elicitation`. + */ +export type ThreadIncrementElicitationResponse = { + /** + * Current out-of-band elicitation count after the increment. + */ + count: bigint; + /** + * Whether timeout accounting is paused after applying the increment. + */ + paused: boolean; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetParams.ts new file mode 100644 index 00000000000..9eee31b8af7 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetParams.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 { ThreadMemoryMode } from "../ThreadMemoryMode.js"; + +export type ThreadMemoryModeSetParams = { threadId: string; mode: ThreadMemoryMode }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetResponse.ts new file mode 100644 index 00000000000..49b42fd9add --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadMemoryModeSetResponse.ts @@ -0,0 +1,5 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type ThreadMemoryModeSetResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioParams.ts new file mode 100644 index 00000000000..83f253bffd0 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioParams.ts @@ -0,0 +1,9 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { ThreadRealtimeAudioChunk } from "./ThreadRealtimeAudioChunk.js"; + +/** + * EXPERIMENTAL - append audio input to thread realtime. + */ +export type ThreadRealtimeAppendAudioParams = { threadId: string; audio: ThreadRealtimeAudioChunk }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioResponse.ts new file mode 100644 index 00000000000..063e8cba783 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendAudioResponse.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - response for appending realtime audio input. + */ +export type ThreadRealtimeAppendAudioResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextParams.ts new file mode 100644 index 00000000000..7be6e7670d3 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextParams.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - append text input to thread realtime. + */ +export type ThreadRealtimeAppendTextParams = { threadId: string; text: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextResponse.ts new file mode 100644 index 00000000000..1fb9f0738fd --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeAppendTextResponse.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - response for appending realtime text input. + */ +export type ThreadRealtimeAppendTextResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesParams.ts new file mode 100644 index 00000000000..b456d89c26e --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesParams.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - list voices supported by thread realtime. + */ +export type ThreadRealtimeListVoicesParams = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesResponse.ts new file mode 100644 index 00000000000..a83f67ed9c3 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeListVoicesResponse.ts @@ -0,0 +1,9 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { RealtimeVoicesList } from "../RealtimeVoicesList.js"; + +/** + * EXPERIMENTAL - response for listing supported realtime voices. + */ +export type ThreadRealtimeListVoicesResponse = { voices: RealtimeVoicesList }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartParams.ts new file mode 100644 index 00000000000..fc1878ebabd --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartParams.ts @@ -0,0 +1,22 @@ +// 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 { RealtimeOutputModality } from "../RealtimeOutputModality.js"; +import type { RealtimeVoice } from "../RealtimeVoice.js"; +import type { ThreadRealtimeStartTransport } from "./ThreadRealtimeStartTransport.js"; + +/** + * EXPERIMENTAL - start a thread-scoped realtime session. + */ +export type ThreadRealtimeStartParams = { + threadId: string; + /** + * Selects text or audio output for the realtime session. Transport and voice stay + * independent so clients can choose how they connect separately from what the model emits. + */ + outputModality: RealtimeOutputModality; + prompt?: string | null; + realtimeSessionId?: string | null; + transport?: ThreadRealtimeStartTransport | null; + voice?: RealtimeVoice | null; +}; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartResponse.ts new file mode 100644 index 00000000000..56254564256 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartResponse.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - response for starting thread realtime. + */ +export type ThreadRealtimeStartResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartedNotification.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartedNotification.ts index fab2bee4f8c..730debc09ed 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartedNotification.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStartedNotification.ts @@ -8,6 +8,6 @@ import type { RealtimeConversationVersion } from "../RealtimeConversationVersion */ export type ThreadRealtimeStartedNotification = { threadId: string; - sessionId: string | null; + realtimeSessionId: string | null; version: RealtimeConversationVersion; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopParams.ts new file mode 100644 index 00000000000..a74f6d8b204 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopParams.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - stop thread realtime. + */ +export type ThreadRealtimeStopParams = { threadId: string }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopResponse.ts new file mode 100644 index 00000000000..c87f4402db5 --- /dev/null +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadRealtimeStopResponse.ts @@ -0,0 +1,8 @@ +// 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. + +/** + * EXPERIMENTAL - response for stopping thread realtime. + */ +export type ThreadRealtimeStopResponse = Record; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeParams.ts index cdf9626c806..c04230b6722 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeParams.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeParams.ts @@ -7,7 +7,7 @@ import type { JsonValue } from "../serde_json/JsonValue.js"; import type { ServiceTier } from "../ServiceTier.js"; import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfile } from "./PermissionProfile.js"; +import type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; import type { SandboxMode } from "./SandboxMode.js"; /** @@ -22,43 +22,52 @@ import type { SandboxMode } from "./SandboxMode.js"; * Prefer using thread_id whenever possible. */ export type ThreadResumeParams = { - threadId: string /** + threadId: string; + /** * [UNSTABLE] FOR CODEX CLOUD - DO NOT USE. * If specified, the thread will be resumed with the provided history * instead of loaded from disk. - */; - history?: Array | null /** + */ + history?: Array | null; + /** * [UNSTABLE] Specify the rollout path to resume from. * If specified, the thread_id param will be ignored. - */; - path?: string | null /** + */ + path?: string | null; + /** * Configuration overrides for the resumed thread, if any. - */; + */ model?: string | null; modelProvider?: string | null; serviceTier?: ServiceTier | null; cwd?: string | null; - approvalPolicy?: AskForApproval | null /** + approvalPolicy?: AskForApproval | null; + /** * Override where approval requests are routed for review on this thread * and subsequent turns. - */; + */ approvalsReviewer?: ApprovalsReviewer | null; - sandbox?: SandboxMode | null /** - * Full permissions override for the resumed thread. Cannot be combined - * with `sandbox`. - */; - permissionProfile?: PermissionProfile | null; + sandbox?: SandboxMode | null; + /** + * Named profile selection for the resumed thread. Cannot be combined + * with `sandbox`. Use bounded `modifications` for supported thread + * adjustments instead of replacing the full permissions profile. + */ + permissions?: PermissionProfileSelectionParams | null; config?: { [key in string]?: JsonValue } | null; baseInstructions?: string | null; developerInstructions?: string | null; - personality?: Personality | null /** + personality?: Personality | null; + /** * When true, return only thread metadata and live-resume state without * populating `thread.turns`. This is useful when the client plans to call * `thread/turns/list` immediately after resuming. - */; - excludeTurns?: boolean /** - * If true, persist additional rollout EventMsg variants required to - * reconstruct a richer thread history on subsequent resume/fork/read. - */; + */ + excludeTurns?: boolean; + /** + * If true, persist additional EventMsg variants to the rollout file. + * However, `thread/read`, `thread/resume`, and `thread/fork` still only + * return the limited form of thread history for scalability reasons. + */ persistExtendedHistory: boolean; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeResponse.ts index a5cc7b14297..9db70479b24 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeResponse.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadResumeResponse.ts @@ -4,6 +4,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; import type { ReasoningEffort } from "../ReasoningEffort.js"; import type { ServiceTier } from "../ServiceTier.js"; +import type { ActivePermissionProfile } from "./ActivePermissionProfile.js"; import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; import type { AskForApproval } from "./AskForApproval.js"; import type { PermissionProfile } from "./PermissionProfile.js"; @@ -26,16 +27,20 @@ export type ThreadResumeResponse = { */ approvalsReviewer: ApprovalsReviewer; /** - * Legacy sandbox policy retained for compatibility. New clients should use - * `permissionProfile` when present as the canonical active permissions - * view. + * Legacy sandbox policy retained for compatibility. Experimental clients + * should prefer `permissionProfile` when they need exact runtime + * permissions. */ sandbox: SandboxPolicy; /** - * Canonical active permissions view for this thread when representable. - * This is `null` for external sandbox policies because external - * enforcement cannot be round-tripped as a `PermissionProfile`. + * Full active permissions for this thread. `activePermissionProfile` + * carries display/provenance metadata for this runtime profile. */ permissionProfile: PermissionProfile | null; + /** + * Named or implicit built-in profile that produced the active + * permissions, when known. + */ + activePermissionProfile: ActivePermissionProfile | null; reasoningEffort: ReasoningEffort | null; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartParams.ts index d8b3a632b61..5d4d1856257 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartParams.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartParams.ts @@ -6,38 +6,61 @@ import type { JsonValue } from "../serde_json/JsonValue.js"; import type { ServiceTier } from "../ServiceTier.js"; import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfile } from "./PermissionProfile.js"; +import type { DynamicToolSpec } from "./DynamicToolSpec.js"; +import type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; import type { SandboxMode } from "./SandboxMode.js"; import type { ThreadStartSource } from "./ThreadStartSource.js"; +import type { TurnEnvironmentParams } from "./TurnEnvironmentParams.js"; export type ThreadStartParams = { model?: string | null; modelProvider?: string | null; serviceTier?: ServiceTier | null; cwd?: string | null; - approvalPolicy?: AskForApproval | null /** + approvalPolicy?: AskForApproval | null; + /** * Override where approval requests are routed for review on this thread * and subsequent turns. - */; + */ approvalsReviewer?: ApprovalsReviewer | null; - sandbox?: SandboxMode | null /** - * Full permissions override for this thread. Cannot be combined with - * `sandbox`. - */; - permissionProfile?: PermissionProfile | null; + sandbox?: SandboxMode | null; + /** + * Named profile selection for this thread. Cannot be combined with + * `sandbox`. Use bounded `modifications` for supported turn/thread + * adjustments instead of replacing the full permissions profile. + */ + permissions?: PermissionProfileSelectionParams | null; config?: { [key in string]?: JsonValue } | null; serviceName?: string | null; baseInstructions?: string | null; developerInstructions?: string | null; personality?: Personality | null; ephemeral?: boolean | null; - sessionStartSource?: ThreadStartSource | null /** + sessionStartSource?: ThreadStartSource | null; + /** + * Optional sticky environments for this thread. + * + * Omitted selects the default environment when environment access is + * enabled. Empty disables environment access for turns that do not + * provide a turn override. Non-empty selects the first environment as the + * current turn environment. + */ + environments?: Array | null; + dynamicTools?: Array | null; + /** + * Test-only experimental field used to validate experimental gating and + * schema filtering behavior in a stable way. + */ + mockExperimentalField?: string | null; + /** * If true, opt into emitting raw Responses API items on the event stream. * This is for internal use only (e.g. Codex Cloud). - */; - experimentalRawEvents: boolean /** - * If true, persist additional rollout EventMsg variants required to - * reconstruct a richer thread history on resume/fork/read. - */; + */ + experimentalRawEvents: boolean; + /** + * If true, persist additional EventMsg variants to the rollout file. + * However, `thread/read`, `thread/resume`, and `thread/fork` still only + * return the limited form of thread history for scalability reasons. + */ persistExtendedHistory: boolean; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartResponse.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartResponse.ts index 3ab1e950e0e..019c189449b 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartResponse.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/ThreadStartResponse.ts @@ -4,6 +4,7 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf.js"; import type { ReasoningEffort } from "../ReasoningEffort.js"; import type { ServiceTier } from "../ServiceTier.js"; +import type { ActivePermissionProfile } from "./ActivePermissionProfile.js"; import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; import type { AskForApproval } from "./AskForApproval.js"; import type { PermissionProfile } from "./PermissionProfile.js"; @@ -26,16 +27,20 @@ export type ThreadStartResponse = { */ approvalsReviewer: ApprovalsReviewer; /** - * Legacy sandbox policy retained for compatibility. New clients should use - * `permissionProfile` when present as the canonical active permissions - * view. + * Legacy sandbox policy retained for compatibility. Experimental clients + * should prefer `permissionProfile` when they need exact runtime + * permissions. */ sandbox: SandboxPolicy; /** - * Canonical active permissions view for this thread when representable. - * This is `null` for external sandbox policies because external - * enforcement cannot be round-tripped as a `PermissionProfile`. + * Full active permissions for this thread. `activePermissionProfile` + * carries display/provenance metadata for this runtime profile. */ permissionProfile: PermissionProfile | null; + /** + * Named or implicit built-in profile that produced the active + * permissions, when known. + */ + activePermissionProfile: ActivePermissionProfile | null; reasoningEffort: ReasoningEffort | null; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartParams.ts index ae0e6d366ea..d395ba607c2 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartParams.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnStartParams.ts @@ -9,54 +9,81 @@ import type { JsonValue } from "../serde_json/JsonValue.js"; import type { ServiceTier } from "../ServiceTier.js"; import type { ApprovalsReviewer } from "./ApprovalsReviewer.js"; import type { AskForApproval } from "./AskForApproval.js"; -import type { PermissionProfile } from "./PermissionProfile.js"; +import type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; import type { SandboxPolicy } from "./SandboxPolicy.js"; +import type { TurnEnvironmentParams } from "./TurnEnvironmentParams.js"; import type { UserInput } from "./UserInput.js"; export type TurnStartParams = { threadId: string; - input: Array /** + input: Array; + /** + * Optional turn-scoped Responses API client metadata. + */ + responsesapiClientMetadata?: { [key in string]?: string } | null; + /** + * Optional turn-scoped environments. + * + * Omitted uses the thread sticky environments. Empty disables + * environment access for this turn. Non-empty selects the first + * environment as the current turn environment for this turn. + */ + environments?: Array | null; + /** * Override the working directory for this turn and subsequent turns. - */; - cwd?: string | null /** + */ + cwd?: string | null; + /** * Override the approval policy for this turn and subsequent turns. - */; - approvalPolicy?: AskForApproval | null /** + */ + approvalPolicy?: AskForApproval | null; + /** * Override where approval requests are routed for review on this turn and * subsequent turns. - */; - approvalsReviewer?: ApprovalsReviewer | null /** + */ + approvalsReviewer?: ApprovalsReviewer | null; + /** * Override the sandbox policy for this turn and subsequent turns. - */; - sandboxPolicy?: SandboxPolicy | null /** - * Override the full permissions profile for this turn and subsequent - * turns. Cannot be combined with `sandboxPolicy`. - */; - permissionProfile?: PermissionProfile | null /** + */ + sandboxPolicy?: SandboxPolicy | null; + /** + * Select a named permissions profile for this turn and subsequent turns. + * Cannot be combined with `sandboxPolicy`. Use bounded `modifications` + * for supported turn adjustments instead of replacing the full + * permissions profile. + */ + permissions?: PermissionProfileSelectionParams | null; + /** * Override the model for this turn and subsequent turns. - */; - model?: string | null /** + */ + model?: string | null; + /** * Override the service tier for this turn and subsequent turns. - */; - serviceTier?: ServiceTier | null /** + */ + serviceTier?: ServiceTier | null; + /** * Override the reasoning effort for this turn and subsequent turns. - */; - effort?: ReasoningEffort | null /** + */ + effort?: ReasoningEffort | null; + /** * Override the reasoning summary for this turn and subsequent turns. - */; - summary?: ReasoningSummary | null /** + */ + summary?: ReasoningSummary | null; + /** * Override the personality for this turn and subsequent turns. - */; - personality?: Personality | null /** + */ + personality?: Personality | null; + /** * Optional JSON Schema used to constrain the final assistant message for * this turn. - */; - outputSchema?: JsonValue | null /** + */ + outputSchema?: JsonValue | null; + /** * EXPERIMENTAL - Set a pre-set collaboration mode. * Takes precedence over model, reasoning_effort, and developer instructions if set. * * For `collaboration_mode.settings.developer_instructions`, `null` means * "use the built-in instructions for the selected mode". - */; + */ collaborationMode?: CollaborationMode | null; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerParams.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerParams.ts index 818508e5804..a2f7a2a0683 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerParams.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/TurnSteerParams.ts @@ -5,9 +5,14 @@ import type { UserInput } from "./UserInput.js"; export type TurnSteerParams = { threadId: string; - input: Array /** + input: Array; + /** + * Optional turn-scoped Responses API client metadata. + */ + responsesapiClientMetadata?: { [key in string]?: string } | null; + /** * Required active turn id precondition. The request fails when it does not * match the currently active turn. - */; + */ expectedTurnId: string; }; diff --git a/extensions/codex/src/app-server/protocol-generated/typescript/v2/index.ts b/extensions/codex/src/app-server/protocol-generated/typescript/v2/index.ts index 6d0b8d1343e..2db19d0fe30 100644 --- a/extensions/codex/src/app-server/protocol-generated/typescript/v2/index.ts +++ b/extensions/codex/src/app-server/protocol-generated/typescript/v2/index.ts @@ -4,6 +4,8 @@ export type { Account } from "./Account.js"; export type { AccountLoginCompletedNotification } from "./AccountLoginCompletedNotification.js"; export type { AccountRateLimitsUpdatedNotification } from "./AccountRateLimitsUpdatedNotification.js"; export type { AccountUpdatedNotification } from "./AccountUpdatedNotification.js"; +export type { ActivePermissionProfile } from "./ActivePermissionProfile.js"; +export type { ActivePermissionProfileModification } from "./ActivePermissionProfileModification.js"; export type { AddCreditsNudgeCreditType } from "./AddCreditsNudgeCreditType.js"; export type { AddCreditsNudgeEmailStatus } from "./AddCreditsNudgeEmailStatus.js"; export type { AdditionalFileSystemPermissions } from "./AdditionalFileSystemPermissions.js"; @@ -39,6 +41,8 @@ export type { CollabAgentState } from "./CollabAgentState.js"; export type { CollabAgentStatus } from "./CollabAgentStatus.js"; export type { CollabAgentTool } from "./CollabAgentTool.js"; export type { CollabAgentToolCallStatus } from "./CollabAgentToolCallStatus.js"; +export type { CollaborationModeListParams } from "./CollaborationModeListParams.js"; +export type { CollaborationModeListResponse } from "./CollaborationModeListResponse.js"; export type { CollaborationModeMask } from "./CollaborationModeMask.js"; export type { CommandAction } from "./CommandAction.js"; export type { CommandExecOutputDeltaNotification } from "./CommandExecOutputDeltaNotification.js"; @@ -58,6 +62,7 @@ export type { CommandExecutionRequestApprovalParams } from "./CommandExecutionRe export type { CommandExecutionRequestApprovalResponse } from "./CommandExecutionRequestApprovalResponse.js"; export type { CommandExecutionSource } from "./CommandExecutionSource.js"; export type { CommandExecutionStatus } from "./CommandExecutionStatus.js"; +export type { CommandMigration } from "./CommandMigration.js"; export type { Config } from "./Config.js"; export type { ConfigBatchWriteParams } from "./ConfigBatchWriteParams.js"; export type { ConfigEdit } from "./ConfigEdit.js"; @@ -151,9 +156,12 @@ export type { GuardianRiskLevel } from "./GuardianRiskLevel.js"; export type { GuardianUserAuthorization } from "./GuardianUserAuthorization.js"; export type { GuardianWarningNotification } from "./GuardianWarningNotification.js"; export type { HookCompletedNotification } from "./HookCompletedNotification.js"; +export type { HookErrorInfo } from "./HookErrorInfo.js"; export type { HookEventName } from "./HookEventName.js"; export type { HookExecutionMode } from "./HookExecutionMode.js"; export type { HookHandlerType } from "./HookHandlerType.js"; +export type { HookMetadata } from "./HookMetadata.js"; +export type { HookMigration } from "./HookMigration.js"; export type { HookOutputEntry } from "./HookOutputEntry.js"; export type { HookOutputEntryKind } from "./HookOutputEntryKind.js"; export type { HookPromptFragment } from "./HookPromptFragment.js"; @@ -162,6 +170,9 @@ export type { HookRunSummary } from "./HookRunSummary.js"; export type { HookScope } from "./HookScope.js"; export type { HookSource } from "./HookSource.js"; export type { HookStartedNotification } from "./HookStartedNotification.js"; +export type { HooksListEntry } from "./HooksListEntry.js"; +export type { HooksListParams } from "./HooksListParams.js"; +export type { HooksListResponse } from "./HooksListResponse.js"; export type { ItemCompletedNotification } from "./ItemCompletedNotification.js"; export type { ItemGuardianApprovalReviewCompletedNotification } from "./ItemGuardianApprovalReviewCompletedNotification.js"; export type { ItemGuardianApprovalReviewStartedNotification } from "./ItemGuardianApprovalReviewStartedNotification.js"; @@ -209,6 +220,7 @@ export type { McpResourceReadResponse } from "./McpResourceReadResponse.js"; export type { McpServerElicitationAction } from "./McpServerElicitationAction.js"; export type { McpServerElicitationRequestParams } from "./McpServerElicitationRequestParams.js"; export type { McpServerElicitationRequestResponse } from "./McpServerElicitationRequestResponse.js"; +export type { McpServerMigration } from "./McpServerMigration.js"; export type { McpServerOauthLoginCompletedNotification } from "./McpServerOauthLoginCompletedNotification.js"; export type { McpServerOauthLoginParams } from "./McpServerOauthLoginParams.js"; export type { McpServerOauthLoginResponse } from "./McpServerOauthLoginResponse.js"; @@ -225,12 +237,17 @@ export type { McpToolCallResult } from "./McpToolCallResult.js"; export type { McpToolCallStatus } from "./McpToolCallStatus.js"; export type { MemoryCitation } from "./MemoryCitation.js"; export type { MemoryCitationEntry } from "./MemoryCitationEntry.js"; +export type { MemoryResetResponse } from "./MemoryResetResponse.js"; export type { MergeStrategy } from "./MergeStrategy.js"; export type { MigrationDetails } from "./MigrationDetails.js"; +export type { MockExperimentalMethodParams } from "./MockExperimentalMethodParams.js"; +export type { MockExperimentalMethodResponse } from "./MockExperimentalMethodResponse.js"; export type { Model } from "./Model.js"; export type { ModelAvailabilityNux } from "./ModelAvailabilityNux.js"; export type { ModelListParams } from "./ModelListParams.js"; export type { ModelListResponse } from "./ModelListResponse.js"; +export type { ModelProviderCapabilitiesReadParams } from "./ModelProviderCapabilitiesReadParams.js"; +export type { ModelProviderCapabilitiesReadResponse } from "./ModelProviderCapabilitiesReadResponse.js"; export type { ModelRerouteReason } from "./ModelRerouteReason.js"; export type { ModelReroutedNotification } from "./ModelReroutedNotification.js"; export type { ModelUpgradeInfo } from "./ModelUpgradeInfo.js"; @@ -251,11 +268,14 @@ export type { PatchChangeKind } from "./PatchChangeKind.js"; export type { PermissionGrantScope } from "./PermissionGrantScope.js"; export type { PermissionProfile } from "./PermissionProfile.js"; export type { PermissionProfileFileSystemPermissions } from "./PermissionProfileFileSystemPermissions.js"; +export type { PermissionProfileModificationParams } from "./PermissionProfileModificationParams.js"; export type { PermissionProfileNetworkPermissions } from "./PermissionProfileNetworkPermissions.js"; +export type { PermissionProfileSelectionParams } from "./PermissionProfileSelectionParams.js"; export type { PermissionsRequestApprovalParams } from "./PermissionsRequestApprovalParams.js"; export type { PermissionsRequestApprovalResponse } from "./PermissionsRequestApprovalResponse.js"; export type { PlanDeltaNotification } from "./PlanDeltaNotification.js"; export type { PluginAuthPolicy } from "./PluginAuthPolicy.js"; +export type { PluginAvailability } from "./PluginAvailability.js"; export type { PluginDetail } from "./PluginDetail.js"; export type { PluginInstallParams } from "./PluginInstallParams.js"; export type { PluginInstallPolicy } from "./PluginInstallPolicy.js"; @@ -266,6 +286,15 @@ export type { PluginListResponse } from "./PluginListResponse.js"; export type { PluginMarketplaceEntry } from "./PluginMarketplaceEntry.js"; export type { PluginReadParams } from "./PluginReadParams.js"; export type { PluginReadResponse } from "./PluginReadResponse.js"; +export type { PluginShareDeleteParams } from "./PluginShareDeleteParams.js"; +export type { PluginShareDeleteResponse } from "./PluginShareDeleteResponse.js"; +export type { PluginShareListItem } from "./PluginShareListItem.js"; +export type { PluginShareListParams } from "./PluginShareListParams.js"; +export type { PluginShareListResponse } from "./PluginShareListResponse.js"; +export type { PluginShareSaveParams } from "./PluginShareSaveParams.js"; +export type { PluginShareSaveResponse } from "./PluginShareSaveResponse.js"; +export type { PluginSkillReadParams } from "./PluginSkillReadParams.js"; +export type { PluginSkillReadResponse } from "./PluginSkillReadResponse.js"; export type { PluginSource } from "./PluginSource.js"; export type { PluginSummary } from "./PluginSummary.js"; export type { PluginUninstallParams } from "./PluginUninstallParams.js"; @@ -276,13 +305,14 @@ export type { RateLimitReachedType } from "./RateLimitReachedType.js"; export type { RateLimitSnapshot } from "./RateLimitSnapshot.js"; export type { RateLimitWindow } from "./RateLimitWindow.js"; export type { RawResponseItemCompletedNotification } from "./RawResponseItemCompletedNotification.js"; -export type { ReadOnlyAccess } from "./ReadOnlyAccess.js"; export type { ReasoningEffortOption } from "./ReasoningEffortOption.js"; export type { ReasoningSummaryPartAddedNotification } from "./ReasoningSummaryPartAddedNotification.js"; export type { ReasoningSummaryTextDeltaNotification } from "./ReasoningSummaryTextDeltaNotification.js"; export type { ReasoningTextDeltaNotification } from "./ReasoningTextDeltaNotification.js"; export type { RemoteControlClientConnectionAudience } from "./RemoteControlClientConnectionAudience.js"; export type { RemoteControlClientEnrollmentAudience } from "./RemoteControlClientEnrollmentAudience.js"; +export type { RemoteControlConnectionStatus } from "./RemoteControlConnectionStatus.js"; +export type { RemoteControlStatusChangedNotification } from "./RemoteControlStatusChangedNotification.js"; export type { RequestPermissionProfile } from "./RequestPermissionProfile.js"; export type { ResidencyRequirement } from "./ResidencyRequirement.js"; export type { ReviewDelivery } from "./ReviewDelivery.js"; @@ -295,6 +325,7 @@ export type { SandboxWorkspaceWrite } from "./SandboxWorkspaceWrite.js"; export type { SendAddCreditsNudgeEmailParams } from "./SendAddCreditsNudgeEmailParams.js"; export type { SendAddCreditsNudgeEmailResponse } from "./SendAddCreditsNudgeEmailResponse.js"; export type { ServerRequestResolvedNotification } from "./ServerRequestResolvedNotification.js"; +export type { SessionMigration } from "./SessionMigration.js"; export type { SessionSource } from "./SessionSource.js"; export type { SkillDependencies } from "./SkillDependencies.js"; export type { SkillErrorInfo } from "./SkillErrorInfo.js"; @@ -311,6 +342,7 @@ export type { SkillsListExtraRootsForCwd } from "./SkillsListExtraRootsForCwd.js export type { SkillsListParams } from "./SkillsListParams.js"; export type { SkillsListResponse } from "./SkillsListResponse.js"; export type { SortDirection } from "./SortDirection.js"; +export type { SubagentMigration } from "./SubagentMigration.js"; export type { TerminalInteractionNotification } from "./TerminalInteractionNotification.js"; export type { TextElement } from "./TextElement.js"; export type { TextPosition } from "./TextPosition.js"; @@ -322,11 +354,27 @@ export type { ThreadApproveGuardianDeniedActionResponse } from "./ThreadApproveG export type { ThreadArchiveParams } from "./ThreadArchiveParams.js"; export type { ThreadArchiveResponse } from "./ThreadArchiveResponse.js"; export type { ThreadArchivedNotification } from "./ThreadArchivedNotification.js"; +export type { ThreadBackgroundTerminalsCleanParams } from "./ThreadBackgroundTerminalsCleanParams.js"; +export type { ThreadBackgroundTerminalsCleanResponse } from "./ThreadBackgroundTerminalsCleanResponse.js"; export type { ThreadClosedNotification } from "./ThreadClosedNotification.js"; export type { ThreadCompactStartParams } from "./ThreadCompactStartParams.js"; export type { ThreadCompactStartResponse } from "./ThreadCompactStartResponse.js"; +export type { ThreadDecrementElicitationParams } from "./ThreadDecrementElicitationParams.js"; +export type { ThreadDecrementElicitationResponse } from "./ThreadDecrementElicitationResponse.js"; export type { ThreadForkParams } from "./ThreadForkParams.js"; export type { ThreadForkResponse } from "./ThreadForkResponse.js"; +export type { ThreadGoal } from "./ThreadGoal.js"; +export type { ThreadGoalClearParams } from "./ThreadGoalClearParams.js"; +export type { ThreadGoalClearResponse } from "./ThreadGoalClearResponse.js"; +export type { ThreadGoalClearedNotification } from "./ThreadGoalClearedNotification.js"; +export type { ThreadGoalGetParams } from "./ThreadGoalGetParams.js"; +export type { ThreadGoalGetResponse } from "./ThreadGoalGetResponse.js"; +export type { ThreadGoalSetParams } from "./ThreadGoalSetParams.js"; +export type { ThreadGoalSetResponse } from "./ThreadGoalSetResponse.js"; +export type { ThreadGoalStatus } from "./ThreadGoalStatus.js"; +export type { ThreadGoalUpdatedNotification } from "./ThreadGoalUpdatedNotification.js"; +export type { ThreadIncrementElicitationParams } from "./ThreadIncrementElicitationParams.js"; +export type { ThreadIncrementElicitationResponse } from "./ThreadIncrementElicitationResponse.js"; export type { ThreadInjectItemsParams } from "./ThreadInjectItemsParams.js"; export type { ThreadInjectItemsResponse } from "./ThreadInjectItemsResponse.js"; export type { ThreadItem } from "./ThreadItem.js"; @@ -334,20 +382,32 @@ export type { ThreadListParams } from "./ThreadListParams.js"; export type { ThreadListResponse } from "./ThreadListResponse.js"; export type { ThreadLoadedListParams } from "./ThreadLoadedListParams.js"; export type { ThreadLoadedListResponse } from "./ThreadLoadedListResponse.js"; +export type { ThreadMemoryModeSetParams } from "./ThreadMemoryModeSetParams.js"; +export type { ThreadMemoryModeSetResponse } from "./ThreadMemoryModeSetResponse.js"; export type { ThreadMetadataGitInfoUpdateParams } from "./ThreadMetadataGitInfoUpdateParams.js"; export type { ThreadMetadataUpdateParams } from "./ThreadMetadataUpdateParams.js"; export type { ThreadMetadataUpdateResponse } from "./ThreadMetadataUpdateResponse.js"; export type { ThreadNameUpdatedNotification } from "./ThreadNameUpdatedNotification.js"; export type { ThreadReadParams } from "./ThreadReadParams.js"; export type { ThreadReadResponse } from "./ThreadReadResponse.js"; +export type { ThreadRealtimeAppendAudioParams } from "./ThreadRealtimeAppendAudioParams.js"; +export type { ThreadRealtimeAppendAudioResponse } from "./ThreadRealtimeAppendAudioResponse.js"; +export type { ThreadRealtimeAppendTextParams } from "./ThreadRealtimeAppendTextParams.js"; +export type { ThreadRealtimeAppendTextResponse } from "./ThreadRealtimeAppendTextResponse.js"; export type { ThreadRealtimeAudioChunk } from "./ThreadRealtimeAudioChunk.js"; export type { ThreadRealtimeClosedNotification } from "./ThreadRealtimeClosedNotification.js"; export type { ThreadRealtimeErrorNotification } from "./ThreadRealtimeErrorNotification.js"; export type { ThreadRealtimeItemAddedNotification } from "./ThreadRealtimeItemAddedNotification.js"; +export type { ThreadRealtimeListVoicesParams } from "./ThreadRealtimeListVoicesParams.js"; +export type { ThreadRealtimeListVoicesResponse } from "./ThreadRealtimeListVoicesResponse.js"; export type { ThreadRealtimeOutputAudioDeltaNotification } from "./ThreadRealtimeOutputAudioDeltaNotification.js"; export type { ThreadRealtimeSdpNotification } from "./ThreadRealtimeSdpNotification.js"; +export type { ThreadRealtimeStartParams } from "./ThreadRealtimeStartParams.js"; +export type { ThreadRealtimeStartResponse } from "./ThreadRealtimeStartResponse.js"; export type { ThreadRealtimeStartTransport } from "./ThreadRealtimeStartTransport.js"; export type { ThreadRealtimeStartedNotification } from "./ThreadRealtimeStartedNotification.js"; +export type { ThreadRealtimeStopParams } from "./ThreadRealtimeStopParams.js"; +export type { ThreadRealtimeStopResponse } from "./ThreadRealtimeStopResponse.js"; export type { ThreadRealtimeTranscriptDeltaNotification } from "./ThreadRealtimeTranscriptDeltaNotification.js"; export type { ThreadRealtimeTranscriptDoneNotification } from "./ThreadRealtimeTranscriptDoneNotification.js"; export type { ThreadResumeParams } from "./ThreadResumeParams.js"; diff --git a/extensions/diagnostics-otel/src/service.ts b/extensions/diagnostics-otel/src/service.ts index 3ada2aefacc..c480f8270f0 100644 --- a/extensions/diagnostics-otel/src/service.ts +++ b/extensions/diagnostics-otel/src/service.ts @@ -2142,6 +2142,35 @@ export function createDiagnosticsOtelService(): OpenClawPluginService { span.end(evt.ts); }; + const recordDiagnosticPhaseCompleted = ( + evt: Extract, + ) => { + if (!tracesEnabled) { + return; + } + const spanAttrs: Record = { + "openclaw.phase": lowCardinalityAttr(evt.name, "unknown"), + ...(evt.cpuUserMs !== undefined ? { "openclaw.phase.cpu_user_ms": evt.cpuUserMs } : {}), + ...(evt.cpuSystemMs !== undefined + ? { "openclaw.phase.cpu_system_ms": evt.cpuSystemMs } + : {}), + ...(evt.cpuTotalMs !== undefined + ? { "openclaw.phase.cpu_total_ms": evt.cpuTotalMs } + : {}), + ...(evt.cpuCoreRatio !== undefined + ? { "openclaw.phase.cpu_core_ratio": evt.cpuCoreRatio } + : {}), + }; + for (const [key, value] of Object.entries(evt.details ?? {})) { + spanAttrs[`openclaw.phase.detail.${key}`] = + typeof value === "boolean" ? String(value) : value; + } + const span = spanWithDuration("openclaw.diagnostic.phase", spanAttrs, evt.durationMs, { + endTimeMs: evt.ts, + }); + span.end(evt.ts); + }; + const recordTelemetryExporter = ( evt: TelemetryExporterDiagnosticEvent, metadata: DiagnosticEventMetadata, @@ -2223,6 +2252,7 @@ export function createDiagnosticsOtelService(): OpenClawPluginService { recordLivenessWarning(evt); return; case "diagnostic.phase.completed": + recordDiagnosticPhaseCompleted(evt); return; case "run.started": recordRunStarted(evt, metadata); diff --git a/scripts/check-codex-app-server-protocol.ts b/scripts/check-codex-app-server-protocol.ts index 65431874ef7..4a3f2a6ef6a 100644 --- a/scripts/check-codex-app-server-protocol.ts +++ b/scripts/check-codex-app-server-protocol.ts @@ -1,25 +1,16 @@ import fs from "node:fs/promises"; import path from "node:path"; -import { resolveCodexAppServerProtocolSource } from "./lib/codex-app-server-protocol-source.js"; +import { + generateExperimentalCodexAppServerProtocolSource, + normalizeGeneratedTypeScript, + selectedCodexAppServerJsonSchemas, +} from "./lib/codex-app-server-protocol-source.js"; -const { sourceRoot: sourceSchemaRoot } = await resolveCodexAppServerProtocolSource(process.cwd()); -const schemaRoot = path.join(sourceSchemaRoot, "typescript"); const generatedRoot = path.resolve( process.cwd(), "extensions/codex/src/app-server/protocol-generated", ); -const selectedJsonSchemas = [ - "DynamicToolCallParams.json", - "v2/ErrorNotification.json", - "v2/GetAccountResponse.json", - "v2/ModelListResponse.json", - "v2/ThreadResumeResponse.json", - "v2/ThreadStartResponse.json", - "v2/TurnCompletedNotification.json", - "v2/TurnStartResponse.json", -] as const; - const checks: Array<{ file: string; snippets: string[] }> = [ { file: "ServerRequest.ts", @@ -33,10 +24,10 @@ const checks: Array<{ file: string; snippets: string[] }> = [ { file: "v2/ThreadItem.ts", snippets: [ - '"type": "contextCompaction"', - '"type": "dynamicToolCall"', - '"type": "commandExecution"', - '"type": "mcpToolCall"', + 'type: "contextCompaction"', + 'type: "dynamicToolCall"', + 'type: "commandExecution"', + 'type: "mcpToolCall"', ], }, { @@ -49,19 +40,23 @@ const checks: Array<{ file: string; snippets: string[] }> = [ }, { file: "v2/Account.ts", - snippets: ['"type": "apiKey"', '"type": "chatgpt"', '"type": "amazonBedrock"'], + snippets: ['type: "apiKey"', 'type: "chatgpt"', 'type: "amazonBedrock"'], }, { file: "v2/ThreadStartParams.ts", snippets: [ - "permissionProfile?: PermissionProfile | null", + "permissions?: PermissionProfileSelectionParams | null", + "dynamicTools?: Array | null", "experimentalRawEvents: boolean", "persistExtendedHistory: boolean", ], }, { file: "v2/TurnStartParams.ts", - snippets: ["permissionProfile?: PermissionProfile | null", "serviceTier?: ServiceTier | null"], + snippets: [ + "permissions?: PermissionProfileSelectionParams | null", + "serviceTier?: ServiceTier | null", + ], }, { file: "ReviewDecision.ts", @@ -78,23 +73,28 @@ const checks: Array<{ file: string; snippets: string[] }> = [ ]; const failures: string[] = []; +const source = await generateExperimentalCodexAppServerProtocolSource(); -await compareGeneratedProtocolMirror(); +try { + await compareGeneratedProtocolMirror(source.typescriptRoot, source.jsonRoot); -for (const check of checks) { - const filePath = path.join(schemaRoot, check.file); - let text: string; - try { - text = await fs.readFile(filePath, "utf8"); - } catch (error) { - failures.push(`${check.file}: missing (${String(error)})`); - continue; - } - for (const snippet of check.snippets) { - if (!text.includes(snippet)) { - failures.push(`${check.file}: missing ${snippet}`); + for (const check of checks) { + const filePath = path.join(source.typescriptRoot, check.file); + let text: string; + try { + text = await fs.readFile(filePath, "utf8"); + } catch (error) { + failures.push(`${check.file}: missing (${String(error)})`); + continue; + } + for (const snippet of check.snippets) { + if (!text.includes(snippet)) { + failures.push(`${check.file}: missing ${snippet}`); + } } } +} finally { + await source.cleanup(); } if (failures.length > 0) { @@ -103,17 +103,19 @@ if (failures.length > 0) { console.error(`- ${failure}`); } console.error( - `Run \`pnpm codex-app-server:protocol:sync\` after refreshing the Codex checkout at ${path.resolve(sourceSchemaRoot, "../../..")}.`, + `Run \`pnpm codex-app-server:protocol:sync\` after refreshing the Codex checkout at ${source.codexRepo}.`, ); process.exit(1); } console.log( - `Codex app-server generated protocol matches OpenClaw bridge assumptions: ${sourceSchemaRoot}`, + `Codex app-server generated protocol matches OpenClaw bridge assumptions: ${source.codexRepo}`, ); -async function compareGeneratedProtocolMirror(): Promise { - const sourceTsRoot = path.join(sourceSchemaRoot, "typescript"); +async function compareGeneratedProtocolMirror( + sourceTsRoot: string, + sourceJsonRoot: string, +): Promise { const targetTsRoot = path.join(generatedRoot, "typescript"); const sourceFiles = await listFiles(sourceTsRoot, ".ts"); const targetFiles = await listFiles(targetTsRoot, ".ts"); @@ -139,8 +141,8 @@ async function compareGeneratedProtocolMirror(): Promise { } } - for (const schema of selectedJsonSchemas) { - const sourcePath = path.join(sourceSchemaRoot, "json", schema); + for (const schema of selectedCodexAppServerJsonSchemas) { + const sourcePath = path.join(sourceJsonRoot, schema); const targetPath = path.join(generatedRoot, "json", schema); let source: string; let target: string; @@ -180,10 +182,3 @@ async function listFiles(root: string, suffix: string): Promise { await visit(root); return files.toSorted(); } - -function normalizeGeneratedTypeScript(text: string): string { - return text - .replace(/(from\s+["'])(\.{1,2}\/[^"']+?)(\.js)?(["'])/g, "$1$2.js$4") - .replace('export * as v2 from "./v2.js";', 'export * as v2 from "./v2/index.js";') - .replaceAll("| null | null", "| null"); -} diff --git a/scripts/lib/codex-app-server-protocol-source.ts b/scripts/lib/codex-app-server-protocol-source.ts index 1c13c50e161..70a5ade21e7 100644 --- a/scripts/lib/codex-app-server-protocol-source.ts +++ b/scripts/lib/codex-app-server-protocol-source.ts @@ -1,8 +1,28 @@ +import { spawnSync } from "node:child_process"; import fs from "node:fs/promises"; import path from "node:path"; const PROTOCOL_SCHEMA_RELATIVE_PATH = "codex-rs/app-server-protocol/schema"; +export const selectedCodexAppServerJsonSchemas = [ + "DynamicToolCallParams.json", + "v2/ErrorNotification.json", + "v2/GetAccountResponse.json", + "v2/ModelListResponse.json", + "v2/ThreadResumeResponse.json", + "v2/ThreadStartResponse.json", + "v2/TurnCompletedNotification.json", + "v2/TurnStartResponse.json", +] as const; + +export type GeneratedCodexAppServerProtocolSource = { + root: string; + codexRepo: string; + typescriptRoot: string; + jsonRoot: string; + cleanup: () => Promise; +}; + export async function resolveCodexAppServerProtocolSource(repoRoot: string): Promise<{ codexRepo: string; sourceRoot: string; @@ -31,6 +51,61 @@ export async function resolveCodexAppServerProtocolSource(repoRoot: string): Pro ); } +export async function generateExperimentalCodexAppServerProtocolSource( + repoRoot = process.cwd(), +): Promise { + const { codexRepo } = await resolveCodexAppServerProtocolSource(repoRoot); + const root = await fs.mkdtemp(path.join(repoRoot, ".tmp-codex-app-server-protocol-")); + const typescriptRoot = path.join(root, "typescript"); + const jsonRoot = path.join(root, "json"); + const manifestPath = path.join(codexRepo, "codex-rs/Cargo.toml"); + const cleanup = async () => { + await fs.rm(root, { recursive: true, force: true }); + }; + + try { + runCargoProtocolGenerator(codexRepo, [ + "run", + "--manifest-path", + manifestPath, + "-p", + "codex-cli", + "--", + "app-server", + "generate-ts", + "--out", + typescriptRoot, + "--experimental", + ]); + runCargoProtocolGenerator(codexRepo, [ + "run", + "--manifest-path", + manifestPath, + "-p", + "codex-cli", + "--", + "app-server", + "generate-json-schema", + "--out", + jsonRoot, + "--experimental", + ]); + await rewriteTypeScriptImports(typescriptRoot); + formatGeneratedTypeScript(repoRoot, typescriptRoot); + } catch (error) { + await cleanup(); + throw error; + } + + return { + root, + codexRepo, + typescriptRoot, + jsonRoot, + cleanup, + }; +} + async function collectCodexRepoCandidates(repoRoot: string): Promise { const candidates = [ process.env.OPENCLAW_CODEX_REPO, @@ -72,3 +147,52 @@ async function isDirectory(candidate: string): Promise { return false; } } + +function runCargoProtocolGenerator(codexRepo: string, args: string[]): void { + const result = spawnSync("cargo", args, { + cwd: codexRepo, + stdio: "inherit", + }); + if (result.status !== 0) { + throw new Error(`cargo ${args.join(" ")} failed with exit code ${result.status ?? "unknown"}`); + } +} + +function formatGeneratedTypeScript(repoRoot: string, root: string): void { + const result = spawnSync("pnpm", ["exec", "oxfmt", "--write", "--threads=1", root], { + cwd: repoRoot, + stdio: "inherit", + }); + if (result.status !== 0) { + throw new Error( + `pnpm exec oxfmt --write --threads=1 ${root} failed with exit code ${ + result.status ?? "unknown" + }`, + ); + } +} + +export async function rewriteTypeScriptImports(root: string): Promise { + const entries = await fs.readdir(root, { withFileTypes: true }); + await Promise.all( + entries.map(async (entry) => { + const fullPath = path.join(root, entry.name); + if (entry.isDirectory()) { + await rewriteTypeScriptImports(fullPath); + return; + } + if (!entry.isFile() || !entry.name.endsWith(".ts")) { + return; + } + const text = await fs.readFile(fullPath, "utf8"); + await fs.writeFile(fullPath, normalizeGeneratedTypeScript(text)); + }), + ); +} + +export function normalizeGeneratedTypeScript(text: string): string { + return text + .replace(/(from\s+["'])(\.{1,2}\/[^"']+?)(\.js)?(["'])/g, "$1$2.js$4") + .replace('export * as v2 from "./v2.js";', 'export * as v2 from "./v2/index.js";') + .replaceAll("| null | null", "| null"); +} diff --git a/scripts/sync-codex-app-server-protocol.ts b/scripts/sync-codex-app-server-protocol.ts index 379d150d7bc..4e63e4a0a2c 100644 --- a/scripts/sync-codex-app-server-protocol.ts +++ b/scripts/sync-codex-app-server-protocol.ts @@ -1,58 +1,29 @@ import fs from "node:fs/promises"; import path from "node:path"; -import { resolveCodexAppServerProtocolSource } from "./lib/codex-app-server-protocol-source.js"; +import { + generateExperimentalCodexAppServerProtocolSource, + selectedCodexAppServerJsonSchemas, +} from "./lib/codex-app-server-protocol-source.js"; -const { sourceRoot } = await resolveCodexAppServerProtocolSource(process.cwd()); const targetRoot = path.resolve( process.cwd(), "extensions/codex/src/app-server/protocol-generated", ); -const selectedJsonSchemas = [ - "DynamicToolCallParams.json", - "v2/ErrorNotification.json", - "v2/GetAccountResponse.json", - "v2/ModelListResponse.json", - "v2/ThreadResumeResponse.json", - "v2/ThreadStartResponse.json", - "v2/TurnCompletedNotification.json", - "v2/TurnStartResponse.json", -] as const; +const source = await generateExperimentalCodexAppServerProtocolSource(); +try { + await fs.rm(targetRoot, { recursive: true, force: true }); + await fs.mkdir(targetRoot, { recursive: true }); + await fs.cp(source.typescriptRoot, path.join(targetRoot, "typescript"), { + recursive: true, + }); -await fs.rm(targetRoot, { recursive: true, force: true }); -await fs.mkdir(targetRoot, { recursive: true }); -await fs.cp(path.join(sourceRoot, "typescript"), path.join(targetRoot, "typescript"), { - recursive: true, -}); -await rewriteTypeScriptImports(path.join(targetRoot, "typescript")); - -for (const schema of selectedJsonSchemas) { - await fs.mkdir(path.dirname(path.join(targetRoot, "json", schema)), { recursive: true }); - await fs.copyFile(path.join(sourceRoot, "json", schema), path.join(targetRoot, "json", schema)); + for (const schema of selectedCodexAppServerJsonSchemas) { + await fs.mkdir(path.dirname(path.join(targetRoot, "json", schema)), { recursive: true }); + await fs.copyFile(path.join(source.jsonRoot, schema), path.join(targetRoot, "json", schema)); + } +} finally { + await source.cleanup(); } -console.log(`Synced Codex app-server generated protocol from ${sourceRoot}`); - -async function rewriteTypeScriptImports(root: string): Promise { - const entries = await fs.readdir(root, { withFileTypes: true }); - await Promise.all( - entries.map(async (entry) => { - const fullPath = path.join(root, entry.name); - if (entry.isDirectory()) { - await rewriteTypeScriptImports(fullPath); - return; - } - if (!entry.isFile() || !entry.name.endsWith(".ts")) { - return; - } - const text = await fs.readFile(fullPath, "utf8"); - await fs.writeFile( - fullPath, - text - .replace(/(from\s+["'])(\.{1,2}\/[^"']+?)(\.js)?(["'])/g, "$1$2.js$4") - .replace('export * as v2 from "./v2.js";', 'export * as v2 from "./v2/index.js";') - .replaceAll("| null | null", "| null"), - ); - }), - ); -} +console.log(`Synced Codex app-server generated protocol from ${source.codexRepo}`);