diff --git a/codex-rs/app-server-protocol/schema/typescript/AuthMode.ts b/codex-rs/app-server-protocol/schema/typescript/AuthMode.ts index 5e0cad8864..a546ca59bd 100644 --- a/codex-rs/app-server-protocol/schema/typescript/AuthMode.ts +++ b/codex-rs/app-server-protocol/schema/typescript/AuthMode.ts @@ -5,4 +5,7 @@ /** * Authentication mode for OpenAI-backed providers. */ -export type AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens"; +export type AuthMode = + | "apikey" + | "chatgpt" + | "chatgptAuthTokens"; diff --git a/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts b/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts index 51bf05961d..8c230a5e61 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ClientRequest.ts @@ -55,4 +55,57 @@ import type { WindowsSandboxSetupStartParams } from "./v2/WindowsSandboxSetupSta /** * Request from the client to the server. */ -export type ClientRequest ={ "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } | { "method": "thread/list", id: RequestId, params: ThreadListParams, } | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } | { "method": "skills/list", id: RequestId, params: SkillsListParams, } | { "method": "plugin/list", id: RequestId, params: PluginListParams, } | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } | { "method": "skills/remote/list", id: RequestId, params: SkillsRemoteReadParams, } | { "method": "skills/remote/export", id: RequestId, params: SkillsRemoteWriteParams, } | { "method": "app/list", id: RequestId, params: AppsListParams, } | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } | { "method": "turn/start", id: RequestId, params: TurnStartParams, } | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } | { "method": "review/start", id: RequestId, params: ReviewStartParams, } | { "method": "model/list", id: RequestId, params: ModelListParams, } | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } | { "method": "account/logout", id: RequestId, params: undefined, } | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } | { "method": "command/exec", id: RequestId, params: CommandExecParams, } | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } | { "method": "config/read", id: RequestId, params: ConfigReadParams, } | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } | { "method": "configRequirements/read", id: RequestId, params: undefined, } | { "method": "account/read", id: RequestId, params: GetAccountParams, } | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, }; +export type ClientRequest = + | { "method": "initialize", id: RequestId, params: InitializeParams, } + | { "method": "thread/start", id: RequestId, params: ThreadStartParams, } + | { "method": "thread/resume", id: RequestId, params: ThreadResumeParams, } + | { "method": "thread/fork", id: RequestId, params: ThreadForkParams, } + | { "method": "thread/archive", id: RequestId, params: ThreadArchiveParams, } + | { "method": "thread/unsubscribe", id: RequestId, params: ThreadUnsubscribeParams, } + | { "method": "thread/name/set", id: RequestId, params: ThreadSetNameParams, } + | { "method": "thread/metadata/update", id: RequestId, params: ThreadMetadataUpdateParams, } + | { "method": "thread/unarchive", id: RequestId, params: ThreadUnarchiveParams, } + | { "method": "thread/compact/start", id: RequestId, params: ThreadCompactStartParams, } + | { "method": "thread/rollback", id: RequestId, params: ThreadRollbackParams, } + | { "method": "thread/list", id: RequestId, params: ThreadListParams, } + | { "method": "thread/loaded/list", id: RequestId, params: ThreadLoadedListParams, } + | { "method": "thread/read", id: RequestId, params: ThreadReadParams, } + | { "method": "skills/list", id: RequestId, params: SkillsListParams, } + | { "method": "plugin/list", id: RequestId, params: PluginListParams, } + | { "method": "plugin/read", id: RequestId, params: PluginReadParams, } + | { "method": "skills/remote/list", id: RequestId, params: SkillsRemoteReadParams, } + | { "method": "skills/remote/export", id: RequestId, params: SkillsRemoteWriteParams, } + | { "method": "app/list", id: RequestId, params: AppsListParams, } + | { "method": "skills/config/write", id: RequestId, params: SkillsConfigWriteParams, } + | { "method": "plugin/install", id: RequestId, params: PluginInstallParams, } + | { "method": "plugin/uninstall", id: RequestId, params: PluginUninstallParams, } + | { "method": "turn/start", id: RequestId, params: TurnStartParams, } + | { "method": "turn/steer", id: RequestId, params: TurnSteerParams, } + | { "method": "turn/interrupt", id: RequestId, params: TurnInterruptParams, } + | { "method": "review/start", id: RequestId, params: ReviewStartParams, } + | { "method": "model/list", id: RequestId, params: ModelListParams, } + | { "method": "experimentalFeature/list", id: RequestId, params: ExperimentalFeatureListParams, } + | { "method": "mcpServer/oauth/login", id: RequestId, params: McpServerOauthLoginParams, } + | { "method": "config/mcpServer/reload", id: RequestId, params: undefined, } + | { "method": "mcpServerStatus/list", id: RequestId, params: ListMcpServerStatusParams, } + | { "method": "windowsSandbox/setupStart", id: RequestId, params: WindowsSandboxSetupStartParams, } + | { "method": "account/login/start", id: RequestId, params: LoginAccountParams, } + | { "method": "account/login/cancel", id: RequestId, params: CancelLoginAccountParams, } + | { "method": "account/logout", id: RequestId, params: undefined, } + | { "method": "account/rateLimits/read", id: RequestId, params: undefined, } + | { "method": "feedback/upload", id: RequestId, params: FeedbackUploadParams, } + | { "method": "command/exec", id: RequestId, params: CommandExecParams, } + | { "method": "command/exec/write", id: RequestId, params: CommandExecWriteParams, } + | { "method": "command/exec/terminate", id: RequestId, params: CommandExecTerminateParams, } + | { "method": "command/exec/resize", id: RequestId, params: CommandExecResizeParams, } + | { "method": "config/read", id: RequestId, params: ConfigReadParams, } + | { "method": "externalAgentConfig/detect", id: RequestId, params: ExternalAgentConfigDetectParams, } + | { "method": "externalAgentConfig/import", id: RequestId, params: ExternalAgentConfigImportParams, } + | { "method": "config/value/write", id: RequestId, params: ConfigValueWriteParams, } + | { "method": "config/batchWrite", id: RequestId, params: ConfigBatchWriteParams, } + | { "method": "configRequirements/read", id: RequestId, params: undefined, } + | { "method": "account/read", id: RequestId, params: GetAccountParams, } + | { "method": "getConversationSummary", id: RequestId, params: GetConversationSummaryParams, } + | { "method": "gitDiffToRemote", id: RequestId, params: GitDiffToRemoteParams, } + | { "method": "getAuthStatus", id: RequestId, params: GetAuthStatusParams, } + | { "method": "fuzzyFileSearch", id: RequestId, params: FuzzyFileSearchParams, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ContentItem.ts b/codex-rs/app-server-protocol/schema/typescript/ContentItem.ts index c89b9d78a4..9b6472fa11 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ContentItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ContentItem.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, } | { "type": "output_text", text: string, }; +export type ContentItem = + | { "type": "input_text", text: string, } + | { "type": "input_image", image_url: string, } + | { "type": "output_text", text: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/FileChange.ts b/codex-rs/app-server-protocol/schema/typescript/FileChange.ts index 8eaac9e8d7..c340b90678 100644 --- a/codex-rs/app-server-protocol/schema/typescript/FileChange.ts +++ b/codex-rs/app-server-protocol/schema/typescript/FileChange.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type FileChange = { "type": "add", content: string, } | { "type": "delete", content: string, } | { "type": "update", unified_diff: string, move_path: string | null, }; +export type FileChange = + | { "type": "add", content: string, } + | { "type": "delete", content: string, } + | { "type": "update", unified_diff: string, move_path: string | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ForcedLoginMethod.ts b/codex-rs/app-server-protocol/schema/typescript/ForcedLoginMethod.ts index c695908866..8eff5e9f6a 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ForcedLoginMethod.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ForcedLoginMethod.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ForcedLoginMethod = "chatgpt" | "api"; +export type ForcedLoginMethod = + | "chatgpt" + | "api"; diff --git a/codex-rs/app-server-protocol/schema/typescript/FunctionCallOutputBody.ts b/codex-rs/app-server-protocol/schema/typescript/FunctionCallOutputBody.ts index 6bcb7e25d6..0f6f29190e 100644 --- a/codex-rs/app-server-protocol/schema/typescript/FunctionCallOutputBody.ts +++ b/codex-rs/app-server-protocol/schema/typescript/FunctionCallOutputBody.ts @@ -3,4 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { FunctionCallOutputContentItem } from "./FunctionCallOutputContentItem"; -export type FunctionCallOutputBody = string | Array; +export type FunctionCallOutputBody = + | string + | Array; diff --git a/codex-rs/app-server-protocol/schema/typescript/FunctionCallOutputContentItem.ts b/codex-rs/app-server-protocol/schema/typescript/FunctionCallOutputContentItem.ts index fb2996f1e5..027516abb4 100644 --- a/codex-rs/app-server-protocol/schema/typescript/FunctionCallOutputContentItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/FunctionCallOutputContentItem.ts @@ -7,4 +7,6 @@ import type { ImageDetail } from "./ImageDetail"; * Responses API compatible content items that can be returned by a tool call. * This is a subset of ContentItem with the types we support as function call outputs. */ -export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, }; +export type FunctionCallOutputContentItem = + | { "type": "input_text", text: string, } + | { "type": "input_image", image_url: string, detail?: ImageDetail, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/GetConversationSummaryParams.ts b/codex-rs/app-server-protocol/schema/typescript/GetConversationSummaryParams.ts index 4e0005430d..9ec25bff42 100644 --- a/codex-rs/app-server-protocol/schema/typescript/GetConversationSummaryParams.ts +++ b/codex-rs/app-server-protocol/schema/typescript/GetConversationSummaryParams.ts @@ -3,4 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ThreadId } from "./ThreadId"; -export type GetConversationSummaryParams = { rolloutPath: string, } | { conversationId: ThreadId, }; +export type GetConversationSummaryParams = + | { rolloutPath: string, } + | { conversationId: ThreadId, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ImageDetail.ts b/codex-rs/app-server-protocol/schema/typescript/ImageDetail.ts index a48f07c088..15cd786244 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ImageDetail.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ImageDetail.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ImageDetail = "auto" | "low" | "high" | "original"; +export type ImageDetail = + | "auto" + | "low" + | "high" + | "original"; diff --git a/codex-rs/app-server-protocol/schema/typescript/InputModality.ts b/codex-rs/app-server-protocol/schema/typescript/InputModality.ts index 73661938b3..50f0a6c5b4 100644 --- a/codex-rs/app-server-protocol/schema/typescript/InputModality.ts +++ b/codex-rs/app-server-protocol/schema/typescript/InputModality.ts @@ -5,4 +5,6 @@ /** * Canonical user-input modality tags advertised by a model. */ -export type InputModality = "text" | "image"; +export type InputModality = + | "text" + | "image"; diff --git a/codex-rs/app-server-protocol/schema/typescript/LocalShellStatus.ts b/codex-rs/app-server-protocol/schema/typescript/LocalShellStatus.ts index 00db484ad6..0854652451 100644 --- a/codex-rs/app-server-protocol/schema/typescript/LocalShellStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/LocalShellStatus.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type LocalShellStatus = "completed" | "in_progress" | "incomplete"; +export type LocalShellStatus = + | "completed" + | "in_progress" + | "incomplete"; diff --git a/codex-rs/app-server-protocol/schema/typescript/MacOsAutomationPermission.ts b/codex-rs/app-server-protocol/schema/typescript/MacOsAutomationPermission.ts index 31036b23ee..3f83aa7cca 100644 --- a/codex-rs/app-server-protocol/schema/typescript/MacOsAutomationPermission.ts +++ b/codex-rs/app-server-protocol/schema/typescript/MacOsAutomationPermission.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type MacOsAutomationPermission = "none" | "all" | { "bundle_ids": Array }; +export type MacOsAutomationPermission = + | "none" + | "all" + | { "bundle_ids": Array }; diff --git a/codex-rs/app-server-protocol/schema/typescript/MacOsContactsPermission.ts b/codex-rs/app-server-protocol/schema/typescript/MacOsContactsPermission.ts index dd6d7b59ef..84a0f4f97e 100644 --- a/codex-rs/app-server-protocol/schema/typescript/MacOsContactsPermission.ts +++ b/codex-rs/app-server-protocol/schema/typescript/MacOsContactsPermission.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type MacOsContactsPermission = "none" | "read_only" | "read_write"; +export type MacOsContactsPermission = + | "none" + | "read_only" + | "read_write"; diff --git a/codex-rs/app-server-protocol/schema/typescript/MacOsPreferencesPermission.ts b/codex-rs/app-server-protocol/schema/typescript/MacOsPreferencesPermission.ts index 2f5234a268..374e4106fe 100644 --- a/codex-rs/app-server-protocol/schema/typescript/MacOsPreferencesPermission.ts +++ b/codex-rs/app-server-protocol/schema/typescript/MacOsPreferencesPermission.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type MacOsPreferencesPermission = "none" | "read_only" | "read_write"; +export type MacOsPreferencesPermission = + | "none" + | "read_only" + | "read_write"; diff --git a/codex-rs/app-server-protocol/schema/typescript/MessagePhase.ts b/codex-rs/app-server-protocol/schema/typescript/MessagePhase.ts index 9e16021b54..c0c9d6b354 100644 --- a/codex-rs/app-server-protocol/schema/typescript/MessagePhase.ts +++ b/codex-rs/app-server-protocol/schema/typescript/MessagePhase.ts @@ -8,4 +8,6 @@ * Providers do not emit this consistently, so callers must treat `None` as * "phase unknown" and keep compatibility behavior for legacy models. */ -export type MessagePhase = "commentary" | "final_answer"; +export type MessagePhase = + | "commentary" + | "final_answer"; diff --git a/codex-rs/app-server-protocol/schema/typescript/ModeKind.ts b/codex-rs/app-server-protocol/schema/typescript/ModeKind.ts index 7d2324add7..d5b23f8247 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ModeKind.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ModeKind.ts @@ -5,4 +5,6 @@ /** * Initial collaboration mode to use when the TUI starts. */ -export type ModeKind = "plan" | "default"; +export type ModeKind = + | "plan" + | "default"; diff --git a/codex-rs/app-server-protocol/schema/typescript/NetworkPolicyRuleAction.ts b/codex-rs/app-server-protocol/schema/typescript/NetworkPolicyRuleAction.ts index 55ec70032a..eb47a97137 100644 --- a/codex-rs/app-server-protocol/schema/typescript/NetworkPolicyRuleAction.ts +++ b/codex-rs/app-server-protocol/schema/typescript/NetworkPolicyRuleAction.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type NetworkPolicyRuleAction = "allow" | "deny"; +export type NetworkPolicyRuleAction = + | "allow" + | "deny"; diff --git a/codex-rs/app-server-protocol/schema/typescript/ParsedCommand.ts b/codex-rs/app-server-protocol/schema/typescript/ParsedCommand.ts index 146d7816c2..4a7854c7e0 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ParsedCommand.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ParsedCommand.ts @@ -2,11 +2,15 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ParsedCommand = { "type": "read", cmd: string, name: string, -/** - * (Best effort) Path to the file being read by the command. When - * possible, this is an absolute path, though when relative, it should - * be resolved against the `cwd`` that will be used to run the command - * to derive the absolute path. - */ -path: string, } | { "type": "list_files", cmd: string, path: string | null, } | { "type": "search", cmd: string, query: string | null, path: string | null, } | { "type": "unknown", cmd: string, }; +export type ParsedCommand = + | { "type": "read", cmd: string, name: string, + /** + * (Best effort) Path to the file being read by the command. When + * possible, this is an absolute path, though when relative, it should + * be resolved against the `cwd`` that will be used to run the command + * to derive the absolute path. + */ + path: string, } + | { "type": "list_files", cmd: string, path: string | null, } + | { "type": "search", cmd: string, query: string | null, path: string | null, } + | { "type": "unknown", cmd: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/Personality.ts b/codex-rs/app-server-protocol/schema/typescript/Personality.ts index 45165f4e33..12e609c71b 100644 --- a/codex-rs/app-server-protocol/schema/typescript/Personality.ts +++ b/codex-rs/app-server-protocol/schema/typescript/Personality.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type Personality = "none" | "friendly" | "pragmatic"; +export type Personality = + | "none" + | "friendly" + | "pragmatic"; diff --git a/codex-rs/app-server-protocol/schema/typescript/PlanType.ts b/codex-rs/app-server-protocol/schema/typescript/PlanType.ts index 9f622d0f1b..0a68a84e61 100644 --- a/codex-rs/app-server-protocol/schema/typescript/PlanType.ts +++ b/codex-rs/app-server-protocol/schema/typescript/PlanType.ts @@ -2,4 +2,13 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PlanType = "free" | "go" | "plus" | "pro" | "team" | "business" | "enterprise" | "edu" | "unknown"; +export type PlanType = + | "free" + | "go" + | "plus" + | "pro" + | "team" + | "business" + | "enterprise" + | "edu" + | "unknown"; diff --git a/codex-rs/app-server-protocol/schema/typescript/ReasoningEffort.ts b/codex-rs/app-server-protocol/schema/typescript/ReasoningEffort.ts index c0798f43a3..2138696fba 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ReasoningEffort.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ReasoningEffort.ts @@ -3,6 +3,12 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. /** - * See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning - */ -export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh"; + * See https://platform.openai.com/docs/guides/reasoning?api-mode= + | responses#get-started-with-reasoning + */ + export type ReasoningEffort = "none" + | "minimal" + | "low" + | "medium" + | "high" + | "xhigh"; diff --git a/codex-rs/app-server-protocol/schema/typescript/ReasoningItemContent.ts b/codex-rs/app-server-protocol/schema/typescript/ReasoningItemContent.ts index fd533796fe..883ccd6de4 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ReasoningItemContent.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ReasoningItemContent.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ReasoningItemContent = { "type": "reasoning_text", text: string, } | { "type": "text", text: string, }; +export type ReasoningItemContent = + | { "type": "reasoning_text", text: string, } + | { "type": "text", text: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ReasoningSummary.ts b/codex-rs/app-server-protocol/schema/typescript/ReasoningSummary.ts index d246ac12ec..70d519e427 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ReasoningSummary.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ReasoningSummary.ts @@ -5,6 +5,10 @@ /** * A summary of the reasoning performed by the model. This can be useful for * debugging and understanding the model's reasoning process. - * See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries - */ -export type ReasoningSummary = "auto" | "concise" | "detailed" | "none"; + * See https://platform.openai.com/docs/guides/reasoning?api-mode= + | responses#reasoning-summaries + */ + export type ReasoningSummary = "auto" + | "concise" + | "detailed" + | "none"; diff --git a/codex-rs/app-server-protocol/schema/typescript/RequestId.ts b/codex-rs/app-server-protocol/schema/typescript/RequestId.ts index 8a771bd021..9570a92e5f 100644 --- a/codex-rs/app-server-protocol/schema/typescript/RequestId.ts +++ b/codex-rs/app-server-protocol/schema/typescript/RequestId.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type RequestId = string | number; +export type RequestId = + | string + | number; diff --git a/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts b/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts index 2464037a50..9bbb0a7433 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ResponseItem.ts @@ -11,8 +11,22 @@ import type { ReasoningItemContent } from "./ReasoningItemContent"; import type { ReasoningItemReasoningSummary } from "./ReasoningItemReasoningSummary"; import type { WebSearchAction } from "./WebSearchAction"; -export type ResponseItem = { "type": "message", role: string, content: Array, end_turn?: boolean, phase?: MessagePhase, } | { "type": "reasoning", summary: Array, content?: Array, encrypted_content: string | null, } | { "type": "local_shell_call", -/** - * Set when using the Responses API. - */ -call_id: string | null, status: LocalShellStatus, action: LocalShellAction, } | { "type": "function_call", name: string, namespace?: string, arguments: string, call_id: string, } | { "type": "tool_search_call", call_id: string | null, status?: string, execution: string, arguments: unknown, } | { "type": "function_call_output", call_id: string, output: FunctionCallOutputPayload, } | { "type": "custom_tool_call", status?: string, call_id: string, name: string, input: string, } | { "type": "custom_tool_call_output", call_id: string, output: FunctionCallOutputPayload, } | { "type": "tool_search_output", call_id: string | null, status: string, execution: string, tools: unknown[], } | { "type": "web_search_call", status?: string, action?: WebSearchAction, } | { "type": "image_generation_call", id: string, status: string, revised_prompt?: string, result: string, } | { "type": "ghost_snapshot", ghost_commit: GhostCommit, } | { "type": "compaction", encrypted_content: string, } | { "type": "other" }; +export type ResponseItem = + | { "type": "message", role: string, content: Array, end_turn?: boolean, phase?: MessagePhase, } + | { "type": "reasoning", summary: Array, content?: Array, encrypted_content: string | null, } + | { "type": "local_shell_call", + /** + * Set when using the Responses API. + */ + call_id: string | null, status: LocalShellStatus, action: LocalShellAction, } + | { "type": "function_call", name: string, namespace?: string, arguments: string, call_id: string, } + | { "type": "tool_search_call", call_id: string | null, status?: string, execution: string, arguments: unknown, } + | { "type": "function_call_output", call_id: string, output: FunctionCallOutputPayload, } + | { "type": "custom_tool_call", status?: string, call_id: string, name: string, input: string, } + | { "type": "custom_tool_call_output", call_id: string, output: FunctionCallOutputPayload, } + | { "type": "tool_search_output", call_id: string | null, status: string, execution: string, tools: unknown[], } + | { "type": "web_search_call", status?: string, action?: WebSearchAction, } + | { "type": "image_generation_call", id: string, status: string, revised_prompt?: string, result: string, } + | { "type": "ghost_snapshot", ghost_commit: GhostCommit, } + | { "type": "compaction", encrypted_content: string, } + | { "type": "other" }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ReviewDecision.ts b/codex-rs/app-server-protocol/schema/typescript/ReviewDecision.ts index b5193785d8..dd101313ba 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ReviewDecision.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ReviewDecision.ts @@ -7,4 +7,10 @@ import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment"; /** * User's decision in response to an ExecApprovalRequest. */ -export type ReviewDecision = "approved" | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } | "approved_for_session" | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "denied" | "abort"; +export type ReviewDecision = + | "approved" + | { "approved_execpolicy_amendment": { proposed_execpolicy_amendment: ExecPolicyAmendment, } } + | "approved_for_session" + | { "network_policy_amendment": { network_policy_amendment: NetworkPolicyAmendment, } } + | "denied" + | "abort"; diff --git a/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts b/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts index 18cb9a8b2e..5d86d0e008 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts @@ -52,4 +52,51 @@ import type { WindowsWorldWritableWarningNotification } from "./v2/WindowsWorldW /** * Notification sent from the server to the client. */ -export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "skills/changed", "params": SkillsChangedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "app/list/updated", "params": AppListUpdatedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }; +export type ServerNotification = + | { "method": "error", "params": ErrorNotification } + | { "method": "thread/started", "params": ThreadStartedNotification } + | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } + | { "method": "thread/archived", "params": ThreadArchivedNotification } + | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } + | { "method": "thread/closed", "params": ThreadClosedNotification } + | { "method": "skills/changed", "params": SkillsChangedNotification } + | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } + | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } + | { "method": "turn/started", "params": TurnStartedNotification } + | { "method": "hook/started", "params": HookStartedNotification } + | { "method": "turn/completed", "params": TurnCompletedNotification } + | { "method": "hook/completed", "params": HookCompletedNotification } + | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } + | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } + | { "method": "item/started", "params": ItemStartedNotification } + | { "method": "item/completed", "params": ItemCompletedNotification } + | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } + | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } + | { "method": "item/plan/delta", "params": PlanDeltaNotification } + | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } + | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } + | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } + | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } + | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } + | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } + | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } + | { "method": "account/updated", "params": AccountUpdatedNotification } + | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } + | { "method": "app/list/updated", "params": AppListUpdatedNotification } + | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } + | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } + | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } + | { "method": "thread/compacted", "params": ContextCompactedNotification } + | { "method": "model/rerouted", "params": ModelReroutedNotification } + | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } + | { "method": "configWarning", "params": ConfigWarningNotification } + | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } + | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } + | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } + | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } + | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } + | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } + | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } + | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } + | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } + | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ServerRequest.ts b/codex-rs/app-server-protocol/schema/typescript/ServerRequest.ts index 13d04b0be7..33a0965671 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ServerRequest.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ServerRequest.ts @@ -15,4 +15,13 @@ import type { ToolRequestUserInputParams } from "./v2/ToolRequestUserInputParams /** * Request initiated from the server and sent to the client. */ -export type ServerRequest = { "method": "item/commandExecution/requestApproval", id: RequestId, params: CommandExecutionRequestApprovalParams, } | { "method": "item/fileChange/requestApproval", id: RequestId, params: FileChangeRequestApprovalParams, } | { "method": "item/tool/requestUserInput", id: RequestId, params: ToolRequestUserInputParams, } | { "method": "mcpServer/elicitation/request", id: RequestId, params: McpServerElicitationRequestParams, } | { "method": "item/permissions/requestApproval", id: RequestId, params: PermissionsRequestApprovalParams, } | { "method": "item/tool/call", id: RequestId, params: DynamicToolCallParams, } | { "method": "account/chatgptAuthTokens/refresh", id: RequestId, params: ChatgptAuthTokensRefreshParams, } | { "method": "applyPatchApproval", id: RequestId, params: ApplyPatchApprovalParams, } | { "method": "execCommandApproval", id: RequestId, params: ExecCommandApprovalParams, }; +export type ServerRequest = + | { "method": "item/commandExecution/requestApproval", id: RequestId, params: CommandExecutionRequestApprovalParams, } + | { "method": "item/fileChange/requestApproval", id: RequestId, params: FileChangeRequestApprovalParams, } + | { "method": "item/tool/requestUserInput", id: RequestId, params: ToolRequestUserInputParams, } + | { "method": "mcpServer/elicitation/request", id: RequestId, params: McpServerElicitationRequestParams, } + | { "method": "item/permissions/requestApproval", id: RequestId, params: PermissionsRequestApprovalParams, } + | { "method": "item/tool/call", id: RequestId, params: DynamicToolCallParams, } + | { "method": "account/chatgptAuthTokens/refresh", id: RequestId, params: ChatgptAuthTokensRefreshParams, } + | { "method": "applyPatchApproval", id: RequestId, params: ApplyPatchApprovalParams, } + | { "method": "execCommandApproval", id: RequestId, params: ExecCommandApprovalParams, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/ServiceTier.ts b/codex-rs/app-server-protocol/schema/typescript/ServiceTier.ts index ce11286dbd..41824c56df 100644 --- a/codex-rs/app-server-protocol/schema/typescript/ServiceTier.ts +++ b/codex-rs/app-server-protocol/schema/typescript/ServiceTier.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ServiceTier = "fast" | "flex"; +export type ServiceTier = + | "fast" + | "flex"; diff --git a/codex-rs/app-server-protocol/schema/typescript/SessionSource.ts b/codex-rs/app-server-protocol/schema/typescript/SessionSource.ts index e5e746e384..f705d0b052 100644 --- a/codex-rs/app-server-protocol/schema/typescript/SessionSource.ts +++ b/codex-rs/app-server-protocol/schema/typescript/SessionSource.ts @@ -3,4 +3,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { SubAgentSource } from "./SubAgentSource"; -export type SessionSource = "cli" | "vscode" | "exec" | "mcp" | { "subagent": SubAgentSource } | "unknown"; +export type SessionSource = + | "cli" + | "vscode" + | "exec" + | "mcp" + | { "subagent": SubAgentSource } + | "unknown"; diff --git a/codex-rs/app-server-protocol/schema/typescript/SubAgentSource.ts b/codex-rs/app-server-protocol/schema/typescript/SubAgentSource.ts index df261bf3ea..225a2299c0 100644 --- a/codex-rs/app-server-protocol/schema/typescript/SubAgentSource.ts +++ b/codex-rs/app-server-protocol/schema/typescript/SubAgentSource.ts @@ -3,4 +3,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ThreadId } from "./ThreadId"; -export type SubAgentSource = "review" | "compact" | { "thread_spawn": { parent_thread_id: ThreadId, depth: number, agent_nickname: string | null, agent_role: string | null, } } | "memory_consolidation" | { "other": string }; +export type SubAgentSource = + | "review" + | "compact" + | { "thread_spawn": { parent_thread_id: ThreadId, depth: number, agent_nickname: string | null, agent_role: string | null, } } + | "memory_consolidation" + | { "other": string }; diff --git a/codex-rs/app-server-protocol/schema/typescript/Verbosity.ts b/codex-rs/app-server-protocol/schema/typescript/Verbosity.ts index 8fd97b0b89..bd7f37f6af 100644 --- a/codex-rs/app-server-protocol/schema/typescript/Verbosity.ts +++ b/codex-rs/app-server-protocol/schema/typescript/Verbosity.ts @@ -6,4 +6,7 @@ * Controls output length/detail on GPT-5 models via the Responses API. * Serialized with lowercase values to match the OpenAI API. */ -export type Verbosity = "low" | "medium" | "high"; +export type Verbosity = + | "low" + | "medium" + | "high"; diff --git a/codex-rs/app-server-protocol/schema/typescript/WebSearchAction.ts b/codex-rs/app-server-protocol/schema/typescript/WebSearchAction.ts index 91cb99e9ed..8aea8c8e0e 100644 --- a/codex-rs/app-server-protocol/schema/typescript/WebSearchAction.ts +++ b/codex-rs/app-server-protocol/schema/typescript/WebSearchAction.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type WebSearchAction = { "type": "search", query?: string, queries?: Array, } | { "type": "open_page", url?: string, } | { "type": "find_in_page", url?: string, pattern?: string, } | { "type": "other" }; +export type WebSearchAction = + | { "type": "search", query?: string, queries?: Array, } + | { "type": "open_page", url?: string, } + | { "type": "find_in_page", url?: string, pattern?: string, } + | { "type": "other" }; diff --git a/codex-rs/app-server-protocol/schema/typescript/WebSearchContextSize.ts b/codex-rs/app-server-protocol/schema/typescript/WebSearchContextSize.ts index d6feedde84..d29fb5045d 100644 --- a/codex-rs/app-server-protocol/schema/typescript/WebSearchContextSize.ts +++ b/codex-rs/app-server-protocol/schema/typescript/WebSearchContextSize.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type WebSearchContextSize = "low" | "medium" | "high"; +export type WebSearchContextSize = + | "low" + | "medium" + | "high"; diff --git a/codex-rs/app-server-protocol/schema/typescript/WebSearchMode.ts b/codex-rs/app-server-protocol/schema/typescript/WebSearchMode.ts index 695c13e3f6..d36fc275f9 100644 --- a/codex-rs/app-server-protocol/schema/typescript/WebSearchMode.ts +++ b/codex-rs/app-server-protocol/schema/typescript/WebSearchMode.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type WebSearchMode = "disabled" | "cached" | "live"; +export type WebSearchMode = + | "disabled" + | "cached" + | "live"; diff --git a/codex-rs/app-server-protocol/schema/typescript/serde_json/JsonValue.ts b/codex-rs/app-server-protocol/schema/typescript/serde_json/JsonValue.ts index 75cf7389ad..dbf7173b1d 100644 --- a/codex-rs/app-server-protocol/schema/typescript/serde_json/JsonValue.ts +++ b/codex-rs/app-server-protocol/schema/typescript/serde_json/JsonValue.ts @@ -2,4 +2,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type JsonValue = number | string | boolean | Array | { [key in string]?: JsonValue } | null; +export type JsonValue = + | number + | string + | boolean + | Array + | { [key in string]?: JsonValue } + | null; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/Account.ts b/codex-rs/app-server-protocol/schema/typescript/v2/Account.ts index f91677499e..03cb00b67f 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/Account.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/Account.ts @@ -3,4 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { PlanType } from "../PlanType"; -export type Account = { "type": "apiKey", } | { "type": "chatgpt", email: string, planType: PlanType, }; +export type Account = + | { "type": "apiKey", } + | { "type": "chatgpt", email: string, planType: PlanType, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AppToolApproval.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AppToolApproval.ts index e92cd8e28b..06a5c72395 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AppToolApproval.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/AppToolApproval.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type AppToolApproval = "auto" | "prompt" | "approve"; +export type AppToolApproval = + | "auto" + | "prompt" + | "approve"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AskForApproval.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AskForApproval.ts index 8d41214e01..61a4d1b996 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AskForApproval.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/AskForApproval.ts @@ -2,4 +2,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type AskForApproval = "untrusted" | "on-failure" | "on-request" | { "granular": { sandbox_approval: boolean, rules: boolean, skill_approval: boolean, request_permissions: boolean, mcp_elicitations: boolean, } } | "never"; +export type AskForApproval = + | "untrusted" + | "on-failure" + | "on-request" + | { "granular": { sandbox_approval: boolean, rules: boolean, skill_approval: boolean, request_permissions: boolean, mcp_elicitations: boolean, } } + | "never"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CancelLoginAccountStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CancelLoginAccountStatus.ts index bd851c6a39..9626c5e9de 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CancelLoginAccountStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CancelLoginAccountStatus.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type CancelLoginAccountStatus = "canceled" | "notFound"; +export type CancelLoginAccountStatus = + | "canceled" + | "notFound"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CodexErrorInfo.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CodexErrorInfo.ts index 1ff409a41a..20dc8e55ea 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CodexErrorInfo.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CodexErrorInfo.ts @@ -8,4 +8,17 @@ * When 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. */ -export type CodexErrorInfo = "contextWindowExceeded" | "usageLimitExceeded" | "serverOverloaded" | { "httpConnectionFailed": { httpStatusCode: number | null, } } | { "responseStreamConnectionFailed": { httpStatusCode: number | null, } } | "internalServerError" | "unauthorized" | "badRequest" | "threadRollbackFailed" | "sandboxError" | { "responseStreamDisconnected": { httpStatusCode: number | null, } } | { "responseTooManyFailedAttempts": { httpStatusCode: number | null, } } | "other"; +export type CodexErrorInfo = + | "contextWindowExceeded" + | "usageLimitExceeded" + | "serverOverloaded" + | { "httpConnectionFailed": { httpStatusCode: number | null, } } + | { "responseStreamConnectionFailed": { httpStatusCode: number | null, } } + | "internalServerError" + | "unauthorized" + | "badRequest" + | "threadRollbackFailed" + | "sandboxError" + | { "responseStreamDisconnected": { httpStatusCode: number | null, } } + | { "responseTooManyFailedAttempts": { httpStatusCode: number | null, } } + | "other"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentStatus.ts index 3672d19dac..f5c0a2d979 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentStatus.ts @@ -2,4 +2,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type CollabAgentStatus = "pendingInit" | "running" | "completed" | "errored" | "shutdown" | "notFound"; +export type CollabAgentStatus = + | "pendingInit" + | "running" + | "completed" + | "errored" + | "shutdown" + | "notFound"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentTool.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentTool.ts index 3637853a38..555dcb5f41 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentTool.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentTool.ts @@ -2,4 +2,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type CollabAgentTool = "spawnAgent" | "sendInput" | "resumeAgent" | "wait" | "closeAgent"; +export type CollabAgentTool = + | "spawnAgent" + | "sendInput" + | "resumeAgent" + | "wait" + | "closeAgent"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentToolCallStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentToolCallStatus.ts index f21f7bd5d5..93c8efb5b9 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentToolCallStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CollabAgentToolCallStatus.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type CollabAgentToolCallStatus = "inProgress" | "completed" | "failed"; +export type CollabAgentToolCallStatus = + | "inProgress" + | "completed" + | "failed"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandAction.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandAction.ts index ac1314c89b..f5c800e006 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandAction.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandAction.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type CommandAction = { "type": "read", command: string, name: string, path: string, } | { "type": "listFiles", command: string, path: string | null, } | { "type": "search", command: string, query: string | null, path: string | null, } | { "type": "unknown", command: string, }; +export type CommandAction = + | { "type": "read", command: string, name: string, path: string, } + | { "type": "listFiles", command: string, path: string | null, } + | { "type": "search", command: string, query: string | null, path: string | null, } + | { "type": "unknown", command: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecOutputStream.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecOutputStream.ts index a8c5b66711..39e541fd06 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecOutputStream.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecOutputStream.ts @@ -5,4 +5,6 @@ /** * Stream label for `command/exec/outputDelta` notifications. */ -export type CommandExecOutputStream = "stdout" | "stderr"; +export type CommandExecOutputStream = + | "stdout" + | "stderr"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionApprovalDecision.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionApprovalDecision.ts index c022030a1e..7523403f47 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionApprovalDecision.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionApprovalDecision.ts @@ -4,4 +4,10 @@ import type { ExecPolicyAmendment } from "./ExecPolicyAmendment"; import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment"; -export type CommandExecutionApprovalDecision = "accept" | "acceptForSession" | { "acceptWithExecpolicyAmendment": { execpolicy_amendment: ExecPolicyAmendment, } } | { "applyNetworkPolicyAmendment": { network_policy_amendment: NetworkPolicyAmendment, } } | "decline" | "cancel"; +export type CommandExecutionApprovalDecision = + | "accept" + | "acceptForSession" + | { "acceptWithExecpolicyAmendment": { execpolicy_amendment: ExecPolicyAmendment, } } + | { "applyNetworkPolicyAmendment": { network_policy_amendment: NetworkPolicyAmendment, } } + | "decline" + | "cancel"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts index 623fb971c1..fd44e3025d 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts @@ -1,16 +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 { AdditionalPermissionProfile } from "./AdditionalPermissionProfile"; import type { CommandAction } from "./CommandAction"; -import type { CommandExecutionApprovalDecision } from "./CommandExecutionApprovalDecision"; -import type { CommandExecutionRequestApprovalSkillMetadata } from "./CommandExecutionRequestApprovalSkillMetadata"; import type { ExecPolicyAmendment } from "./ExecPolicyAmendment"; import type { NetworkApprovalContext } from "./NetworkApprovalContext"; import type { NetworkPolicyAmendment } from "./NetworkPolicyAmendment"; -export type CommandExecutionRequestApprovalParams = { threadId: string, turnId: string, itemId: string, -/** +export type CommandExecutionRequestApprovalParams = {threadId: string, turnId: string, itemId: string, /** * Unique identifier for this specific approval callback. * * For regular shell/unified_exec approvals, this is null. @@ -19,44 +15,25 @@ export type CommandExecutionRequestApprovalParams = { threadId: string, turnId: * one parent `itemId`, so `approvalId` is a distinct opaque callback id * (a UUID) used to disambiguate routing. */ -approvalId?: string | null, -/** +approvalId?: string | null, /** * Optional explanatory reason (e.g. request for network access). */ -reason?: string | null, -/** +reason?: string | null, /** * Optional context for a managed-network approval prompt. */ -networkApprovalContext?: NetworkApprovalContext | null, -/** +networkApprovalContext?: NetworkApprovalContext | null, /** * The command to be executed. */ -command?: string | null, -/** +command?: string | null, /** * The command's working directory. */ -cwd?: string | null, -/** +cwd?: string | null, /** * Best-effort parsed command actions for friendly display. */ -commandActions?: Array | null, -/** - * Optional additional permissions requested for this command. - */ -additionalPermissions?: AdditionalPermissionProfile | null, -/** - * Optional skill metadata when the approval was triggered by a skill script. - */ -skillMetadata?: CommandExecutionRequestApprovalSkillMetadata | null, -/** +commandActions?: Array | null, /** * Optional proposed execpolicy amendment to allow similar commands without prompting. */ -proposedExecpolicyAmendment?: ExecPolicyAmendment | null, -/** +proposedExecpolicyAmendment?: ExecPolicyAmendment | null, /** * Optional proposed network policy amendments (allow/deny host) for future requests. */ -proposedNetworkPolicyAmendments?: Array | null, -/** - * Ordered list of decisions the client may present for this prompt. - */ -availableDecisions?: Array | null, }; +proposedNetworkPolicyAmendments?: Array | null}; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionStatus.ts index c58b3cc7fa..c8d3bf8f39 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionStatus.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type CommandExecutionStatus = "inProgress" | "completed" | "failed" | "declined"; +export type CommandExecutionStatus = + | "inProgress" + | "completed" + | "failed" + | "declined"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigLayerSource.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigLayerSource.ts index b20c373bcb..ae75dcd7b2 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigLayerSource.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigLayerSource.ts @@ -3,14 +3,21 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AbsolutePathBuf } from "../AbsolutePathBuf"; -export type ConfigLayerSource = { "type": "mdm", domain: string, key: string, } | { "type": "system", -/** - * This is the path to the system config.toml file, though it is not - * guaranteed to exist. - */ -file: AbsolutePathBuf, } | { "type": "user", -/** - * This is the path to the user's config.toml file, though it is not - * guaranteed to exist. - */ -file: AbsolutePathBuf, } | { "type": "project", dotCodexFolder: AbsolutePathBuf, } | { "type": "sessionFlags" } | { "type": "legacyManagedConfigTomlFromFile", file: AbsolutePathBuf, } | { "type": "legacyManagedConfigTomlFromMdm" }; +export type ConfigLayerSource = + | { "type": "mdm", domain: string, key: string, } + | { "type": "system", + /** + * This is the path to the system config.toml file, though it is not + * guaranteed to exist. + */ + file: AbsolutePathBuf, } + | { "type": "user", + /** + * This is the path to the user's config.toml file, though it is not + * guaranteed to exist. + */ + file: AbsolutePathBuf, } + | { "type": "project", dotCodexFolder: AbsolutePathBuf, } + | { "type": "sessionFlags" } + | { "type": "legacyManagedConfigTomlFromFile", file: AbsolutePathBuf, } + | { "type": "legacyManagedConfigTomlFromMdm" }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/DynamicToolCallOutputContentItem.ts b/codex-rs/app-server-protocol/schema/typescript/v2/DynamicToolCallOutputContentItem.ts index 8f432109d1..fd56f86cef 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/DynamicToolCallOutputContentItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/DynamicToolCallOutputContentItem.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DynamicToolCallOutputContentItem = { "type": "inputText", text: string, } | { "type": "inputImage", imageUrl: string, }; +export type DynamicToolCallOutputContentItem = + | { "type": "inputText", text: string, } + | { "type": "inputImage", imageUrl: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/DynamicToolCallStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/DynamicToolCallStatus.ts index 04f44ec0a8..2b7e84e127 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/DynamicToolCallStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/DynamicToolCallStatus.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type DynamicToolCallStatus = "inProgress" | "completed" | "failed"; +export type DynamicToolCallStatus = + | "inProgress" + | "completed" + | "failed"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureStage.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureStage.ts index dbd206e05f..b72828d4ca 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureStage.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExperimentalFeatureStage.ts @@ -2,4 +2,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ExperimentalFeatureStage = "beta" | "underDevelopment" | "stable" | "deprecated" | "removed"; +export type ExperimentalFeatureStage = + | "beta" + | "underDevelopment" + | "stable" + | "deprecated" + | "removed"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItemType.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItemType.ts index c9bd160b1c..d45fa06dcf 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItemType.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ExternalAgentConfigMigrationItemType.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ExternalAgentConfigMigrationItemType = "AGENTS_MD" | "CONFIG" | "SKILLS" | "MCP_SERVER_CONFIG"; +export type ExternalAgentConfigMigrationItemType = + | "AGENTS_MD" + | "CONFIG" + | "SKILLS" + | "MCP_SERVER_CONFIG"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/FileChangeApprovalDecision.ts b/codex-rs/app-server-protocol/schema/typescript/v2/FileChangeApprovalDecision.ts index b74ba004b8..cdf7056044 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/FileChangeApprovalDecision.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/FileChangeApprovalDecision.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type FileChangeApprovalDecision = "accept" | "acceptForSession" | "decline" | "cancel"; +export type FileChangeApprovalDecision = + | "accept" + | "acceptForSession" + | "decline" + | "cancel"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/HazelnutScope.ts b/codex-rs/app-server-protocol/schema/typescript/v2/HazelnutScope.ts index e623f1860b..9418d29757 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/HazelnutScope.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/HazelnutScope.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HazelnutScope = "example" | "workspace-shared" | "all-shared" | "personal"; +export type HazelnutScope = + | "example" + | "workspace-shared" + | "all-shared" + | "personal"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/HookEventName.ts b/codex-rs/app-server-protocol/schema/typescript/v2/HookEventName.ts index d07429a926..f449a78718 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/HookEventName.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/HookEventName.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HookEventName = "sessionStart" | "stop"; +export type HookEventName = + | "sessionStart" + | "stop"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/HookExecutionMode.ts b/codex-rs/app-server-protocol/schema/typescript/v2/HookExecutionMode.ts index 61f98564ca..0987884774 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/HookExecutionMode.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/HookExecutionMode.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HookExecutionMode = "sync" | "async"; +export type HookExecutionMode = + | "sync" + | "async"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/HookHandlerType.ts b/codex-rs/app-server-protocol/schema/typescript/v2/HookHandlerType.ts index dc3f087bff..d154224c01 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/HookHandlerType.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/HookHandlerType.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HookHandlerType = "command" | "prompt" | "agent"; +export type HookHandlerType = + | "command" + | "prompt" + | "agent"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/HookOutputEntryKind.ts b/codex-rs/app-server-protocol/schema/typescript/v2/HookOutputEntryKind.ts index 090dfe3874..5b21a76ab0 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/HookOutputEntryKind.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/HookOutputEntryKind.ts @@ -2,4 +2,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HookOutputEntryKind = "warning" | "stop" | "feedback" | "context" | "error"; +export type HookOutputEntryKind = + | "warning" + | "stop" + | "feedback" + | "context" + | "error"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/HookRunStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/HookRunStatus.ts index ffca7e0e2c..a7c356e4a0 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/HookRunStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/HookRunStatus.ts @@ -2,4 +2,9 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HookRunStatus = "running" | "completed" | "failed" | "blocked" | "stopped"; +export type HookRunStatus = + | "running" + | "completed" + | "failed" + | "blocked" + | "stopped"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/HookScope.ts b/codex-rs/app-server-protocol/schema/typescript/v2/HookScope.ts index ff6f8bfee4..af63af00b2 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/HookScope.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/HookScope.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type HookScope = "thread" | "turn"; +export type HookScope = + | "thread" + | "turn"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountParams.ts index ef668f9c1a..c752adba56 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountParams.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountParams.ts @@ -2,20 +2,23 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type LoginAccountParams = { "type": "apiKey", apiKey: string, } | { "type": "chatgpt" } | { "type": "chatgptAuthTokens", -/** - * Access token (JWT) supplied by the client. - * This token is used for backend API requests and email extraction. - */ -accessToken: string, -/** - * Workspace/account identifier supplied by the client. - */ -chatgptAccountId: string, -/** - * Optional plan type supplied by the client. - * - * When `null`, Codex attempts to derive the plan type from access-token - * claims. If unavailable, the plan defaults to `unknown`. - */ -chatgptPlanType?: string | null, }; +export type LoginAccountParams = + | { "type": "apiKey", apiKey: string, } + | { "type": "chatgpt" } + | { "type": "chatgptAuthTokens", + /** + * Access token (JWT) supplied by the client. + * This token is used for backend API requests and email extraction. + */ + accessToken: string, + /** + * Workspace/account identifier supplied by the client. + */ + chatgptAccountId: string, + /** + * Optional plan type supplied by the client. + * + * When `null`, Codex attempts to derive the plan type from access-token + * claims. If unavailable, the plan defaults to `unknown`. + */ + chatgptPlanType?: string | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountResponse.ts b/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountResponse.ts index cd79f6c83f..a2191de353 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountResponse.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/LoginAccountResponse.ts @@ -2,8 +2,11 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type LoginAccountResponse = { "type": "apiKey", } | { "type": "chatgpt", loginId: string, -/** - * URL the client should open in a browser to initiate the OAuth flow. - */ -authUrl: string, } | { "type": "chatgptAuthTokens", }; +export type LoginAccountResponse = + | { "type": "apiKey", } + | { "type": "chatgpt", loginId: string, + /** + * URL the client should open in a browser to initiate the OAuth flow. + */ + authUrl: string, } + | { "type": "chatgptAuthTokens", }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpAuthStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpAuthStatus.ts index 6903a12321..dd34dabf9f 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpAuthStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpAuthStatus.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type McpAuthStatus = "unsupported" | "notLoggedIn" | "bearerToken" | "oAuth"; +export type McpAuthStatus = + | "unsupported" + | "notLoggedIn" + | "bearerToken" + | "oAuth"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationEnumSchema.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationEnumSchema.ts index e9155db4ad..2b2f7baad9 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationEnumSchema.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationEnumSchema.ts @@ -5,4 +5,7 @@ import type { McpElicitationLegacyTitledEnumSchema } from "./McpElicitationLegac import type { McpElicitationMultiSelectEnumSchema } from "./McpElicitationMultiSelectEnumSchema"; import type { McpElicitationSingleSelectEnumSchema } from "./McpElicitationSingleSelectEnumSchema"; -export type McpElicitationEnumSchema = McpElicitationSingleSelectEnumSchema | McpElicitationMultiSelectEnumSchema | McpElicitationLegacyTitledEnumSchema; +export type McpElicitationEnumSchema = + | McpElicitationSingleSelectEnumSchema + | McpElicitationMultiSelectEnumSchema + | McpElicitationLegacyTitledEnumSchema; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationMultiSelectEnumSchema.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationMultiSelectEnumSchema.ts index 48eb25e172..f99a19bb9c 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationMultiSelectEnumSchema.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationMultiSelectEnumSchema.ts @@ -4,4 +4,6 @@ import type { McpElicitationTitledMultiSelectEnumSchema } from "./McpElicitationTitledMultiSelectEnumSchema"; import type { McpElicitationUntitledMultiSelectEnumSchema } from "./McpElicitationUntitledMultiSelectEnumSchema"; -export type McpElicitationMultiSelectEnumSchema = McpElicitationUntitledMultiSelectEnumSchema | McpElicitationTitledMultiSelectEnumSchema; +export type McpElicitationMultiSelectEnumSchema = + | McpElicitationUntitledMultiSelectEnumSchema + | McpElicitationTitledMultiSelectEnumSchema; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationNumberType.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationNumberType.ts index 96a9ded760..1c2477408c 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationNumberType.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationNumberType.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type McpElicitationNumberType = "number" | "integer"; +export type McpElicitationNumberType = + | "number" + | "integer"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationPrimitiveSchema.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationPrimitiveSchema.ts index 2828ae5895..a8b6668a74 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationPrimitiveSchema.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationPrimitiveSchema.ts @@ -6,4 +6,8 @@ import type { McpElicitationEnumSchema } from "./McpElicitationEnumSchema"; import type { McpElicitationNumberSchema } from "./McpElicitationNumberSchema"; import type { McpElicitationStringSchema } from "./McpElicitationStringSchema"; -export type McpElicitationPrimitiveSchema = McpElicitationEnumSchema | McpElicitationStringSchema | McpElicitationNumberSchema | McpElicitationBooleanSchema; +export type McpElicitationPrimitiveSchema = + | McpElicitationEnumSchema + | McpElicitationStringSchema + | McpElicitationNumberSchema + | McpElicitationBooleanSchema; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationSingleSelectEnumSchema.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationSingleSelectEnumSchema.ts index 2ba7dadb12..3d1ce0112f 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationSingleSelectEnumSchema.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationSingleSelectEnumSchema.ts @@ -4,4 +4,6 @@ import type { McpElicitationTitledSingleSelectEnumSchema } from "./McpElicitationTitledSingleSelectEnumSchema"; import type { McpElicitationUntitledSingleSelectEnumSchema } from "./McpElicitationUntitledSingleSelectEnumSchema"; -export type McpElicitationSingleSelectEnumSchema = McpElicitationUntitledSingleSelectEnumSchema | McpElicitationTitledSingleSelectEnumSchema; +export type McpElicitationSingleSelectEnumSchema = + | McpElicitationUntitledSingleSelectEnumSchema + | McpElicitationTitledSingleSelectEnumSchema; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationStringFormat.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationStringFormat.ts index 9891d4c7ca..dedf87bf4b 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationStringFormat.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpElicitationStringFormat.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type McpElicitationStringFormat = "email" | "uri" | "date" | "date-time"; +export type McpElicitationStringFormat = + | "email" + | "uri" + | "date" + | "date-time"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationAction.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationAction.ts index 7be134c015..32af7b23a7 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationAction.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpServerElicitationAction.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type McpServerElicitationAction = "accept" | "decline" | "cancel"; +export type McpServerElicitationAction = + | "accept" + | "decline" + | "cancel"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/McpToolCallStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/McpToolCallStatus.ts index f46bca07e8..40856835b9 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/McpToolCallStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/McpToolCallStatus.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type McpToolCallStatus = "inProgress" | "completed" | "failed"; +export type McpToolCallStatus = + | "inProgress" + | "completed" + | "failed"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/MergeStrategy.ts b/codex-rs/app-server-protocol/schema/typescript/v2/MergeStrategy.ts index 098677f289..2cd3ccc508 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/MergeStrategy.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/MergeStrategy.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type MergeStrategy = "replace" | "upsert"; +export type MergeStrategy = + | "replace" + | "upsert"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/NetworkAccess.ts b/codex-rs/app-server-protocol/schema/typescript/v2/NetworkAccess.ts index 7b697b2314..dd3b011b21 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/NetworkAccess.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/NetworkAccess.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type NetworkAccess = "restricted" | "enabled"; +export type NetworkAccess = + | "restricted" + | "enabled"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/NetworkApprovalProtocol.ts b/codex-rs/app-server-protocol/schema/typescript/v2/NetworkApprovalProtocol.ts index 9dd4066fd1..c1f31104fd 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/NetworkApprovalProtocol.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/NetworkApprovalProtocol.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type NetworkApprovalProtocol = "http" | "https" | "socks5Tcp" | "socks5Udp"; +export type NetworkApprovalProtocol = + | "http" + | "https" + | "socks5Tcp" + | "socks5Udp"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/NetworkPolicyRuleAction.ts b/codex-rs/app-server-protocol/schema/typescript/v2/NetworkPolicyRuleAction.ts index 55ec70032a..eb47a97137 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/NetworkPolicyRuleAction.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/NetworkPolicyRuleAction.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type NetworkPolicyRuleAction = "allow" | "deny"; +export type NetworkPolicyRuleAction = + | "allow" + | "deny"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PatchApplyStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PatchApplyStatus.ts index 620be789e4..9d85b29de6 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/PatchApplyStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/PatchApplyStatus.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PatchApplyStatus = "inProgress" | "completed" | "failed" | "declined"; +export type PatchApplyStatus = + | "inProgress" + | "completed" + | "failed" + | "declined"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PatchChangeKind.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PatchChangeKind.ts index 23dda6cb12..4f87a2c550 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/PatchChangeKind.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/PatchChangeKind.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PatchChangeKind = { "type": "add" } | { "type": "delete" } | { "type": "update", move_path: string | null, }; +export type PatchChangeKind = + | { "type": "add" } + | { "type": "delete" } + | { "type": "update", move_path: string | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PermissionGrantScope.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PermissionGrantScope.ts index 8ca127ebcb..c6d4883e5b 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/PermissionGrantScope.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/PermissionGrantScope.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PermissionGrantScope = "turn" | "session"; +export type PermissionGrantScope = + | "turn" + | "session"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PluginAuthPolicy.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PluginAuthPolicy.ts index 5b90e9c313..962442b0fa 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/PluginAuthPolicy.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/PluginAuthPolicy.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PluginAuthPolicy = "ON_INSTALL" | "ON_USE"; +export type PluginAuthPolicy = + | "ON_INSTALL" + | "ON_USE"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/PluginInstallPolicy.ts b/codex-rs/app-server-protocol/schema/typescript/v2/PluginInstallPolicy.ts index d624f38ea3..d704dc1f3f 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/PluginInstallPolicy.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/PluginInstallPolicy.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PluginInstallPolicy = "NOT_AVAILABLE" | "AVAILABLE" | "INSTALLED_BY_DEFAULT"; +export type PluginInstallPolicy = + | "NOT_AVAILABLE" + | "AVAILABLE" + | "INSTALLED_BY_DEFAULT"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ProductSurface.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ProductSurface.ts index 9998c727a8..ff4ba39ccd 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ProductSurface.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ProductSurface.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ProductSurface = "chatgpt" | "codex" | "api" | "atlas"; +export type ProductSurface = + | "chatgpt" + | "codex" + | "api" + | "atlas"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ReadOnlyAccess.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ReadOnlyAccess.ts index 78fa04ff37..ab0cc1b24e 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ReadOnlyAccess.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ReadOnlyAccess.ts @@ -3,4 +3,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AbsolutePathBuf } from "../AbsolutePathBuf"; -export type ReadOnlyAccess = { "type": "restricted", includePlatformDefaults: boolean, readableRoots: Array, } | { "type": "fullAccess" }; +export type ReadOnlyAccess = + | { "type": "restricted", includePlatformDefaults: boolean, readableRoots: Array, } + | { "type": "fullAccess" }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewDelivery.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewDelivery.ts index 8fbccd1050..834528f653 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewDelivery.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewDelivery.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ReviewDelivery = "inline" | "detached"; +export type ReviewDelivery = + | "inline" + | "detached"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewTarget.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewTarget.ts index a79f1e993c..9fef8a9b2c 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ReviewTarget.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ReviewTarget.ts @@ -2,8 +2,12 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ReviewTarget = { "type": "uncommittedChanges" } | { "type": "baseBranch", branch: string, } | { "type": "commit", sha: string, -/** - * Optional human-readable label (e.g., commit subject) for UIs. - */ -title: string | null, } | { "type": "custom", instructions: string, }; +export type ReviewTarget = + | { "type": "uncommittedChanges" } + | { "type": "baseBranch", branch: string, } + | { "type": "commit", sha: string, + /** + * Optional human-readable label (e.g., commit subject) for UIs. + */ + title: string | null, } + | { "type": "custom", instructions: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/SandboxMode.ts b/codex-rs/app-server-protocol/schema/typescript/v2/SandboxMode.ts index b8cf4326b9..2ae352beb1 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/SandboxMode.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/SandboxMode.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type SandboxMode = "read-only" | "workspace-write" | "danger-full-access"; +export type SandboxMode = + | "read-only" + | "workspace-write" + | "danger-full-access"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/SandboxPolicy.ts b/codex-rs/app-server-protocol/schema/typescript/v2/SandboxPolicy.ts index c6780648cf..c4a7b72a62 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/SandboxPolicy.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/SandboxPolicy.ts @@ -5,4 +5,8 @@ import type { AbsolutePathBuf } from "../AbsolutePathBuf"; import type { NetworkAccess } from "./NetworkAccess"; import type { ReadOnlyAccess } from "./ReadOnlyAccess"; -export type SandboxPolicy = { "type": "dangerFullAccess" } | { "type": "readOnly", access: ReadOnlyAccess, networkAccess: boolean, } | { "type": "externalSandbox", networkAccess: NetworkAccess, } | { "type": "workspaceWrite", writableRoots: Array, readOnlyAccess: ReadOnlyAccess, networkAccess: boolean, excludeTmpdirEnvVar: boolean, excludeSlashTmp: boolean, }; +export type SandboxPolicy = + | { "type": "dangerFullAccess" } + | { "type": "readOnly", access: ReadOnlyAccess, networkAccess: boolean, } + | { "type": "externalSandbox", networkAccess: NetworkAccess, } + | { "type": "workspaceWrite", writableRoots: Array, readOnlyAccess: ReadOnlyAccess, networkAccess: boolean, excludeTmpdirEnvVar: boolean, excludeSlashTmp: boolean, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/SessionSource.ts b/codex-rs/app-server-protocol/schema/typescript/v2/SessionSource.ts index b35b421fcd..0ae478d3b2 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/SessionSource.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/SessionSource.ts @@ -3,4 +3,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { SubAgentSource } from "../SubAgentSource"; -export type SessionSource = "cli" | "vscode" | "exec" | "appServer" | { "subAgent": SubAgentSource } | "unknown"; +export type SessionSource = + | "cli" + | "vscode" + | "exec" + | "appServer" + | { "subAgent": SubAgentSource } + | "unknown"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/SkillScope.ts b/codex-rs/app-server-protocol/schema/typescript/v2/SkillScope.ts index 997006f5b8..a13818712c 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/SkillScope.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/SkillScope.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type SkillScope = "user" | "repo" | "system" | "admin"; +export type SkillScope = + | "user" + | "repo" + | "system" + | "admin"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadActiveFlag.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadActiveFlag.ts index 73c875a00d..f5a891c637 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadActiveFlag.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadActiveFlag.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ThreadActiveFlag = "waitingOnApproval" | "waitingOnUserInput"; +export type ThreadActiveFlag = + | "waitingOnApproval" + | "waitingOnUserInput"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadForkParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadForkParams.ts index 43b0b36ad8..0d922ee545 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadForkParams.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadForkParams.ts @@ -16,14 +16,6 @@ import type { SandboxMode } from "./SandboxMode"; * Prefer using thread_id whenever possible. */ export type ThreadForkParams = {threadId: string, /** - * [UNSTABLE] Specify the rollout path to fork from. - * If specified, the thread_id param will be ignored. - */ -path?: string | null, /** * Configuration overrides for the forked thread, if any. */ -model?: string | null, modelProvider?: string | null, serviceTier?: ServiceTier | null | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, ephemeral?: boolean, /** - * If true, persist additional rollout EventMsg variants required to - * reconstruct a richer thread history on subsequent resume/fork/read. - */ -persistExtendedHistory: boolean}; +model?: string | null, modelProvider?: string | null, serviceTier?: ServiceTier | null | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, ephemeral?: boolean}; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts index bcc81c0251..3a63c6b1c1 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts @@ -19,79 +19,94 @@ import type { PatchApplyStatus } from "./PatchApplyStatus"; import type { UserInput } from "./UserInput"; import type { WebSearchAction } from "./WebSearchAction"; -export type ThreadItem = { "type": "userMessage", id: string, content: Array, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array, content: Array, } | { "type": "commandExecution", id: string, -/** - * The command to be executed. - */ -command: string, -/** - * The command's working directory. - */ -cwd: string, -/** - * Identifier for the underlying PTY process (when available). - */ -processId: string | null, status: CommandExecutionStatus, -/** - * A best-effort parsing of the command to understand the action(s) it will perform. - * This returns a list of CommandAction objects because a single shell command may - * be composed of many commands piped together. - */ -commandActions: Array, -/** - * The command's output, aggregated from stdout and stderr. - */ -aggregatedOutput: string | null, -/** - * The command's exit code. - */ -exitCode: number | null, -/** - * The duration of the command execution in milliseconds. - */ -durationMs: number | null, } | { "type": "fileChange", id: string, changes: Array, status: PatchApplyStatus, } | { "type": "mcpToolCall", id: string, server: string, tool: string, status: McpToolCallStatus, arguments: JsonValue, result: McpToolCallResult | null, error: McpToolCallError | null, -/** - * The duration of the MCP tool call in milliseconds. - */ -durationMs: number | null, } | { "type": "dynamicToolCall", id: string, tool: string, arguments: JsonValue, status: DynamicToolCallStatus, contentItems: Array | null, success: boolean | null, -/** - * The duration of the dynamic tool call in milliseconds. - */ -durationMs: number | null, } | { "type": "collabAgentToolCall", -/** - * Unique identifier for this collab tool call. - */ -id: string, -/** - * Name of the collab tool that was invoked. - */ -tool: CollabAgentTool, -/** - * Current status of the collab tool call. - */ -status: CollabAgentToolCallStatus, -/** - * Thread ID of the agent issuing the collab request. - */ -senderThreadId: string, -/** - * Thread ID of the receiving agent, when applicable. In case of spawn operation, - * this corresponds to the newly spawned agent. - */ -receiverThreadIds: Array, -/** - * Prompt text sent as part of the collab tool call, when available. - */ -prompt: string | null, -/** - * Model requested for the spawned agent, when applicable. - */ -model: string | null, -/** - * Reasoning effort requested for the spawned agent, when applicable. - */ -reasoningEffort: ReasoningEffort | null, -/** - * Last known status of the target agents, when available. - */ -agentsStates: { [key in string]?: CollabAgentState }, } | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } | { "type": "imageView", id: string, path: string, } | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, } | { "type": "enteredReviewMode", id: string, review: string, } | { "type": "exitedReviewMode", id: string, review: string, } | { "type": "contextCompaction", id: string, }; +export type ThreadItem = + | { "type": "userMessage", id: string, content: Array, } + | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, } + | { "type": "plan", id: string, text: string, } + | { "type": "reasoning", id: string, summary: Array, content: Array, } + | { "type": "commandExecution", id: string, + /** + * The command to be executed. + */ + command: string, + /** + * The command's working directory. + */ + cwd: string, + /** + * Identifier for the underlying PTY process (when available). + */ + processId: string | null, status: CommandExecutionStatus, + /** + * A best-effort parsing of the command to understand the action(s) it will perform. + * This returns a list of CommandAction objects because a single shell command may + * be composed of many commands piped together. + */ + commandActions: Array, + /** + * The command's output, aggregated from stdout and stderr. + */ + aggregatedOutput: string | null, + /** + * The command's exit code. + */ + exitCode: number | null, + /** + * The duration of the command execution in milliseconds. + */ + durationMs: number | null, } + | { "type": "fileChange", id: string, changes: Array, status: PatchApplyStatus, } + | { "type": "mcpToolCall", id: string, server: string, tool: string, status: McpToolCallStatus, arguments: JsonValue, result: McpToolCallResult | null, error: McpToolCallError | null, + /** + * The duration of the MCP tool call in milliseconds. + */ + durationMs: number | null, } + | { "type": "dynamicToolCall", id: string, tool: string, arguments: JsonValue, status: DynamicToolCallStatus, contentItems: Array | null, success: boolean | null, + /** + * The duration of the dynamic tool call in milliseconds. + */ + durationMs: number | null, } + | { "type": "collabAgentToolCall", + /** + * Unique identifier for this collab tool call. + */ + id: string, + /** + * Name of the collab tool that was invoked. + */ + tool: CollabAgentTool, + /** + * Current status of the collab tool call. + */ + status: CollabAgentToolCallStatus, + /** + * Thread ID of the agent issuing the collab request. + */ + senderThreadId: string, + /** + * Thread ID of the receiving agent, when applicable. In case of spawn operation, + * this corresponds to the newly spawned agent. + */ + receiverThreadIds: Array, + /** + * Prompt text sent as part of the collab tool call, when available. + */ + prompt: string | null, + /** + * Model requested for the spawned agent, when applicable. + */ + model: string | null, + /** + * Reasoning effort requested for the spawned agent, when applicable. + */ + reasoningEffort: ReasoningEffort | null, + /** + * Last known status of the target agents, when available. + */ + agentsStates: { [key in string]?: CollabAgentState }, } + | { "type": "webSearch", id: string, query: string, action: WebSearchAction | null, } + | { "type": "imageView", id: string, path: string, } + | { "type": "imageGeneration", id: string, status: string, revisedPrompt: string | null, result: string, } + | { "type": "enteredReviewMode", id: string, review: string, } + | { "type": "exitedReviewMode", id: string, review: string, } + | { "type": "contextCompaction", id: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadResumeParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadResumeParams.ts index cc12020bd0..05aa00d964 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadResumeParams.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadResumeParams.ts @@ -2,7 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Personality } from "../Personality"; -import type { ResponseItem } from "../ResponseItem"; import type { ServiceTier } from "../ServiceTier"; import type { JsonValue } from "../serde_json/JsonValue"; import type { AskForApproval } from "./AskForApproval"; @@ -20,19 +19,6 @@ import type { SandboxMode } from "./SandboxMode"; * Prefer using thread_id whenever possible. */ export type ThreadResumeParams = {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, /** - * [UNSTABLE] Specify the rollout path to resume from. - * If specified, the thread_id param will be ignored. - */ -path?: string | null, /** * Configuration overrides for the resumed thread, if any. */ -model?: string | null, modelProvider?: string | null, serviceTier?: ServiceTier | null | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, /** - * If true, persist additional rollout EventMsg variants required to - * reconstruct a richer thread history on subsequent resume/fork/read. - */ -persistExtendedHistory: boolean}; +model?: string | null, modelProvider?: string | null, serviceTier?: ServiceTier | null | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null}; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadSortKey.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadSortKey.ts index dbf1b6c40f..ec821f8f60 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadSortKey.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadSortKey.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ThreadSortKey = "created_at" | "updated_at"; +export type ThreadSortKey = + | "created_at" + | "updated_at"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadSourceKind.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadSourceKind.ts index 0a464e3d8d..39b188796d 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadSourceKind.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadSourceKind.ts @@ -2,4 +2,14 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ThreadSourceKind = "cli" | "vscode" | "exec" | "appServer" | "subAgent" | "subAgentReview" | "subAgentCompact" | "subAgentThreadSpawn" | "subAgentOther" | "unknown"; +export type ThreadSourceKind = + | "cli" + | "vscode" + | "exec" + | "appServer" + | "subAgent" + | "subAgentReview" + | "subAgentCompact" + | "subAgentThreadSpawn" + | "subAgentOther" + | "unknown"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStartParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStartParams.ts index db73763e40..e47e8335fd 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStartParams.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStartParams.ts @@ -7,12 +7,4 @@ import type { JsonValue } from "../serde_json/JsonValue"; import type { AskForApproval } from "./AskForApproval"; import type { SandboxMode } from "./SandboxMode"; -export type ThreadStartParams = {model?: string | null, modelProvider?: string | null, serviceTier?: ServiceTier | null | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, serviceName?: string | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, ephemeral?: boolean | 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. - */ -persistExtendedHistory: boolean}; +export type ThreadStartParams = {model?: string | null, modelProvider?: string | null, serviceTier?: ServiceTier | null | null, cwd?: string | null, approvalPolicy?: AskForApproval | null, sandbox?: SandboxMode | null, config?: { [key in string]?: JsonValue } | null, serviceName?: string | null, baseInstructions?: string | null, developerInstructions?: string | null, personality?: Personality | null, ephemeral?: boolean | null}; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStatus.ts index 7cc6c8a6aa..812cb53225 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadStatus.ts @@ -3,4 +3,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { ThreadActiveFlag } from "./ThreadActiveFlag"; -export type ThreadStatus = { "type": "notLoaded" } | { "type": "idle" } | { "type": "systemError" } | { "type": "active", activeFlags: Array, }; +export type ThreadStatus = + | { "type": "notLoaded" } + | { "type": "idle" } + | { "type": "systemError" } + | { "type": "active", activeFlags: Array, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadUnsubscribeStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadUnsubscribeStatus.ts index 2970598dc1..d2de7bd6db 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadUnsubscribeStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadUnsubscribeStatus.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type ThreadUnsubscribeStatus = "notLoaded" | "notSubscribed" | "unsubscribed"; +export type ThreadUnsubscribeStatus = + | "notLoaded" + | "notSubscribed" + | "unsubscribed"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/TurnPlanStepStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/TurnPlanStepStatus.ts index f6733a6885..7f728b67c1 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/TurnPlanStepStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/TurnPlanStepStatus.ts @@ -2,4 +2,7 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type TurnPlanStepStatus = "pending" | "inProgress" | "completed"; +export type TurnPlanStepStatus = + | "pending" + | "inProgress" + | "completed"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/TurnStartParams.ts b/codex-rs/app-server-protocol/schema/typescript/v2/TurnStartParams.ts index b8bf7ea69d..8fbba6a5c5 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/TurnStartParams.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/TurnStartParams.ts @@ -1,7 +1,6 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CollaborationMode } from "../CollaborationMode"; import type { Personality } from "../Personality"; import type { ReasoningEffort } from "../ReasoningEffort"; import type { ReasoningSummary } from "../ReasoningSummary"; @@ -39,11 +38,4 @@ personality?: Personality | null, /** * Optional JSON Schema used to constrain the final assistant message for * this turn. */ -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}; +outputSchema?: JsonValue | null}; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/TurnStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/TurnStatus.ts index 476922edc2..adb72942f8 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/TurnStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/TurnStatus.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type TurnStatus = "completed" | "interrupted" | "failed" | "inProgress"; +export type TurnStatus = + | "completed" + | "interrupted" + | "failed" + | "inProgress"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/UserInput.ts b/codex-rs/app-server-protocol/schema/typescript/v2/UserInput.ts index 65196fe5d9..6c247fb830 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/UserInput.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/UserInput.ts @@ -3,8 +3,13 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { TextElement } from "./TextElement"; -export type UserInput = { "type": "text", text: string, -/** - * UI-defined spans within `text` used to render or persist special elements. - */ -text_elements: Array, } | { "type": "image", url: string, } | { "type": "localImage", path: string, } | { "type": "skill", name: string, path: string, } | { "type": "mention", name: string, path: string, }; +export type UserInput = + | { "type": "text", text: string, + /** + * UI-defined spans within `text` used to render or persist special elements. + */ + text_elements: Array, } + | { "type": "image", url: string, } + | { "type": "localImage", path: string, } + | { "type": "skill", name: string, path: string, } + | { "type": "mention", name: string, path: string, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/WebSearchAction.ts b/codex-rs/app-server-protocol/schema/typescript/v2/WebSearchAction.ts index 309bff4544..8bfd52c289 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/WebSearchAction.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/WebSearchAction.ts @@ -2,4 +2,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type WebSearchAction = { "type": "search", query: string | null, queries: Array | null, } | { "type": "openPage", url: string | null, } | { "type": "findInPage", url: string | null, pattern: string | null, } | { "type": "other" }; +export type WebSearchAction = + | { "type": "search", query: string | null, queries: Array | null, } + | { "type": "openPage", url: string | null, } + | { "type": "findInPage", url: string | null, pattern: string | null, } + | { "type": "other" }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/WindowsSandboxSetupMode.ts b/codex-rs/app-server-protocol/schema/typescript/v2/WindowsSandboxSetupMode.ts index a74bea4240..15d989f17b 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/WindowsSandboxSetupMode.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/WindowsSandboxSetupMode.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type WindowsSandboxSetupMode = "elevated" | "unelevated"; +export type WindowsSandboxSetupMode = + | "elevated" + | "unelevated"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/WriteStatus.ts b/codex-rs/app-server-protocol/schema/typescript/v2/WriteStatus.ts index 068eb3bdb9..377262837b 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/WriteStatus.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/WriteStatus.ts @@ -2,4 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type WriteStatus = "ok" | "okOverridden"; +export type WriteStatus = + | "ok" + | "okOverridden"; diff --git a/codex-rs/app-server-protocol/src/export.rs b/codex-rs/app-server-protocol/src/export.rs index 35c4eb7763..f337a736c2 100644 --- a/codex-rs/app-server-protocol/src/export.rs +++ b/codex-rs/app-server-protocol/src/export.rs @@ -122,6 +122,8 @@ pub fn generate_ts_with_options( filter_experimental_ts(out_dir)?; } + normalize_generated_ts(out_dir)?; + if options.generate_indices { generate_index_ts(out_dir)?; generate_index_ts(&v2_out_dir)?; @@ -281,9 +283,32 @@ pub(crate) fn filter_experimental_ts_tree(tree: &mut BTreeMap) } remove_generated_type_entries(tree, &experimental_method_types, "ts"); + normalize_generated_ts_tree(tree); Ok(()) } +fn normalize_generated_ts(out_dir: &Path) -> Result<()> { + for path in ts_files_in_recursive(out_dir)? { + let content = fs::read_to_string(&path) + .with_context(|| format!("Failed to read {}", path.display()))?; + let normalized = normalize_union_type_alias_contents(&content); + if normalized != content { + fs::write(&path, normalized) + .with_context(|| format!("Failed to write {}", path.display()))?; + } + } + Ok(()) +} + +pub(crate) fn normalize_generated_ts_tree(tree: &mut BTreeMap) { + for (path, content) in tree.iter_mut() { + if path.extension().is_some_and(|ext| ext == "ts") { + let normalized = normalize_union_type_alias_contents(content); + *content = normalized; + } + } +} + /// Removes union arms from `ClientRequest.ts` for methods marked experimental. fn filter_client_request_ts(out_dir: &Path, experimental_methods: &[&str]) -> Result<()> { let path = out_dir.join("ClientRequest.ts"); @@ -323,6 +348,38 @@ fn filter_client_request_ts_contents(mut content: String, experimental_methods: prune_unused_type_imports(content, &import_usage_scope) } +fn normalize_union_type_alias_contents(content: &str) -> String { + let Some((prefix, body, suffix)) = split_type_alias(content) else { + return content.to_string(); + }; + let arms = split_top_level(&body, '|'); + if arms.len() <= 1 { + return content.to_string(); + } + + let formatted_body = arms + .iter() + .map(|arm| format_union_arm(arm)) + .collect::>() + .join("\n"); + format!("{prefix}\n{formatted_body}{suffix}") +} + +fn format_union_arm(arm: &str) -> String { + let mut lines = arm.trim().lines(); + let Some(first) = lines.next() else { + return " |".to_string(); + }; + + let mut formatted = format!(" | {}", first.trim()); + for line in lines { + formatted.push('\n'); + formatted.push_str(" "); + formatted.push_str(line.trim_end()); + } + formatted +} + /// Removes experimental properties from generated TypeScript type files. fn filter_experimental_type_fields_ts( out_dir: &Path, @@ -732,11 +789,12 @@ fn find_top_level_brace_span(input: &str) -> Option<(usize, usize)> { let mut state = ScanState::default(); let mut open_index = None; for (index, ch) in input.char_indices() { - if !state.in_string() && ch == '{' && state.depth.is_top_level() { + if !state.in_string() && !state.in_comment() && ch == '{' && state.depth.is_top_level() { open_index = Some(index); } state.observe(ch); if !state.in_string() + && !state.in_comment() && ch == '}' && state.depth.is_top_level() && let Some(open) = open_index @@ -756,7 +814,11 @@ fn split_top_level_multi(input: &str, delimiters: &[char]) -> Vec { let mut start = 0usize; let mut parts = Vec::new(); for (index, ch) in input.char_indices() { - if !state.in_string() && state.depth.is_top_level() && delimiters.contains(&ch) { + if !state.in_string() + && !state.in_comment() + && state.depth.is_top_level() + && delimiters.contains(&ch) + { let part = input[start..index].trim(); if !part.is_empty() { parts.push(part.to_string()); @@ -878,10 +940,30 @@ struct ScanState { depth: Depth, string_delim: Option, escape: bool, + pending_slash: bool, + comment: CommentState, + pending_block_comment_star: bool, } impl ScanState { fn observe(&mut self, ch: char) { + if self.comment == CommentState::Line { + if ch == '\n' { + self.comment = CommentState::None; + } + return; + } + + if self.comment == CommentState::Block { + if self.pending_block_comment_star && ch == '/' { + self.comment = CommentState::None; + self.pending_block_comment_star = false; + return; + } + self.pending_block_comment_star = ch == '*'; + return; + } + if let Some(delim) = self.string_delim { if self.escape { self.escape = false; @@ -897,7 +979,29 @@ impl ScanState { return; } + if self.pending_slash { + match ch { + '/' => { + self.comment = CommentState::Line; + self.pending_slash = false; + return; + } + '*' => { + self.comment = CommentState::Block; + self.pending_block_comment_star = false; + self.pending_slash = false; + return; + } + _ => { + self.pending_slash = false; + } + } + } + match ch { + '/' => { + self.pending_slash = true; + } '"' | '\'' => { self.string_delim = Some(ch); } @@ -920,6 +1024,18 @@ impl ScanState { fn in_string(&self) -> bool { self.string_delim.is_some() } + + fn in_comment(&self) -> bool { + self.comment != CommentState::None + } +} + +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +enum CommentState { + #[default] + None, + Line, + Block, } #[derive(Default)] @@ -2299,6 +2415,57 @@ mod tests { Ok(()) } + #[test] + fn normalize_union_type_alias_contents_rewrites_tagged_union_onto_separate_lines() { + let input = r#"export type ClientRequest = { "method": "initialize", id: RequestId, params: InitializeParams, } | { "method": "thread/start", id: RequestId, params: ThreadStartParams, }; +"# + .to_string(); + + let expected = r#"export type ClientRequest = + | { "method": "initialize", id: RequestId, params: InitializeParams, } + | { "method": "thread/start", id: RequestId, params: ThreadStartParams, }; +"#; + + assert_eq!(normalize_union_type_alias_contents(&input), expected); + } + + #[test] + fn normalize_union_type_alias_contents_rewrites_literal_unions_onto_separate_lines() { + let input = r#"export type AuthMode = "apikey" | "chatgpt" | "chatgptAuthTokens"; +"# + .to_string(); + + let expected = r#"export type AuthMode = + | "apikey" + | "chatgpt" + | "chatgptAuthTokens"; +"#; + + assert_eq!(normalize_union_type_alias_contents(&input), expected); + } + + #[test] + fn normalize_union_type_alias_contents_keeps_commented_multiline_object_arms_split() { + let input = r#"export type ThreadItem = { "type": "commandExecution", +/** + * Example with Array and { braces } inside docs. + */ +command: string, } | { "type": "fileChange", status: string, }; +"# + .to_string(); + + let expected = r#"export type ThreadItem = + | { "type": "commandExecution", + /** + * Example with Array and { braces } inside docs. + */ + command: string, } + | { "type": "fileChange", status: string, }; +"#; + + assert_eq!(normalize_union_type_alias_contents(&input), expected); + } + #[test] fn stable_schema_filter_removes_mock_thread_start_field() -> Result<()> { let output_dir = std::env::temp_dir().join(format!("codex_schema_{}", Uuid::now_v7()));