codex-python 0.1.1__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1719 @@
1
+ # GENERATED CODE! DO NOT MODIFY BY HAND!
2
+ from __future__ import annotations
3
+
4
+ from typing import Any, Literal
5
+
6
+ from pydantic import BaseModel
7
+ from pydantic.config import ConfigDict
8
+
9
+
10
+ class AddConversationListenerParams(BaseModel):
11
+ conversationId: ConversationId
12
+
13
+ model_config = ConfigDict(extra="allow")
14
+
15
+
16
+ class AddConversationSubscriptionResponse(BaseModel):
17
+ subscriptionId: str
18
+
19
+ model_config = ConfigDict(extra="allow")
20
+
21
+
22
+ class AgentMessageDeltaEvent(BaseModel):
23
+ delta: str
24
+
25
+ model_config = ConfigDict(extra="allow")
26
+
27
+
28
+ class AgentMessageEvent(BaseModel):
29
+ message: str
30
+
31
+ model_config = ConfigDict(extra="allow")
32
+
33
+
34
+ class AgentReasoningDeltaEvent(BaseModel):
35
+ delta: str
36
+
37
+ model_config = ConfigDict(extra="allow")
38
+
39
+
40
+ class AgentReasoningEvent(BaseModel):
41
+ text: str
42
+
43
+ model_config = ConfigDict(extra="allow")
44
+
45
+
46
+ class AgentReasoningRawContentDeltaEvent(BaseModel):
47
+ delta: str
48
+
49
+ model_config = ConfigDict(extra="allow")
50
+
51
+
52
+ class AgentReasoningRawContentEvent(BaseModel):
53
+ text: str
54
+
55
+ model_config = ConfigDict(extra="allow")
56
+
57
+
58
+ class Annotations(BaseModel):
59
+ model_config = ConfigDict(extra="allow")
60
+
61
+
62
+ class ApplyPatchApprovalParams(BaseModel):
63
+ conversation_id: ConversationId
64
+ call_id: str
65
+ file_changes: dict[str, FileChange]
66
+ reason: str | None = None
67
+ grant_root: str | None = None
68
+
69
+ model_config = ConfigDict(extra="allow")
70
+
71
+
72
+ class ApplyPatchApprovalRequestEvent(BaseModel):
73
+ call_id: str
74
+ changes: dict[str, FileChange]
75
+ reason: str | None = None
76
+ grant_root: str | None = None
77
+
78
+ model_config = ConfigDict(extra="allow")
79
+
80
+
81
+ class ApplyPatchApprovalResponse(BaseModel):
82
+ decision: ReviewDecision
83
+
84
+ model_config = ConfigDict(extra="allow")
85
+
86
+
87
+ class ArchiveConversationParams(BaseModel):
88
+ conversationId: ConversationId
89
+ rolloutPath: str
90
+
91
+ model_config = ConfigDict(extra="allow")
92
+
93
+
94
+ class AudioContent(BaseModel):
95
+ data: str
96
+ mimeType: str
97
+ type: str
98
+
99
+ model_config = ConfigDict(extra="allow")
100
+
101
+
102
+ class AuthStatusChangeNotification(BaseModel):
103
+ authMethod: AuthMode | None = None
104
+
105
+ model_config = ConfigDict(extra="allow")
106
+
107
+
108
+ class BackgroundEventEvent(BaseModel):
109
+ message: str
110
+
111
+ model_config = ConfigDict(extra="allow")
112
+
113
+
114
+ class BlobResourceContents(BaseModel):
115
+ blob: str
116
+ uri: str
117
+
118
+ model_config = ConfigDict(extra="allow")
119
+
120
+
121
+ class CallToolResult(BaseModel):
122
+ content: list[ContentBlock]
123
+
124
+ model_config = ConfigDict(extra="allow")
125
+
126
+
127
+ class CancelLoginChatGptParams(BaseModel):
128
+ loginId: str
129
+
130
+ model_config = ConfigDict(extra="allow")
131
+
132
+
133
+ class ConversationHistoryResponseEvent(BaseModel):
134
+ conversation_id: ConversationId
135
+ entries: list[ResponseItem]
136
+
137
+ model_config = ConfigDict(extra="allow")
138
+
139
+
140
+ class ConversationSummary(BaseModel):
141
+ conversationId: ConversationId
142
+ path: str
143
+ preview: str
144
+ timestamp: str | None = None
145
+
146
+ model_config = ConfigDict(extra="allow")
147
+
148
+
149
+ class CustomPrompt(BaseModel):
150
+ name: str
151
+ path: str
152
+ content: str
153
+
154
+ model_config = ConfigDict(extra="allow")
155
+
156
+
157
+ class EmbeddedResource(BaseModel):
158
+ resource: EmbeddedResourceResource
159
+ type: str
160
+
161
+ model_config = ConfigDict(extra="allow")
162
+
163
+
164
+ class ErrorEvent(BaseModel):
165
+ message: str
166
+
167
+ model_config = ConfigDict(extra="allow")
168
+
169
+
170
+ class ExecApprovalRequestEvent(BaseModel):
171
+ call_id: str
172
+ command: list[str]
173
+ cwd: str
174
+ reason: str | None = None
175
+
176
+ model_config = ConfigDict(extra="allow")
177
+
178
+
179
+ class ExecCommandApprovalParams(BaseModel):
180
+ conversation_id: ConversationId
181
+ call_id: str
182
+ command: list[str]
183
+ cwd: str
184
+ reason: str | None = None
185
+
186
+ model_config = ConfigDict(extra="allow")
187
+
188
+
189
+ class ExecCommandApprovalResponse(BaseModel):
190
+ decision: ReviewDecision
191
+
192
+ model_config = ConfigDict(extra="allow")
193
+
194
+
195
+ class ExecCommandBeginEvent(BaseModel):
196
+ call_id: str
197
+ command: list[str]
198
+ cwd: str
199
+ parsed_cmd: list[ParsedCommand]
200
+
201
+ model_config = ConfigDict(extra="allow")
202
+
203
+
204
+ class ExecCommandEndEvent(BaseModel):
205
+ call_id: str
206
+ stdout: str
207
+ stderr: str
208
+ aggregated_output: str
209
+ exit_code: float
210
+ duration: str
211
+ formatted_output: str
212
+
213
+ model_config = ConfigDict(extra="allow")
214
+
215
+
216
+ class ExecCommandOutputDeltaEvent(BaseModel):
217
+ call_id: str
218
+ stream: ExecOutputStream
219
+ chunk: str
220
+
221
+ model_config = ConfigDict(extra="allow")
222
+
223
+
224
+ class ExecOneOffCommandParams(BaseModel):
225
+ command: list[str]
226
+ timeoutMs: int | None = None
227
+ cwd: str | None = None
228
+ sandboxPolicy: SandboxPolicy | None = None
229
+
230
+ model_config = ConfigDict(extra="allow")
231
+
232
+
233
+ class FunctionCallOutputPayload(BaseModel):
234
+ content: str
235
+ success: bool | None = None
236
+
237
+ model_config = ConfigDict(extra="allow")
238
+
239
+
240
+ class GetAuthStatusParams(BaseModel):
241
+ includeToken: bool | None = None
242
+ refreshToken: bool | None = None
243
+
244
+ model_config = ConfigDict(extra="allow")
245
+
246
+
247
+ class GetAuthStatusResponse(BaseModel):
248
+ authMethod: AuthMode | None = None
249
+ preferredAuthMethod: AuthMode
250
+ authToken: str | None = None
251
+
252
+ model_config = ConfigDict(extra="allow")
253
+
254
+
255
+ class GetHistoryEntryResponseEvent(BaseModel):
256
+ offset: float
257
+ log_id: int
258
+ entry: HistoryEntry | None = None
259
+
260
+ model_config = ConfigDict(extra="allow")
261
+
262
+
263
+ class GetUserAgentResponse(BaseModel):
264
+ userAgent: str
265
+
266
+ model_config = ConfigDict(extra="allow")
267
+
268
+
269
+ class GetUserSavedConfigResponse(BaseModel):
270
+ config: UserSavedConfig
271
+
272
+ model_config = ConfigDict(extra="allow")
273
+
274
+
275
+ class GitDiffToRemoteParams(BaseModel):
276
+ cwd: str
277
+
278
+ model_config = ConfigDict(extra="allow")
279
+
280
+
281
+ class GitDiffToRemoteResponse(BaseModel):
282
+ sha: GitSha
283
+ diff: str
284
+
285
+ model_config = ConfigDict(extra="allow")
286
+
287
+
288
+ class HistoryEntry(BaseModel):
289
+ conversation_id: str
290
+ ts: int
291
+ text: str
292
+
293
+ model_config = ConfigDict(extra="allow")
294
+
295
+
296
+ class ImageContent(BaseModel):
297
+ data: str
298
+ mimeType: str
299
+ type: str
300
+
301
+ model_config = ConfigDict(extra="allow")
302
+
303
+
304
+ class InitializeResult(BaseModel):
305
+ capabilities: ServerCapabilities
306
+ protocolVersion: str
307
+ serverInfo: McpServerInfo
308
+
309
+ model_config = ConfigDict(extra="allow")
310
+
311
+
312
+ class InterruptConversationParams(BaseModel):
313
+ conversationId: ConversationId
314
+
315
+ model_config = ConfigDict(extra="allow")
316
+
317
+
318
+ class InterruptConversationResponse(BaseModel):
319
+ abortReason: TurnAbortReason
320
+
321
+ model_config = ConfigDict(extra="allow")
322
+
323
+
324
+ class ListConversationsParams(BaseModel):
325
+ pageSize: float | None = None
326
+ cursor: str | None = None
327
+
328
+ model_config = ConfigDict(extra="allow")
329
+
330
+
331
+ class ListConversationsResponse(BaseModel):
332
+ items: list[ConversationSummary]
333
+ nextCursor: str | None = None
334
+
335
+ model_config = ConfigDict(extra="allow")
336
+
337
+
338
+ class ListCustomPromptsResponseEvent(BaseModel):
339
+ custom_prompts: list[CustomPrompt]
340
+
341
+ model_config = ConfigDict(extra="allow")
342
+
343
+
344
+ class LocalShellAction(BaseModel):
345
+ model_config = ConfigDict(extra="allow")
346
+
347
+
348
+ class LocalShellExecAction(BaseModel):
349
+ command: list[str]
350
+ timeout_ms: int | None = None
351
+ working_directory: str | None = None
352
+ env: dict[str, str] | None = None
353
+ user: str | None = None
354
+
355
+ model_config = ConfigDict(extra="allow")
356
+
357
+
358
+ class LoginChatGptCompleteNotification(BaseModel):
359
+ loginId: str
360
+ success: bool
361
+ error: str | None = None
362
+
363
+ model_config = ConfigDict(extra="allow")
364
+
365
+
366
+ class LoginChatGptResponse(BaseModel):
367
+ loginId: str
368
+ authUrl: str
369
+
370
+ model_config = ConfigDict(extra="allow")
371
+
372
+
373
+ class McpInvocation(BaseModel):
374
+ server: str
375
+ tool: str
376
+ arguments: JsonValue | None = None
377
+
378
+ model_config = ConfigDict(extra="allow")
379
+
380
+
381
+ class McpListToolsResponseEvent(BaseModel):
382
+ tools: dict[str, Tool]
383
+
384
+ model_config = ConfigDict(extra="allow")
385
+
386
+
387
+ class McpServerInfo(BaseModel):
388
+ name: str
389
+ version: str
390
+ user_agent: str
391
+
392
+ model_config = ConfigDict(extra="allow")
393
+
394
+
395
+ class McpToolCallBeginEvent(BaseModel):
396
+ call_id: str
397
+ invocation: McpInvocation
398
+
399
+ model_config = ConfigDict(extra="allow")
400
+
401
+
402
+ class McpToolCallEndEvent(BaseModel):
403
+ call_id: str
404
+ invocation: McpInvocation
405
+ duration: str
406
+ result: dict[str, Any]
407
+
408
+ model_config = ConfigDict(extra="allow")
409
+
410
+
411
+ class NewConversationParams(BaseModel):
412
+ model: str | None = None
413
+ profile: str | None = None
414
+ cwd: str | None = None
415
+ approvalPolicy: AskForApproval | None = None
416
+ sandbox: SandboxMode | None = None
417
+ config: dict[str, JsonValue] | None = None
418
+ baseInstructions: str | None = None
419
+ includePlanTool: bool | None = None
420
+ includeApplyPatchTool: bool | None = None
421
+
422
+ model_config = ConfigDict(extra="allow")
423
+
424
+
425
+ class NewConversationResponse(BaseModel):
426
+ conversationId: ConversationId
427
+ model: str
428
+ rolloutPath: str
429
+
430
+ model_config = ConfigDict(extra="allow")
431
+
432
+
433
+ class PatchApplyBeginEvent(BaseModel):
434
+ call_id: str
435
+ auto_approved: bool
436
+ changes: dict[str, FileChange]
437
+
438
+ model_config = ConfigDict(extra="allow")
439
+
440
+
441
+ class PatchApplyEndEvent(BaseModel):
442
+ call_id: str
443
+ stdout: str
444
+ stderr: str
445
+ success: bool
446
+
447
+ model_config = ConfigDict(extra="allow")
448
+
449
+
450
+ class PlanItemArg(BaseModel):
451
+ step: str
452
+ status: StepStatus
453
+
454
+ model_config = ConfigDict(extra="allow")
455
+
456
+
457
+ class Profile(BaseModel):
458
+ model: str | None = None
459
+ modelProvider: str | None = None
460
+ approvalPolicy: AskForApproval | None = None
461
+ modelReasoningEffort: ReasoningEffort | None = None
462
+ modelReasoningSummary: ReasoningSummary | None = None
463
+ modelVerbosity: Verbosity | None = None
464
+ chatgptBaseUrl: str | None = None
465
+
466
+ model_config = ConfigDict(extra="allow")
467
+
468
+
469
+ class ReasoningItemReasoningSummary(BaseModel):
470
+ type: Literal["summary_text"]
471
+ text: str
472
+
473
+ model_config = ConfigDict(extra="allow")
474
+
475
+
476
+ class RemoveConversationListenerParams(BaseModel):
477
+ subscriptionId: str
478
+
479
+ model_config = ConfigDict(extra="allow")
480
+
481
+
482
+ class ResourceLink(BaseModel):
483
+ name: str
484
+ type: str
485
+ uri: str
486
+
487
+ model_config = ConfigDict(extra="allow")
488
+
489
+
490
+ class ResumeConversationParams(BaseModel):
491
+ path: str
492
+ overrides: NewConversationParams | None = None
493
+
494
+ model_config = ConfigDict(extra="allow")
495
+
496
+
497
+ class ResumeConversationResponse(BaseModel):
498
+ conversationId: ConversationId
499
+ model: str
500
+ initialMessages: list[EventMsg] | None = None
501
+
502
+ model_config = ConfigDict(extra="allow")
503
+
504
+
505
+ class SandboxSettings(BaseModel):
506
+ writableRoots: list[str]
507
+ networkAccess: bool | None = None
508
+ excludeTmpdirEnvVar: bool | None = None
509
+ excludeSlashTmp: bool | None = None
510
+
511
+ model_config = ConfigDict(extra="allow")
512
+
513
+
514
+ class SendUserMessageParams(BaseModel):
515
+ conversationId: ConversationId
516
+ items: list[InputItem]
517
+
518
+ model_config = ConfigDict(extra="allow")
519
+
520
+
521
+ class SendUserTurnParams(BaseModel):
522
+ conversationId: ConversationId
523
+ items: list[InputItem]
524
+ cwd: str
525
+ approvalPolicy: AskForApproval
526
+ sandboxPolicy: SandboxPolicy
527
+ model: str
528
+ effort: ReasoningEffort
529
+ summary: ReasoningSummary
530
+
531
+ model_config = ConfigDict(extra="allow")
532
+
533
+
534
+ class ServerCapabilities(BaseModel):
535
+ model_config = ConfigDict(extra="allow")
536
+
537
+
538
+ class ServerCapabilitiesPrompts(BaseModel):
539
+ model_config = ConfigDict(extra="allow")
540
+
541
+
542
+ class ServerCapabilitiesResources(BaseModel):
543
+ model_config = ConfigDict(extra="allow")
544
+
545
+
546
+ class ServerCapabilitiesTools(BaseModel):
547
+ model_config = ConfigDict(extra="allow")
548
+
549
+
550
+ class SessionConfiguredEvent(BaseModel):
551
+ session_id: ConversationId
552
+ model: str
553
+ history_log_id: int
554
+ history_entry_count: float
555
+ initial_messages: list[EventMsg] | None = None
556
+ rollout_path: str
557
+
558
+ model_config = ConfigDict(extra="allow")
559
+
560
+
561
+ class StreamErrorEvent(BaseModel):
562
+ message: str
563
+
564
+ model_config = ConfigDict(extra="allow")
565
+
566
+
567
+ class TaskCompleteEvent(BaseModel):
568
+ last_agent_message: str | None = None
569
+
570
+ model_config = ConfigDict(extra="allow")
571
+
572
+
573
+ class TaskStartedEvent(BaseModel):
574
+ model_context_window: int | None = None
575
+
576
+ model_config = ConfigDict(extra="allow")
577
+
578
+
579
+ class TextContent(BaseModel):
580
+ text: str
581
+ type: str
582
+
583
+ model_config = ConfigDict(extra="allow")
584
+
585
+
586
+ class TextResourceContents(BaseModel):
587
+ text: str
588
+ uri: str
589
+
590
+ model_config = ConfigDict(extra="allow")
591
+
592
+
593
+ class TokenCountEvent(BaseModel):
594
+ info: TokenUsageInfo | None = None
595
+
596
+ model_config = ConfigDict(extra="allow")
597
+
598
+
599
+ class TokenUsage(BaseModel):
600
+ input_tokens: int
601
+ cached_input_tokens: int
602
+ output_tokens: int
603
+ reasoning_output_tokens: int
604
+ total_tokens: int
605
+
606
+ model_config = ConfigDict(extra="allow")
607
+
608
+
609
+ class TokenUsageInfo(BaseModel):
610
+ total_token_usage: TokenUsage
611
+ last_token_usage: TokenUsage
612
+ model_context_window: int | None = None
613
+
614
+ model_config = ConfigDict(extra="allow")
615
+
616
+
617
+ class Tool(BaseModel):
618
+ inputSchema: ToolInputSchema
619
+ name: str
620
+
621
+ model_config = ConfigDict(extra="allow")
622
+
623
+
624
+ class ToolAnnotations(BaseModel):
625
+ model_config = ConfigDict(extra="allow")
626
+
627
+
628
+ class ToolInputSchema(BaseModel):
629
+ type: str
630
+
631
+ model_config = ConfigDict(extra="allow")
632
+
633
+
634
+ class ToolOutputSchema(BaseModel):
635
+ type: str
636
+
637
+ model_config = ConfigDict(extra="allow")
638
+
639
+
640
+ class Tools(BaseModel):
641
+ webSearch: bool | None = None
642
+ viewImage: bool | None = None
643
+
644
+ model_config = ConfigDict(extra="allow")
645
+
646
+
647
+ class TurnAbortedEvent(BaseModel):
648
+ reason: TurnAbortReason
649
+
650
+ model_config = ConfigDict(extra="allow")
651
+
652
+
653
+ class TurnDiffEvent(BaseModel):
654
+ unified_diff: str
655
+
656
+ model_config = ConfigDict(extra="allow")
657
+
658
+
659
+ class UpdatePlanArgs(BaseModel):
660
+ explanation: str | None = None
661
+ plan: list[PlanItemArg]
662
+
663
+ model_config = ConfigDict(extra="allow")
664
+
665
+
666
+ class UserMessageEvent(BaseModel):
667
+ message: str
668
+ kind: InputMessageKind | None = None
669
+
670
+ model_config = ConfigDict(extra="allow")
671
+
672
+
673
+ class UserSavedConfig(BaseModel):
674
+ approvalPolicy: AskForApproval | None = None
675
+ sandboxMode: SandboxMode | None = None
676
+ sandboxSettings: SandboxSettings | None = None
677
+ model: str | None = None
678
+ modelReasoningEffort: ReasoningEffort | None = None
679
+ modelReasoningSummary: ReasoningSummary | None = None
680
+ modelVerbosity: Verbosity | None = None
681
+ tools: Tools | None = None
682
+ profile: str | None = None
683
+ profiles: dict[str, Profile]
684
+
685
+ model_config = ConfigDict(extra="allow")
686
+
687
+
688
+ class WebSearchBeginEvent(BaseModel):
689
+ call_id: str
690
+
691
+ model_config = ConfigDict(extra="allow")
692
+
693
+
694
+ class WebSearchEndEvent(BaseModel):
695
+ call_id: str
696
+ query: str
697
+
698
+ model_config = ConfigDict(extra="allow")
699
+
700
+
701
+ class AskForApproval_Variant1(BaseModel):
702
+ model_config = ConfigDict(extra="allow")
703
+
704
+
705
+ class AskForApproval_Variant2(BaseModel):
706
+ model_config = ConfigDict(extra="allow")
707
+
708
+
709
+ class AskForApproval_Variant3(BaseModel):
710
+ model_config = ConfigDict(extra="allow")
711
+
712
+
713
+ class AskForApproval_Variant4(BaseModel):
714
+ model_config = ConfigDict(extra="allow")
715
+
716
+
717
+ class AuthMode_Variant1(BaseModel):
718
+ model_config = ConfigDict(extra="allow")
719
+
720
+
721
+ class AuthMode_Variant2(BaseModel):
722
+ model_config = ConfigDict(extra="allow")
723
+
724
+
725
+ class ClientRequest_NewConversation(BaseModel):
726
+ method: Literal["newConversation"]
727
+ id: RequestId
728
+ params: NewConversationParams
729
+
730
+ model_config = ConfigDict(extra="allow")
731
+
732
+
733
+ class ClientRequest_ListConversations(BaseModel):
734
+ method: Literal["listConversations"]
735
+ id: RequestId
736
+ params: ListConversationsParams
737
+
738
+ model_config = ConfigDict(extra="allow")
739
+
740
+
741
+ class ClientRequest_ResumeConversation(BaseModel):
742
+ method: Literal["resumeConversation"]
743
+ id: RequestId
744
+ params: ResumeConversationParams
745
+
746
+ model_config = ConfigDict(extra="allow")
747
+
748
+
749
+ class ClientRequest_ArchiveConversation(BaseModel):
750
+ method: Literal["archiveConversation"]
751
+ id: RequestId
752
+ params: ArchiveConversationParams
753
+
754
+ model_config = ConfigDict(extra="allow")
755
+
756
+
757
+ class ClientRequest_SendUserMessage(BaseModel):
758
+ method: Literal["sendUserMessage"]
759
+ id: RequestId
760
+ params: SendUserMessageParams
761
+
762
+ model_config = ConfigDict(extra="allow")
763
+
764
+
765
+ class ClientRequest_SendUserTurn(BaseModel):
766
+ method: Literal["sendUserTurn"]
767
+ id: RequestId
768
+ params: SendUserTurnParams
769
+
770
+ model_config = ConfigDict(extra="allow")
771
+
772
+
773
+ class ClientRequest_InterruptConversation(BaseModel):
774
+ method: Literal["interruptConversation"]
775
+ id: RequestId
776
+ params: InterruptConversationParams
777
+
778
+ model_config = ConfigDict(extra="allow")
779
+
780
+
781
+ class ClientRequest_AddConversationListener(BaseModel):
782
+ method: Literal["addConversationListener"]
783
+ id: RequestId
784
+ params: AddConversationListenerParams
785
+
786
+ model_config = ConfigDict(extra="allow")
787
+
788
+
789
+ class ClientRequest_RemoveConversationListener(BaseModel):
790
+ method: Literal["removeConversationListener"]
791
+ id: RequestId
792
+ params: RemoveConversationListenerParams
793
+
794
+ model_config = ConfigDict(extra="allow")
795
+
796
+
797
+ class ClientRequest_GitDiffToRemote(BaseModel):
798
+ method: Literal["gitDiffToRemote"]
799
+ id: RequestId
800
+ params: GitDiffToRemoteParams
801
+
802
+ model_config = ConfigDict(extra="allow")
803
+
804
+
805
+ class ClientRequest_LoginChatGpt(BaseModel):
806
+ method: Literal["loginChatGpt"]
807
+ id: RequestId
808
+
809
+ model_config = ConfigDict(extra="allow")
810
+
811
+
812
+ class ClientRequest_CancelLoginChatGpt(BaseModel):
813
+ method: Literal["cancelLoginChatGpt"]
814
+ id: RequestId
815
+ params: CancelLoginChatGptParams
816
+
817
+ model_config = ConfigDict(extra="allow")
818
+
819
+
820
+ class ClientRequest_LogoutChatGpt(BaseModel):
821
+ method: Literal["logoutChatGpt"]
822
+ id: RequestId
823
+
824
+ model_config = ConfigDict(extra="allow")
825
+
826
+
827
+ class ClientRequest_GetAuthStatus(BaseModel):
828
+ method: Literal["getAuthStatus"]
829
+ id: RequestId
830
+ params: GetAuthStatusParams
831
+
832
+ model_config = ConfigDict(extra="allow")
833
+
834
+
835
+ class ClientRequest_GetUserSavedConfig(BaseModel):
836
+ method: Literal["getUserSavedConfig"]
837
+ id: RequestId
838
+
839
+ model_config = ConfigDict(extra="allow")
840
+
841
+
842
+ class ClientRequest_GetUserAgent(BaseModel):
843
+ method: Literal["getUserAgent"]
844
+ id: RequestId
845
+
846
+ model_config = ConfigDict(extra="allow")
847
+
848
+
849
+ class ClientRequest_ExecOneOffCommand(BaseModel):
850
+ method: Literal["execOneOffCommand"]
851
+ id: RequestId
852
+ params: ExecOneOffCommandParams
853
+
854
+ model_config = ConfigDict(extra="allow")
855
+
856
+
857
+ class ContentBlock_Variant1(BaseModel):
858
+ text: str
859
+ type: str
860
+
861
+ model_config = ConfigDict(extra="allow")
862
+
863
+
864
+ class ContentBlock_Variant2(BaseModel):
865
+ data: str
866
+ mimeType: str
867
+ type: str
868
+
869
+ model_config = ConfigDict(extra="allow")
870
+
871
+
872
+ class ContentBlock_Variant3(BaseModel):
873
+ data: str
874
+ mimeType: str
875
+ type: str
876
+
877
+ model_config = ConfigDict(extra="allow")
878
+
879
+
880
+ class ContentBlock_Variant4(BaseModel):
881
+ name: str
882
+ type: str
883
+ uri: str
884
+
885
+ model_config = ConfigDict(extra="allow")
886
+
887
+
888
+ class ContentBlock_Variant5(BaseModel):
889
+ resource: EmbeddedResourceResource
890
+ type: str
891
+
892
+ model_config = ConfigDict(extra="allow")
893
+
894
+
895
+ class ContentItem_InputText(BaseModel):
896
+ type: Literal["input_text"]
897
+ text: str
898
+
899
+ model_config = ConfigDict(extra="allow")
900
+
901
+
902
+ class ContentItem_InputImage(BaseModel):
903
+ type: Literal["input_image"]
904
+ image_url: str
905
+
906
+ model_config = ConfigDict(extra="allow")
907
+
908
+
909
+ class ContentItem_OutputText(BaseModel):
910
+ type: Literal["output_text"]
911
+ text: str
912
+
913
+ model_config = ConfigDict(extra="allow")
914
+
915
+
916
+ class EmbeddedResourceResource_Variant1(BaseModel):
917
+ text: str
918
+ uri: str
919
+
920
+ model_config = ConfigDict(extra="allow")
921
+
922
+
923
+ class EmbeddedResourceResource_Variant2(BaseModel):
924
+ blob: str
925
+ uri: str
926
+
927
+ model_config = ConfigDict(extra="allow")
928
+
929
+
930
+ class EventMsg_Error(BaseModel):
931
+ type: Literal["error"]
932
+ message: str
933
+
934
+ model_config = ConfigDict(extra="allow")
935
+
936
+
937
+ class EventMsg_TaskStarted(BaseModel):
938
+ type: Literal["task_started"]
939
+ model_context_window: int | None = None
940
+
941
+ model_config = ConfigDict(extra="allow")
942
+
943
+
944
+ class EventMsg_TaskComplete(BaseModel):
945
+ type: Literal["task_complete"]
946
+ last_agent_message: str | None = None
947
+
948
+ model_config = ConfigDict(extra="allow")
949
+
950
+
951
+ class EventMsg_TokenCount(BaseModel):
952
+ type: Literal["token_count"]
953
+ info: TokenUsageInfo | None = None
954
+
955
+ model_config = ConfigDict(extra="allow")
956
+
957
+
958
+ class EventMsg_AgentMessage(BaseModel):
959
+ type: Literal["agent_message"]
960
+ message: str
961
+
962
+ model_config = ConfigDict(extra="allow")
963
+
964
+
965
+ class EventMsg_UserMessage(BaseModel):
966
+ type: Literal["user_message"]
967
+ message: str
968
+ kind: InputMessageKind | None = None
969
+
970
+ model_config = ConfigDict(extra="allow")
971
+
972
+
973
+ class EventMsg_AgentMessageDelta(BaseModel):
974
+ type: Literal["agent_message_delta"]
975
+ delta: str
976
+
977
+ model_config = ConfigDict(extra="allow")
978
+
979
+
980
+ class EventMsg_AgentReasoning(BaseModel):
981
+ type: Literal["agent_reasoning"]
982
+ text: str
983
+
984
+ model_config = ConfigDict(extra="allow")
985
+
986
+
987
+ class EventMsg_AgentReasoningDelta(BaseModel):
988
+ type: Literal["agent_reasoning_delta"]
989
+ delta: str
990
+
991
+ model_config = ConfigDict(extra="allow")
992
+
993
+
994
+ class EventMsg_AgentReasoningRawContent(BaseModel):
995
+ type: Literal["agent_reasoning_raw_content"]
996
+ text: str
997
+
998
+ model_config = ConfigDict(extra="allow")
999
+
1000
+
1001
+ class EventMsg_AgentReasoningRawContentDelta(BaseModel):
1002
+ type: Literal["agent_reasoning_raw_content_delta"]
1003
+ delta: str
1004
+
1005
+ model_config = ConfigDict(extra="allow")
1006
+
1007
+
1008
+ class EventMsg_AgentReasoningSectionBreak(BaseModel):
1009
+ type: Literal["agent_reasoning_section_break"]
1010
+
1011
+ model_config = ConfigDict(extra="allow")
1012
+
1013
+
1014
+ class EventMsg_SessionConfigured(BaseModel):
1015
+ type: Literal["session_configured"]
1016
+ session_id: ConversationId
1017
+ model: str
1018
+ history_log_id: int
1019
+ history_entry_count: float
1020
+ initial_messages: list[EventMsg] | None = None
1021
+ rollout_path: str
1022
+
1023
+ model_config = ConfigDict(extra="allow")
1024
+
1025
+
1026
+ class EventMsg_McpToolCallBegin(BaseModel):
1027
+ type: Literal["mcp_tool_call_begin"]
1028
+ call_id: str
1029
+ invocation: McpInvocation
1030
+
1031
+ model_config = ConfigDict(extra="allow")
1032
+
1033
+
1034
+ class EventMsg_McpToolCallEnd(BaseModel):
1035
+ type: Literal["mcp_tool_call_end"]
1036
+ call_id: str
1037
+ invocation: McpInvocation
1038
+ duration: str
1039
+ result: dict[str, Any]
1040
+
1041
+ model_config = ConfigDict(extra="allow")
1042
+
1043
+
1044
+ class EventMsg_WebSearchBegin(BaseModel):
1045
+ type: Literal["web_search_begin"]
1046
+ call_id: str
1047
+
1048
+ model_config = ConfigDict(extra="allow")
1049
+
1050
+
1051
+ class EventMsg_WebSearchEnd(BaseModel):
1052
+ type: Literal["web_search_end"]
1053
+ call_id: str
1054
+ query: str
1055
+
1056
+ model_config = ConfigDict(extra="allow")
1057
+
1058
+
1059
+ class EventMsg_ExecCommandBegin(BaseModel):
1060
+ type: Literal["exec_command_begin"]
1061
+ call_id: str
1062
+ command: list[str]
1063
+ cwd: str
1064
+ parsed_cmd: list[ParsedCommand]
1065
+
1066
+ model_config = ConfigDict(extra="allow")
1067
+
1068
+
1069
+ class EventMsg_ExecCommandOutputDelta(BaseModel):
1070
+ type: Literal["exec_command_output_delta"]
1071
+ call_id: str
1072
+ stream: ExecOutputStream
1073
+ chunk: str
1074
+
1075
+ model_config = ConfigDict(extra="allow")
1076
+
1077
+
1078
+ class EventMsg_ExecCommandEnd(BaseModel):
1079
+ type: Literal["exec_command_end"]
1080
+ call_id: str
1081
+ stdout: str
1082
+ stderr: str
1083
+ aggregated_output: str
1084
+ exit_code: float
1085
+ duration: str
1086
+ formatted_output: str
1087
+
1088
+ model_config = ConfigDict(extra="allow")
1089
+
1090
+
1091
+ class EventMsg_ExecApprovalRequest(BaseModel):
1092
+ type: Literal["exec_approval_request"]
1093
+ call_id: str
1094
+ command: list[str]
1095
+ cwd: str
1096
+ reason: str | None = None
1097
+
1098
+ model_config = ConfigDict(extra="allow")
1099
+
1100
+
1101
+ class EventMsg_ApplyPatchApprovalRequest(BaseModel):
1102
+ type: Literal["apply_patch_approval_request"]
1103
+ call_id: str
1104
+ changes: dict[str, FileChange]
1105
+ reason: str | None = None
1106
+ grant_root: str | None = None
1107
+
1108
+ model_config = ConfigDict(extra="allow")
1109
+
1110
+
1111
+ class EventMsg_BackgroundEvent(BaseModel):
1112
+ type: Literal["background_event"]
1113
+ message: str
1114
+
1115
+ model_config = ConfigDict(extra="allow")
1116
+
1117
+
1118
+ class EventMsg_StreamError(BaseModel):
1119
+ type: Literal["stream_error"]
1120
+ message: str
1121
+
1122
+ model_config = ConfigDict(extra="allow")
1123
+
1124
+
1125
+ class EventMsg_PatchApplyBegin(BaseModel):
1126
+ type: Literal["patch_apply_begin"]
1127
+ call_id: str
1128
+ auto_approved: bool
1129
+ changes: dict[str, FileChange]
1130
+
1131
+ model_config = ConfigDict(extra="allow")
1132
+
1133
+
1134
+ class EventMsg_PatchApplyEnd(BaseModel):
1135
+ type: Literal["patch_apply_end"]
1136
+ call_id: str
1137
+ stdout: str
1138
+ stderr: str
1139
+ success: bool
1140
+
1141
+ model_config = ConfigDict(extra="allow")
1142
+
1143
+
1144
+ class EventMsg_TurnDiff(BaseModel):
1145
+ type: Literal["turn_diff"]
1146
+ unified_diff: str
1147
+
1148
+ model_config = ConfigDict(extra="allow")
1149
+
1150
+
1151
+ class EventMsg_GetHistoryEntryResponse(BaseModel):
1152
+ type: Literal["get_history_entry_response"]
1153
+ offset: float
1154
+ log_id: int
1155
+ entry: HistoryEntry | None = None
1156
+
1157
+ model_config = ConfigDict(extra="allow")
1158
+
1159
+
1160
+ class EventMsg_McpListToolsResponse(BaseModel):
1161
+ type: Literal["mcp_list_tools_response"]
1162
+ tools: dict[str, Tool]
1163
+
1164
+ model_config = ConfigDict(extra="allow")
1165
+
1166
+
1167
+ class EventMsg_ListCustomPromptsResponse(BaseModel):
1168
+ type: Literal["list_custom_prompts_response"]
1169
+ custom_prompts: list[CustomPrompt]
1170
+
1171
+ model_config = ConfigDict(extra="allow")
1172
+
1173
+
1174
+ class EventMsg_PlanUpdate(BaseModel):
1175
+ type: Literal["plan_update"]
1176
+ explanation: str | None = None
1177
+ plan: list[PlanItemArg]
1178
+
1179
+ model_config = ConfigDict(extra="allow")
1180
+
1181
+
1182
+ class EventMsg_TurnAborted(BaseModel):
1183
+ type: Literal["turn_aborted"]
1184
+ reason: TurnAbortReason
1185
+
1186
+ model_config = ConfigDict(extra="allow")
1187
+
1188
+
1189
+ class EventMsg_ShutdownComplete(BaseModel):
1190
+ type: Literal["shutdown_complete"]
1191
+
1192
+ model_config = ConfigDict(extra="allow")
1193
+
1194
+
1195
+ class EventMsg_ConversationHistory(BaseModel):
1196
+ type: Literal["conversation_history"]
1197
+ conversation_id: ConversationId
1198
+ entries: list[ResponseItem]
1199
+
1200
+ model_config = ConfigDict(extra="allow")
1201
+
1202
+
1203
+ class ExecOutputStream_Variant1(BaseModel):
1204
+ model_config = ConfigDict(extra="allow")
1205
+
1206
+
1207
+ class ExecOutputStream_Variant2(BaseModel):
1208
+ model_config = ConfigDict(extra="allow")
1209
+
1210
+
1211
+ class FileChange_Variant1(BaseModel):
1212
+ add: dict[str, Any]
1213
+
1214
+ model_config = ConfigDict(extra="allow")
1215
+
1216
+
1217
+ class FileChange_Variant2(BaseModel):
1218
+ delete: dict[str, Any]
1219
+
1220
+ model_config = ConfigDict(extra="allow")
1221
+
1222
+
1223
+ class FileChange_Variant3(BaseModel):
1224
+ update: dict[str, Any]
1225
+
1226
+ model_config = ConfigDict(extra="allow")
1227
+
1228
+
1229
+ class InputItem_Text(BaseModel):
1230
+ type: Literal["text"]
1231
+ data: dict[str, Any]
1232
+
1233
+ model_config = ConfigDict(extra="allow")
1234
+
1235
+
1236
+ class InputItem_Image(BaseModel):
1237
+ type: Literal["image"]
1238
+ data: dict[str, Any]
1239
+
1240
+ model_config = ConfigDict(extra="allow")
1241
+
1242
+
1243
+ class InputItem_LocalImage(BaseModel):
1244
+ type: Literal["localImage"]
1245
+ data: dict[str, Any]
1246
+
1247
+ model_config = ConfigDict(extra="allow")
1248
+
1249
+
1250
+ class InputMessageKind_Variant1(BaseModel):
1251
+ model_config = ConfigDict(extra="allow")
1252
+
1253
+
1254
+ class InputMessageKind_Variant2(BaseModel):
1255
+ model_config = ConfigDict(extra="allow")
1256
+
1257
+
1258
+ class InputMessageKind_Variant3(BaseModel):
1259
+ model_config = ConfigDict(extra="allow")
1260
+
1261
+
1262
+ class LocalShellStatus_Variant1(BaseModel):
1263
+ model_config = ConfigDict(extra="allow")
1264
+
1265
+
1266
+ class LocalShellStatus_Variant2(BaseModel):
1267
+ model_config = ConfigDict(extra="allow")
1268
+
1269
+
1270
+ class LocalShellStatus_Variant3(BaseModel):
1271
+ model_config = ConfigDict(extra="allow")
1272
+
1273
+
1274
+ class ParsedCommand_Read(BaseModel):
1275
+ type: Literal["read"]
1276
+ cmd: str
1277
+ name: str
1278
+
1279
+ model_config = ConfigDict(extra="allow")
1280
+
1281
+
1282
+ class ParsedCommand_ListFiles(BaseModel):
1283
+ type: Literal["list_files"]
1284
+ cmd: str
1285
+ path: str | None = None
1286
+
1287
+ model_config = ConfigDict(extra="allow")
1288
+
1289
+
1290
+ class ParsedCommand_Search(BaseModel):
1291
+ type: Literal["search"]
1292
+ cmd: str
1293
+ query: str | None = None
1294
+ path: str | None = None
1295
+
1296
+ model_config = ConfigDict(extra="allow")
1297
+
1298
+
1299
+ class ParsedCommand_Unknown(BaseModel):
1300
+ type: Literal["unknown"]
1301
+ cmd: str
1302
+
1303
+ model_config = ConfigDict(extra="allow")
1304
+
1305
+
1306
+ class ReasoningEffort_Variant1(BaseModel):
1307
+ model_config = ConfigDict(extra="allow")
1308
+
1309
+
1310
+ class ReasoningEffort_Variant2(BaseModel):
1311
+ model_config = ConfigDict(extra="allow")
1312
+
1313
+
1314
+ class ReasoningEffort_Variant3(BaseModel):
1315
+ model_config = ConfigDict(extra="allow")
1316
+
1317
+
1318
+ class ReasoningEffort_Variant4(BaseModel):
1319
+ model_config = ConfigDict(extra="allow")
1320
+
1321
+
1322
+ class ReasoningItemContent_ReasoningText(BaseModel):
1323
+ type: Literal["reasoning_text"]
1324
+ text: str
1325
+
1326
+ model_config = ConfigDict(extra="allow")
1327
+
1328
+
1329
+ class ReasoningItemContent_Text(BaseModel):
1330
+ type: Literal["text"]
1331
+ text: str
1332
+
1333
+ model_config = ConfigDict(extra="allow")
1334
+
1335
+
1336
+ class ReasoningSummary_Variant1(BaseModel):
1337
+ model_config = ConfigDict(extra="allow")
1338
+
1339
+
1340
+ class ReasoningSummary_Variant2(BaseModel):
1341
+ model_config = ConfigDict(extra="allow")
1342
+
1343
+
1344
+ class ReasoningSummary_Variant3(BaseModel):
1345
+ model_config = ConfigDict(extra="allow")
1346
+
1347
+
1348
+ class ReasoningSummary_Variant4(BaseModel):
1349
+ model_config = ConfigDict(extra="allow")
1350
+
1351
+
1352
+ class RequestId_Variant1(BaseModel):
1353
+ model_config = ConfigDict(extra="allow")
1354
+
1355
+
1356
+ class RequestId_Variant2(BaseModel):
1357
+ model_config = ConfigDict(extra="allow")
1358
+
1359
+
1360
+ class ResponseItem_Message(BaseModel):
1361
+ type: Literal["message"]
1362
+ id: str | None = None
1363
+ role: str
1364
+ content: list[ContentItem]
1365
+
1366
+ model_config = ConfigDict(extra="allow")
1367
+
1368
+
1369
+ class ResponseItem_Reasoning(BaseModel):
1370
+ type: Literal["reasoning"]
1371
+ summary: list[ReasoningItemReasoningSummary]
1372
+ encrypted_content: str | None = None
1373
+
1374
+ model_config = ConfigDict(extra="allow")
1375
+
1376
+
1377
+ class ResponseItem_LocalShellCall(BaseModel):
1378
+ type: Literal["local_shell_call"]
1379
+ id: str | None = None
1380
+ call_id: str | None = None
1381
+ status: LocalShellStatus
1382
+ action: LocalShellAction
1383
+
1384
+ model_config = ConfigDict(extra="allow")
1385
+
1386
+
1387
+ class ResponseItem_FunctionCall(BaseModel):
1388
+ type: Literal["function_call"]
1389
+ id: str | None = None
1390
+ name: str
1391
+ arguments: str
1392
+ call_id: str
1393
+
1394
+ model_config = ConfigDict(extra="allow")
1395
+
1396
+
1397
+ class ResponseItem_FunctionCallOutput(BaseModel):
1398
+ type: Literal["function_call_output"]
1399
+ call_id: str
1400
+ output: FunctionCallOutputPayload
1401
+
1402
+ model_config = ConfigDict(extra="allow")
1403
+
1404
+
1405
+ class ResponseItem_CustomToolCall(BaseModel):
1406
+ type: Literal["custom_tool_call"]
1407
+ id: str | None = None
1408
+ call_id: str
1409
+ name: str
1410
+ input: str
1411
+
1412
+ model_config = ConfigDict(extra="allow")
1413
+
1414
+
1415
+ class ResponseItem_CustomToolCallOutput(BaseModel):
1416
+ type: Literal["custom_tool_call_output"]
1417
+ call_id: str
1418
+ output: str
1419
+
1420
+ model_config = ConfigDict(extra="allow")
1421
+
1422
+
1423
+ class ResponseItem_WebSearchCall(BaseModel):
1424
+ type: Literal["web_search_call"]
1425
+ id: str | None = None
1426
+ action: WebSearchAction
1427
+
1428
+ model_config = ConfigDict(extra="allow")
1429
+
1430
+
1431
+ class ResponseItem_Other(BaseModel):
1432
+ type: Literal["other"]
1433
+
1434
+ model_config = ConfigDict(extra="allow")
1435
+
1436
+
1437
+ class ReviewDecision_Variant1(BaseModel):
1438
+ model_config = ConfigDict(extra="allow")
1439
+
1440
+
1441
+ class ReviewDecision_Variant2(BaseModel):
1442
+ model_config = ConfigDict(extra="allow")
1443
+
1444
+
1445
+ class ReviewDecision_Variant3(BaseModel):
1446
+ model_config = ConfigDict(extra="allow")
1447
+
1448
+
1449
+ class ReviewDecision_Variant4(BaseModel):
1450
+ model_config = ConfigDict(extra="allow")
1451
+
1452
+
1453
+ class Role_Variant1(BaseModel):
1454
+ model_config = ConfigDict(extra="allow")
1455
+
1456
+
1457
+ class Role_Variant2(BaseModel):
1458
+ model_config = ConfigDict(extra="allow")
1459
+
1460
+
1461
+ class SandboxMode_Variant1(BaseModel):
1462
+ model_config = ConfigDict(extra="allow")
1463
+
1464
+
1465
+ class SandboxMode_Variant2(BaseModel):
1466
+ model_config = ConfigDict(extra="allow")
1467
+
1468
+
1469
+ class SandboxMode_Variant3(BaseModel):
1470
+ model_config = ConfigDict(extra="allow")
1471
+
1472
+
1473
+ class SandboxPolicy_Variant1(BaseModel):
1474
+ mode: Literal["danger-full-access"]
1475
+
1476
+ model_config = ConfigDict(extra="allow")
1477
+
1478
+
1479
+ class SandboxPolicy_Variant2(BaseModel):
1480
+ mode: Literal["read-only"]
1481
+
1482
+ model_config = ConfigDict(extra="allow")
1483
+
1484
+
1485
+ class SandboxPolicy_Variant3(BaseModel):
1486
+ mode: Literal["workspace-write"]
1487
+ network_access: bool
1488
+ exclude_tmpdir_env_var: bool
1489
+ exclude_slash_tmp: bool
1490
+
1491
+ model_config = ConfigDict(extra="allow")
1492
+
1493
+
1494
+ class ServerNotification_AuthStatusChange(BaseModel):
1495
+ method: Literal["authStatusChange"]
1496
+ params: AuthStatusChangeNotification
1497
+
1498
+ model_config = ConfigDict(extra="allow")
1499
+
1500
+
1501
+ class ServerNotification_LoginChatGptComplete(BaseModel):
1502
+ method: Literal["loginChatGptComplete"]
1503
+ params: LoginChatGptCompleteNotification
1504
+
1505
+ model_config = ConfigDict(extra="allow")
1506
+
1507
+
1508
+ class ServerRequest_ApplyPatchApproval(BaseModel):
1509
+ method: Literal["applyPatchApproval"]
1510
+ id: RequestId
1511
+ params: ApplyPatchApprovalParams
1512
+
1513
+ model_config = ConfigDict(extra="allow")
1514
+
1515
+
1516
+ class ServerRequest_ExecCommandApproval(BaseModel):
1517
+ method: Literal["execCommandApproval"]
1518
+ id: RequestId
1519
+ params: ExecCommandApprovalParams
1520
+
1521
+ model_config = ConfigDict(extra="allow")
1522
+
1523
+
1524
+ class StepStatus_Variant1(BaseModel):
1525
+ model_config = ConfigDict(extra="allow")
1526
+
1527
+
1528
+ class StepStatus_Variant2(BaseModel):
1529
+ model_config = ConfigDict(extra="allow")
1530
+
1531
+
1532
+ class StepStatus_Variant3(BaseModel):
1533
+ model_config = ConfigDict(extra="allow")
1534
+
1535
+
1536
+ class TurnAbortReason_Variant1(BaseModel):
1537
+ model_config = ConfigDict(extra="allow")
1538
+
1539
+
1540
+ class TurnAbortReason_Variant2(BaseModel):
1541
+ model_config = ConfigDict(extra="allow")
1542
+
1543
+
1544
+ class Verbosity_Variant1(BaseModel):
1545
+ model_config = ConfigDict(extra="allow")
1546
+
1547
+
1548
+ class Verbosity_Variant2(BaseModel):
1549
+ model_config = ConfigDict(extra="allow")
1550
+
1551
+
1552
+ class Verbosity_Variant3(BaseModel):
1553
+ model_config = ConfigDict(extra="allow")
1554
+
1555
+
1556
+ class WebSearchAction_Search(BaseModel):
1557
+ type: Literal["search"]
1558
+ query: str
1559
+
1560
+ model_config = ConfigDict(extra="allow")
1561
+
1562
+
1563
+ class WebSearchAction_Other(BaseModel):
1564
+ type: Literal["other"]
1565
+
1566
+ model_config = ConfigDict(extra="allow")
1567
+
1568
+
1569
+ class AgentReasoningSectionBreakEvent(BaseModel):
1570
+ model_config = ConfigDict(extra="allow")
1571
+
1572
+
1573
+ class ArchiveConversationResponse(BaseModel):
1574
+ model_config = ConfigDict(extra="allow")
1575
+
1576
+
1577
+ class CancelLoginChatGptResponse(BaseModel):
1578
+ model_config = ConfigDict(extra="allow")
1579
+
1580
+
1581
+ class LogoutChatGptResponse(BaseModel):
1582
+ model_config = ConfigDict(extra="allow")
1583
+
1584
+
1585
+ class RemoveConversationSubscriptionResponse(BaseModel):
1586
+ model_config = ConfigDict(extra="allow")
1587
+
1588
+
1589
+ class SendUserMessageResponse(BaseModel):
1590
+ model_config = ConfigDict(extra="allow")
1591
+
1592
+
1593
+ class SendUserTurnResponse(BaseModel):
1594
+ model_config = ConfigDict(extra="allow")
1595
+
1596
+
1597
+ AskForApproval = (
1598
+ AskForApproval_Variant1
1599
+ | AskForApproval_Variant2
1600
+ | AskForApproval_Variant3
1601
+ | AskForApproval_Variant4
1602
+ )
1603
+ AuthMode = AuthMode_Variant1 | AuthMode_Variant2
1604
+ ClientRequest = (
1605
+ ClientRequest_NewConversation
1606
+ | ClientRequest_ListConversations
1607
+ | ClientRequest_ResumeConversation
1608
+ | ClientRequest_ArchiveConversation
1609
+ | ClientRequest_SendUserMessage
1610
+ | ClientRequest_SendUserTurn
1611
+ | ClientRequest_InterruptConversation
1612
+ | ClientRequest_AddConversationListener
1613
+ | ClientRequest_RemoveConversationListener
1614
+ | ClientRequest_GitDiffToRemote
1615
+ | ClientRequest_LoginChatGpt
1616
+ | ClientRequest_CancelLoginChatGpt
1617
+ | ClientRequest_LogoutChatGpt
1618
+ | ClientRequest_GetAuthStatus
1619
+ | ClientRequest_GetUserSavedConfig
1620
+ | ClientRequest_GetUserAgent
1621
+ | ClientRequest_ExecOneOffCommand
1622
+ )
1623
+ ContentBlock = (
1624
+ ContentBlock_Variant1
1625
+ | ContentBlock_Variant2
1626
+ | ContentBlock_Variant3
1627
+ | ContentBlock_Variant4
1628
+ | ContentBlock_Variant5
1629
+ )
1630
+ ContentItem = ContentItem_InputText | ContentItem_InputImage | ContentItem_OutputText
1631
+ EmbeddedResourceResource = EmbeddedResourceResource_Variant1 | EmbeddedResourceResource_Variant2
1632
+ EventMsg = (
1633
+ EventMsg_Error
1634
+ | EventMsg_TaskStarted
1635
+ | EventMsg_TaskComplete
1636
+ | EventMsg_TokenCount
1637
+ | EventMsg_AgentMessage
1638
+ | EventMsg_UserMessage
1639
+ | EventMsg_AgentMessageDelta
1640
+ | EventMsg_AgentReasoning
1641
+ | EventMsg_AgentReasoningDelta
1642
+ | EventMsg_AgentReasoningRawContent
1643
+ | EventMsg_AgentReasoningRawContentDelta
1644
+ | EventMsg_AgentReasoningSectionBreak
1645
+ | EventMsg_SessionConfigured
1646
+ | EventMsg_McpToolCallBegin
1647
+ | EventMsg_McpToolCallEnd
1648
+ | EventMsg_WebSearchBegin
1649
+ | EventMsg_WebSearchEnd
1650
+ | EventMsg_ExecCommandBegin
1651
+ | EventMsg_ExecCommandOutputDelta
1652
+ | EventMsg_ExecCommandEnd
1653
+ | EventMsg_ExecApprovalRequest
1654
+ | EventMsg_ApplyPatchApprovalRequest
1655
+ | EventMsg_BackgroundEvent
1656
+ | EventMsg_StreamError
1657
+ | EventMsg_PatchApplyBegin
1658
+ | EventMsg_PatchApplyEnd
1659
+ | EventMsg_TurnDiff
1660
+ | EventMsg_GetHistoryEntryResponse
1661
+ | EventMsg_McpListToolsResponse
1662
+ | EventMsg_ListCustomPromptsResponse
1663
+ | EventMsg_PlanUpdate
1664
+ | EventMsg_TurnAborted
1665
+ | EventMsg_ShutdownComplete
1666
+ | EventMsg_ConversationHistory
1667
+ )
1668
+ ExecOutputStream = ExecOutputStream_Variant1 | ExecOutputStream_Variant2
1669
+ FileChange = FileChange_Variant1 | FileChange_Variant2 | FileChange_Variant3
1670
+ InputItem = InputItem_Text | InputItem_Image | InputItem_LocalImage
1671
+ InputMessageKind = InputMessageKind_Variant1 | InputMessageKind_Variant2 | InputMessageKind_Variant3
1672
+ LocalShellStatus = LocalShellStatus_Variant1 | LocalShellStatus_Variant2 | LocalShellStatus_Variant3
1673
+ ParsedCommand = (
1674
+ ParsedCommand_Read | ParsedCommand_ListFiles | ParsedCommand_Search | ParsedCommand_Unknown
1675
+ )
1676
+ ReasoningEffort = (
1677
+ ReasoningEffort_Variant1
1678
+ | ReasoningEffort_Variant2
1679
+ | ReasoningEffort_Variant3
1680
+ | ReasoningEffort_Variant4
1681
+ )
1682
+ ReasoningItemContent = ReasoningItemContent_ReasoningText | ReasoningItemContent_Text
1683
+ ReasoningSummary = (
1684
+ ReasoningSummary_Variant1
1685
+ | ReasoningSummary_Variant2
1686
+ | ReasoningSummary_Variant3
1687
+ | ReasoningSummary_Variant4
1688
+ )
1689
+ RequestId = RequestId_Variant1 | RequestId_Variant2
1690
+ ResponseItem = (
1691
+ ResponseItem_Message
1692
+ | ResponseItem_Reasoning
1693
+ | ResponseItem_LocalShellCall
1694
+ | ResponseItem_FunctionCall
1695
+ | ResponseItem_FunctionCallOutput
1696
+ | ResponseItem_CustomToolCall
1697
+ | ResponseItem_CustomToolCallOutput
1698
+ | ResponseItem_WebSearchCall
1699
+ | ResponseItem_Other
1700
+ )
1701
+ ReviewDecision = (
1702
+ ReviewDecision_Variant1
1703
+ | ReviewDecision_Variant2
1704
+ | ReviewDecision_Variant3
1705
+ | ReviewDecision_Variant4
1706
+ )
1707
+ Role = Role_Variant1 | Role_Variant2
1708
+ SandboxMode = SandboxMode_Variant1 | SandboxMode_Variant2 | SandboxMode_Variant3
1709
+ SandboxPolicy = SandboxPolicy_Variant1 | SandboxPolicy_Variant2 | SandboxPolicy_Variant3
1710
+ ServerNotification = ServerNotification_AuthStatusChange | ServerNotification_LoginChatGptComplete
1711
+ ServerRequest = ServerRequest_ApplyPatchApproval | ServerRequest_ExecCommandApproval
1712
+ StepStatus = StepStatus_Variant1 | StepStatus_Variant2 | StepStatus_Variant3
1713
+ TurnAbortReason = TurnAbortReason_Variant1 | TurnAbortReason_Variant2
1714
+ Verbosity = Verbosity_Variant1 | Verbosity_Variant2 | Verbosity_Variant3
1715
+ WebSearchAction = WebSearchAction_Search | WebSearchAction_Other
1716
+
1717
+ ConversationId = str
1718
+ GitSha = str
1719
+ JsonValue = Any