Open History to see the last commit
1// This file is generated by the effect-codex-app-server package. Do not edit manually.
2// Upstream protocol ref: 678157acaa819d5510adfe359abb5d0392cfe461
3
4import * as CodexSchema from "./schema.gen.ts";
5
6export const CLIENT_REQUEST_METHODS = {
7 initialize: "initialize",
8 "thread/start": "thread/start",
9 "thread/resume": "thread/resume",
10 "thread/fork": "thread/fork",
11 "thread/archive": "thread/archive",
12 "thread/delete": "thread/delete",
13 "thread/unsubscribe": "thread/unsubscribe",
14 "thread/name/set": "thread/name/set",
15 "thread/goal/set": "thread/goal/set",
16 "thread/goal/get": "thread/goal/get",
17 "thread/goal/clear": "thread/goal/clear",
18 "thread/metadata/update": "thread/metadata/update",
19 "thread/unarchive": "thread/unarchive",
20 "thread/compact/start": "thread/compact/start",
21 "thread/shellCommand": "thread/shellCommand",
22 "thread/approveGuardianDeniedAction": "thread/approveGuardianDeniedAction",
23 "thread/rollback": "thread/rollback",
24 "thread/list": "thread/list",
25 "thread/loaded/list": "thread/loaded/list",
26 "thread/read": "thread/read",
27 "thread/inject_items": "thread/inject_items",
28 "skills/list": "skills/list",
29 "skills/extraRoots/set": "skills/extraRoots/set",
30 "hooks/list": "hooks/list",
31 "marketplace/add": "marketplace/add",
32 "marketplace/remove": "marketplace/remove",
33 "marketplace/upgrade": "marketplace/upgrade",
34 "plugin/list": "plugin/list",
35 "plugin/installed": "plugin/installed",
36 "plugin/read": "plugin/read",
37 "plugin/skill/read": "plugin/skill/read",
38 "plugin/share/save": "plugin/share/save",
39 "plugin/share/updateTargets": "plugin/share/updateTargets",
40 "plugin/share/list": "plugin/share/list",
41 "plugin/share/checkout": "plugin/share/checkout",
42 "plugin/share/delete": "plugin/share/delete",
43 "app/read": "app/read",
44 "app/list": "app/list",
45 "app/installed": "app/installed",
46 "fs/readFile": "fs/readFile",
47 "fs/writeFile": "fs/writeFile",
48 "fs/createDirectory": "fs/createDirectory",
49 "fs/getMetadata": "fs/getMetadata",
50 "fs/readDirectory": "fs/readDirectory",
51 "fs/remove": "fs/remove",
52 "fs/copy": "fs/copy",
53 "fs/watch": "fs/watch",
54 "fs/unwatch": "fs/unwatch",
55 "skills/config/write": "skills/config/write",
56 "plugin/install": "plugin/install",
57 "plugin/uninstall": "plugin/uninstall",
58 "turn/start": "turn/start",
59 "turn/steer": "turn/steer",
60 "turn/interrupt": "turn/interrupt",
61 "review/start": "review/start",
62 "model/list": "model/list",
63 "modelProvider/capabilities/read": "modelProvider/capabilities/read",
64 "experimentalFeature/list": "experimentalFeature/list",
65 "permissionProfile/list": "permissionProfile/list",
66 "experimentalFeature/enablement/set": "experimentalFeature/enablement/set",
67 "mcpServer/oauth/login": "mcpServer/oauth/login",
68 "config/mcpServer/reload": "config/mcpServer/reload",
69 "mcpServerStatus/list": "mcpServerStatus/list",
70 "mcpServer/resource/read": "mcpServer/resource/read",
71 "mcpServer/tool/call": "mcpServer/tool/call",
72 "windowsSandbox/setupStart": "windowsSandbox/setupStart",
73 "windowsSandbox/readiness": "windowsSandbox/readiness",
74 "account/login/start": "account/login/start",
75 "account/login/cancel": "account/login/cancel",
76 "account/logout": "account/logout",
77 "account/rateLimits/read": "account/rateLimits/read",
78 "account/rateLimitResetCredit/consume": "account/rateLimitResetCredit/consume",
79 "account/usage/read": "account/usage/read",
80 "account/workspaceMessages/read": "account/workspaceMessages/read",
81 "account/sendAddCreditsNudgeEmail": "account/sendAddCreditsNudgeEmail",
82 "feedback/upload": "feedback/upload",
83 "command/exec": "command/exec",
84 "command/exec/write": "command/exec/write",
85 "command/exec/terminate": "command/exec/terminate",
86 "command/exec/resize": "command/exec/resize",
87 "config/read": "config/read",
88 "externalAgentConfig/detect": "externalAgentConfig/detect",
89 "externalAgentConfig/import": "externalAgentConfig/import",
90 "externalAgentConfig/import/readHistories": "externalAgentConfig/import/readHistories",
91 "config/value/write": "config/value/write",
92 "config/batchWrite": "config/batchWrite",
93 "configRequirements/read": "configRequirements/read",
94 "account/read": "account/read",
95 getConversationSummary: "getConversationSummary",
96 gitDiffToRemote: "gitDiffToRemote",
97 getAuthStatus: "getAuthStatus",
98 fuzzyFileSearch: "fuzzyFileSearch",
99} as const;
100
101export const CLIENT_NOTIFICATION_METHODS = {
102 initialized: "initialized",
103} as const;
104
105export const SERVER_REQUEST_METHODS = {
106 "item/commandExecution/requestApproval": "item/commandExecution/requestApproval",
107 "item/fileChange/requestApproval": "item/fileChange/requestApproval",
108 "item/tool/requestUserInput": "item/tool/requestUserInput",
109 "mcpServer/elicitation/request": "mcpServer/elicitation/request",
110 "item/permissions/requestApproval": "item/permissions/requestApproval",
111 "item/tool/call": "item/tool/call",
112 "account/chatgptAuthTokens/refresh": "account/chatgptAuthTokens/refresh",
113 "attestation/generate": "attestation/generate",
114 applyPatchApproval: "applyPatchApproval",
115 execCommandApproval: "execCommandApproval",
116} as const;
117
118export const SERVER_NOTIFICATION_METHODS = {
119 error: "error",
120 "thread/started": "thread/started",
121 "thread/status/changed": "thread/status/changed",
122 "thread/archived": "thread/archived",
123 "thread/deleted": "thread/deleted",
124 "thread/unarchived": "thread/unarchived",
125 "thread/closed": "thread/closed",
126 "skills/changed": "skills/changed",
127 "thread/name/updated": "thread/name/updated",
128 "thread/goal/updated": "thread/goal/updated",
129 "thread/goal/cleared": "thread/goal/cleared",
130 "thread/environment/connected": "thread/environment/connected",
131 "thread/environment/disconnected": "thread/environment/disconnected",
132 "thread/settings/updated": "thread/settings/updated",
133 "thread/tokenUsage/updated": "thread/tokenUsage/updated",
134 "turn/started": "turn/started",
135 "hook/started": "hook/started",
136 "turn/completed": "turn/completed",
137 "hook/completed": "hook/completed",
138 "turn/diff/updated": "turn/diff/updated",
139 "turn/plan/updated": "turn/plan/updated",
140 "item/started": "item/started",
141 "item/autoApprovalReview/started": "item/autoApprovalReview/started",
142 "item/autoApprovalReview/completed": "item/autoApprovalReview/completed",
143 "item/completed": "item/completed",
144 "rawResponseItem/completed": "rawResponseItem/completed",
145 "rawResponse/completed": "rawResponse/completed",
146 "item/agentMessage/delta": "item/agentMessage/delta",
147 "item/plan/delta": "item/plan/delta",
148 "command/exec/outputDelta": "command/exec/outputDelta",
149 "process/outputDelta": "process/outputDelta",
150 "process/exited": "process/exited",
151 "item/commandExecution/outputDelta": "item/commandExecution/outputDelta",
152 "item/commandExecution/terminalInteraction": "item/commandExecution/terminalInteraction",
153 "item/fileChange/outputDelta": "item/fileChange/outputDelta",
154 "item/fileChange/patchUpdated": "item/fileChange/patchUpdated",
155 "serverRequest/resolved": "serverRequest/resolved",
156 "item/mcpToolCall/progress": "item/mcpToolCall/progress",
157 "mcpServer/oauthLogin/completed": "mcpServer/oauthLogin/completed",
158 "mcpServer/startupStatus/updated": "mcpServer/startupStatus/updated",
159 "account/updated": "account/updated",
160 "account/rateLimits/updated": "account/rateLimits/updated",
161 "app/list/updated": "app/list/updated",
162 "remoteControl/status/changed": "remoteControl/status/changed",
163 "externalAgentConfig/import/progress": "externalAgentConfig/import/progress",
164 "externalAgentConfig/import/completed": "externalAgentConfig/import/completed",
165 "fs/changed": "fs/changed",
166 "item/reasoning/summaryTextDelta": "item/reasoning/summaryTextDelta",
167 "item/reasoning/summaryPartAdded": "item/reasoning/summaryPartAdded",
168 "item/reasoning/textDelta": "item/reasoning/textDelta",
169 "thread/compacted": "thread/compacted",
170 "model/rerouted": "model/rerouted",
171 "model/verification": "model/verification",
172 "turn/moderationMetadata": "turn/moderationMetadata",
173 "model/safetyBuffering/updated": "model/safetyBuffering/updated",
174 warning: "warning",
175 guardianWarning: "guardianWarning",
176 deprecationNotice: "deprecationNotice",
177 configWarning: "configWarning",
178 "fuzzyFileSearch/sessionUpdated": "fuzzyFileSearch/sessionUpdated",
179 "fuzzyFileSearch/sessionCompleted": "fuzzyFileSearch/sessionCompleted",
180 "thread/realtime/started": "thread/realtime/started",
181 "thread/realtime/itemAdded": "thread/realtime/itemAdded",
182 "thread/realtime/transcript/delta": "thread/realtime/transcript/delta",
183 "thread/realtime/transcript/done": "thread/realtime/transcript/done",
184 "thread/realtime/outputAudio/delta": "thread/realtime/outputAudio/delta",
185 "thread/realtime/sdp": "thread/realtime/sdp",
186 "thread/realtime/error": "thread/realtime/error",
187 "thread/realtime/closed": "thread/realtime/closed",
188 "windows/worldWritableWarning": "windows/worldWritableWarning",
189 "windowsSandbox/setupCompleted": "windowsSandbox/setupCompleted",
190 "account/login/completed": "account/login/completed",
191} as const;
192
193export type ClientRequestMethod = keyof typeof CLIENT_REQUEST_METHODS;
194export type ClientNotificationMethod = keyof typeof CLIENT_NOTIFICATION_METHODS;
195export type ServerRequestMethod = keyof typeof SERVER_REQUEST_METHODS;
196export type ServerNotificationMethod = keyof typeof SERVER_NOTIFICATION_METHODS;
197
198export interface ClientRequestParamsByMethod {
199 readonly initialize: CodexSchema.V1InitializeParams;
200 readonly "thread/start": CodexSchema.V2ThreadStartParams;
201 readonly "thread/resume": CodexSchema.V2ThreadResumeParams;
202 readonly "thread/fork": CodexSchema.V2ThreadForkParams;
203 readonly "thread/archive": CodexSchema.V2ThreadArchiveParams;
204 readonly "thread/delete": CodexSchema.V2ThreadDeleteParams;
205 readonly "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeParams;
206 readonly "thread/name/set": CodexSchema.V2ThreadSetNameParams;
207 readonly "thread/goal/set": CodexSchema.V2ThreadGoalSetParams;
208 readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetParams;
209 readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams;
210 readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams;
211 readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams;
212 readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartParams;
213 readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams;
214 readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams;
215 readonly "thread/rollback": CodexSchema.V2ThreadRollbackParams;
216 readonly "thread/list": CodexSchema.V2ThreadListParams;
217 readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams;
218 readonly "thread/read": CodexSchema.V2ThreadReadParams;
219 readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams;
220 readonly "skills/list": CodexSchema.V2SkillsListParams;
221 readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams;
222 readonly "hooks/list": CodexSchema.V2HooksListParams;
223 readonly "marketplace/add": CodexSchema.V2MarketplaceAddParams;
224 readonly "marketplace/remove": CodexSchema.V2MarketplaceRemoveParams;
225 readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams;
226 readonly "plugin/list": CodexSchema.V2PluginListParams;
227 readonly "plugin/installed": CodexSchema.V2PluginInstalledParams;
228 readonly "plugin/read": CodexSchema.V2PluginReadParams;
229 readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadParams;
230 readonly "plugin/share/save": CodexSchema.V2PluginShareSaveParams;
231 readonly "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsParams;
232 readonly "plugin/share/list": CodexSchema.V2PluginShareListParams;
233 readonly "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutParams;
234 readonly "plugin/share/delete": CodexSchema.V2PluginShareDeleteParams;
235 readonly "app/read": CodexSchema.V2AppsReadParams;
236 readonly "app/list": CodexSchema.V2AppsListParams;
237 readonly "app/installed": CodexSchema.V2AppsInstalledParams;
238 readonly "fs/readFile": CodexSchema.V2FsReadFileParams;
239 readonly "fs/writeFile": CodexSchema.V2FsWriteFileParams;
240 readonly "fs/createDirectory": CodexSchema.V2FsCreateDirectoryParams;
241 readonly "fs/getMetadata": CodexSchema.V2FsGetMetadataParams;
242 readonly "fs/readDirectory": CodexSchema.V2FsReadDirectoryParams;
243 readonly "fs/remove": CodexSchema.V2FsRemoveParams;
244 readonly "fs/copy": CodexSchema.V2FsCopyParams;
245 readonly "fs/watch": CodexSchema.V2FsWatchParams;
246 readonly "fs/unwatch": CodexSchema.V2FsUnwatchParams;
247 readonly "skills/config/write": CodexSchema.V2SkillsConfigWriteParams;
248 readonly "plugin/install": CodexSchema.V2PluginInstallParams;
249 readonly "plugin/uninstall": CodexSchema.V2PluginUninstallParams;
250 readonly "turn/start": CodexSchema.V2TurnStartParams;
251 readonly "turn/steer": CodexSchema.V2TurnSteerParams;
252 readonly "turn/interrupt": CodexSchema.V2TurnInterruptParams;
253 readonly "review/start": CodexSchema.V2ReviewStartParams;
254 readonly "model/list": CodexSchema.V2ModelListParams;
255 readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams;
256 readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams;
257 readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListParams;
258 readonly "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetParams;
259 readonly "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginParams;
260 readonly "config/mcpServer/reload": undefined;
261 readonly "mcpServerStatus/list": CodexSchema.V2ListMcpServerStatusParams;
262 readonly "mcpServer/resource/read": CodexSchema.V2McpResourceReadParams;
263 readonly "mcpServer/tool/call": CodexSchema.V2McpServerToolCallParams;
264 readonly "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartParams;
265 readonly "windowsSandbox/readiness": undefined;
266 readonly "account/login/start": CodexSchema.V2LoginAccountParams;
267 readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountParams;
268 readonly "account/logout": undefined;
269 readonly "account/rateLimits/read": undefined;
270 readonly "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams;
271 readonly "account/usage/read": undefined;
272 readonly "account/workspaceMessages/read": undefined;
273 readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams;
274 readonly "feedback/upload": CodexSchema.V2FeedbackUploadParams;
275 readonly "command/exec": CodexSchema.V2CommandExecParams;
276 readonly "command/exec/write": CodexSchema.V2CommandExecWriteParams;
277 readonly "command/exec/terminate": CodexSchema.V2CommandExecTerminateParams;
278 readonly "command/exec/resize": CodexSchema.V2CommandExecResizeParams;
279 readonly "config/read": CodexSchema.V2ConfigReadParams;
280 readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams;
281 readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams;
282 readonly "externalAgentConfig/import/readHistories": undefined;
283 readonly "config/value/write": CodexSchema.V2ConfigValueWriteParams;
284 readonly "config/batchWrite": CodexSchema.V2ConfigBatchWriteParams;
285 readonly "configRequirements/read": undefined;
286 readonly "account/read": CodexSchema.V2GetAccountParams;
287 readonly getConversationSummary: CodexSchema.GetConversationSummaryParams;
288 readonly gitDiffToRemote: CodexSchema.GitDiffToRemoteParams;
289 readonly getAuthStatus: CodexSchema.GetAuthStatusParams;
290 readonly fuzzyFileSearch: CodexSchema.FuzzyFileSearchParams;
291}
292
293export interface ClientRequestResponsesByMethod {
294 readonly initialize: CodexSchema.V1InitializeResponse;
295 readonly "thread/start": CodexSchema.V2ThreadStartResponse;
296 readonly "thread/resume": CodexSchema.V2ThreadResumeResponse;
297 readonly "thread/fork": CodexSchema.V2ThreadForkResponse;
298 readonly "thread/archive": CodexSchema.V2ThreadArchiveResponse;
299 readonly "thread/delete": CodexSchema.V2ThreadDeleteResponse;
300 readonly "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeResponse;
301 readonly "thread/name/set": CodexSchema.V2ThreadSetNameResponse;
302 readonly "thread/goal/set": CodexSchema.V2ThreadGoalSetResponse;
303 readonly "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse;
304 readonly "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse;
305 readonly "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse;
306 readonly "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse;
307 readonly "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse;
308 readonly "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse;
309 readonly "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse;
310 readonly "thread/rollback": CodexSchema.V2ThreadRollbackResponse;
311 readonly "thread/list": CodexSchema.V2ThreadListResponse;
312 readonly "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse;
313 readonly "thread/read": CodexSchema.V2ThreadReadResponse;
314 readonly "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse;
315 readonly "skills/list": CodexSchema.V2SkillsListResponse;
316 readonly "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse;
317 readonly "hooks/list": CodexSchema.V2HooksListResponse;
318 readonly "marketplace/add": CodexSchema.V2MarketplaceAddResponse;
319 readonly "marketplace/remove": CodexSchema.V2MarketplaceRemoveResponse;
320 readonly "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse;
321 readonly "plugin/list": CodexSchema.V2PluginListResponse;
322 readonly "plugin/installed": CodexSchema.V2PluginInstalledResponse;
323 readonly "plugin/read": CodexSchema.V2PluginReadResponse;
324 readonly "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse;
325 readonly "plugin/share/save": CodexSchema.V2PluginShareSaveResponse;
326 readonly "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsResponse;
327 readonly "plugin/share/list": CodexSchema.V2PluginShareListResponse;
328 readonly "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutResponse;
329 readonly "plugin/share/delete": CodexSchema.V2PluginShareDeleteResponse;
330 readonly "app/read": CodexSchema.V2AppsReadResponse;
331 readonly "app/list": CodexSchema.V2AppsListResponse;
332 readonly "app/installed": CodexSchema.V2AppsInstalledResponse;
333 readonly "fs/readFile": CodexSchema.V2FsReadFileResponse;
334 readonly "fs/writeFile": CodexSchema.V2FsWriteFileResponse;
335 readonly "fs/createDirectory": CodexSchema.V2FsCreateDirectoryResponse;
336 readonly "fs/getMetadata": CodexSchema.V2FsGetMetadataResponse;
337 readonly "fs/readDirectory": CodexSchema.V2FsReadDirectoryResponse;
338 readonly "fs/remove": CodexSchema.V2FsRemoveResponse;
339 readonly "fs/copy": CodexSchema.V2FsCopyResponse;
340 readonly "fs/watch": CodexSchema.V2FsWatchResponse;
341 readonly "fs/unwatch": CodexSchema.V2FsUnwatchResponse;
342 readonly "skills/config/write": CodexSchema.V2SkillsConfigWriteResponse;
343 readonly "plugin/install": CodexSchema.V2PluginInstallResponse;
344 readonly "plugin/uninstall": CodexSchema.V2PluginUninstallResponse;
345 readonly "turn/start": CodexSchema.V2TurnStartResponse;
346 readonly "turn/steer": CodexSchema.V2TurnSteerResponse;
347 readonly "turn/interrupt": CodexSchema.V2TurnInterruptResponse;
348 readonly "review/start": CodexSchema.V2ReviewStartResponse;
349 readonly "model/list": CodexSchema.V2ModelListResponse;
350 readonly "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse;
351 readonly "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse;
352 readonly "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse;
353 readonly "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetResponse;
354 readonly "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginResponse;
355 readonly "config/mcpServer/reload": CodexSchema.V2McpServerRefreshResponse;
356 readonly "mcpServerStatus/list": CodexSchema.V2ListMcpServerStatusResponse;
357 readonly "mcpServer/resource/read": CodexSchema.V2McpResourceReadResponse;
358 readonly "mcpServer/tool/call": CodexSchema.V2McpServerToolCallResponse;
359 readonly "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartResponse;
360 readonly "windowsSandbox/readiness": CodexSchema.V2WindowsSandboxReadinessResponse;
361 readonly "account/login/start": CodexSchema.V2LoginAccountResponse;
362 readonly "account/login/cancel": CodexSchema.V2CancelLoginAccountResponse;
363 readonly "account/logout": CodexSchema.V2LogoutAccountResponse;
364 readonly "account/rateLimits/read": CodexSchema.V2GetAccountRateLimitsResponse;
365 readonly "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditResponse;
366 readonly "account/usage/read": CodexSchema.V2GetAccountTokenUsageResponse;
367 readonly "account/workspaceMessages/read": CodexSchema.V2GetWorkspaceMessagesResponse;
368 readonly "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailResponse;
369 readonly "feedback/upload": CodexSchema.V2FeedbackUploadResponse;
370 readonly "command/exec": CodexSchema.V2CommandExecResponse;
371 readonly "command/exec/write": CodexSchema.V2CommandExecWriteResponse;
372 readonly "command/exec/terminate": CodexSchema.V2CommandExecTerminateResponse;
373 readonly "command/exec/resize": CodexSchema.V2CommandExecResizeResponse;
374 readonly "config/read": CodexSchema.V2ConfigReadResponse;
375 readonly "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse;
376 readonly "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse;
377 readonly "externalAgentConfig/import/readHistories": CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse;
378 readonly "config/value/write": CodexSchema.V2ConfigWriteResponse;
379 readonly "config/batchWrite": CodexSchema.V2ConfigWriteResponse;
380 readonly "configRequirements/read": CodexSchema.V2ConfigRequirementsReadResponse;
381 readonly "account/read": CodexSchema.V2GetAccountResponse;
382 readonly getConversationSummary: CodexSchema.GetConversationSummaryResponse;
383 readonly gitDiffToRemote: CodexSchema.GitDiffToRemoteResponse;
384 readonly getAuthStatus: CodexSchema.GetAuthStatusResponse;
385 readonly fuzzyFileSearch: CodexSchema.FuzzyFileSearchResponse;
386}
387
388export interface ClientNotificationParamsByMethod {
389 readonly initialized: undefined;
390}
391
392export interface ServerRequestParamsByMethod {
393 readonly "item/commandExecution/requestApproval": CodexSchema.CommandExecutionRequestApprovalParams;
394 readonly "item/fileChange/requestApproval": CodexSchema.FileChangeRequestApprovalParams;
395 readonly "item/tool/requestUserInput": CodexSchema.ToolRequestUserInputParams;
396 readonly "mcpServer/elicitation/request": CodexSchema.McpServerElicitationRequestParams;
397 readonly "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalParams;
398 readonly "item/tool/call": CodexSchema.DynamicToolCallParams;
399 readonly "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshParams;
400 readonly "attestation/generate": CodexSchema.AttestationGenerateParams;
401 readonly applyPatchApproval: CodexSchema.ApplyPatchApprovalParams;
402 readonly execCommandApproval: CodexSchema.ExecCommandApprovalParams;
403}
404
405export interface ServerRequestResponsesByMethod {
406 readonly "item/commandExecution/requestApproval": CodexSchema.CommandExecutionRequestApprovalResponse;
407 readonly "item/fileChange/requestApproval": CodexSchema.FileChangeRequestApprovalResponse;
408 readonly "item/tool/requestUserInput": CodexSchema.ToolRequestUserInputResponse;
409 readonly "mcpServer/elicitation/request": CodexSchema.McpServerElicitationRequestResponse;
410 readonly "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalResponse;
411 readonly "item/tool/call": CodexSchema.DynamicToolCallResponse;
412 readonly "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshResponse;
413 readonly "attestation/generate": CodexSchema.AttestationGenerateResponse;
414 readonly applyPatchApproval: CodexSchema.ApplyPatchApprovalResponse;
415 readonly execCommandApproval: CodexSchema.ExecCommandApprovalResponse;
416}
417
418export interface ServerNotificationParamsByMethod {
419 readonly error: CodexSchema.V2ErrorNotification;
420 readonly "thread/started": CodexSchema.V2ThreadStartedNotification;
421 readonly "thread/status/changed": CodexSchema.V2ThreadStatusChangedNotification;
422 readonly "thread/archived": CodexSchema.V2ThreadArchivedNotification;
423 readonly "thread/deleted": CodexSchema.V2ThreadDeletedNotification;
424 readonly "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification;
425 readonly "thread/closed": CodexSchema.V2ThreadClosedNotification;
426 readonly "skills/changed": CodexSchema.V2SkillsChangedNotification;
427 readonly "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification;
428 readonly "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification;
429 readonly "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification;
430 readonly "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification;
431 readonly "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification;
432 readonly "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification;
433 readonly "thread/tokenUsage/updated": CodexSchema.V2ThreadTokenUsageUpdatedNotification;
434 readonly "turn/started": CodexSchema.V2TurnStartedNotification;
435 readonly "hook/started": CodexSchema.V2HookStartedNotification;
436 readonly "turn/completed": CodexSchema.V2TurnCompletedNotification;
437 readonly "hook/completed": CodexSchema.V2HookCompletedNotification;
438 readonly "turn/diff/updated": CodexSchema.V2TurnDiffUpdatedNotification;
439 readonly "turn/plan/updated": CodexSchema.V2TurnPlanUpdatedNotification;
440 readonly "item/started": CodexSchema.V2ItemStartedNotification;
441 readonly "item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification;
442 readonly "item/autoApprovalReview/completed": CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification;
443 readonly "item/completed": CodexSchema.V2ItemCompletedNotification;
444 readonly "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification;
445 readonly "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification;
446 readonly "item/agentMessage/delta": CodexSchema.V2AgentMessageDeltaNotification;
447 readonly "item/plan/delta": CodexSchema.V2PlanDeltaNotification;
448 readonly "command/exec/outputDelta": CodexSchema.V2CommandExecOutputDeltaNotification;
449 readonly "process/outputDelta": CodexSchema.V2ProcessOutputDeltaNotification;
450 readonly "process/exited": CodexSchema.V2ProcessExitedNotification;
451 readonly "item/commandExecution/outputDelta": CodexSchema.V2CommandExecutionOutputDeltaNotification;
452 readonly "item/commandExecution/terminalInteraction": CodexSchema.V2TerminalInteractionNotification;
453 readonly "item/fileChange/outputDelta": CodexSchema.V2FileChangeOutputDeltaNotification;
454 readonly "item/fileChange/patchUpdated": CodexSchema.V2FileChangePatchUpdatedNotification;
455 readonly "serverRequest/resolved": CodexSchema.V2ServerRequestResolvedNotification;
456 readonly "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification;
457 readonly "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification;
458 readonly "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification;
459 readonly "account/updated": CodexSchema.V2AccountUpdatedNotification;
460 readonly "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification;
461 readonly "app/list/updated": CodexSchema.V2AppListUpdatedNotification;
462 readonly "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification;
463 readonly "externalAgentConfig/import/progress": CodexSchema.V2ExternalAgentConfigImportProgressNotification;
464 readonly "externalAgentConfig/import/completed": CodexSchema.V2ExternalAgentConfigImportCompletedNotification;
465 readonly "fs/changed": CodexSchema.V2FsChangedNotification;
466 readonly "item/reasoning/summaryTextDelta": CodexSchema.V2ReasoningSummaryTextDeltaNotification;
467 readonly "item/reasoning/summaryPartAdded": CodexSchema.V2ReasoningSummaryPartAddedNotification;
468 readonly "item/reasoning/textDelta": CodexSchema.V2ReasoningTextDeltaNotification;
469 readonly "thread/compacted": CodexSchema.V2ContextCompactedNotification;
470 readonly "model/rerouted": CodexSchema.V2ModelReroutedNotification;
471 readonly "model/verification": CodexSchema.V2ModelVerificationNotification;
472 readonly "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification;
473 readonly "model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification;
474 readonly warning: CodexSchema.V2WarningNotification;
475 readonly guardianWarning: CodexSchema.V2GuardianWarningNotification;
476 readonly deprecationNotice: CodexSchema.V2DeprecationNoticeNotification;
477 readonly configWarning: CodexSchema.V2ConfigWarningNotification;
478 readonly "fuzzyFileSearch/sessionUpdated": CodexSchema.FuzzyFileSearchSessionUpdatedNotification;
479 readonly "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification;
480 readonly "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification;
481 readonly "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification;
482 readonly "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification;
483 readonly "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification;
484 readonly "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification;
485 readonly "thread/realtime/sdp": CodexSchema.V2ThreadRealtimeSdpNotification;
486 readonly "thread/realtime/error": CodexSchema.V2ThreadRealtimeErrorNotification;
487 readonly "thread/realtime/closed": CodexSchema.V2ThreadRealtimeClosedNotification;
488 readonly "windows/worldWritableWarning": CodexSchema.V2WindowsWorldWritableWarningNotification;
489 readonly "windowsSandbox/setupCompleted": CodexSchema.V2WindowsSandboxSetupCompletedNotification;
490 readonly "account/login/completed": CodexSchema.V2AccountLoginCompletedNotification;
491}
492
493export const CLIENT_REQUEST_PARAMS = {
494 initialize: CodexSchema.V1InitializeParams,
495 "thread/start": CodexSchema.V2ThreadStartParams,
496 "thread/resume": CodexSchema.V2ThreadResumeParams,
497 "thread/fork": CodexSchema.V2ThreadForkParams,
498 "thread/archive": CodexSchema.V2ThreadArchiveParams,
499 "thread/delete": CodexSchema.V2ThreadDeleteParams,
500 "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeParams,
501 "thread/name/set": CodexSchema.V2ThreadSetNameParams,
502 "thread/goal/set": CodexSchema.V2ThreadGoalSetParams,
503 "thread/goal/get": CodexSchema.V2ThreadGoalGetParams,
504 "thread/goal/clear": CodexSchema.V2ThreadGoalClearParams,
505 "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateParams,
506 "thread/unarchive": CodexSchema.V2ThreadUnarchiveParams,
507 "thread/compact/start": CodexSchema.V2ThreadCompactStartParams,
508 "thread/shellCommand": CodexSchema.V2ThreadShellCommandParams,
509 "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionParams,
510 "thread/rollback": CodexSchema.V2ThreadRollbackParams,
511 "thread/list": CodexSchema.V2ThreadListParams,
512 "thread/loaded/list": CodexSchema.V2ThreadLoadedListParams,
513 "thread/read": CodexSchema.V2ThreadReadParams,
514 "thread/inject_items": CodexSchema.V2ThreadInjectItemsParams,
515 "skills/list": CodexSchema.V2SkillsListParams,
516 "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetParams,
517 "hooks/list": CodexSchema.V2HooksListParams,
518 "marketplace/add": CodexSchema.V2MarketplaceAddParams,
519 "marketplace/remove": CodexSchema.V2MarketplaceRemoveParams,
520 "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeParams,
521 "plugin/list": CodexSchema.V2PluginListParams,
522 "plugin/installed": CodexSchema.V2PluginInstalledParams,
523 "plugin/read": CodexSchema.V2PluginReadParams,
524 "plugin/skill/read": CodexSchema.V2PluginSkillReadParams,
525 "plugin/share/save": CodexSchema.V2PluginShareSaveParams,
526 "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsParams,
527 "plugin/share/list": CodexSchema.V2PluginShareListParams,
528 "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutParams,
529 "plugin/share/delete": CodexSchema.V2PluginShareDeleteParams,
530 "app/read": CodexSchema.V2AppsReadParams,
531 "app/list": CodexSchema.V2AppsListParams,
532 "app/installed": CodexSchema.V2AppsInstalledParams,
533 "fs/readFile": CodexSchema.V2FsReadFileParams,
534 "fs/writeFile": CodexSchema.V2FsWriteFileParams,
535 "fs/createDirectory": CodexSchema.V2FsCreateDirectoryParams,
536 "fs/getMetadata": CodexSchema.V2FsGetMetadataParams,
537 "fs/readDirectory": CodexSchema.V2FsReadDirectoryParams,
538 "fs/remove": CodexSchema.V2FsRemoveParams,
539 "fs/copy": CodexSchema.V2FsCopyParams,
540 "fs/watch": CodexSchema.V2FsWatchParams,
541 "fs/unwatch": CodexSchema.V2FsUnwatchParams,
542 "skills/config/write": CodexSchema.V2SkillsConfigWriteParams,
543 "plugin/install": CodexSchema.V2PluginInstallParams,
544 "plugin/uninstall": CodexSchema.V2PluginUninstallParams,
545 "turn/start": CodexSchema.V2TurnStartParams,
546 "turn/steer": CodexSchema.V2TurnSteerParams,
547 "turn/interrupt": CodexSchema.V2TurnInterruptParams,
548 "review/start": CodexSchema.V2ReviewStartParams,
549 "model/list": CodexSchema.V2ModelListParams,
550 "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadParams,
551 "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListParams,
552 "permissionProfile/list": CodexSchema.V2PermissionProfileListParams,
553 "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetParams,
554 "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginParams,
555 "config/mcpServer/reload": undefined,
556 "mcpServerStatus/list": CodexSchema.V2ListMcpServerStatusParams,
557 "mcpServer/resource/read": CodexSchema.V2McpResourceReadParams,
558 "mcpServer/tool/call": CodexSchema.V2McpServerToolCallParams,
559 "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartParams,
560 "windowsSandbox/readiness": undefined,
561 "account/login/start": CodexSchema.V2LoginAccountParams,
562 "account/login/cancel": CodexSchema.V2CancelLoginAccountParams,
563 "account/logout": undefined,
564 "account/rateLimits/read": undefined,
565 "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditParams,
566 "account/usage/read": undefined,
567 "account/workspaceMessages/read": undefined,
568 "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailParams,
569 "feedback/upload": CodexSchema.V2FeedbackUploadParams,
570 "command/exec": CodexSchema.V2CommandExecParams,
571 "command/exec/write": CodexSchema.V2CommandExecWriteParams,
572 "command/exec/terminate": CodexSchema.V2CommandExecTerminateParams,
573 "command/exec/resize": CodexSchema.V2CommandExecResizeParams,
574 "config/read": CodexSchema.V2ConfigReadParams,
575 "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectParams,
576 "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportParams,
577 "externalAgentConfig/import/readHistories": undefined,
578 "config/value/write": CodexSchema.V2ConfigValueWriteParams,
579 "config/batchWrite": CodexSchema.V2ConfigBatchWriteParams,
580 "configRequirements/read": undefined,
581 "account/read": CodexSchema.V2GetAccountParams,
582 getConversationSummary: CodexSchema.GetConversationSummaryParams,
583 gitDiffToRemote: CodexSchema.GitDiffToRemoteParams,
584 getAuthStatus: CodexSchema.GetAuthStatusParams,
585 fuzzyFileSearch: CodexSchema.FuzzyFileSearchParams,
586} as const;
587
588export const CLIENT_REQUEST_RESPONSES = {
589 initialize: CodexSchema.V1InitializeResponse,
590 "thread/start": CodexSchema.V2ThreadStartResponse,
591 "thread/resume": CodexSchema.V2ThreadResumeResponse,
592 "thread/fork": CodexSchema.V2ThreadForkResponse,
593 "thread/archive": CodexSchema.V2ThreadArchiveResponse,
594 "thread/delete": CodexSchema.V2ThreadDeleteResponse,
595 "thread/unsubscribe": CodexSchema.V2ThreadUnsubscribeResponse,
596 "thread/name/set": CodexSchema.V2ThreadSetNameResponse,
597 "thread/goal/set": CodexSchema.V2ThreadGoalSetResponse,
598 "thread/goal/get": CodexSchema.V2ThreadGoalGetResponse,
599 "thread/goal/clear": CodexSchema.V2ThreadGoalClearResponse,
600 "thread/metadata/update": CodexSchema.V2ThreadMetadataUpdateResponse,
601 "thread/unarchive": CodexSchema.V2ThreadUnarchiveResponse,
602 "thread/compact/start": CodexSchema.V2ThreadCompactStartResponse,
603 "thread/shellCommand": CodexSchema.V2ThreadShellCommandResponse,
604 "thread/approveGuardianDeniedAction": CodexSchema.V2ThreadApproveGuardianDeniedActionResponse,
605 "thread/rollback": CodexSchema.V2ThreadRollbackResponse,
606 "thread/list": CodexSchema.V2ThreadListResponse,
607 "thread/loaded/list": CodexSchema.V2ThreadLoadedListResponse,
608 "thread/read": CodexSchema.V2ThreadReadResponse,
609 "thread/inject_items": CodexSchema.V2ThreadInjectItemsResponse,
610 "skills/list": CodexSchema.V2SkillsListResponse,
611 "skills/extraRoots/set": CodexSchema.V2SkillsExtraRootsSetResponse,
612 "hooks/list": CodexSchema.V2HooksListResponse,
613 "marketplace/add": CodexSchema.V2MarketplaceAddResponse,
614 "marketplace/remove": CodexSchema.V2MarketplaceRemoveResponse,
615 "marketplace/upgrade": CodexSchema.V2MarketplaceUpgradeResponse,
616 "plugin/list": CodexSchema.V2PluginListResponse,
617 "plugin/installed": CodexSchema.V2PluginInstalledResponse,
618 "plugin/read": CodexSchema.V2PluginReadResponse,
619 "plugin/skill/read": CodexSchema.V2PluginSkillReadResponse,
620 "plugin/share/save": CodexSchema.V2PluginShareSaveResponse,
621 "plugin/share/updateTargets": CodexSchema.V2PluginShareUpdateTargetsResponse,
622 "plugin/share/list": CodexSchema.V2PluginShareListResponse,
623 "plugin/share/checkout": CodexSchema.V2PluginShareCheckoutResponse,
624 "plugin/share/delete": CodexSchema.V2PluginShareDeleteResponse,
625 "app/read": CodexSchema.V2AppsReadResponse,
626 "app/list": CodexSchema.V2AppsListResponse,
627 "app/installed": CodexSchema.V2AppsInstalledResponse,
628 "fs/readFile": CodexSchema.V2FsReadFileResponse,
629 "fs/writeFile": CodexSchema.V2FsWriteFileResponse,
630 "fs/createDirectory": CodexSchema.V2FsCreateDirectoryResponse,
631 "fs/getMetadata": CodexSchema.V2FsGetMetadataResponse,
632 "fs/readDirectory": CodexSchema.V2FsReadDirectoryResponse,
633 "fs/remove": CodexSchema.V2FsRemoveResponse,
634 "fs/copy": CodexSchema.V2FsCopyResponse,
635 "fs/watch": CodexSchema.V2FsWatchResponse,
636 "fs/unwatch": CodexSchema.V2FsUnwatchResponse,
637 "skills/config/write": CodexSchema.V2SkillsConfigWriteResponse,
638 "plugin/install": CodexSchema.V2PluginInstallResponse,
639 "plugin/uninstall": CodexSchema.V2PluginUninstallResponse,
640 "turn/start": CodexSchema.V2TurnStartResponse,
641 "turn/steer": CodexSchema.V2TurnSteerResponse,
642 "turn/interrupt": CodexSchema.V2TurnInterruptResponse,
643 "review/start": CodexSchema.V2ReviewStartResponse,
644 "model/list": CodexSchema.V2ModelListResponse,
645 "modelProvider/capabilities/read": CodexSchema.V2ModelProviderCapabilitiesReadResponse,
646 "experimentalFeature/list": CodexSchema.V2ExperimentalFeatureListResponse,
647 "permissionProfile/list": CodexSchema.V2PermissionProfileListResponse,
648 "experimentalFeature/enablement/set": CodexSchema.V2ExperimentalFeatureEnablementSetResponse,
649 "mcpServer/oauth/login": CodexSchema.V2McpServerOauthLoginResponse,
650 "config/mcpServer/reload": CodexSchema.V2McpServerRefreshResponse,
651 "mcpServerStatus/list": CodexSchema.V2ListMcpServerStatusResponse,
652 "mcpServer/resource/read": CodexSchema.V2McpResourceReadResponse,
653 "mcpServer/tool/call": CodexSchema.V2McpServerToolCallResponse,
654 "windowsSandbox/setupStart": CodexSchema.V2WindowsSandboxSetupStartResponse,
655 "windowsSandbox/readiness": CodexSchema.V2WindowsSandboxReadinessResponse,
656 "account/login/start": CodexSchema.V2LoginAccountResponse,
657 "account/login/cancel": CodexSchema.V2CancelLoginAccountResponse,
658 "account/logout": CodexSchema.V2LogoutAccountResponse,
659 "account/rateLimits/read": CodexSchema.V2GetAccountRateLimitsResponse,
660 "account/rateLimitResetCredit/consume": CodexSchema.V2ConsumeAccountRateLimitResetCreditResponse,
661 "account/usage/read": CodexSchema.V2GetAccountTokenUsageResponse,
662 "account/workspaceMessages/read": CodexSchema.V2GetWorkspaceMessagesResponse,
663 "account/sendAddCreditsNudgeEmail": CodexSchema.V2SendAddCreditsNudgeEmailResponse,
664 "feedback/upload": CodexSchema.V2FeedbackUploadResponse,
665 "command/exec": CodexSchema.V2CommandExecResponse,
666 "command/exec/write": CodexSchema.V2CommandExecWriteResponse,
667 "command/exec/terminate": CodexSchema.V2CommandExecTerminateResponse,
668 "command/exec/resize": CodexSchema.V2CommandExecResizeResponse,
669 "config/read": CodexSchema.V2ConfigReadResponse,
670 "externalAgentConfig/detect": CodexSchema.V2ExternalAgentConfigDetectResponse,
671 "externalAgentConfig/import": CodexSchema.V2ExternalAgentConfigImportResponse,
672 "externalAgentConfig/import/readHistories":
673 CodexSchema.V2ExternalAgentConfigImportHistoriesReadResponse,
674 "config/value/write": CodexSchema.V2ConfigWriteResponse,
675 "config/batchWrite": CodexSchema.V2ConfigWriteResponse,
676 "configRequirements/read": CodexSchema.V2ConfigRequirementsReadResponse,
677 "account/read": CodexSchema.V2GetAccountResponse,
678 getConversationSummary: CodexSchema.GetConversationSummaryResponse,
679 gitDiffToRemote: CodexSchema.GitDiffToRemoteResponse,
680 getAuthStatus: CodexSchema.GetAuthStatusResponse,
681 fuzzyFileSearch: CodexSchema.FuzzyFileSearchResponse,
682} as const;
683
684export const CLIENT_NOTIFICATION_PARAMS = {
685 initialized: undefined,
686} as const;
687
688export const SERVER_REQUEST_PARAMS = {
689 "item/commandExecution/requestApproval": CodexSchema.CommandExecutionRequestApprovalParams,
690 "item/fileChange/requestApproval": CodexSchema.FileChangeRequestApprovalParams,
691 "item/tool/requestUserInput": CodexSchema.ToolRequestUserInputParams,
692 "mcpServer/elicitation/request": CodexSchema.McpServerElicitationRequestParams,
693 "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalParams,
694 "item/tool/call": CodexSchema.DynamicToolCallParams,
695 "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshParams,
696 "attestation/generate": CodexSchema.AttestationGenerateParams,
697 applyPatchApproval: CodexSchema.ApplyPatchApprovalParams,
698 execCommandApproval: CodexSchema.ExecCommandApprovalParams,
699} as const;
700
701export const SERVER_REQUEST_RESPONSES = {
702 "item/commandExecution/requestApproval": CodexSchema.CommandExecutionRequestApprovalResponse,
703 "item/fileChange/requestApproval": CodexSchema.FileChangeRequestApprovalResponse,
704 "item/tool/requestUserInput": CodexSchema.ToolRequestUserInputResponse,
705 "mcpServer/elicitation/request": CodexSchema.McpServerElicitationRequestResponse,
706 "item/permissions/requestApproval": CodexSchema.PermissionsRequestApprovalResponse,
707 "item/tool/call": CodexSchema.DynamicToolCallResponse,
708 "account/chatgptAuthTokens/refresh": CodexSchema.ChatgptAuthTokensRefreshResponse,
709 "attestation/generate": CodexSchema.AttestationGenerateResponse,
710 applyPatchApproval: CodexSchema.ApplyPatchApprovalResponse,
711 execCommandApproval: CodexSchema.ExecCommandApprovalResponse,
712} as const;
713
714export const SERVER_NOTIFICATION_PARAMS = {
715 error: CodexSchema.V2ErrorNotification,
716 "thread/started": CodexSchema.V2ThreadStartedNotification,
717 "thread/status/changed": CodexSchema.V2ThreadStatusChangedNotification,
718 "thread/archived": CodexSchema.V2ThreadArchivedNotification,
719 "thread/deleted": CodexSchema.V2ThreadDeletedNotification,
720 "thread/unarchived": CodexSchema.V2ThreadUnarchivedNotification,
721 "thread/closed": CodexSchema.V2ThreadClosedNotification,
722 "skills/changed": CodexSchema.V2SkillsChangedNotification,
723 "thread/name/updated": CodexSchema.V2ThreadNameUpdatedNotification,
724 "thread/goal/updated": CodexSchema.V2ThreadGoalUpdatedNotification,
725 "thread/goal/cleared": CodexSchema.V2ThreadGoalClearedNotification,
726 "thread/environment/connected": CodexSchema.V2EnvironmentConnectionNotification,
727 "thread/environment/disconnected": CodexSchema.V2EnvironmentConnectionNotification,
728 "thread/settings/updated": CodexSchema.V2ThreadSettingsUpdatedNotification,
729 "thread/tokenUsage/updated": CodexSchema.V2ThreadTokenUsageUpdatedNotification,
730 "turn/started": CodexSchema.V2TurnStartedNotification,
731 "hook/started": CodexSchema.V2HookStartedNotification,
732 "turn/completed": CodexSchema.V2TurnCompletedNotification,
733 "hook/completed": CodexSchema.V2HookCompletedNotification,
734 "turn/diff/updated": CodexSchema.V2TurnDiffUpdatedNotification,
735 "turn/plan/updated": CodexSchema.V2TurnPlanUpdatedNotification,
736 "item/started": CodexSchema.V2ItemStartedNotification,
737 "item/autoApprovalReview/started": CodexSchema.V2ItemGuardianApprovalReviewStartedNotification,
738 "item/autoApprovalReview/completed":
739 CodexSchema.V2ItemGuardianApprovalReviewCompletedNotification,
740 "item/completed": CodexSchema.V2ItemCompletedNotification,
741 "rawResponseItem/completed": CodexSchema.V2RawResponseItemCompletedNotification,
742 "rawResponse/completed": CodexSchema.V2RawResponseCompletedNotification,
743 "item/agentMessage/delta": CodexSchema.V2AgentMessageDeltaNotification,
744 "item/plan/delta": CodexSchema.V2PlanDeltaNotification,
745 "command/exec/outputDelta": CodexSchema.V2CommandExecOutputDeltaNotification,
746 "process/outputDelta": CodexSchema.V2ProcessOutputDeltaNotification,
747 "process/exited": CodexSchema.V2ProcessExitedNotification,
748 "item/commandExecution/outputDelta": CodexSchema.V2CommandExecutionOutputDeltaNotification,
749 "item/commandExecution/terminalInteraction": CodexSchema.V2TerminalInteractionNotification,
750 "item/fileChange/outputDelta": CodexSchema.V2FileChangeOutputDeltaNotification,
751 "item/fileChange/patchUpdated": CodexSchema.V2FileChangePatchUpdatedNotification,
752 "serverRequest/resolved": CodexSchema.V2ServerRequestResolvedNotification,
753 "item/mcpToolCall/progress": CodexSchema.V2McpToolCallProgressNotification,
754 "mcpServer/oauthLogin/completed": CodexSchema.V2McpServerOauthLoginCompletedNotification,
755 "mcpServer/startupStatus/updated": CodexSchema.V2McpServerStatusUpdatedNotification,
756 "account/updated": CodexSchema.V2AccountUpdatedNotification,
757 "account/rateLimits/updated": CodexSchema.V2AccountRateLimitsUpdatedNotification,
758 "app/list/updated": CodexSchema.V2AppListUpdatedNotification,
759 "remoteControl/status/changed": CodexSchema.V2RemoteControlStatusChangedNotification,
760 "externalAgentConfig/import/progress":
761 CodexSchema.V2ExternalAgentConfigImportProgressNotification,
762 "externalAgentConfig/import/completed":
763 CodexSchema.V2ExternalAgentConfigImportCompletedNotification,
764 "fs/changed": CodexSchema.V2FsChangedNotification,
765 "item/reasoning/summaryTextDelta": CodexSchema.V2ReasoningSummaryTextDeltaNotification,
766 "item/reasoning/summaryPartAdded": CodexSchema.V2ReasoningSummaryPartAddedNotification,
767 "item/reasoning/textDelta": CodexSchema.V2ReasoningTextDeltaNotification,
768 "thread/compacted": CodexSchema.V2ContextCompactedNotification,
769 "model/rerouted": CodexSchema.V2ModelReroutedNotification,
770 "model/verification": CodexSchema.V2ModelVerificationNotification,
771 "turn/moderationMetadata": CodexSchema.V2TurnModerationMetadataNotification,
772 "model/safetyBuffering/updated": CodexSchema.V2ModelSafetyBufferingUpdatedNotification,
773 warning: CodexSchema.V2WarningNotification,
774 guardianWarning: CodexSchema.V2GuardianWarningNotification,
775 deprecationNotice: CodexSchema.V2DeprecationNoticeNotification,
776 configWarning: CodexSchema.V2ConfigWarningNotification,
777 "fuzzyFileSearch/sessionUpdated": CodexSchema.FuzzyFileSearchSessionUpdatedNotification,
778 "fuzzyFileSearch/sessionCompleted": CodexSchema.FuzzyFileSearchSessionCompletedNotification,
779 "thread/realtime/started": CodexSchema.V2ThreadRealtimeStartedNotification,
780 "thread/realtime/itemAdded": CodexSchema.V2ThreadRealtimeItemAddedNotification,
781 "thread/realtime/transcript/delta": CodexSchema.V2ThreadRealtimeTranscriptDeltaNotification,
782 "thread/realtime/transcript/done": CodexSchema.V2ThreadRealtimeTranscriptDoneNotification,
783 "thread/realtime/outputAudio/delta": CodexSchema.V2ThreadRealtimeOutputAudioDeltaNotification,
784 "thread/realtime/sdp": CodexSchema.V2ThreadRealtimeSdpNotification,
785 "thread/realtime/error": CodexSchema.V2ThreadRealtimeErrorNotification,
786 "thread/realtime/closed": CodexSchema.V2ThreadRealtimeClosedNotification,
787 "windows/worldWritableWarning": CodexSchema.V2WindowsWorldWritableWarningNotification,
788 "windowsSandbox/setupCompleted": CodexSchema.V2WindowsSandboxSetupCompletedNotification,
789 "account/login/completed": CodexSchema.V2AccountLoginCompletedNotification,
790} as const;