Skip to content
Source
Sign inSign up

meta.gen.ts

904 lines55.6 KB

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