@opencode-ai/sdk 1.0.134 → 1.0.137

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.
Files changed (42) hide show
  1. package/dist/client.d.ts +1 -1
  2. package/dist/client.js +7 -6
  3. package/dist/gen/sdk.gen.d.ts +32 -7
  4. package/dist/gen/sdk.gen.js +74 -15
  5. package/dist/gen/types.gen.d.ts +184 -1
  6. package/dist/v2/client.d.ts +7 -0
  7. package/dist/v2/client.js +25 -0
  8. package/dist/v2/gen/client/client.gen.d.ts +2 -0
  9. package/dist/v2/gen/client/client.gen.js +225 -0
  10. package/dist/v2/gen/client/index.d.ts +8 -0
  11. package/dist/v2/gen/client/index.js +6 -0
  12. package/dist/v2/gen/client/types.gen.d.ts +117 -0
  13. package/dist/v2/gen/client/types.gen.js +2 -0
  14. package/dist/v2/gen/client/utils.gen.d.ts +33 -0
  15. package/dist/v2/gen/client/utils.gen.js +226 -0
  16. package/dist/v2/gen/client.gen.d.ts +12 -0
  17. package/dist/v2/gen/client.gen.js +3 -0
  18. package/dist/v2/gen/core/auth.gen.d.ts +18 -0
  19. package/dist/v2/gen/core/auth.gen.js +14 -0
  20. package/dist/v2/gen/core/bodySerializer.gen.d.ts +25 -0
  21. package/dist/v2/gen/core/bodySerializer.gen.js +57 -0
  22. package/dist/v2/gen/core/params.gen.d.ts +43 -0
  23. package/dist/v2/gen/core/params.gen.js +102 -0
  24. package/dist/v2/gen/core/pathSerializer.gen.d.ts +33 -0
  25. package/dist/v2/gen/core/pathSerializer.gen.js +106 -0
  26. package/dist/v2/gen/core/queryKeySerializer.gen.d.ts +18 -0
  27. package/dist/v2/gen/core/queryKeySerializer.gen.js +93 -0
  28. package/dist/v2/gen/core/serverSentEvents.gen.d.ts +71 -0
  29. package/dist/v2/gen/core/serverSentEvents.gen.js +131 -0
  30. package/dist/v2/gen/core/types.gen.d.ts +78 -0
  31. package/dist/v2/gen/core/types.gen.js +2 -0
  32. package/dist/v2/gen/core/utils.gen.d.ts +19 -0
  33. package/dist/v2/gen/core/utils.gen.js +87 -0
  34. package/dist/v2/gen/sdk.gen.d.ts +850 -0
  35. package/dist/v2/gen/sdk.gen.js +1626 -0
  36. package/dist/v2/gen/types.gen.d.ts +3356 -0
  37. package/dist/v2/gen/types.gen.js +2 -0
  38. package/dist/v2/index.d.ts +10 -0
  39. package/dist/v2/index.js +16 -0
  40. package/dist/v2/server.d.ts +23 -0
  41. package/dist/v2/server.js +91 -0
  42. package/package.json +15 -3
