@ex-machina/opencode-sdk 1.1.25-exmachina.1

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