@engineer-ai/sdk 1.2.3 → 1.3.0

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