@opencode-ai/sdk 1.0.134 → 1.0.138

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