@@ -0,0 +1,3356 @@
1
+ export type ClientOptions = {
2
+ baseUrl: `${string}://${string}` | (string & {});
3
+ };
4
+ export type EventServerInstanceDisposed = {
5
+ type: "server.instance.disposed";
6
+ properties: {
7
+ directory: string;
8
+ };
9
+ };
10
+ export type EventInstallationUpdated = {
11
+ type: "installation.updated";
12
+ properties: {
13
+ version: string;
14
+ };
15
+ };
16
+ export type EventInstallationUpdateAvailable = {
17
+ type: "installation.update-available";
18
+ properties: {
19
+ version: string;
20
+ };
21
+ };
22
+ export type EventLspClientDiagnostics = {
23
+ type: "lsp.client.diagnostics";
24
+ properties: {
25
+ serverID: string;
26
+ path: string;
27
+ };
28
+ };
29
+ export type EventLspUpdated = {
30
+ type: "lsp.updated";
31
+ properties: {
32
+ [key: string]: unknown;
33
+ };
34
+ };
35
+ export type FileDiff = {
36
+ file: string;
37
+ before: string;
38
+ after: string;
39
+ additions: number;
40
+ deletions: number;
41
+ };
42
+ export type UserMessage = {
43
+ id: string;
44
+ sessionID: string;
45
+ role: "user";
46
+ time: {
47
+ created: number;
48
+ };
49
+ summary?: {
50
+ title?: string;
51
+ body?: string;
52
+ diffs: Array<FileDiff>;
53
+ };
54
+ agent: string;
55
+ model: {
56
+ providerID: string;
57
+ modelID: string;
58
+ };
59
+ system?: string;
60
+ tools?: {
61
+ [key: string]: boolean;
62
+ };
63
+ };
64
+ export type ProviderAuthError = {
65
+ name: "ProviderAuthError";
66
+ data: {
67
+ providerID: string;
68
+ message: string;
69
+ };
70
+ };
71
+ export type UnknownError = {
72
+ name: "UnknownError";
73
+ data: {
74
+ message: string;
75
+ };
76
+ };
77
+ export type MessageOutputLengthError = {
78
+ name: "MessageOutputLengthError";
79
+ data: {
80
+ [key: string]: unknown;
81
+ };
82
+ };
83
+ export type MessageAbortedError = {
84
+ name: "MessageAbortedError";
85
+ data: {
86
+ message: string;
87
+ };
88
+ };
89
+ export type ApiError = {
90
+ name: "APIError";
91
+ data: {
92
+ message: string;
93
+ statusCode?: number;
94
+ isRetryable: boolean;
95
+ responseHeaders?: {
96
+ [key: string]: string;
97
+ };
98
+ responseBody?: string;
99
+ };
100
+ };
101
+ export type AssistantMessage = {
102
+ id: string;
103
+ sessionID: string;
104
+ role: "assistant";
105
+ time: {
106
+ created: number;
107
+ completed?: number;
108
+ };
109
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
110
+ parentID: string;
111
+ modelID: string;
112
+ providerID: string;
113
+ mode: string;
114
+ path: {
115
+ cwd: string;
116
+ root: string;
117
+ };
118
+ summary?: boolean;
119
+ cost: number;
120
+ tokens: {
121
+ input: number;
122
+ output: number;
123
+ reasoning: number;
124
+ cache: {
125
+ read: number;
126
+ write: number;
127
+ };
128
+ };
129
+ finish?: string;
130
+ };
131
+ export type Message = UserMessage | AssistantMessage;
132
+ export type EventMessageUpdated = {
133
+ type: "message.updated";
134
+ properties: {
135
+ info: Message;
136
+ };
137
+ };
138
+ export type EventMessageRemoved = {
139
+ type: "message.removed";
140
+ properties: {
141
+ sessionID: string;
142
+ messageID: string;
143
+ };
144
+ };
145
+ export type TextPart = {
146
+ id: string;
147
+ sessionID: string;
148
+ messageID: string;
149
+ type: "text";
150
+ text: string;
151
+ synthetic?: boolean;
152
+ ignored?: boolean;
153
+ time?: {
154
+ start: number;
155
+ end?: number;
156
+ };
157
+ metadata?: {
158
+ [key: string]: unknown;
159
+ };
160
+ };
161
+ export type ReasoningPart = {
162
+ id: string;
163
+ sessionID: string;
164
+ messageID: string;
165
+ type: "reasoning";
166
+ text: string;
167
+ metadata?: {
168
+ [key: string]: unknown;
169
+ };
170
+ time: {
171
+ start: number;
172
+ end?: number;
173
+ };
174
+ };
175
+ export type FilePartSourceText = {
176
+ value: string;
177
+ start: number;
178
+ end: number;
179
+ };
180
+ export type FileSource = {
181
+ text: FilePartSourceText;
182
+ type: "file";
183
+ path: string;
184
+ };
185
+ export type Range = {
186
+ start: {
187
+ line: number;
188
+ character: number;
189
+ };
190
+ end: {
191
+ line: number;
192
+ character: number;
193
+ };
194
+ };
195
+ export type SymbolSource = {
196
+ text: FilePartSourceText;
197
+ type: "symbol";
198
+ path: string;
199
+ range: Range;
200
+ name: string;
201
+ kind: number;
202
+ };
203
+ export type FilePartSource = FileSource | SymbolSource;
204
+ export type FilePart = {
205
+ id: string;
206
+ sessionID: string;
207
+ messageID: string;
208
+ type: "file";
209
+ mime: string;
210
+ filename?: string;
211
+ url: string;
212
+ source?: FilePartSource;
213
+ };
214
+ export type ToolStatePending = {
215
+ status: "pending";
216
+ input: {
217
+ [key: string]: unknown;
218
+ };
219
+ raw: string;
220
+ };
221
+ export type ToolStateRunning = {
222
+ status: "running";
223
+ input: {
224
+ [key: string]: unknown;
225
+ };
226
+ title?: string;
227
+ metadata?: {
228
+ [key: string]: unknown;
229
+ };
230
+ time: {
231
+ start: number;
232
+ };
233
+ };
234
+ export type ToolStateCompleted = {
235
+ status: "completed";
236
+ input: {
237
+ [key: string]: unknown;
238
+ };
239
+ output: string;
240
+ title: string;
241
+ metadata: {
242
+ [key: string]: unknown;
243
+ };
244
+ time: {
245
+ start: number;
246
+ end: number;
247
+ compacted?: number;
248
+ };
249
+ attachments?: Array<FilePart>;
250
+ };
251
+ export type ToolStateError = {
252
+ status: "error";
253
+ input: {
254
+ [key: string]: unknown;
255
+ };
256
+ error: string;
257
+ metadata?: {
258
+ [key: string]: unknown;
259
+ };
260
+ time: {
261
+ start: number;
262
+ end: number;
263
+ };
264
+ };
265
+ export type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;
266
+ export type ToolPart = {
267
+ id: string;
268
+ sessionID: string;
269
+ messageID: string;
270
+ type: "tool";
271
+ callID: string;
272
+ tool: string;
273
+ state: ToolState;
274
+ metadata?: {
275
+ [key: string]: unknown;
276
+ };
277
+ };
278
+ export type StepStartPart = {
279
+ id: string;
280
+ sessionID: string;
281
+ messageID: string;
282
+ type: "step-start";
283
+ snapshot?: string;
284
+ };
285
+ export type StepFinishPart = {
286
+ id: string;
287
+ sessionID: string;
288
+ messageID: string;
289
+ type: "step-finish";
290
+ reason: string;
291
+ snapshot?: string;
292
+ cost: number;
293
+ tokens: {
294
+ input: number;
295
+ output: number;
296
+ reasoning: number;
297
+ cache: {
298
+ read: number;
299
+ write: number;
300
+ };
301
+ };
302
+ };
303
+ export type SnapshotPart = {
304
+ id: string;
305
+ sessionID: string;
306
+ messageID: string;
307
+ type: "snapshot";
308
+ snapshot: string;
309
+ };
310
+ export type PatchPart = {
311
+ id: string;
312
+ sessionID: string;
313
+ messageID: string;
314
+ type: "patch";
315
+ hash: string;
316
+ files: Array<string>;
317
+ };
318
+ export type AgentPart = {
319
+ id: string;
320
+ sessionID: string;
321
+ messageID: string;
322
+ type: "agent";
323
+ name: string;
324
+ source?: {
325
+ value: string;
326
+ start: number;
327
+ end: number;
328
+ };
329
+ };
330
+ export type RetryPart = {
331
+ id: string;
332
+ sessionID: string;
333
+ messageID: string;
334
+ type: "retry";
335
+ attempt: number;
336
+ error: ApiError;
337
+ time: {
338
+ created: number;
339
+ };
340
+ };
341
+ export type CompactionPart = {
342
+ id: string;
343
+ sessionID: string;
344
+ messageID: string;
345
+ type: "compaction";
346
+ auto: boolean;
347
+ };
348
+ export type Part = TextPart | {
349
+ id: string;
350
+ sessionID: string;
351
+ messageID: string;
352
+ type: "subtask";
353
+ prompt: string;
354
+ description: string;
355
+ agent: string;
356
+ } | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;
357
+ export type EventMessagePartUpdated = {
358
+ type: "message.part.updated";
359
+ properties: {
360
+ part: Part;
361
+ delta?: string;
362
+ };
363
+ };
364
+ export type EventMessagePartRemoved = {
365
+ type: "message.part.removed";
366
+ properties: {
367
+ sessionID: string;
368
+ messageID: string;
369
+ partID: string;
370
+ };
371
+ };
372
+ export type Permission = {
373
+ id: string;
374
+ type: string;
375
+ pattern?: string | Array<string>;
376
+ sessionID: string;
377
+ messageID: string;
378
+ callID?: string;
379
+ title: string;
380
+ metadata: {
381
+ [key: string]: unknown;
382
+ };
383
+ time: {
384
+ created: number;
385
+ };
386
+ };
387
+ export type EventPermissionUpdated = {
388
+ type: "permission.updated";
389
+ properties: Permission;
390
+ };
391
+ export type EventPermissionReplied = {
392
+ type: "permission.replied";
393
+ properties: {
394
+ sessionID: string;
395
+ permissionID: string;
396
+ response: string;
397
+ };
398
+ };
399
+ export type SessionStatus = {
400
+ type: "idle";
401
+ } | {
402
+ type: "retry";
403
+ attempt: number;
404
+ message: string;
405
+ next: number;
406
+ } | {
407
+ type: "busy";
408
+ };
409
+ export type EventSessionStatus = {
410
+ type: "session.status";
411
+ properties: {
412
+ sessionID: string;
413
+ status: SessionStatus;
414
+ };
415
+ };
416
+ export type EventSessionIdle = {
417
+ type: "session.idle";
418
+ properties: {
419
+ sessionID: string;
420
+ };
421
+ };
422
+ export type EventSessionCompacted = {
423
+ type: "session.compacted";
424
+ properties: {
425
+ sessionID: string;
426
+ };
427
+ };
428
+ export type EventFileEdited = {
429
+ type: "file.edited";
430
+ properties: {
431
+ file: string;
432
+ };
433
+ };
434
+ export type Todo = {
435
+ /**
436
+ * Brief description of the task
437
+ */
438
+ content: string;
439
+ /**
440
+ * Current status of the task: pending, in_progress, completed, cancelled
441
+ */
442
+ status: string;
443
+ /**
444
+ * Priority level of the task: high, medium, low
445
+ */
446
+ priority: string;
447
+ /**
448
+ * Unique identifier for the todo item
449
+ */
450
+ id: string;
451
+ };
452
+ export type EventTodoUpdated = {
453
+ type: "todo.updated";
454
+ properties: {
455
+ sessionID: string;
456
+ todos: Array<Todo>;
457
+ };
458
+ };
459
+ export type EventCommandExecuted = {
460
+ type: "command.executed";
461
+ properties: {
462
+ name: string;
463
+ sessionID: string;
464
+ arguments: string;
465
+ messageID: string;
466
+ };
467
+ };
468
+ export type Session = {
469
+ id: string;
470
+ projectID: string;
471
+ directory: string;
472
+ parentID?: string;
473
+ summary?: {
474
+ additions: number;
475
+ deletions: number;
476
+ files: number;
477
+ diffs?: Array<FileDiff>;
478
+ };
479
+ share?: {
480
+ url: string;
481
+ };
482
+ title: string;
483
+ version: string;
484
+ time: {
485
+ created: number;
486
+ updated: number;
487
+ compacting?: number;
488
+ };
489
+ revert?: {
490
+ messageID: string;
491
+ partID?: string;
492
+ snapshot?: string;
493
+ diff?: string;
494
+ };
495
+ };
496
+ export type EventSessionCreated = {
497
+ type: "session.created";
498
+ properties: {
499
+ info: Session;
500
+ };
501
+ };
502
+ export type EventSessionUpdated = {
503
+ type: "session.updated";
504
+ properties: {
505
+ info: Session;
506
+ };
507
+ };
508
+ export type EventSessionDeleted = {
509
+ type: "session.deleted";
510
+ properties: {
511
+ info: Session;
512
+ };
513
+ };
514
+ export type EventSessionDiff = {
515
+ type: "session.diff";
516
+ properties: {
517
+ sessionID: string;
518
+ diff: Array<FileDiff>;
519
+ };
520
+ };
521
+ export type EventSessionError = {
522
+ type: "session.error";
523
+ properties: {
524
+ sessionID?: string;
525
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
526
+ };
527
+ };
528
+ export type EventFileWatcherUpdated = {
529
+ type: "file.watcher.updated";
530
+ properties: {
531
+ file: string;
532
+ event: "add" | "change" | "unlink";
533
+ };
534
+ };
535
+ export type EventVcsBranchUpdated = {
536
+ type: "vcs.branch.updated";
537
+ properties: {
538
+ branch?: string;
539
+ };
540
+ };
541
+ export type EventTuiPromptAppend = {
542
+ type: "tui.prompt.append";
543
+ properties: {
544
+ text: string;
545
+ };
546
+ };
547
+ export type EventTuiCommandExecute = {
548
+ type: "tui.command.execute";
549
+ properties: {
550
+ command: "session.list" | "session.new" | "session.share" | "session.interrupt" | "session.compact" | "session.page.up" | "session.page.down" | "session.half.page.up" | "session.half.page.down" | "session.first" | "session.last" | "prompt.clear" | "prompt.submit" | "agent.cycle" | string;
551
+ };
552
+ };
553
+ export type EventTuiToastShow = {
554
+ type: "tui.toast.show";
555
+ properties: {
556
+ title?: string;
557
+ message: string;
558
+ variant: "info" | "success" | "warning" | "error";
559
+ /**
560
+ * Duration in milliseconds
561
+ */
562
+ duration?: number;
563
+ };
564
+ };
565
+ export type Pty = {
566
+ id: string;
567
+ title: string;
568
+ command: string;
569
+ args: Array<string>;
570
+ cwd: string;
571
+ status: "running" | "exited";
572
+ pid: number;
573
+ };
574
+ export type EventPtyCreated = {
575
+ type: "pty.created";
576
+ properties: {
577
+ info: Pty;
578
+ };
579
+ };
580
+ export type EventPtyUpdated = {
581
+ type: "pty.updated";
582
+ properties: {
583
+ info: Pty;
584
+ };
585
+ };
586
+ export type EventPtyExited = {
587
+ type: "pty.exited";
588
+ properties: {
589
+ id: string;
590
+ exitCode: number;
591
+ };
592
+ };
593
+ export type EventPtyDeleted = {
594
+ type: "pty.deleted";
595
+ properties: {
596
+ id: string;
597
+ };
598
+ };
599
+ export type EventServerConnected = {
600
+ type: "server.connected";
601
+ properties: {
602
+ [key: string]: unknown;
603
+ };
604
+ };
605
+ export type Event = EventServerInstanceDisposed | EventInstallationUpdated | EventInstallationUpdateAvailable | EventLspClientDiagnostics | EventLspUpdated | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionUpdated | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventFileEdited | EventTodoUpdated | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventServerConnected;
606
+ export type GlobalEvent = {
607
+ directory: string;
608
+ payload: Event;
609
+ };
610
+ export type Project = {
611
+ id: string;
612
+ worktree: string;
613
+ vcsDir?: string;
614
+ vcs?: "git";
615
+ time: {
616
+ created: number;
617
+ initialized?: number;
618
+ };
619
+ };
620
+ export type BadRequestError = {
621
+ data: unknown;
622
+ errors: Array<{
623
+ [key: string]: unknown;
624
+ }>;
625
+ success: false;
626
+ };
627
+ export type NotFoundError = {
628
+ name: "NotFoundError";
629
+ data: {
630
+ message: string;
631
+ };
632
+ };
633
+ /**
634
+ * Custom keybind configurations
635
+ */
636
+ export type KeybindsConfig = {
637
+ /**
638
+ * Leader key for keybind combinations
639
+ */
640
+ leader?: string;
641
+ /**
642
+ * Exit the application
643
+ */
644
+ app_exit?: string;
645
+ /**
646
+ * Open external editor
647
+ */
648
+ editor_open?: string;
649
+ /**
650
+ * List available themes
651
+ */
652
+ theme_list?: string;
653
+ /**
654
+ * Toggle sidebar
655
+ */
656
+ sidebar_toggle?: string;
657
+ /**
658
+ * Toggle session scrollbar
659
+ */
660
+ scrollbar_toggle?: string;
661
+ /**
662
+ * Toggle username visibility
663
+ */
664
+ username_toggle?: string;
665
+ /**
666
+ * View status
667
+ */
668
+ status_view?: string;
669
+ /**
670
+ * Export session to editor
671
+ */
672
+ session_export?: string;
673
+ /**
674
+ * Create a new session
675
+ */
676
+ session_new?: string;
677
+ /**
678
+ * List all sessions
679
+ */
680
+ session_list?: string;
681
+ /**
682
+ * Show session timeline
683
+ */
684
+ session_timeline?: string;
685
+ /**
686
+ * Share current session
687
+ */
688
+ session_share?: string;
689
+ /**
690
+ * Unshare current session
691
+ */
692
+ session_unshare?: string;
693
+ /**
694
+ * Interrupt current session
695
+ */
696
+ session_interrupt?: string;
697
+ /**
698
+ * Compact the session
699
+ */
700
+ session_compact?: string;
701
+ /**
702
+ * Scroll messages up by one page
703
+ */
704
+ messages_page_up?: string;
705
+ /**
706
+ * Scroll messages down by one page
707
+ */
708
+ messages_page_down?: string;
709
+ /**
710
+ * Scroll messages up by half page
711
+ */
712
+ messages_half_page_up?: string;
713
+ /**
714
+ * Scroll messages down by half page
715
+ */
716
+ messages_half_page_down?: string;
717
+ /**
718
+ * Navigate to first message
719
+ */
720
+ messages_first?: string;
721
+ /**
722
+ * Navigate to last message
723
+ */
724
+ messages_last?: string;
725
+ /**
726
+ * Navigate to last user message
727
+ */
728
+ messages_last_user?: string;
729
+ /**
730
+ * Copy message
731
+ */
732
+ messages_copy?: string;
733
+ /**
734
+ * Undo message
735
+ */
736
+ messages_undo?: string;
737
+ /**
738
+ * Redo message
739
+ */
740
+ messages_redo?: string;
741
+ /**
742
+ * Toggle code block concealment in messages
743
+ */
744
+ messages_toggle_conceal?: string;
745
+ /**
746
+ * Toggle tool details visibility
747
+ */
748
+ tool_details?: string;
749
+ /**
750
+ * List available models
751
+ */
752
+ model_list?: string;
753
+ /**
754
+ * Next recently used model
755
+ */
756
+ model_cycle_recent?: string;
757
+ /**
758
+ * Previous recently used model
759
+ */
760
+ model_cycle_recent_reverse?: string;
761
+ /**
762
+ * List available commands
763
+ */
764
+ command_list?: string;
765
+ /**
766
+ * List agents
767
+ */
768
+ agent_list?: string;
769
+ /**
770
+ * Next agent
771
+ */
772
+ agent_cycle?: string;
773
+ /**
774
+ * Previous agent
775
+ */
776
+ agent_cycle_reverse?: string;
777
+ /**
778
+ * Clear input field
779
+ */
780
+ input_clear?: string;
781
+ /**
782
+ * Forward delete
783
+ */
784
+ input_forward_delete?: string;
785
+ /**
786
+ * Paste from clipboard
787
+ */
788
+ input_paste?: string;
789
+ /**
790
+ * Submit input
791
+ */
792
+ input_submit?: string;
793
+ /**
794
+ * Insert newline in input
795
+ */
796
+ input_newline?: string;
797
+ /**
798
+ * Previous history item
799
+ */
800
+ history_previous?: string;
801
+ /**
802
+ * Next history item
803
+ */
804
+ history_next?: string;
805
+ /**
806
+ * Next child session
807
+ */
808
+ session_child_cycle?: string;
809
+ /**
810
+ * Previous child session
811
+ */
812
+ session_child_cycle_reverse?: string;
813
+ /**
814
+ * Suspend terminal
815
+ */
816
+ terminal_suspend?: string;
817
+ };
818
+ export type AgentConfig = {
819
+ model?: string;
820
+ temperature?: number;
821
+ top_p?: number;
822
+ prompt?: string;
823
+ tools?: {
824
+ [key: string]: boolean;
825
+ };
826
+ disable?: boolean;
827
+ /**
828
+ * Description of when to use the agent
829
+ */
830
+ description?: string;
831
+ mode?: "subagent" | "primary" | "all";
832
+ /**
833
+ * Hex color code for the agent (e.g., #FF5733)
834
+ */
835
+ color?: string;
836
+ /**
837
+ * Maximum number of agentic iterations before forcing text-only response
838
+ */
839
+ maxSteps?: number;
840
+ permission?: {
841
+ edit?: "ask" | "allow" | "deny";
842
+ bash?: "ask" | "allow" | "deny" | {
843
+ [key: string]: "ask" | "allow" | "deny";
844
+ };
845
+ webfetch?: "ask" | "allow" | "deny";
846
+ doom_loop?: "ask" | "allow" | "deny";
847
+ external_directory?: "ask" | "allow" | "deny";
848
+ };
849
+ [key: string]: unknown | string | number | {
850
+ [key: string]: boolean;
851
+ } | boolean | "subagent" | "primary" | "all" | string | number | {
852
+ edit?: "ask" | "allow" | "deny";
853
+ bash?: "ask" | "allow" | "deny" | {
854
+ [key: string]: "ask" | "allow" | "deny";
855
+ };
856
+ webfetch?: "ask" | "allow" | "deny";
857
+ doom_loop?: "ask" | "allow" | "deny";
858
+ external_directory?: "ask" | "allow" | "deny";
859
+ } | undefined;
860
+ };
861
+ export type ProviderConfig = {
862
+ api?: string;
863
+ name?: string;
864
+ env?: Array<string>;
865
+ id?: string;
866
+ npm?: string;
867
+ models?: {
868
+ [key: string]: {
869
+ id?: string;
870
+ name?: string;
871
+ release_date?: string;
872
+ attachment?: boolean;
873
+ reasoning?: boolean;
874
+ temperature?: boolean;
875
+ tool_call?: boolean;
876
+ cost?: {
877
+ input: number;
878
+ output: number;
879
+ cache_read?: number;
880
+ cache_write?: number;
881
+ context_over_200k?: {
882
+ input: number;
883
+ output: number;
884
+ cache_read?: number;
885
+ cache_write?: number;
886
+ };
887
+ };
888
+ limit?: {
889
+ context: number;
890
+ output: number;
891
+ };
892
+ modalities?: {
893
+ input: Array<"text" | "audio" | "image" | "video" | "pdf">;
894
+ output: Array<"text" | "audio" | "image" | "video" | "pdf">;
895
+ };
896
+ experimental?: boolean;
897
+ status?: "alpha" | "beta" | "deprecated";
898
+ options?: {
899
+ [key: string]: unknown;
900
+ };
901
+ headers?: {
902
+ [key: string]: string;
903
+ };
904
+ provider?: {
905
+ npm: string;
906
+ };
907
+ };
908
+ };
909
+ whitelist?: Array<string>;
910
+ blacklist?: Array<string>;
911
+ options?: {
912
+ apiKey?: string;
913
+ baseURL?: string;
914
+ /**
915
+ * GitHub Enterprise URL for copilot authentication
916
+ */
917
+ enterpriseUrl?: string;
918
+ /**
919
+ * Enable promptCacheKey for this provider (default false)
920
+ */
921
+ setCacheKey?: boolean;
922
+ /**
923
+ * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
924
+ */
925
+ timeout?: number | false;
926
+ [key: string]: unknown | string | boolean | number | false | undefined;
927
+ };
928
+ };
929
+ export type McpLocalConfig = {
930
+ /**
931
+ * Type of MCP server connection
932
+ */
933
+ type: "local";
934
+ /**
935
+ * Command and arguments to run the MCP server
936
+ */
937
+ command: Array<string>;
938
+ /**
939
+ * Environment variables to set when running the MCP server
940
+ */
941
+ environment?: {
942
+ [key: string]: string;
943
+ };
944
+ /**
945
+ * Enable or disable the MCP server on startup
946
+ */
947
+ enabled?: boolean;
948
+ /**
949
+ * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.
950
+ */
951
+ timeout?: number;
952
+ };
953
+ export type McpOAuthConfig = {
954
+ /**
955
+ * OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.
956
+ */
957
+ clientId?: string;
958
+ /**
959
+ * OAuth client secret (if required by the authorization server)
960
+ */
961
+ clientSecret?: string;
962
+ /**
963
+ * OAuth scopes to request during authorization
964
+ */
965
+ scope?: string;
966
+ };
967
+ export type McpRemoteConfig = {
968
+ /**
969
+ * Type of MCP server connection
970
+ */
971
+ type: "remote";
972
+ /**
973
+ * URL of the remote MCP server
974
+ */
975
+ url: string;
976
+ /**
977
+ * Enable or disable the MCP server on startup
978
+ */
979
+ enabled?: boolean;
980
+ /**
981
+ * Headers to send with the request
982
+ */
983
+ headers?: {
984
+ [key: string]: string;
985
+ };
986
+ /**
987
+ * OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.
988
+ */
989
+ oauth?: McpOAuthConfig | false;
990
+ /**
991
+ * Timeout in ms for fetching tools from the MCP server. Defaults to 5000 (5 seconds) if not specified.
992
+ */
993
+ timeout?: number;
994
+ };
995
+ /**
996
+ * @deprecated Always uses stretch layout.
997
+ */
998
+ export type LayoutConfig = "auto" | "stretch";
999
+ export type Config = {
1000
+ /**
1001
+ * JSON schema reference for configuration validation
1002
+ */
1003
+ $schema?: string;
1004
+ /**
1005
+ * Theme name to use for the interface
1006
+ */
1007
+ theme?: string;
1008
+ keybinds?: KeybindsConfig;
1009
+ /**
1010
+ * TUI specific settings
1011
+ */
1012
+ tui?: {
1013
+ /**
1014
+ * TUI scroll speed
1015
+ */
1016
+ scroll_speed?: number;
1017
+ /**
1018
+ * Scroll acceleration settings
1019
+ */
1020
+ scroll_acceleration?: {
1021
+ /**
1022
+ * Enable scroll acceleration
1023
+ */
1024
+ enabled: boolean;
1025
+ };
1026
+ /**
1027
+ * Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column
1028
+ */
1029
+ diff_style?: "auto" | "stacked";
1030
+ };
1031
+ /**
1032
+ * Command configuration, see https://opencode.ai/docs/commands
1033
+ */
1034
+ command?: {
1035
+ [key: string]: {
1036
+ template: string;
1037
+ description?: string;
1038
+ agent?: string;
1039
+ model?: string;
1040
+ subtask?: boolean;
1041
+ };
1042
+ };
1043
+ watcher?: {
1044
+ ignore?: Array<string>;
1045
+ };
1046
+ plugin?: Array<string>;
1047
+ snapshot?: boolean;
1048
+ /**
1049
+ * Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
1050
+ */
1051
+ share?: "manual" | "auto" | "disabled";
1052
+ /**
1053
+ * @deprecated Use 'share' field instead. Share newly created sessions automatically
1054
+ */
1055
+ autoshare?: boolean;
1056
+ /**
1057
+ * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
1058
+ */
1059
+ autoupdate?: boolean | "notify";
1060
+ /**
1061
+ * Disable providers that are loaded automatically
1062
+ */
1063
+ disabled_providers?: Array<string>;
1064
+ /**
1065
+ * When set, ONLY these providers will be enabled. All other providers will be ignored
1066
+ */
1067
+ enabled_providers?: Array<string>;
1068
+ /**
1069
+ * Model to use in the format of provider/model, eg anthropic/claude-2
1070
+ */
1071
+ model?: string;
1072
+ /**
1073
+ * Small model to use for tasks like title generation in the format of provider/model
1074
+ */
1075
+ small_model?: string;
1076
+ /**
1077
+ * Custom username to display in conversations instead of system username
1078
+ */
1079
+ username?: string;
1080
+ /**
1081
+ * @deprecated Use `agent` field instead.
1082
+ */
1083
+ mode?: {
1084
+ build?: AgentConfig;
1085
+ plan?: AgentConfig;
1086
+ [key: string]: AgentConfig | undefined;
1087
+ };
1088
+ /**
1089
+ * Agent configuration, see https://opencode.ai/docs/agent
1090
+ */
1091
+ agent?: {
1092
+ plan?: AgentConfig;
1093
+ build?: AgentConfig;
1094
+ general?: AgentConfig;
1095
+ explore?: AgentConfig;
1096
+ [key: string]: AgentConfig | undefined;
1097
+ };
1098
+ /**
1099
+ * Custom provider configurations and model overrides
1100
+ */
1101
+ provider?: {
1102
+ [key: string]: ProviderConfig;
1103
+ };
1104
+ /**
1105
+ * MCP (Model Context Protocol) server configurations
1106
+ */
1107
+ mcp?: {
1108
+ [key: string]: McpLocalConfig | McpRemoteConfig;
1109
+ };
1110
+ formatter?: false | {
1111
+ [key: string]: {
1112
+ disabled?: boolean;
1113
+ command?: Array<string>;
1114
+ environment?: {
1115
+ [key: string]: string;
1116
+ };
1117
+ extensions?: Array<string>;
1118
+ };
1119
+ };
1120
+ lsp?: false | {
1121
+ [key: string]: {
1122
+ disabled: true;
1123
+ } | {
1124
+ command: Array<string>;
1125
+ extensions?: Array<string>;
1126
+ disabled?: boolean;
1127
+ env?: {
1128
+ [key: string]: string;
1129
+ };
1130
+ initialization?: {
1131
+ [key: string]: unknown;
1132
+ };
1133
+ };
1134
+ };
1135
+ /**
1136
+ * Additional instruction files or patterns to include
1137
+ */
1138
+ instructions?: Array<string>;
1139
+ layout?: LayoutConfig;
1140
+ permission?: {
1141
+ edit?: "ask" | "allow" | "deny";
1142
+ bash?: "ask" | "allow" | "deny" | {
1143
+ [key: string]: "ask" | "allow" | "deny";
1144
+ };
1145
+ webfetch?: "ask" | "allow" | "deny";
1146
+ doom_loop?: "ask" | "allow" | "deny";
1147
+ external_directory?: "ask" | "allow" | "deny";
1148
+ };
1149
+ tools?: {
1150
+ [key: string]: boolean;
1151
+ };
1152
+ enterprise?: {
1153
+ /**
1154
+ * Enterprise URL
1155
+ */
1156
+ url?: string;
1157
+ };
1158
+ experimental?: {
1159
+ hook?: {
1160
+ file_edited?: {
1161
+ [key: string]: Array<{
1162
+ command: Array<string>;
1163
+ environment?: {
1164
+ [key: string]: string;
1165
+ };
1166
+ }>;
1167
+ };
1168
+ session_completed?: Array<{
1169
+ command: Array<string>;
1170
+ environment?: {
1171
+ [key: string]: string;
1172
+ };
1173
+ }>;
1174
+ };
1175
+ /**
1176
+ * Number of retries for chat completions on failure
1177
+ */
1178
+ chatMaxRetries?: number;
1179
+ disable_paste_summary?: boolean;
1180
+ /**
1181
+ * Enable the batch tool
1182
+ */
1183
+ batch_tool?: boolean;
1184
+ /**
1185
+ * Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)
1186
+ */
1187
+ openTelemetry?: boolean;
1188
+ /**
1189
+ * Tools that should only be available to primary agents.
1190
+ */
1191
+ primary_tools?: Array<string>;
1192
+ };
1193
+ };
1194
+ export type ToolIds = Array<string>;
1195
+ export type ToolListItem = {
1196
+ id: string;
1197
+ description: string;
1198
+ parameters: unknown;
1199
+ };
1200
+ export type ToolList = Array<ToolListItem>;
1201
+ export type Path = {
1202
+ state: string;
1203
+ config: string;
1204
+ worktree: string;
1205
+ directory: string;
1206
+ };
1207
+ export type VcsInfo = {
1208
+ branch: string;
1209
+ };
1210
+ export type TextPartInput = {
1211
+ id?: string;
1212
+ type: "text";
1213
+ text: string;
1214
+ synthetic?: boolean;
1215
+ ignored?: boolean;
1216
+ time?: {
1217
+ start: number;
1218
+ end?: number;
1219
+ };
1220
+ metadata?: {
1221
+ [key: string]: unknown;
1222
+ };
1223
+ };
1224
+ export type FilePartInput = {
1225
+ id?: string;
1226
+ type: "file";
1227
+ mime: string;
1228
+ filename?: string;
1229
+ url: string;
1230
+ source?: FilePartSource;
1231
+ };
1232
+ export type AgentPartInput = {
1233
+ id?: string;
1234
+ type: "agent";
1235
+ name: string;
1236
+ source?: {
1237
+ value: string;
1238
+ start: number;
1239
+ end: number;
1240
+ };
1241
+ };
1242
+ export type SubtaskPartInput = {
1243
+ id?: string;
1244
+ type: "subtask";
1245
+ prompt: string;
1246
+ description: string;
1247
+ agent: string;
1248
+ };
1249
+ export type Command = {
1250
+ name: string;
1251
+ description?: string;
1252
+ agent?: string;
1253
+ model?: string;
1254
+ template: string;
1255
+ subtask?: boolean;
1256
+ };
1257
+ export type Model = {
1258
+ id: string;
1259
+ providerID: string;
1260
+ api: {
1261
+ id: string;
1262
+ url: string;
1263
+ npm: string;
1264
+ };
1265
+ name: string;
1266
+ capabilities: {
1267
+ temperature: boolean;
1268
+ reasoning: boolean;
1269
+ attachment: boolean;
1270
+ toolcall: boolean;
1271
+ input: {
1272
+ text: boolean;
1273
+ audio: boolean;
1274
+ image: boolean;
1275
+ video: boolean;
1276
+ pdf: boolean;
1277
+ };
1278
+ output: {
1279
+ text: boolean;
1280
+ audio: boolean;
1281
+ image: boolean;
1282
+ video: boolean;
1283
+ pdf: boolean;
1284
+ };
1285
+ };
1286
+ cost: {
1287
+ input: number;
1288
+ output: number;
1289
+ cache: {
1290
+ read: number;
1291
+ write: number;
1292
+ };
1293
+ experimentalOver200K?: {
1294
+ input: number;
1295
+ output: number;
1296
+ cache: {
1297
+ read: number;
1298
+ write: number;
1299
+ };
1300
+ };
1301
+ };
1302
+ limit: {
1303
+ context: number;
1304
+ output: number;
1305
+ };
1306
+ status: "alpha" | "beta" | "deprecated" | "active";
1307
+ options: {
1308
+ [key: string]: unknown;
1309
+ };
1310
+ headers: {
1311
+ [key: string]: string;
1312
+ };
1313
+ };
1314
+ export type Provider = {
1315
+ id: string;
1316
+ name: string;
1317
+ source: "env" | "config" | "custom" | "api";
1318
+ env: Array<string>;
1319
+ key?: string;
1320
+ options: {
1321
+ [key: string]: unknown;
1322
+ };
1323
+ models: {
1324
+ [key: string]: Model;
1325
+ };
1326
+ };
1327
+ export type ProviderAuthMethod = {
1328
+ type: "oauth" | "api";
1329
+ label: string;
1330
+ };
1331
+ export type ProviderAuthAuthorization = {
1332
+ url: string;
1333
+ method: "auto" | "code";
1334
+ instructions: string;
1335
+ };
1336
+ export type Symbol = {
1337
+ name: string;
1338
+ kind: number;
1339
+ location: {
1340
+ uri: string;
1341
+ range: Range;
1342
+ };
1343
+ };
1344
+ export type FileNode = {
1345
+ name: string;
1346
+ path: string;
1347
+ absolute: string;
1348
+ type: "file" | "directory";
1349
+ ignored: boolean;
1350
+ };
1351
+ export type FileContent = {
1352
+ type: "text";
1353
+ content: string;
1354
+ diff?: string;
1355
+ patch?: {
1356
+ oldFileName: string;
1357
+ newFileName: string;
1358
+ oldHeader?: string;
1359
+ newHeader?: string;
1360
+ hunks: Array<{
1361
+ oldStart: number;
1362
+ oldLines: number;
1363
+ newStart: number;
1364
+ newLines: number;
1365
+ lines: Array<string>;
1366
+ }>;
1367
+ index?: string;
1368
+ };
1369
+ encoding?: "base64";
1370
+ mimeType?: string;
1371
+ };
1372
+ export type File = {
1373
+ path: string;
1374
+ added: number;
1375
+ removed: number;
1376
+ status: "added" | "deleted" | "modified";
1377
+ };
1378
+ export type Agent = {
1379
+ name: string;
1380
+ description?: string;
1381
+ mode: "subagent" | "primary" | "all";
1382
+ builtIn: boolean;
1383
+ topP?: number;
1384
+ temperature?: number;
1385
+ color?: string;
1386
+ permission: {
1387
+ edit: "ask" | "allow" | "deny";
1388
+ bash: {
1389
+ [key: string]: "ask" | "allow" | "deny";
1390
+ };
1391
+ webfetch?: "ask" | "allow" | "deny";
1392
+ doom_loop?: "ask" | "allow" | "deny";
1393
+ external_directory?: "ask" | "allow" | "deny";
1394
+ };
1395
+ model?: {
1396
+ modelID: string;
1397
+ providerID: string;
1398
+ };
1399
+ prompt?: string;
1400
+ tools: {
1401
+ [key: string]: boolean;
1402
+ };
1403
+ options: {
1404
+ [key: string]: unknown;
1405
+ };
1406
+ maxSteps?: number;
1407
+ };
1408
+ export type McpStatusConnected = {
1409
+ status: "connected";
1410
+ };
1411
+ export type McpStatusDisabled = {
1412
+ status: "disabled";
1413
+ };
1414
+ export type McpStatusFailed = {
1415
+ status: "failed";
1416
+ error: string;
1417
+ };
1418
+ export type McpStatusNeedsAuth = {
1419
+ status: "needs_auth";
1420
+ };
1421
+ export type McpStatusNeedsClientRegistration = {
1422
+ status: "needs_client_registration";
1423
+ error: string;
1424
+ };
1425
+ export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed | McpStatusNeedsAuth | McpStatusNeedsClientRegistration;
1426
+ export type LspStatus = {
1427
+ id: string;
1428
+ name: string;
1429
+ root: string;
1430
+ status: "connected" | "error";
1431
+ };
1432
+ export type FormatterStatus = {
1433
+ name: string;
1434
+ extensions: Array<string>;
1435
+ enabled: boolean;
1436
+ };
1437
+ export type OAuth = {
1438
+ type: "oauth";
1439
+ refresh: string;
1440
+ access: string;
1441
+ expires: number;
1442
+ enterpriseUrl?: string;
1443
+ };
1444
+ export type ApiAuth = {
1445
+ type: "api";
1446
+ key: string;
1447
+ };
1448
+ export type WellKnownAuth = {
1449
+ type: "wellknown";
1450
+ key: string;
1451
+ token: string;
1452
+ };
1453
+ export type Auth = OAuth | ApiAuth | WellKnownAuth;
1454
+ export type GlobalEventData = {
1455
+ body?: never;
1456
+ path?: never;
1457
+ query?: never;
1458
+ url: "/global/event";
1459
+ };
1460
+ export type GlobalEventResponses = {
1461
+ /**
1462
+ * Event stream
1463
+ */
1464
+ 200: GlobalEvent;
1465
+ };
1466
+ export type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses];
1467
+ export type ProjectListData = {
1468
+ body?: never;
1469
+ path?: never;
1470
+ query?: {
1471
+ directory?: string;
1472
+ };
1473
+ url: "/project";
1474
+ };
1475
+ export type ProjectListResponses = {
1476
+ /**
1477
+ * List of projects
1478
+ */
1479
+ 200: Array<Project>;
1480
+ };
1481
+ export type ProjectListResponse = ProjectListResponses[keyof ProjectListResponses];
1482
+ export type ProjectCurrentData = {
1483
+ body?: never;
1484
+ path?: never;
1485
+ query?: {
1486
+ directory?: string;
1487
+ };
1488
+ url: "/project/current";
1489
+ };
1490
+ export type ProjectCurrentResponses = {
1491
+ /**
1492
+ * Current project information
1493
+ */
1494
+ 200: Project;
1495
+ };
1496
+ export type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses];
1497
+ export type PtyListData = {
1498
+ body?: never;
1499
+ path?: never;
1500
+ query?: {
1501
+ directory?: string;
1502
+ };
1503
+ url: "/pty";
1504
+ };
1505
+ export type PtyListResponses = {
1506
+ /**
1507
+ * List of sessions
1508
+ */
1509
+ 200: Array<Pty>;
1510
+ };
1511
+ export type PtyListResponse = PtyListResponses[keyof PtyListResponses];
1512
+ export type PtyCreateData = {
1513
+ body?: {
1514
+ command?: string;
1515
+ args?: Array<string>;
1516
+ cwd?: string;
1517
+ title?: string;
1518
+ env?: {
1519
+ [key: string]: string;
1520
+ };
1521
+ };
1522
+ path?: never;
1523
+ query?: {
1524
+ directory?: string;
1525
+ };
1526
+ url: "/pty";
1527
+ };
1528
+ export type PtyCreateErrors = {
1529
+ /**
1530
+ * Bad request
1531
+ */
1532
+ 400: BadRequestError;
1533
+ };
1534
+ export type PtyCreateError = PtyCreateErrors[keyof PtyCreateErrors];
1535
+ export type PtyCreateResponses = {
1536
+ /**
1537
+ * Created session
1538
+ */
1539
+ 200: Pty;
1540
+ };
1541
+ export type PtyCreateResponse = PtyCreateResponses[keyof PtyCreateResponses];
1542
+ export type PtyRemoveData = {
1543
+ body?: never;
1544
+ path: {
1545
+ ptyID: string;
1546
+ };
1547
+ query?: {
1548
+ directory?: string;
1549
+ };
1550
+ url: "/pty/{ptyID}";
1551
+ };
1552
+ export type PtyRemoveErrors = {
1553
+ /**
1554
+ * Not found
1555
+ */
1556
+ 404: NotFoundError;
1557
+ };
1558
+ export type PtyRemoveError = PtyRemoveErrors[keyof PtyRemoveErrors];
1559
+ export type PtyRemoveResponses = {
1560
+ /**
1561
+ * Session removed
1562
+ */
1563
+ 200: boolean;
1564
+ };
1565
+ export type PtyRemoveResponse = PtyRemoveResponses[keyof PtyRemoveResponses];
1566
+ export type PtyGetData = {
1567
+ body?: never;
1568
+ path: {
1569
+ ptyID: string;
1570
+ };
1571
+ query?: {
1572
+ directory?: string;
1573
+ };
1574
+ url: "/pty/{ptyID}";
1575
+ };
1576
+ export type PtyGetErrors = {
1577
+ /**
1578
+ * Not found
1579
+ */
1580
+ 404: NotFoundError;
1581
+ };
1582
+ export type PtyGetError = PtyGetErrors[keyof PtyGetErrors];
1583
+ export type PtyGetResponses = {
1584
+ /**
1585
+ * Session info
1586
+ */
1587
+ 200: Pty;
1588
+ };
1589
+ export type PtyGetResponse = PtyGetResponses[keyof PtyGetResponses];
1590
+ export type PtyUpdateData = {
1591
+ body?: {
1592
+ title?: string;
1593
+ size?: {
1594
+ rows: number;
1595
+ cols: number;
1596
+ };
1597
+ };
1598
+ path: {
1599
+ ptyID: string;
1600
+ };
1601
+ query?: {
1602
+ directory?: string;
1603
+ };
1604
+ url: "/pty/{ptyID}";
1605
+ };
1606
+ export type PtyUpdateErrors = {
1607
+ /**
1608
+ * Bad request
1609
+ */
1610
+ 400: BadRequestError;
1611
+ };
1612
+ export type PtyUpdateError = PtyUpdateErrors[keyof PtyUpdateErrors];
1613
+ export type PtyUpdateResponses = {
1614
+ /**
1615
+ * Updated session
1616
+ */
1617
+ 200: Pty;
1618
+ };
1619
+ export type PtyUpdateResponse = PtyUpdateResponses[keyof PtyUpdateResponses];
1620
+ export type PtyConnectData = {
1621
+ body?: never;
1622
+ path: {
1623
+ ptyID: string;
1624
+ };
1625
+ query?: {
1626
+ directory?: string;
1627
+ };
1628
+ url: "/pty/{ptyID}/connect";
1629
+ };
1630
+ export type PtyConnectErrors = {
1631
+ /**
1632
+ * Not found
1633
+ */
1634
+ 404: NotFoundError;
1635
+ };
1636
+ export type PtyConnectError = PtyConnectErrors[keyof PtyConnectErrors];
1637
+ export type PtyConnectResponses = {
1638
+ /**
1639
+ * Connected session
1640
+ */
1641
+ 200: boolean;
1642
+ };
1643
+ export type PtyConnectResponse = PtyConnectResponses[keyof PtyConnectResponses];
1644
+ export type ConfigGetData = {
1645
+ body?: never;
1646
+ path?: never;
1647
+ query?: {
1648
+ directory?: string;
1649
+ };
1650
+ url: "/config";
1651
+ };
1652
+ export type ConfigGetResponses = {
1653
+ /**
1654
+ * Get config info
1655
+ */
1656
+ 200: Config;
1657
+ };
1658
+ export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses];
1659
+ export type ConfigUpdateData = {
1660
+ body?: Config;
1661
+ path?: never;
1662
+ query?: {
1663
+ directory?: string;
1664
+ };
1665
+ url: "/config";
1666
+ };
1667
+ export type ConfigUpdateErrors = {
1668
+ /**
1669
+ * Bad request
1670
+ */
1671
+ 400: BadRequestError;
1672
+ };
1673
+ export type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors];
1674
+ export type ConfigUpdateResponses = {
1675
+ /**
1676
+ * Successfully updated config
1677
+ */
1678
+ 200: Config;
1679
+ };
1680
+ export type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses];
1681
+ export type ToolIdsData = {
1682
+ body?: never;
1683
+ path?: never;
1684
+ query?: {
1685
+ directory?: string;
1686
+ };
1687
+ url: "/experimental/tool/ids";
1688
+ };
1689
+ export type ToolIdsErrors = {
1690
+ /**
1691
+ * Bad request
1692
+ */
1693
+ 400: BadRequestError;
1694
+ };
1695
+ export type ToolIdsError = ToolIdsErrors[keyof ToolIdsErrors];
1696
+ export type ToolIdsResponses = {
1697
+ /**
1698
+ * Tool IDs
1699
+ */
1700
+ 200: ToolIds;
1701
+ };
1702
+ export type ToolIdsResponse = ToolIdsResponses[keyof ToolIdsResponses];
1703
+ export type ToolListData = {
1704
+ body?: never;
1705
+ path?: never;
1706
+ query: {
1707
+ directory?: string;
1708
+ provider: string;
1709
+ model: string;
1710
+ };
1711
+ url: "/experimental/tool";
1712
+ };
1713
+ export type ToolListErrors = {
1714
+ /**
1715
+ * Bad request
1716
+ */
1717
+ 400: BadRequestError;
1718
+ };
1719
+ export type ToolListError = ToolListErrors[keyof ToolListErrors];
1720
+ export type ToolListResponses = {
1721
+ /**
1722
+ * Tools
1723
+ */
1724
+ 200: ToolList;
1725
+ };
1726
+ export type ToolListResponse = ToolListResponses[keyof ToolListResponses];
1727
+ export type InstanceDisposeData = {
1728
+ body?: never;
1729
+ path?: never;
1730
+ query?: {
1731
+ directory?: string;
1732
+ };
1733
+ url: "/instance/dispose";
1734
+ };
1735
+ export type InstanceDisposeResponses = {
1736
+ /**
1737
+ * Instance disposed
1738
+ */
1739
+ 200: boolean;
1740
+ };
1741
+ export type InstanceDisposeResponse = InstanceDisposeResponses[keyof InstanceDisposeResponses];
1742
+ export type PathGetData = {
1743
+ body?: never;
1744
+ path?: never;
1745
+ query?: {
1746
+ directory?: string;
1747
+ };
1748
+ url: "/path";
1749
+ };
1750
+ export type PathGetResponses = {
1751
+ /**
1752
+ * Path
1753
+ */
1754
+ 200: Path;
1755
+ };
1756
+ export type PathGetResponse = PathGetResponses[keyof PathGetResponses];
1757
+ export type VcsGetData = {
1758
+ body?: never;
1759
+ path?: never;
1760
+ query?: {
1761
+ directory?: string;
1762
+ };
1763
+ url: "/vcs";
1764
+ };
1765
+ export type VcsGetResponses = {
1766
+ /**
1767
+ * VCS info
1768
+ */
1769
+ 200: VcsInfo;
1770
+ };
1771
+ export type VcsGetResponse = VcsGetResponses[keyof VcsGetResponses];
1772
+ export type SessionListData = {
1773
+ body?: never;
1774
+ path?: never;
1775
+ query?: {
1776
+ directory?: string;
1777
+ };
1778
+ url: "/session";
1779
+ };
1780
+ export type SessionListResponses = {
1781
+ /**
1782
+ * List of sessions
1783
+ */
1784
+ 200: Array<Session>;
1785
+ };
1786
+ export type SessionListResponse = SessionListResponses[keyof SessionListResponses];
1787
+ export type SessionCreateData = {
1788
+ body?: {
1789
+ parentID?: string;
1790
+ title?: string;
1791
+ };
1792
+ path?: never;
1793
+ query?: {
1794
+ directory?: string;
1795
+ };
1796
+ url: "/session";
1797
+ };
1798
+ export type SessionCreateErrors = {
1799
+ /**
1800
+ * Bad request
1801
+ */
1802
+ 400: BadRequestError;
1803
+ };
1804
+ export type SessionCreateError = SessionCreateErrors[keyof SessionCreateErrors];
1805
+ export type SessionCreateResponses = {
1806
+ /**
1807
+ * Successfully created session
1808
+ */
1809
+ 200: Session;
1810
+ };
1811
+ export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses];
1812
+ export type SessionStatusData = {
1813
+ body?: never;
1814
+ path?: never;
1815
+ query?: {
1816
+ directory?: string;
1817
+ };
1818
+ url: "/session/status";
1819
+ };
1820
+ export type SessionStatusErrors = {
1821
+ /**
1822
+ * Bad request
1823
+ */
1824
+ 400: BadRequestError;
1825
+ };
1826
+ export type SessionStatusError = SessionStatusErrors[keyof SessionStatusErrors];
1827
+ export type SessionStatusResponses = {
1828
+ /**
1829
+ * Get session status
1830
+ */
1831
+ 200: {
1832
+ [key: string]: SessionStatus;
1833
+ };
1834
+ };
1835
+ export type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses];
1836
+ export type SessionDeleteData = {
1837
+ body?: never;
1838
+ path: {
1839
+ sessionID: string;
1840
+ };
1841
+ query?: {
1842
+ directory?: string;
1843
+ };
1844
+ url: "/session/{sessionID}";
1845
+ };
1846
+ export type SessionDeleteErrors = {
1847
+ /**
1848
+ * Bad request
1849
+ */
1850
+ 400: BadRequestError;
1851
+ /**
1852
+ * Not found
1853
+ */
1854
+ 404: NotFoundError;
1855
+ };
1856
+ export type SessionDeleteError = SessionDeleteErrors[keyof SessionDeleteErrors];
1857
+ export type SessionDeleteResponses = {
1858
+ /**
1859
+ * Successfully deleted session
1860
+ */
1861
+ 200: boolean;
1862
+ };
1863
+ export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses];
1864
+ export type SessionGetData = {
1865
+ body?: never;
1866
+ path: {
1867
+ sessionID: string;
1868
+ };
1869
+ query?: {
1870
+ directory?: string;
1871
+ };
1872
+ url: "/session/{sessionID}";
1873
+ };
1874
+ export type SessionGetErrors = {
1875
+ /**
1876
+ * Bad request
1877
+ */
1878
+ 400: BadRequestError;
1879
+ /**
1880
+ * Not found
1881
+ */
1882
+ 404: NotFoundError;
1883
+ };
1884
+ export type SessionGetError = SessionGetErrors[keyof SessionGetErrors];
1885
+ export type SessionGetResponses = {
1886
+ /**
1887
+ * Get session
1888
+ */
1889
+ 200: Session;
1890
+ };
1891
+ export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses];
1892
+ export type SessionUpdateData = {
1893
+ body?: {
1894
+ title?: string;
1895
+ };
1896
+ path: {
1897
+ sessionID: string;
1898
+ };
1899
+ query?: {
1900
+ directory?: string;
1901
+ };
1902
+ url: "/session/{sessionID}";
1903
+ };
1904
+ export type SessionUpdateErrors = {
1905
+ /**
1906
+ * Bad request
1907
+ */
1908
+ 400: BadRequestError;
1909
+ /**
1910
+ * Not found
1911
+ */
1912
+ 404: NotFoundError;
1913
+ };
1914
+ export type SessionUpdateError = SessionUpdateErrors[keyof SessionUpdateErrors];
1915
+ export type SessionUpdateResponses = {
1916
+ /**
1917
+ * Successfully updated session
1918
+ */
1919
+ 200: Session;
1920
+ };
1921
+ export type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses];
1922
+ export type SessionChildrenData = {
1923
+ body?: never;
1924
+ path: {
1925
+ sessionID: string;
1926
+ };
1927
+ query?: {
1928
+ directory?: string;
1929
+ };
1930
+ url: "/session/{sessionID}/children";
1931
+ };
1932
+ export type SessionChildrenErrors = {
1933
+ /**
1934
+ * Bad request
1935
+ */
1936
+ 400: BadRequestError;
1937
+ /**
1938
+ * Not found
1939
+ */
1940
+ 404: NotFoundError;
1941
+ };
1942
+ export type SessionChildrenError = SessionChildrenErrors[keyof SessionChildrenErrors];
1943
+ export type SessionChildrenResponses = {
1944
+ /**
1945
+ * List of children
1946
+ */
1947
+ 200: Array<Session>;
1948
+ };
1949
+ export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses];
1950
+ export type SessionTodoData = {
1951
+ body?: never;
1952
+ path: {
1953
+ /**
1954
+ * Session ID
1955
+ */
1956
+ sessionID: string;
1957
+ };
1958
+ query?: {
1959
+ directory?: string;
1960
+ };
1961
+ url: "/session/{sessionID}/todo";
1962
+ };
1963
+ export type SessionTodoErrors = {
1964
+ /**
1965
+ * Bad request
1966
+ */
1967
+ 400: BadRequestError;
1968
+ /**
1969
+ * Not found
1970
+ */
1971
+ 404: NotFoundError;
1972
+ };
1973
+ export type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors];
1974
+ export type SessionTodoResponses = {
1975
+ /**
1976
+ * Todo list
1977
+ */
1978
+ 200: Array<Todo>;
1979
+ };
1980
+ export type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses];
1981
+ export type SessionInitData = {
1982
+ body?: {
1983
+ modelID: string;
1984
+ providerID: string;
1985
+ messageID: string;
1986
+ };
1987
+ path: {
1988
+ /**
1989
+ * Session ID
1990
+ */
1991
+ sessionID: string;
1992
+ };
1993
+ query?: {
1994
+ directory?: string;
1995
+ };
1996
+ url: "/session/{sessionID}/init";
1997
+ };
1998
+ export type SessionInitErrors = {
1999
+ /**
2000
+ * Bad request
2001
+ */
2002
+ 400: BadRequestError;
2003
+ /**
2004
+ * Not found
2005
+ */
2006
+ 404: NotFoundError;
2007
+ };
2008
+ export type SessionInitError = SessionInitErrors[keyof SessionInitErrors];
2009
+ export type SessionInitResponses = {
2010
+ /**
2011
+ * 200
2012
+ */
2013
+ 200: boolean;
2014
+ };
2015
+ export type SessionInitResponse = SessionInitResponses[keyof SessionInitResponses];
2016
+ export type SessionForkData = {
2017
+ body?: {
2018
+ messageID?: string;
2019
+ };
2020
+ path: {
2021
+ sessionID: string;
2022
+ };
2023
+ query?: {
2024
+ directory?: string;
2025
+ };
2026
+ url: "/session/{sessionID}/fork";
2027
+ };
2028
+ export type SessionForkResponses = {
2029
+ /**
2030
+ * 200
2031
+ */
2032
+ 200: Session;
2033
+ };
2034
+ export type SessionForkResponse = SessionForkResponses[keyof SessionForkResponses];
2035
+ export type SessionAbortData = {
2036
+ body?: never;
2037
+ path: {
2038
+ sessionID: string;
2039
+ };
2040
+ query?: {
2041
+ directory?: string;
2042
+ };
2043
+ url: "/session/{sessionID}/abort";
2044
+ };
2045
+ export type SessionAbortErrors = {
2046
+ /**
2047
+ * Bad request
2048
+ */
2049
+ 400: BadRequestError;
2050
+ /**
2051
+ * Not found
2052
+ */
2053
+ 404: NotFoundError;
2054
+ };
2055
+ export type SessionAbortError = SessionAbortErrors[keyof SessionAbortErrors];
2056
+ export type SessionAbortResponses = {
2057
+ /**
2058
+ * Aborted session
2059
+ */
2060
+ 200: boolean;
2061
+ };
2062
+ export type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses];
2063
+ export type SessionUnshareData = {
2064
+ body?: never;
2065
+ path: {
2066
+ sessionID: string;
2067
+ };
2068
+ query?: {
2069
+ directory?: string;
2070
+ };
2071
+ url: "/session/{sessionID}/share";
2072
+ };
2073
+ export type SessionUnshareErrors = {
2074
+ /**
2075
+ * Bad request
2076
+ */
2077
+ 400: BadRequestError;
2078
+ /**
2079
+ * Not found
2080
+ */
2081
+ 404: NotFoundError;
2082
+ };
2083
+ export type SessionUnshareError = SessionUnshareErrors[keyof SessionUnshareErrors];
2084
+ export type SessionUnshareResponses = {
2085
+ /**
2086
+ * Successfully unshared session
2087
+ */
2088
+ 200: Session;
2089
+ };
2090
+ export type SessionUnshareResponse = SessionUnshareResponses[keyof SessionUnshareResponses];
2091
+ export type SessionShareData = {
2092
+ body?: never;
2093
+ path: {
2094
+ sessionID: string;
2095
+ };
2096
+ query?: {
2097
+ directory?: string;
2098
+ };
2099
+ url: "/session/{sessionID}/share";
2100
+ };
2101
+ export type SessionShareErrors = {
2102
+ /**
2103
+ * Bad request
2104
+ */
2105
+ 400: BadRequestError;
2106
+ /**
2107
+ * Not found
2108
+ */
2109
+ 404: NotFoundError;
2110
+ };
2111
+ export type SessionShareError = SessionShareErrors[keyof SessionShareErrors];
2112
+ export type SessionShareResponses = {
2113
+ /**
2114
+ * Successfully shared session
2115
+ */
2116
+ 200: Session;
2117
+ };
2118
+ export type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses];
2119
+ export type SessionDiffData = {
2120
+ body?: never;
2121
+ path: {
2122
+ /**
2123
+ * Session ID
2124
+ */
2125
+ sessionID: string;
2126
+ };
2127
+ query?: {
2128
+ directory?: string;
2129
+ messageID?: string;
2130
+ };
2131
+ url: "/session/{sessionID}/diff";
2132
+ };
2133
+ export type SessionDiffErrors = {
2134
+ /**
2135
+ * Bad request
2136
+ */
2137
+ 400: BadRequestError;
2138
+ /**
2139
+ * Not found
2140
+ */
2141
+ 404: NotFoundError;
2142
+ };
2143
+ export type SessionDiffError = SessionDiffErrors[keyof SessionDiffErrors];
2144
+ export type SessionDiffResponses = {
2145
+ /**
2146
+ * List of diffs
2147
+ */
2148
+ 200: Array<FileDiff>;
2149
+ };
2150
+ export type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses];
2151
+ export type SessionSummarizeData = {
2152
+ body?: {
2153
+ providerID: string;
2154
+ modelID: string;
2155
+ };
2156
+ path: {
2157
+ /**
2158
+ * Session ID
2159
+ */
2160
+ sessionID: string;
2161
+ };
2162
+ query?: {
2163
+ directory?: string;
2164
+ };
2165
+ url: "/session/{sessionID}/summarize";
2166
+ };
2167
+ export type SessionSummarizeErrors = {
2168
+ /**
2169
+ * Bad request
2170
+ */
2171
+ 400: BadRequestError;
2172
+ /**
2173
+ * Not found
2174
+ */
2175
+ 404: NotFoundError;
2176
+ };
2177
+ export type SessionSummarizeError = SessionSummarizeErrors[keyof SessionSummarizeErrors];
2178
+ export type SessionSummarizeResponses = {
2179
+ /**
2180
+ * Summarized session
2181
+ */
2182
+ 200: boolean;
2183
+ };
2184
+ export type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSummarizeResponses];
2185
+ export type SessionMessagesData = {
2186
+ body?: never;
2187
+ path: {
2188
+ /**
2189
+ * Session ID
2190
+ */
2191
+ sessionID: string;
2192
+ };
2193
+ query?: {
2194
+ directory?: string;
2195
+ limit?: number;
2196
+ };
2197
+ url: "/session/{sessionID}/message";
2198
+ };
2199
+ export type SessionMessagesErrors = {
2200
+ /**
2201
+ * Bad request
2202
+ */
2203
+ 400: BadRequestError;
2204
+ /**
2205
+ * Not found
2206
+ */
2207
+ 404: NotFoundError;
2208
+ };
2209
+ export type SessionMessagesError = SessionMessagesErrors[keyof SessionMessagesErrors];
2210
+ export type SessionMessagesResponses = {
2211
+ /**
2212
+ * List of messages
2213
+ */
2214
+ 200: Array<{
2215
+ info: Message;
2216
+ parts: Array<Part>;
2217
+ }>;
2218
+ };
2219
+ export type SessionMessagesResponse = SessionMessagesResponses[keyof SessionMessagesResponses];
2220
+ export type SessionPromptData = {
2221
+ body?: {
2222
+ messageID?: string;
2223
+ model?: {
2224
+ providerID: string;
2225
+ modelID: string;
2226
+ };
2227
+ agent?: string;
2228
+ noReply?: boolean;
2229
+ system?: string;
2230
+ tools?: {
2231
+ [key: string]: boolean;
2232
+ };
2233
+ parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
2234
+ };
2235
+ path: {
2236
+ /**
2237
+ * Session ID
2238
+ */
2239
+ sessionID: string;
2240
+ };
2241
+ query?: {
2242
+ directory?: string;
2243
+ };
2244
+ url: "/session/{sessionID}/message";
2245
+ };
2246
+ export type SessionPromptErrors = {
2247
+ /**
2248
+ * Bad request
2249
+ */
2250
+ 400: BadRequestError;
2251
+ /**
2252
+ * Not found
2253
+ */
2254
+ 404: NotFoundError;
2255
+ };
2256
+ export type SessionPromptError = SessionPromptErrors[keyof SessionPromptErrors];
2257
+ export type SessionPromptResponses = {
2258
+ /**
2259
+ * Created message
2260
+ */
2261
+ 200: {
2262
+ info: AssistantMessage;
2263
+ parts: Array<Part>;
2264
+ };
2265
+ };
2266
+ export type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses];
2267
+ export type SessionMessageData = {
2268
+ body?: never;
2269
+ path: {
2270
+ /**
2271
+ * Session ID
2272
+ */
2273
+ sessionID: string;
2274
+ /**
2275
+ * Message ID
2276
+ */
2277
+ messageID: string;
2278
+ };
2279
+ query?: {
2280
+ directory?: string;
2281
+ };
2282
+ url: "/session/{sessionID}/message/{messageID}";
2283
+ };
2284
+ export type SessionMessageErrors = {
2285
+ /**
2286
+ * Bad request
2287
+ */
2288
+ 400: BadRequestError;
2289
+ /**
2290
+ * Not found
2291
+ */
2292
+ 404: NotFoundError;
2293
+ };
2294
+ export type SessionMessageError = SessionMessageErrors[keyof SessionMessageErrors];
2295
+ export type SessionMessageResponses = {
2296
+ /**
2297
+ * Message
2298
+ */
2299
+ 200: {
2300
+ info: Message;
2301
+ parts: Array<Part>;
2302
+ };
2303
+ };
2304
+ export type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses];
2305
+ export type SessionPromptAsyncData = {
2306
+ body?: {
2307
+ messageID?: string;
2308
+ model?: {
2309
+ providerID: string;
2310
+ modelID: string;
2311
+ };
2312
+ agent?: string;
2313
+ noReply?: boolean;
2314
+ system?: string;
2315
+ tools?: {
2316
+ [key: string]: boolean;
2317
+ };
2318
+ parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
2319
+ };
2320
+ path: {
2321
+ /**
2322
+ * Session ID
2323
+ */
2324
+ sessionID: string;
2325
+ };
2326
+ query?: {
2327
+ directory?: string;
2328
+ };
2329
+ url: "/session/{sessionID}/prompt_async";
2330
+ };
2331
+ export type SessionPromptAsyncErrors = {
2332
+ /**
2333
+ * Bad request
2334
+ */
2335
+ 400: BadRequestError;
2336
+ /**
2337
+ * Not found
2338
+ */
2339
+ 404: NotFoundError;
2340
+ };
2341
+ export type SessionPromptAsyncError = SessionPromptAsyncErrors[keyof SessionPromptAsyncErrors];
2342
+ export type SessionPromptAsyncResponses = {
2343
+ /**
2344
+ * Prompt accepted
2345
+ */
2346
+ 204: void;
2347
+ };
2348
+ export type SessionPromptAsyncResponse = SessionPromptAsyncResponses[keyof SessionPromptAsyncResponses];
2349
+ export type SessionCommandData = {
2350
+ body?: {
2351
+ messageID?: string;
2352
+ agent?: string;
2353
+ model?: string;
2354
+ arguments: string;
2355
+ command: string;
2356
+ };
2357
+ path: {
2358
+ /**
2359
+ * Session ID
2360
+ */
2361
+ sessionID: string;
2362
+ };
2363
+ query?: {
2364
+ directory?: string;
2365
+ };
2366
+ url: "/session/{sessionID}/command";
2367
+ };
2368
+ export type SessionCommandErrors = {
2369
+ /**
2370
+ * Bad request
2371
+ */
2372
+ 400: BadRequestError;
2373
+ /**
2374
+ * Not found
2375
+ */
2376
+ 404: NotFoundError;
2377
+ };
2378
+ export type SessionCommandError = SessionCommandErrors[keyof SessionCommandErrors];
2379
+ export type SessionCommandResponses = {
2380
+ /**
2381
+ * Created message
2382
+ */
2383
+ 200: {
2384
+ info: AssistantMessage;
2385
+ parts: Array<Part>;
2386
+ };
2387
+ };
2388
+ export type SessionCommandResponse = SessionCommandResponses[keyof SessionCommandResponses];
2389
+ export type SessionShellData = {
2390
+ body?: {
2391
+ agent: string;
2392
+ model?: {
2393
+ providerID: string;
2394
+ modelID: string;
2395
+ };
2396
+ command: string;
2397
+ };
2398
+ path: {
2399
+ /**
2400
+ * Session ID
2401
+ */
2402
+ sessionID: string;
2403
+ };
2404
+ query?: {
2405
+ directory?: string;
2406
+ };
2407
+ url: "/session/{sessionID}/shell";
2408
+ };
2409
+ export type SessionShellErrors = {
2410
+ /**
2411
+ * Bad request
2412
+ */
2413
+ 400: BadRequestError;
2414
+ /**
2415
+ * Not found
2416
+ */
2417
+ 404: NotFoundError;
2418
+ };
2419
+ export type SessionShellError = SessionShellErrors[keyof SessionShellErrors];
2420
+ export type SessionShellResponses = {
2421
+ /**
2422
+ * Created message
2423
+ */
2424
+ 200: AssistantMessage;
2425
+ };
2426
+ export type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses];
2427
+ export type SessionRevertData = {
2428
+ body?: {
2429
+ messageID: string;
2430
+ partID?: string;
2431
+ };
2432
+ path: {
2433
+ sessionID: string;
2434
+ };
2435
+ query?: {
2436
+ directory?: string;
2437
+ };
2438
+ url: "/session/{sessionID}/revert";
2439
+ };
2440
+ export type SessionRevertErrors = {
2441
+ /**
2442
+ * Bad request
2443
+ */
2444
+ 400: BadRequestError;
2445
+ /**
2446
+ * Not found
2447
+ */
2448
+ 404: NotFoundError;
2449
+ };
2450
+ export type SessionRevertError = SessionRevertErrors[keyof SessionRevertErrors];
2451
+ export type SessionRevertResponses = {
2452
+ /**
2453
+ * Updated session
2454
+ */
2455
+ 200: Session;
2456
+ };
2457
+ export type SessionRevertResponse = SessionRevertResponses[keyof SessionRevertResponses];
2458
+ export type SessionUnrevertData = {
2459
+ body?: never;
2460
+ path: {
2461
+ sessionID: string;
2462
+ };
2463
+ query?: {
2464
+ directory?: string;
2465
+ };
2466
+ url: "/session/{sessionID}/unrevert";
2467
+ };
2468
+ export type SessionUnrevertErrors = {
2469
+ /**
2470
+ * Bad request
2471
+ */
2472
+ 400: BadRequestError;
2473
+ /**
2474
+ * Not found
2475
+ */
2476
+ 404: NotFoundError;
2477
+ };
2478
+ export type SessionUnrevertError = SessionUnrevertErrors[keyof SessionUnrevertErrors];
2479
+ export type SessionUnrevertResponses = {
2480
+ /**
2481
+ * Updated session
2482
+ */
2483
+ 200: Session;
2484
+ };
2485
+ export type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses];
2486
+ export type PermissionRespondData = {
2487
+ body?: {
2488
+ response: "once" | "always" | "reject";
2489
+ };
2490
+ path: {
2491
+ sessionID: string;
2492
+ permissionID: string;
2493
+ };
2494
+ query?: {
2495
+ directory?: string;
2496
+ };
2497
+ url: "/session/{sessionID}/permissions/{permissionID}";
2498
+ };
2499
+ export type PermissionRespondErrors = {
2500
+ /**
2501
+ * Bad request
2502
+ */
2503
+ 400: BadRequestError;
2504
+ /**
2505
+ * Not found
2506
+ */
2507
+ 404: NotFoundError;
2508
+ };
2509
+ export type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors];
2510
+ export type PermissionRespondResponses = {
2511
+ /**
2512
+ * Permission processed successfully
2513
+ */
2514
+ 200: boolean;
2515
+ };
2516
+ export type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses];
2517
+ export type CommandListData = {
2518
+ body?: never;
2519
+ path?: never;
2520
+ query?: {
2521
+ directory?: string;
2522
+ };
2523
+ url: "/command";
2524
+ };
2525
+ export type CommandListResponses = {
2526
+ /**
2527
+ * List of commands
2528
+ */
2529
+ 200: Array<Command>;
2530
+ };
2531
+ export type CommandListResponse = CommandListResponses[keyof CommandListResponses];
2532
+ export type ConfigProvidersData = {
2533
+ body?: never;
2534
+ path?: never;
2535
+ query?: {
2536
+ directory?: string;
2537
+ };
2538
+ url: "/config/providers";
2539
+ };
2540
+ export type ConfigProvidersResponses = {
2541
+ /**
2542
+ * List of providers
2543
+ */
2544
+ 200: {
2545
+ providers: Array<Provider>;
2546
+ default: {
2547
+ [key: string]: string;
2548
+ };
2549
+ };
2550
+ };
2551
+ export type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses];
2552
+ export type ProviderListData = {
2553
+ body?: never;
2554
+ path?: never;
2555
+ query?: {
2556
+ directory?: string;
2557
+ };
2558
+ url: "/provider";
2559
+ };
2560
+ export type ProviderListResponses = {
2561
+ /**
2562
+ * List of providers
2563
+ */
2564
+ 200: {
2565
+ all: Array<{
2566
+ api?: string;
2567
+ name: string;
2568
+ env: Array<string>;
2569
+ id: string;
2570
+ npm?: string;
2571
+ models: {
2572
+ [key: string]: {
2573
+ id: string;
2574
+ name: string;
2575
+ release_date: string;
2576
+ attachment: boolean;
2577
+ reasoning: boolean;
2578
+ temperature: boolean;
2579
+ tool_call: boolean;
2580
+ cost?: {
2581
+ input: number;
2582
+ output: number;
2583
+ cache_read?: number;
2584
+ cache_write?: number;
2585
+ context_over_200k?: {
2586
+ input: number;
2587
+ output: number;
2588
+ cache_read?: number;
2589
+ cache_write?: number;
2590
+ };
2591
+ };
2592
+ limit: {
2593
+ context: number;
2594
+ output: number;
2595
+ };
2596
+ modalities?: {
2597
+ input: Array<"text" | "audio" | "image" | "video" | "pdf">;
2598
+ output: Array<"text" | "audio" | "image" | "video" | "pdf">;
2599
+ };
2600
+ experimental?: boolean;
2601
+ status?: "alpha" | "beta" | "deprecated";
2602
+ options: {
2603
+ [key: string]: unknown;
2604
+ };
2605
+ headers?: {
2606
+ [key: string]: string;
2607
+ };
2608
+ provider?: {
2609
+ npm: string;
2610
+ };
2611
+ };
2612
+ };
2613
+ }>;
2614
+ default: {
2615
+ [key: string]: string;
2616
+ };
2617
+ connected: Array<string>;
2618
+ };
2619
+ };
2620
+ export type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses];
2621
+ export type ProviderAuthData = {
2622
+ body?: never;
2623
+ path?: never;
2624
+ query?: {
2625
+ directory?: string;
2626
+ };
2627
+ url: "/provider/auth";
2628
+ };
2629
+ export type ProviderAuthResponses = {
2630
+ /**
2631
+ * Provider auth methods
2632
+ */
2633
+ 200: {
2634
+ [key: string]: Array<ProviderAuthMethod>;
2635
+ };
2636
+ };
2637
+ export type ProviderAuthResponse = ProviderAuthResponses[keyof ProviderAuthResponses];
2638
+ export type ProviderOauthAuthorizeData = {
2639
+ body?: {
2640
+ /**
2641
+ * Auth method index
2642
+ */
2643
+ method: number;
2644
+ };
2645
+ path: {
2646
+ /**
2647
+ * Provider ID
2648
+ */
2649
+ providerID: string;
2650
+ };
2651
+ query?: {
2652
+ directory?: string;
2653
+ };
2654
+ url: "/provider/{providerID}/oauth/authorize";
2655
+ };
2656
+ export type ProviderOauthAuthorizeErrors = {
2657
+ /**
2658
+ * Bad request
2659
+ */
2660
+ 400: BadRequestError;
2661
+ };
2662
+ export type ProviderOauthAuthorizeError = ProviderOauthAuthorizeErrors[keyof ProviderOauthAuthorizeErrors];
2663
+ export type ProviderOauthAuthorizeResponses = {
2664
+ /**
2665
+ * Authorization URL and method
2666
+ */
2667
+ 200: ProviderAuthAuthorization;
2668
+ };
2669
+ export type ProviderOauthAuthorizeResponse = ProviderOauthAuthorizeResponses[keyof ProviderOauthAuthorizeResponses];
2670
+ export type ProviderOauthCallbackData = {
2671
+ body?: {
2672
+ /**
2673
+ * Auth method index
2674
+ */
2675
+ method: number;
2676
+ /**
2677
+ * OAuth authorization code
2678
+ */
2679
+ code?: string;
2680
+ };
2681
+ path: {
2682
+ /**
2683
+ * Provider ID
2684
+ */
2685
+ providerID: string;
2686
+ };
2687
+ query?: {
2688
+ directory?: string;
2689
+ };
2690
+ url: "/provider/{providerID}/oauth/callback";
2691
+ };
2692
+ export type ProviderOauthCallbackErrors = {
2693
+ /**
2694
+ * Bad request
2695
+ */
2696
+ 400: BadRequestError;
2697
+ };
2698
+ export type ProviderOauthCallbackError = ProviderOauthCallbackErrors[keyof ProviderOauthCallbackErrors];
2699
+ export type ProviderOauthCallbackResponses = {
2700
+ /**
2701
+ * OAuth callback processed successfully
2702
+ */
2703
+ 200: boolean;
2704
+ };
2705
+ export type ProviderOauthCallbackResponse = ProviderOauthCallbackResponses[keyof ProviderOauthCallbackResponses];
2706
+ export type FindTextData = {
2707
+ body?: never;
2708
+ path?: never;
2709
+ query: {
2710
+ directory?: string;
2711
+ pattern: string;
2712
+ };
2713
+ url: "/find";
2714
+ };
2715
+ export type FindTextResponses = {
2716
+ /**
2717
+ * Matches
2718
+ */
2719
+ 200: Array<{
2720
+ path: {
2721
+ text: string;
2722
+ };
2723
+ lines: {
2724
+ text: string;
2725
+ };
2726
+ line_number: number;
2727
+ absolute_offset: number;
2728
+ submatches: Array<{
2729
+ match: {
2730
+ text: string;
2731
+ };
2732
+ start: number;
2733
+ end: number;
2734
+ }>;
2735
+ }>;
2736
+ };
2737
+ export type FindTextResponse = FindTextResponses[keyof FindTextResponses];
2738
+ export type FindFilesData = {
2739
+ body?: never;
2740
+ path?: never;
2741
+ query: {
2742
+ directory?: string;
2743
+ query: string;
2744
+ dirs?: "true" | "false";
2745
+ };
2746
+ url: "/find/file";
2747
+ };
2748
+ export type FindFilesResponses = {
2749
+ /**
2750
+ * File paths
2751
+ */
2752
+ 200: Array<string>;
2753
+ };
2754
+ export type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses];
2755
+ export type FindSymbolsData = {
2756
+ body?: never;
2757
+ path?: never;
2758
+ query: {
2759
+ directory?: string;
2760
+ query: string;
2761
+ };
2762
+ url: "/find/symbol";
2763
+ };
2764
+ export type FindSymbolsResponses = {
2765
+ /**
2766
+ * Symbols
2767
+ */
2768
+ 200: Array<Symbol>;
2769
+ };
2770
+ export type FindSymbolsResponse = FindSymbolsResponses[keyof FindSymbolsResponses];
2771
+ export type FileListData = {
2772
+ body?: never;
2773
+ path?: never;
2774
+ query: {
2775
+ directory?: string;
2776
+ path: string;
2777
+ };
2778
+ url: "/file";
2779
+ };
2780
+ export type FileListResponses = {
2781
+ /**
2782
+ * Files and directories
2783
+ */
2784
+ 200: Array<FileNode>;
2785
+ };
2786
+ export type FileListResponse = FileListResponses[keyof FileListResponses];
2787
+ export type FileReadData = {
2788
+ body?: never;
2789
+ path?: never;
2790
+ query: {
2791
+ directory?: string;
2792
+ path: string;
2793
+ };
2794
+ url: "/file/content";
2795
+ };
2796
+ export type FileReadResponses = {
2797
+ /**
2798
+ * File content
2799
+ */
2800
+ 200: FileContent;
2801
+ };
2802
+ export type FileReadResponse = FileReadResponses[keyof FileReadResponses];
2803
+ export type FileStatusData = {
2804
+ body?: never;
2805
+ path?: never;
2806
+ query?: {
2807
+ directory?: string;
2808
+ };
2809
+ url: "/file/status";
2810
+ };
2811
+ export type FileStatusResponses = {
2812
+ /**
2813
+ * File status
2814
+ */
2815
+ 200: Array<File>;
2816
+ };
2817
+ export type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses];
2818
+ export type AppLogData = {
2819
+ body?: {
2820
+ /**
2821
+ * Service name for the log entry
2822
+ */
2823
+ service: string;
2824
+ /**
2825
+ * Log level
2826
+ */
2827
+ level: "debug" | "info" | "error" | "warn";
2828
+ /**
2829
+ * Log message
2830
+ */
2831
+ message: string;
2832
+ /**
2833
+ * Additional metadata for the log entry
2834
+ */
2835
+ extra?: {
2836
+ [key: string]: unknown;
2837
+ };
2838
+ };
2839
+ path?: never;
2840
+ query?: {
2841
+ directory?: string;
2842
+ };
2843
+ url: "/log";
2844
+ };
2845
+ export type AppLogErrors = {
2846
+ /**
2847
+ * Bad request
2848
+ */
2849
+ 400: BadRequestError;
2850
+ };
2851
+ export type AppLogError = AppLogErrors[keyof AppLogErrors];
2852
+ export type AppLogResponses = {
2853
+ /**
2854
+ * Log entry written successfully
2855
+ */
2856
+ 200: boolean;
2857
+ };
2858
+ export type AppLogResponse = AppLogResponses[keyof AppLogResponses];
2859
+ export type AppAgentsData = {
2860
+ body?: never;
2861
+ path?: never;
2862
+ query?: {
2863
+ directory?: string;
2864
+ };
2865
+ url: "/agent";
2866
+ };
2867
+ export type AppAgentsResponses = {
2868
+ /**
2869
+ * List of agents
2870
+ */
2871
+ 200: Array<Agent>;
2872
+ };
2873
+ export type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses];
2874
+ export type McpStatusData = {
2875
+ body?: never;
2876
+ path?: never;
2877
+ query?: {
2878
+ directory?: string;
2879
+ };
2880
+ url: "/mcp";
2881
+ };
2882
+ export type McpStatusResponses = {
2883
+ /**
2884
+ * MCP server status
2885
+ */
2886
+ 200: {
2887
+ [key: string]: McpStatus;
2888
+ };
2889
+ };
2890
+ export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];
2891
+ export type McpAddData = {
2892
+ body?: {
2893
+ name: string;
2894
+ config: McpLocalConfig | McpRemoteConfig;
2895
+ };
2896
+ path?: never;
2897
+ query?: {
2898
+ directory?: string;
2899
+ };
2900
+ url: "/mcp";
2901
+ };
2902
+ export type McpAddErrors = {
2903
+ /**
2904
+ * Bad request
2905
+ */
2906
+ 400: BadRequestError;
2907
+ };
2908
+ export type McpAddError = McpAddErrors[keyof McpAddErrors];
2909
+ export type McpAddResponses = {
2910
+ /**
2911
+ * MCP server added successfully
2912
+ */
2913
+ 200: {
2914
+ [key: string]: McpStatus;
2915
+ };
2916
+ };
2917
+ export type McpAddResponse = McpAddResponses[keyof McpAddResponses];
2918
+ export type McpAuthRemoveData = {
2919
+ body?: never;
2920
+ path: {
2921
+ name: string;
2922
+ };
2923
+ query?: {
2924
+ directory?: string;
2925
+ };
2926
+ url: "/mcp/{name}/auth";
2927
+ };
2928
+ export type McpAuthRemoveErrors = {
2929
+ /**
2930
+ * Not found
2931
+ */
2932
+ 404: NotFoundError;
2933
+ };
2934
+ export type McpAuthRemoveError = McpAuthRemoveErrors[keyof McpAuthRemoveErrors];
2935
+ export type McpAuthRemoveResponses = {
2936
+ /**
2937
+ * OAuth credentials removed
2938
+ */
2939
+ 200: {
2940
+ success: true;
2941
+ };
2942
+ };
2943
+ export type McpAuthRemoveResponse = McpAuthRemoveResponses[keyof McpAuthRemoveResponses];
2944
+ export type McpAuthStartData = {
2945
+ body?: never;
2946
+ path: {
2947
+ name: string;
2948
+ };
2949
+ query?: {
2950
+ directory?: string;
2951
+ };
2952
+ url: "/mcp/{name}/auth";
2953
+ };
2954
+ export type McpAuthStartErrors = {
2955
+ /**
2956
+ * Bad request
2957
+ */
2958
+ 400: BadRequestError;
2959
+ /**
2960
+ * Not found
2961
+ */
2962
+ 404: NotFoundError;
2963
+ };
2964
+ export type McpAuthStartError = McpAuthStartErrors[keyof McpAuthStartErrors];
2965
+ export type McpAuthStartResponses = {
2966
+ /**
2967
+ * OAuth flow started
2968
+ */
2969
+ 200: {
2970
+ /**
2971
+ * URL to open in browser for authorization
2972
+ */
2973
+ authorizationUrl: string;
2974
+ };
2975
+ };
2976
+ export type McpAuthStartResponse = McpAuthStartResponses[keyof McpAuthStartResponses];
2977
+ export type McpAuthCallbackData = {
2978
+ body?: {
2979
+ /**
2980
+ * Authorization code from OAuth callback
2981
+ */
2982
+ code: string;
2983
+ };
2984
+ path: {
2985
+ name: string;
2986
+ };
2987
+ query?: {
2988
+ directory?: string;
2989
+ };
2990
+ url: "/mcp/{name}/auth/callback";
2991
+ };
2992
+ export type McpAuthCallbackErrors = {
2993
+ /**
2994
+ * Bad request
2995
+ */
2996
+ 400: BadRequestError;
2997
+ /**
2998
+ * Not found
2999
+ */
3000
+ 404: NotFoundError;
3001
+ };
3002
+ export type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors];
3003
+ export type McpAuthCallbackResponses = {
3004
+ /**
3005
+ * OAuth authentication completed
3006
+ */
3007
+ 200: McpStatus;
3008
+ };
3009
+ export type McpAuthCallbackResponse = McpAuthCallbackResponses[keyof McpAuthCallbackResponses];
3010
+ export type McpAuthAuthenticateData = {
3011
+ body?: never;
3012
+ path: {
3013
+ name: string;
3014
+ };
3015
+ query?: {
3016
+ directory?: string;
3017
+ };
3018
+ url: "/mcp/{name}/auth/authenticate";
3019
+ };
3020
+ export type McpAuthAuthenticateErrors = {
3021
+ /**
3022
+ * Bad request
3023
+ */
3024
+ 400: BadRequestError;
3025
+ /**
3026
+ * Not found
3027
+ */
3028
+ 404: NotFoundError;
3029
+ };
3030
+ export type McpAuthAuthenticateError = McpAuthAuthenticateErrors[keyof McpAuthAuthenticateErrors];
3031
+ export type McpAuthAuthenticateResponses = {
3032
+ /**
3033
+ * OAuth authentication completed
3034
+ */
3035
+ 200: McpStatus;
3036
+ };
3037
+ export type McpAuthAuthenticateResponse = McpAuthAuthenticateResponses[keyof McpAuthAuthenticateResponses];
3038
+ export type McpConnectData = {
3039
+ body?: never;
3040
+ path: {
3041
+ name: string;
3042
+ };
3043
+ query?: {
3044
+ directory?: string;
3045
+ };
3046
+ url: "/mcp/{name}/connect";
3047
+ };
3048
+ export type McpConnectResponses = {
3049
+ /**
3050
+ * MCP server connected successfully
3051
+ */
3052
+ 200: boolean;
3053
+ };
3054
+ export type McpConnectResponse = McpConnectResponses[keyof McpConnectResponses];
3055
+ export type McpDisconnectData = {
3056
+ body?: never;
3057
+ path: {
3058
+ name: string;
3059
+ };
3060
+ query?: {
3061
+ directory?: string;
3062
+ };
3063
+ url: "/mcp/{name}/disconnect";
3064
+ };
3065
+ export type McpDisconnectResponses = {
3066
+ /**
3067
+ * MCP server disconnected successfully
3068
+ */
3069
+ 200: boolean;
3070
+ };
3071
+ export type McpDisconnectResponse = McpDisconnectResponses[keyof McpDisconnectResponses];
3072
+ export type LspStatusData = {
3073
+ body?: never;
3074
+ path?: never;
3075
+ query?: {
3076
+ directory?: string;
3077
+ };
3078
+ url: "/lsp";
3079
+ };
3080
+ export type LspStatusResponses = {
3081
+ /**
3082
+ * LSP server status
3083
+ */
3084
+ 200: Array<LspStatus>;
3085
+ };
3086
+ export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];
3087
+ export type FormatterStatusData = {
3088
+ body?: never;
3089
+ path?: never;
3090
+ query?: {
3091
+ directory?: string;
3092
+ };
3093
+ url: "/formatter";
3094
+ };
3095
+ export type FormatterStatusResponses = {
3096
+ /**
3097
+ * Formatter status
3098
+ */
3099
+ 200: Array<FormatterStatus>;
3100
+ };
3101
+ export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses];
3102
+ export type TuiAppendPromptData = {
3103
+ body?: {
3104
+ text: string;
3105
+ };
3106
+ path?: never;
3107
+ query?: {
3108
+ directory?: string;
3109
+ };
3110
+ url: "/tui/append-prompt";
3111
+ };
3112
+ export type TuiAppendPromptErrors = {
3113
+ /**
3114
+ * Bad request
3115
+ */
3116
+ 400: BadRequestError;
3117
+ };
3118
+ export type TuiAppendPromptError = TuiAppendPromptErrors[keyof TuiAppendPromptErrors];
3119
+ export type TuiAppendPromptResponses = {
3120
+ /**
3121
+ * Prompt processed successfully
3122
+ */
3123
+ 200: boolean;
3124
+ };
3125
+ export type TuiAppendPromptResponse = TuiAppendPromptResponses[keyof TuiAppendPromptResponses];
3126
+ export type TuiOpenHelpData = {
3127
+ body?: never;
3128
+ path?: never;
3129
+ query?: {
3130
+ directory?: string;
3131
+ };
3132
+ url: "/tui/open-help";
3133
+ };
3134
+ export type TuiOpenHelpResponses = {
3135
+ /**
3136
+ * Help dialog opened successfully
3137
+ */
3138
+ 200: boolean;
3139
+ };
3140
+ export type TuiOpenHelpResponse = TuiOpenHelpResponses[keyof TuiOpenHelpResponses];
3141
+ export type TuiOpenSessionsData = {
3142
+ body?: never;
3143
+ path?: never;
3144
+ query?: {
3145
+ directory?: string;
3146
+ };
3147
+ url: "/tui/open-sessions";
3148
+ };
3149
+ export type TuiOpenSessionsResponses = {
3150
+ /**
3151
+ * Session dialog opened successfully
3152
+ */
3153
+ 200: boolean;
3154
+ };
3155
+ export type TuiOpenSessionsResponse = TuiOpenSessionsResponses[keyof TuiOpenSessionsResponses];
3156
+ export type TuiOpenThemesData = {
3157
+ body?: never;
3158
+ path?: never;
3159
+ query?: {
3160
+ directory?: string;
3161
+ };
3162
+ url: "/tui/open-themes";
3163
+ };
3164
+ export type TuiOpenThemesResponses = {
3165
+ /**
3166
+ * Theme dialog opened successfully
3167
+ */
3168
+ 200: boolean;
3169
+ };
3170
+ export type TuiOpenThemesResponse = TuiOpenThemesResponses[keyof TuiOpenThemesResponses];
3171
+ export type TuiOpenModelsData = {
3172
+ body?: never;
3173
+ path?: never;
3174
+ query?: {
3175
+ directory?: string;
3176
+ };
3177
+ url: "/tui/open-models";
3178
+ };
3179
+ export type TuiOpenModelsResponses = {
3180
+ /**
3181
+ * Model dialog opened successfully
3182
+ */
3183
+ 200: boolean;
3184
+ };
3185
+ export type TuiOpenModelsResponse = TuiOpenModelsResponses[keyof TuiOpenModelsResponses];
3186
+ export type TuiSubmitPromptData = {
3187
+ body?: never;
3188
+ path?: never;
3189
+ query?: {
3190
+ directory?: string;
3191
+ };
3192
+ url: "/tui/submit-prompt";
3193
+ };
3194
+ export type TuiSubmitPromptResponses = {
3195
+ /**
3196
+ * Prompt submitted successfully
3197
+ */
3198
+ 200: boolean;
3199
+ };
3200
+ export type TuiSubmitPromptResponse = TuiSubmitPromptResponses[keyof TuiSubmitPromptResponses];
3201
+ export type TuiClearPromptData = {
3202
+ body?: never;
3203
+ path?: never;
3204
+ query?: {
3205
+ directory?: string;
3206
+ };
3207
+ url: "/tui/clear-prompt";
3208
+ };
3209
+ export type TuiClearPromptResponses = {
3210
+ /**
3211
+ * Prompt cleared successfully
3212
+ */
3213
+ 200: boolean;
3214
+ };
3215
+ export type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromptResponses];
3216
+ export type TuiExecuteCommandData = {
3217
+ body?: {
3218
+ command: string;
3219
+ };
3220
+ path?: never;
3221
+ query?: {
3222
+ directory?: string;
3223
+ };
3224
+ url: "/tui/execute-command";
3225
+ };
3226
+ export type TuiExecuteCommandErrors = {
3227
+ /**
3228
+ * Bad request
3229
+ */
3230
+ 400: BadRequestError;
3231
+ };
3232
+ export type TuiExecuteCommandError = TuiExecuteCommandErrors[keyof TuiExecuteCommandErrors];
3233
+ export type TuiExecuteCommandResponses = {
3234
+ /**
3235
+ * Command executed successfully
3236
+ */
3237
+ 200: boolean;
3238
+ };
3239
+ export type TuiExecuteCommandResponse = TuiExecuteCommandResponses[keyof TuiExecuteCommandResponses];
3240
+ export type TuiShowToastData = {
3241
+ body?: {
3242
+ title?: string;
3243
+ message: string;
3244
+ variant: "info" | "success" | "warning" | "error";
3245
+ /**
3246
+ * Duration in milliseconds
3247
+ */
3248
+ duration?: number;
3249
+ };
3250
+ path?: never;
3251
+ query?: {
3252
+ directory?: string;
3253
+ };
3254
+ url: "/tui/show-toast";
3255
+ };
3256
+ export type TuiShowToastResponses = {
3257
+ /**
3258
+ * Toast notification shown successfully
3259
+ */
3260
+ 200: boolean;
3261
+ };
3262
+ export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses];
3263
+ export type TuiPublishData = {
3264
+ body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow;
3265
+ path?: never;
3266
+ query?: {
3267
+ directory?: string;
3268
+ };
3269
+ url: "/tui/publish";
3270
+ };
3271
+ export type TuiPublishErrors = {
3272
+ /**
3273
+ * Bad request
3274
+ */
3275
+ 400: BadRequestError;
3276
+ };
3277
+ export type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors];
3278
+ export type TuiPublishResponses = {
3279
+ /**
3280
+ * Event published successfully
3281
+ */
3282
+ 200: boolean;
3283
+ };
3284
+ export type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses];
3285
+ export type TuiControlNextData = {
3286
+ body?: never;
3287
+ path?: never;
3288
+ query?: {
3289
+ directory?: string;
3290
+ };
3291
+ url: "/tui/control/next";
3292
+ };
3293
+ export type TuiControlNextResponses = {
3294
+ /**
3295
+ * Next TUI request
3296
+ */
3297
+ 200: {
3298
+ path: string;
3299
+ body: unknown;
3300
+ };
3301
+ };
3302
+ export type TuiControlNextResponse = TuiControlNextResponses[keyof TuiControlNextResponses];
3303
+ export type TuiControlResponseData = {
3304
+ body?: unknown;
3305
+ path?: never;
3306
+ query?: {
3307
+ directory?: string;
3308
+ };
3309
+ url: "/tui/control/response";
3310
+ };
3311
+ export type TuiControlResponseResponses = {
3312
+ /**
3313
+ * Response submitted successfully
3314
+ */
3315
+ 200: boolean;
3316
+ };
3317
+ export type TuiControlResponseResponse = TuiControlResponseResponses[keyof TuiControlResponseResponses];
3318
+ export type AuthSetData = {
3319
+ body?: Auth;
3320
+ path: {
3321
+ providerID: string;
3322
+ };
3323
+ query?: {
3324
+ directory?: string;
3325
+ };
3326
+ url: "/auth/{providerID}";
3327
+ };
3328
+ export type AuthSetErrors = {
3329
+ /**
3330
+ * Bad request
3331
+ */
3332
+ 400: BadRequestError;
3333
+ };
3334
+ export type AuthSetError = AuthSetErrors[keyof AuthSetErrors];
3335
+ export type AuthSetResponses = {
3336
+ /**
3337
+ * Successfully set authentication credentials
3338
+ */
3339
+ 200: boolean;
3340
+ };
3341
+ export type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses];
3342
+ export type EventSubscribeData = {
3343
+ body?: never;
3344
+ path?: never;
3345
+ query?: {
3346
+ directory?: string;
3347
+ };
3348
+ url: "/event";
3349
+ };
3350
+ export type EventSubscribeResponses = {
3351
+ /**
3352
+ * Event stream
3353
+ */
3354
+ 200: Event;
3355
+ };
3356
+ export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];