@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,4226 @@
1
+ export type ClientOptions = {
2
+ baseUrl: `${string}://${string}` | (string & {});
3
+ };
4
+ export type EventInstallationUpdated = {
5
+ type: "installation.updated";
6
+ properties: {
7
+ version: string;
8
+ };
9
+ };
10
+ export type EventInstallationUpdateAvailable = {
11
+ type: "installation.update-available";
12
+ properties: {
13
+ version: string;
14
+ };
15
+ };
16
+ export type Project = {
17
+ id: string;
18
+ worktree: string;
19
+ vcs?: "git";
20
+ name?: string;
21
+ icon?: {
22
+ url?: string;
23
+ color?: string;
24
+ };
25
+ time: {
26
+ created: number;
27
+ updated: number;
28
+ initialized?: number;
29
+ };
30
+ sandboxes: Array<string>;
31
+ };
32
+ export type EventProjectUpdated = {
33
+ type: "project.updated";
34
+ properties: Project;
35
+ };
36
+ export type EventServerInstanceDisposed = {
37
+ type: "server.instance.disposed";
38
+ properties: {
39
+ directory: string;
40
+ };
41
+ };
42
+ export type EventLspClientDiagnostics = {
43
+ type: "lsp.client.diagnostics";
44
+ properties: {
45
+ serverID: string;
46
+ path: string;
47
+ };
48
+ };
49
+ export type EventLspUpdated = {
50
+ type: "lsp.updated";
51
+ properties: {
52
+ [key: string]: unknown;
53
+ };
54
+ };
55
+ export type EventFileEdited = {
56
+ type: "file.edited";
57
+ properties: {
58
+ file: string;
59
+ };
60
+ };
61
+ export type FileDiff = {
62
+ file: string;
63
+ before: string;
64
+ after: string;
65
+ additions: number;
66
+ deletions: number;
67
+ };
68
+ export type UserMessage = {
69
+ id: string;
70
+ sessionID: string;
71
+ role: "user";
72
+ time: {
73
+ created: number;
74
+ };
75
+ summary?: {
76
+ title?: string;
77
+ body?: string;
78
+ diffs: Array<FileDiff>;
79
+ };
80
+ agent: string;
81
+ model: {
82
+ providerID: string;
83
+ modelID: string;
84
+ };
85
+ system?: string;
86
+ tools?: {
87
+ [key: string]: boolean;
88
+ };
89
+ variant?: string;
90
+ };
91
+ export type ProviderAuthError = {
92
+ name: "ProviderAuthError";
93
+ data: {
94
+ providerID: string;
95
+ message: string;
96
+ };
97
+ };
98
+ export type UnknownError = {
99
+ name: "UnknownError";
100
+ data: {
101
+ message: string;
102
+ };
103
+ };
104
+ export type MessageOutputLengthError = {
105
+ name: "MessageOutputLengthError";
106
+ data: {
107
+ [key: string]: unknown;
108
+ };
109
+ };
110
+ export type MessageAbortedError = {
111
+ name: "MessageAbortedError";
112
+ data: {
113
+ message: string;
114
+ };
115
+ };
116
+ export type ApiError = {
117
+ name: "APIError";
118
+ data: {
119
+ message: string;
120
+ statusCode?: number;
121
+ isRetryable: boolean;
122
+ responseHeaders?: {
123
+ [key: string]: string;
124
+ };
125
+ responseBody?: string;
126
+ metadata?: {
127
+ [key: string]: string;
128
+ };
129
+ };
130
+ };
131
+ export type AssistantMessage = {
132
+ id: string;
133
+ sessionID: string;
134
+ role: "assistant";
135
+ time: {
136
+ created: number;
137
+ completed?: number;
138
+ };
139
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
140
+ parentID: string;
141
+ modelID: string;
142
+ providerID: string;
143
+ mode: string;
144
+ agent: string;
145
+ path: {
146
+ cwd: string;
147
+ root: string;
148
+ };
149
+ summary?: boolean;
150
+ cost: number;
151
+ tokens: {
152
+ input: number;
153
+ output: number;
154
+ reasoning: number;
155
+ cache: {
156
+ read: number;
157
+ write: number;
158
+ };
159
+ };
160
+ finish?: string;
161
+ };
162
+ export type Message = UserMessage | AssistantMessage;
163
+ export type EventMessageUpdated = {
164
+ type: "message.updated";
165
+ properties: {
166
+ info: Message;
167
+ };
168
+ };
169
+ export type EventMessageRemoved = {
170
+ type: "message.removed";
171
+ properties: {
172
+ sessionID: string;
173
+ messageID: string;
174
+ };
175
+ };
176
+ export type TextPart = {
177
+ id: string;
178
+ sessionID: string;
179
+ messageID: string;
180
+ type: "text";
181
+ text: string;
182
+ synthetic?: boolean;
183
+ ignored?: boolean;
184
+ time?: {
185
+ start: number;
186
+ end?: number;
187
+ };
188
+ metadata?: {
189
+ [key: string]: unknown;
190
+ };
191
+ };
192
+ export type ReasoningPart = {
193
+ id: string;
194
+ sessionID: string;
195
+ messageID: string;
196
+ type: "reasoning";
197
+ text: string;
198
+ metadata?: {
199
+ [key: string]: unknown;
200
+ };
201
+ time: {
202
+ start: number;
203
+ end?: number;
204
+ };
205
+ };
206
+ export type FilePartSourceText = {
207
+ value: string;
208
+ start: number;
209
+ end: number;
210
+ };
211
+ export type FileSource = {
212
+ text: FilePartSourceText;
213
+ type: "file";
214
+ path: string;
215
+ };
216
+ export type Range = {
217
+ start: {
218
+ line: number;
219
+ character: number;
220
+ };
221
+ end: {
222
+ line: number;
223
+ character: number;
224
+ };
225
+ };
226
+ export type SymbolSource = {
227
+ text: FilePartSourceText;
228
+ type: "symbol";
229
+ path: string;
230
+ range: Range;
231
+ name: string;
232
+ kind: number;
233
+ };
234
+ export type ResourceSource = {
235
+ text: FilePartSourceText;
236
+ type: "resource";
237
+ clientName: string;
238
+ uri: string;
239
+ };
240
+ export type FilePartSource = FileSource | SymbolSource | ResourceSource;
241
+ export type FilePart = {
242
+ id: string;
243
+ sessionID: string;
244
+ messageID: string;
245
+ type: "file";
246
+ mime: string;
247
+ filename?: string;
248
+ url: string;
249
+ source?: FilePartSource;
250
+ };
251
+ export type ToolStatePending = {
252
+ status: "pending";
253
+ input: {
254
+ [key: string]: unknown;
255
+ };
256
+ raw: string;
257
+ };
258
+ export type ToolStateRunning = {
259
+ status: "running";
260
+ input: {
261
+ [key: string]: unknown;
262
+ };
263
+ title?: string;
264
+ metadata?: {
265
+ [key: string]: unknown;
266
+ };
267
+ time: {
268
+ start: number;
269
+ };
270
+ };
271
+ export type ToolStateCompleted = {
272
+ status: "completed";
273
+ input: {
274
+ [key: string]: unknown;
275
+ };
276
+ output: string;
277
+ title: string;
278
+ metadata: {
279
+ [key: string]: unknown;
280
+ };
281
+ time: {
282
+ start: number;
283
+ end: number;
284
+ compacted?: number;
285
+ };
286
+ attachments?: Array<FilePart>;
287
+ };
288
+ export type ToolStateError = {
289
+ status: "error";
290
+ input: {
291
+ [key: string]: unknown;
292
+ };
293
+ error: string;
294
+ metadata?: {
295
+ [key: string]: unknown;
296
+ };
297
+ time: {
298
+ start: number;
299
+ end: number;
300
+ };
301
+ };
302
+ export type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;
303
+ export type ToolPart = {
304
+ id: string;
305
+ sessionID: string;
306
+ messageID: string;
307
+ type: "tool";
308
+ callID: string;
309
+ tool: string;
310
+ state: ToolState;
311
+ metadata?: {
312
+ [key: string]: unknown;
313
+ };
314
+ };
315
+ export type StepStartPart = {
316
+ id: string;
317
+ sessionID: string;
318
+ messageID: string;
319
+ type: "step-start";
320
+ snapshot?: string;
321
+ };
322
+ export type StepFinishPart = {
323
+ id: string;
324
+ sessionID: string;
325
+ messageID: string;
326
+ type: "step-finish";
327
+ reason: string;
328
+ snapshot?: string;
329
+ cost: number;
330
+ tokens: {
331
+ input: number;
332
+ output: number;
333
+ reasoning: number;
334
+ cache: {
335
+ read: number;
336
+ write: number;
337
+ };
338
+ };
339
+ };
340
+ export type SnapshotPart = {
341
+ id: string;
342
+ sessionID: string;
343
+ messageID: string;
344
+ type: "snapshot";
345
+ snapshot: string;
346
+ };
347
+ export type PatchPart = {
348
+ id: string;
349
+ sessionID: string;
350
+ messageID: string;
351
+ type: "patch";
352
+ hash: string;
353
+ files: Array<string>;
354
+ };
355
+ export type AgentPart = {
356
+ id: string;
357
+ sessionID: string;
358
+ messageID: string;
359
+ type: "agent";
360
+ name: string;
361
+ source?: {
362
+ value: string;
363
+ start: number;
364
+ end: number;
365
+ };
366
+ };
367
+ export type RetryPart = {
368
+ id: string;
369
+ sessionID: string;
370
+ messageID: string;
371
+ type: "retry";
372
+ attempt: number;
373
+ error: ApiError;
374
+ time: {
375
+ created: number;
376
+ };
377
+ };
378
+ export type CompactionPart = {
379
+ id: string;
380
+ sessionID: string;
381
+ messageID: string;
382
+ type: "compaction";
383
+ auto: boolean;
384
+ };
385
+ export type Part = TextPart | {
386
+ id: string;
387
+ sessionID: string;
388
+ messageID: string;
389
+ type: "subtask";
390
+ prompt: string;
391
+ description: string;
392
+ agent: string;
393
+ model?: {
394
+ providerID: string;
395
+ modelID: string;
396
+ };
397
+ command?: string;
398
+ } | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart | CompactionPart;
399
+ export type EventMessagePartUpdated = {
400
+ type: "message.part.updated";
401
+ properties: {
402
+ part: Part;
403
+ delta?: string;
404
+ };
405
+ };
406
+ export type EventMessagePartRemoved = {
407
+ type: "message.part.removed";
408
+ properties: {
409
+ sessionID: string;
410
+ messageID: string;
411
+ partID: string;
412
+ };
413
+ };
414
+ export type PermissionRequest = {
415
+ id: string;
416
+ sessionID: string;
417
+ permission: string;
418
+ patterns: Array<string>;
419
+ metadata: {
420
+ [key: string]: unknown;
421
+ };
422
+ always: Array<string>;
423
+ tool?: {
424
+ messageID: string;
425
+ callID: string;
426
+ };
427
+ };
428
+ export type EventPermissionAsked = {
429
+ type: "permission.asked";
430
+ properties: PermissionRequest;
431
+ };
432
+ export type EventPermissionReplied = {
433
+ type: "permission.replied";
434
+ properties: {
435
+ sessionID: string;
436
+ requestID: string;
437
+ reply: "once" | "always" | "reject";
438
+ };
439
+ };
440
+ export type SessionStatus = {
441
+ type: "idle";
442
+ } | {
443
+ type: "retry";
444
+ attempt: number;
445
+ message: string;
446
+ next: number;
447
+ } | {
448
+ type: "busy";
449
+ };
450
+ export type EventSessionStatus = {
451
+ type: "session.status";
452
+ properties: {
453
+ sessionID: string;
454
+ status: SessionStatus;
455
+ };
456
+ };
457
+ export type EventSessionIdle = {
458
+ type: "session.idle";
459
+ properties: {
460
+ sessionID: string;
461
+ };
462
+ };
463
+ export type QuestionOption = {
464
+ /**
465
+ * Display text (1-5 words, concise)
466
+ */
467
+ label: string;
468
+ /**
469
+ * Explanation of choice
470
+ */
471
+ description: string;
472
+ };
473
+ export type QuestionInfo = {
474
+ /**
475
+ * Complete question
476
+ */
477
+ question: string;
478
+ /**
479
+ * Very short label (max 12 chars)
480
+ */
481
+ header: string;
482
+ /**
483
+ * Available choices
484
+ */
485
+ options: Array<QuestionOption>;
486
+ /**
487
+ * Allow selecting multiple choices
488
+ */
489
+ multiple?: boolean;
490
+ /**
491
+ * Allow typing a custom answer (default: true)
492
+ */
493
+ custom?: boolean;
494
+ };
495
+ export type QuestionRequest = {
496
+ sessionID: string;
497
+ /**
498
+ * Questions to ask
499
+ */
500
+ questions: Array<QuestionInfo>;
501
+ tool?: {
502
+ messageID: string;
503
+ callID: string;
504
+ };
505
+ id: string;
506
+ };
507
+ export type EventQuestionAsked = {
508
+ type: "question.asked";
509
+ properties: QuestionRequest;
510
+ };
511
+ export type QuestionAnswer = Array<string>;
512
+ export type EventQuestionReplied = {
513
+ type: "question.replied";
514
+ properties: {
515
+ sessionID: string;
516
+ requestID: string;
517
+ answers: Array<QuestionAnswer>;
518
+ };
519
+ };
520
+ export type EventQuestionRejected = {
521
+ type: "question.rejected";
522
+ properties: {
523
+ sessionID: string;
524
+ requestID: string;
525
+ };
526
+ };
527
+ export type EventSessionCompacted = {
528
+ type: "session.compacted";
529
+ properties: {
530
+ sessionID: string;
531
+ };
532
+ };
533
+ export type Todo = {
534
+ /**
535
+ * Brief description of the task
536
+ */
537
+ content: string;
538
+ /**
539
+ * Current status of the task: pending, in_progress, completed, cancelled
540
+ */
541
+ status: string;
542
+ /**
543
+ * Priority level of the task: high, medium, low
544
+ */
545
+ priority: string;
546
+ /**
547
+ * Unique identifier for the todo item
548
+ */
549
+ id: string;
550
+ };
551
+ export type EventTodoUpdated = {
552
+ type: "todo.updated";
553
+ properties: {
554
+ sessionID: string;
555
+ todos: Array<Todo>;
556
+ };
557
+ };
558
+ export type EventTuiPromptAppend = {
559
+ type: "tui.prompt.append";
560
+ properties: {
561
+ text: string;
562
+ };
563
+ };
564
+ export type EventTuiCommandExecute = {
565
+ type: "tui.command.execute";
566
+ properties: {
567
+ 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;
568
+ };
569
+ };
570
+ export type EventTuiToastShow = {
571
+ type: "tui.toast.show";
572
+ properties: {
573
+ title?: string;
574
+ message: string;
575
+ variant: "info" | "success" | "warning" | "error";
576
+ /**
577
+ * Duration in milliseconds
578
+ */
579
+ duration?: number;
580
+ };
581
+ };
582
+ export type EventTuiSessionSelect = {
583
+ type: "tui.session.select";
584
+ properties: {
585
+ /**
586
+ * Session ID to navigate to
587
+ */
588
+ sessionID: string;
589
+ };
590
+ };
591
+ export type EventMcpToolsChanged = {
592
+ type: "mcp.tools.changed";
593
+ properties: {
594
+ server: string;
595
+ };
596
+ };
597
+ export type EventMcpBrowserOpenFailed = {
598
+ type: "mcp.browser.open.failed";
599
+ properties: {
600
+ mcpName: string;
601
+ url: string;
602
+ };
603
+ };
604
+ export type EventCommandExecuted = {
605
+ type: "command.executed";
606
+ properties: {
607
+ name: string;
608
+ sessionID: string;
609
+ arguments: string;
610
+ messageID: string;
611
+ };
612
+ };
613
+ export type PermissionAction = "allow" | "deny" | "ask";
614
+ export type PermissionRule = {
615
+ permission: string;
616
+ pattern: string;
617
+ action: PermissionAction;
618
+ };
619
+ export type PermissionRuleset = Array<PermissionRule>;
620
+ export type Session = {
621
+ id: string;
622
+ slug: string;
623
+ projectID: string;
624
+ directory: string;
625
+ parentID?: string;
626
+ summary?: {
627
+ additions: number;
628
+ deletions: number;
629
+ files: number;
630
+ diffs?: Array<FileDiff>;
631
+ };
632
+ share?: {
633
+ url: string;
634
+ };
635
+ title: string;
636
+ version: string;
637
+ time: {
638
+ created: number;
639
+ updated: number;
640
+ compacting?: number;
641
+ archived?: number;
642
+ };
643
+ permission?: PermissionRuleset;
644
+ revert?: {
645
+ messageID: string;
646
+ partID?: string;
647
+ snapshot?: string;
648
+ diff?: string;
649
+ };
650
+ };
651
+ export type EventSessionCreated = {
652
+ type: "session.created";
653
+ properties: {
654
+ info: Session;
655
+ };
656
+ };
657
+ export type EventSessionUpdated = {
658
+ type: "session.updated";
659
+ properties: {
660
+ info: Session;
661
+ };
662
+ };
663
+ export type EventSessionDeleted = {
664
+ type: "session.deleted";
665
+ properties: {
666
+ info: Session;
667
+ };
668
+ };
669
+ export type EventSessionDiff = {
670
+ type: "session.diff";
671
+ properties: {
672
+ sessionID: string;
673
+ diff: Array<FileDiff>;
674
+ };
675
+ };
676
+ export type EventSessionError = {
677
+ type: "session.error";
678
+ properties: {
679
+ sessionID?: string;
680
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
681
+ };
682
+ };
683
+ export type EventFileWatcherUpdated = {
684
+ type: "file.watcher.updated";
685
+ properties: {
686
+ file: string;
687
+ event: "add" | "change" | "unlink";
688
+ };
689
+ };
690
+ export type EventVcsBranchUpdated = {
691
+ type: "vcs.branch.updated";
692
+ properties: {
693
+ branch?: string;
694
+ };
695
+ };
696
+ export type Pty = {
697
+ id: string;
698
+ title: string;
699
+ command: string;
700
+ args: Array<string>;
701
+ cwd: string;
702
+ status: "running" | "exited";
703
+ pid: number;
704
+ };
705
+ export type EventPtyCreated = {
706
+ type: "pty.created";
707
+ properties: {
708
+ info: Pty;
709
+ };
710
+ };
711
+ export type EventPtyUpdated = {
712
+ type: "pty.updated";
713
+ properties: {
714
+ info: Pty;
715
+ };
716
+ };
717
+ export type EventPtyExited = {
718
+ type: "pty.exited";
719
+ properties: {
720
+ id: string;
721
+ exitCode: number;
722
+ };
723
+ };
724
+ export type EventPtyDeleted = {
725
+ type: "pty.deleted";
726
+ properties: {
727
+ id: string;
728
+ };
729
+ };
730
+ export type EventGlobalDisposed = {
731
+ type: "global.disposed";
732
+ properties: {
733
+ [key: string]: unknown;
734
+ };
735
+ };
736
+ export type EventServerConnected = {
737
+ type: "server.connected";
738
+ properties: {
739
+ [key: string]: unknown;
740
+ };
741
+ };
742
+ export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventLspClientDiagnostics | EventLspUpdated | EventFileEdited | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventFileWatcherUpdated | EventVcsBranchUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventGlobalDisposed | EventServerConnected;
743
+ export type GlobalEvent = {
744
+ directory: string;
745
+ payload: Event;
746
+ };
747
+ export type BadRequestError = {
748
+ data: unknown;
749
+ errors: Array<{
750
+ [key: string]: unknown;
751
+ }>;
752
+ success: false;
753
+ };
754
+ export type NotFoundError = {
755
+ name: "NotFoundError";
756
+ data: {
757
+ message: string;
758
+ };
759
+ };
760
+ /**
761
+ * Custom keybind configurations
762
+ */
763
+ export type KeybindsConfig = {
764
+ /**
765
+ * Leader key for keybind combinations
766
+ */
767
+ leader?: string;
768
+ /**
769
+ * Exit the application
770
+ */
771
+ app_exit?: string;
772
+ /**
773
+ * Open external editor
774
+ */
775
+ editor_open?: string;
776
+ /**
777
+ * List available themes
778
+ */
779
+ theme_list?: string;
780
+ /**
781
+ * Toggle sidebar
782
+ */
783
+ sidebar_toggle?: string;
784
+ /**
785
+ * Toggle session scrollbar
786
+ */
787
+ scrollbar_toggle?: string;
788
+ /**
789
+ * Toggle username visibility
790
+ */
791
+ username_toggle?: string;
792
+ /**
793
+ * View status
794
+ */
795
+ status_view?: string;
796
+ /**
797
+ * Export session to editor
798
+ */
799
+ session_export?: string;
800
+ /**
801
+ * Create a new session
802
+ */
803
+ session_new?: string;
804
+ /**
805
+ * List all sessions
806
+ */
807
+ session_list?: string;
808
+ /**
809
+ * Show session timeline
810
+ */
811
+ session_timeline?: string;
812
+ /**
813
+ * Fork session from message
814
+ */
815
+ session_fork?: string;
816
+ /**
817
+ * Rename session
818
+ */
819
+ session_rename?: string;
820
+ /**
821
+ * Delete session
822
+ */
823
+ session_delete?: string;
824
+ /**
825
+ * Delete stash entry
826
+ */
827
+ stash_delete?: string;
828
+ /**
829
+ * Open provider list from model dialog
830
+ */
831
+ model_provider_list?: string;
832
+ /**
833
+ * Toggle model favorite status
834
+ */
835
+ model_favorite_toggle?: string;
836
+ /**
837
+ * Share current session
838
+ */
839
+ session_share?: string;
840
+ /**
841
+ * Unshare current session
842
+ */
843
+ session_unshare?: string;
844
+ /**
845
+ * Interrupt current session
846
+ */
847
+ session_interrupt?: string;
848
+ /**
849
+ * Compact the session
850
+ */
851
+ session_compact?: string;
852
+ /**
853
+ * Scroll messages up by one page
854
+ */
855
+ messages_page_up?: string;
856
+ /**
857
+ * Scroll messages down by one page
858
+ */
859
+ messages_page_down?: string;
860
+ /**
861
+ * Scroll messages up by half page
862
+ */
863
+ messages_half_page_up?: string;
864
+ /**
865
+ * Scroll messages down by half page
866
+ */
867
+ messages_half_page_down?: string;
868
+ /**
869
+ * Navigate to first message
870
+ */
871
+ messages_first?: string;
872
+ /**
873
+ * Navigate to last message
874
+ */
875
+ messages_last?: string;
876
+ /**
877
+ * Navigate to next message
878
+ */
879
+ messages_next?: string;
880
+ /**
881
+ * Navigate to previous message
882
+ */
883
+ messages_previous?: string;
884
+ /**
885
+ * Navigate to last user message
886
+ */
887
+ messages_last_user?: string;
888
+ /**
889
+ * Copy message
890
+ */
891
+ messages_copy?: string;
892
+ /**
893
+ * Undo message
894
+ */
895
+ messages_undo?: string;
896
+ /**
897
+ * Redo message
898
+ */
899
+ messages_redo?: string;
900
+ /**
901
+ * Toggle code block concealment in messages
902
+ */
903
+ messages_toggle_conceal?: string;
904
+ /**
905
+ * Toggle tool details visibility
906
+ */
907
+ tool_details?: string;
908
+ /**
909
+ * List available models
910
+ */
911
+ model_list?: string;
912
+ /**
913
+ * Next recently used model
914
+ */
915
+ model_cycle_recent?: string;
916
+ /**
917
+ * Previous recently used model
918
+ */
919
+ model_cycle_recent_reverse?: string;
920
+ /**
921
+ * Next favorite model
922
+ */
923
+ model_cycle_favorite?: string;
924
+ /**
925
+ * Previous favorite model
926
+ */
927
+ model_cycle_favorite_reverse?: string;
928
+ /**
929
+ * List available commands
930
+ */
931
+ command_list?: string;
932
+ /**
933
+ * List agents
934
+ */
935
+ agent_list?: string;
936
+ /**
937
+ * Next agent
938
+ */
939
+ agent_cycle?: string;
940
+ /**
941
+ * Previous agent
942
+ */
943
+ agent_cycle_reverse?: string;
944
+ /**
945
+ * Cycle model variants
946
+ */
947
+ variant_cycle?: string;
948
+ /**
949
+ * Clear input field
950
+ */
951
+ input_clear?: string;
952
+ /**
953
+ * Paste from clipboard
954
+ */
955
+ input_paste?: string;
956
+ /**
957
+ * Submit input
958
+ */
959
+ input_submit?: string;
960
+ /**
961
+ * Insert newline in input
962
+ */
963
+ input_newline?: string;
964
+ /**
965
+ * Move cursor left in input
966
+ */
967
+ input_move_left?: string;
968
+ /**
969
+ * Move cursor right in input
970
+ */
971
+ input_move_right?: string;
972
+ /**
973
+ * Move cursor up in input
974
+ */
975
+ input_move_up?: string;
976
+ /**
977
+ * Move cursor down in input
978
+ */
979
+ input_move_down?: string;
980
+ /**
981
+ * Select left in input
982
+ */
983
+ input_select_left?: string;
984
+ /**
985
+ * Select right in input
986
+ */
987
+ input_select_right?: string;
988
+ /**
989
+ * Select up in input
990
+ */
991
+ input_select_up?: string;
992
+ /**
993
+ * Select down in input
994
+ */
995
+ input_select_down?: string;
996
+ /**
997
+ * Move to start of line in input
998
+ */
999
+ input_line_home?: string;
1000
+ /**
1001
+ * Move to end of line in input
1002
+ */
1003
+ input_line_end?: string;
1004
+ /**
1005
+ * Select to start of line in input
1006
+ */
1007
+ input_select_line_home?: string;
1008
+ /**
1009
+ * Select to end of line in input
1010
+ */
1011
+ input_select_line_end?: string;
1012
+ /**
1013
+ * Move to start of visual line in input
1014
+ */
1015
+ input_visual_line_home?: string;
1016
+ /**
1017
+ * Move to end of visual line in input
1018
+ */
1019
+ input_visual_line_end?: string;
1020
+ /**
1021
+ * Select to start of visual line in input
1022
+ */
1023
+ input_select_visual_line_home?: string;
1024
+ /**
1025
+ * Select to end of visual line in input
1026
+ */
1027
+ input_select_visual_line_end?: string;
1028
+ /**
1029
+ * Move to start of buffer in input
1030
+ */
1031
+ input_buffer_home?: string;
1032
+ /**
1033
+ * Move to end of buffer in input
1034
+ */
1035
+ input_buffer_end?: string;
1036
+ /**
1037
+ * Select to start of buffer in input
1038
+ */
1039
+ input_select_buffer_home?: string;
1040
+ /**
1041
+ * Select to end of buffer in input
1042
+ */
1043
+ input_select_buffer_end?: string;
1044
+ /**
1045
+ * Delete line in input
1046
+ */
1047
+ input_delete_line?: string;
1048
+ /**
1049
+ * Delete to end of line in input
1050
+ */
1051
+ input_delete_to_line_end?: string;
1052
+ /**
1053
+ * Delete to start of line in input
1054
+ */
1055
+ input_delete_to_line_start?: string;
1056
+ /**
1057
+ * Backspace in input
1058
+ */
1059
+ input_backspace?: string;
1060
+ /**
1061
+ * Delete character in input
1062
+ */
1063
+ input_delete?: string;
1064
+ /**
1065
+ * Undo in input
1066
+ */
1067
+ input_undo?: string;
1068
+ /**
1069
+ * Redo in input
1070
+ */
1071
+ input_redo?: string;
1072
+ /**
1073
+ * Move word forward in input
1074
+ */
1075
+ input_word_forward?: string;
1076
+ /**
1077
+ * Move word backward in input
1078
+ */
1079
+ input_word_backward?: string;
1080
+ /**
1081
+ * Select word forward in input
1082
+ */
1083
+ input_select_word_forward?: string;
1084
+ /**
1085
+ * Select word backward in input
1086
+ */
1087
+ input_select_word_backward?: string;
1088
+ /**
1089
+ * Delete word forward in input
1090
+ */
1091
+ input_delete_word_forward?: string;
1092
+ /**
1093
+ * Delete word backward in input
1094
+ */
1095
+ input_delete_word_backward?: string;
1096
+ /**
1097
+ * Previous history item
1098
+ */
1099
+ history_previous?: string;
1100
+ /**
1101
+ * Next history item
1102
+ */
1103
+ history_next?: string;
1104
+ /**
1105
+ * Next child session
1106
+ */
1107
+ session_child_cycle?: string;
1108
+ /**
1109
+ * Previous child session
1110
+ */
1111
+ session_child_cycle_reverse?: string;
1112
+ /**
1113
+ * Go to parent session
1114
+ */
1115
+ session_parent?: string;
1116
+ /**
1117
+ * Suspend terminal
1118
+ */
1119
+ terminal_suspend?: string;
1120
+ /**
1121
+ * Toggle terminal title
1122
+ */
1123
+ terminal_title_toggle?: string;
1124
+ /**
1125
+ * Toggle tips on home screen
1126
+ */
1127
+ tips_toggle?: string;
1128
+ };
1129
+ /**
1130
+ * Log level
1131
+ */
1132
+ export type LogLevel = "DEBUG" | "INFO" | "WARN" | "ERROR";
1133
+ /**
1134
+ * Server configuration for opencode serve and web commands
1135
+ */
1136
+ export type ServerConfig = {
1137
+ /**
1138
+ * Port to listen on
1139
+ */
1140
+ port?: number;
1141
+ /**
1142
+ * Hostname to listen on
1143
+ */
1144
+ hostname?: string;
1145
+ /**
1146
+ * Enable mDNS service discovery
1147
+ */
1148
+ mdns?: boolean;
1149
+ /**
1150
+ * Additional domains to allow for CORS
1151
+ */
1152
+ cors?: Array<string>;
1153
+ };
1154
+ export type PermissionActionConfig = "ask" | "allow" | "deny";
1155
+ export type PermissionObjectConfig = {
1156
+ [key: string]: PermissionActionConfig;
1157
+ };
1158
+ export type PermissionRuleConfig = PermissionActionConfig | PermissionObjectConfig;
1159
+ export type PermissionConfig = {
1160
+ __originalKeys?: Array<string>;
1161
+ read?: PermissionRuleConfig;
1162
+ edit?: PermissionRuleConfig;
1163
+ glob?: PermissionRuleConfig;
1164
+ grep?: PermissionRuleConfig;
1165
+ list?: PermissionRuleConfig;
1166
+ bash?: PermissionRuleConfig;
1167
+ task?: PermissionRuleConfig;
1168
+ external_directory?: PermissionRuleConfig;
1169
+ todowrite?: PermissionActionConfig;
1170
+ todoread?: PermissionActionConfig;
1171
+ question?: PermissionActionConfig;
1172
+ webfetch?: PermissionActionConfig;
1173
+ websearch?: PermissionActionConfig;
1174
+ codesearch?: PermissionActionConfig;
1175
+ lsp?: PermissionRuleConfig;
1176
+ doom_loop?: PermissionActionConfig;
1177
+ [key: string]: PermissionRuleConfig | Array<string> | PermissionActionConfig | undefined;
1178
+ } | PermissionActionConfig;
1179
+ export type AgentConfig = {
1180
+ model?: string;
1181
+ temperature?: number;
1182
+ top_p?: number;
1183
+ prompt?: string;
1184
+ /**
1185
+ * @deprecated Use 'permission' field instead
1186
+ */
1187
+ tools?: {
1188
+ [key: string]: boolean;
1189
+ };
1190
+ disable?: boolean;
1191
+ /**
1192
+ * Description of when to use the agent
1193
+ */
1194
+ description?: string;
1195
+ mode?: "subagent" | "primary" | "all";
1196
+ /**
1197
+ * Hide this subagent from the @ autocomplete menu (default: false, only applies to mode: subagent)
1198
+ */
1199
+ hidden?: boolean;
1200
+ options?: {
1201
+ [key: string]: unknown;
1202
+ };
1203
+ /**
1204
+ * Hex color code for the agent (e.g., #FF5733)
1205
+ */
1206
+ color?: string;
1207
+ /**
1208
+ * Maximum number of agentic iterations before forcing text-only response
1209
+ */
1210
+ steps?: number;
1211
+ /**
1212
+ * @deprecated Use 'steps' field instead.
1213
+ */
1214
+ maxSteps?: number;
1215
+ permission?: PermissionConfig;
1216
+ [key: string]: unknown | string | number | {
1217
+ [key: string]: boolean;
1218
+ } | boolean | "subagent" | "primary" | "all" | {
1219
+ [key: string]: unknown;
1220
+ } | string | number | PermissionConfig | undefined;
1221
+ };
1222
+ export type ProviderConfig = {
1223
+ api?: string;
1224
+ name?: string;
1225
+ env?: Array<string>;
1226
+ id?: string;
1227
+ npm?: string;
1228
+ models?: {
1229
+ [key: string]: {
1230
+ id?: string;
1231
+ name?: string;
1232
+ family?: string;
1233
+ release_date?: string;
1234
+ attachment?: boolean;
1235
+ reasoning?: boolean;
1236
+ temperature?: boolean;
1237
+ tool_call?: boolean;
1238
+ interleaved?: true | {
1239
+ field: "reasoning_content" | "reasoning_details";
1240
+ };
1241
+ cost?: {
1242
+ input: number;
1243
+ output: number;
1244
+ cache_read?: number;
1245
+ cache_write?: number;
1246
+ context_over_200k?: {
1247
+ input: number;
1248
+ output: number;
1249
+ cache_read?: number;
1250
+ cache_write?: number;
1251
+ };
1252
+ };
1253
+ limit?: {
1254
+ context: number;
1255
+ input?: number;
1256
+ output: number;
1257
+ };
1258
+ modalities?: {
1259
+ input: Array<"text" | "audio" | "image" | "video" | "pdf">;
1260
+ output: Array<"text" | "audio" | "image" | "video" | "pdf">;
1261
+ };
1262
+ experimental?: boolean;
1263
+ status?: "alpha" | "beta" | "deprecated";
1264
+ options?: {
1265
+ [key: string]: unknown;
1266
+ };
1267
+ headers?: {
1268
+ [key: string]: string;
1269
+ };
1270
+ provider?: {
1271
+ npm: string;
1272
+ };
1273
+ /**
1274
+ * Variant-specific configuration
1275
+ */
1276
+ variants?: {
1277
+ [key: string]: {
1278
+ /**
1279
+ * Disable this variant for the model
1280
+ */
1281
+ disabled?: boolean;
1282
+ [key: string]: unknown | boolean | undefined;
1283
+ };
1284
+ };
1285
+ };
1286
+ };
1287
+ whitelist?: Array<string>;
1288
+ blacklist?: Array<string>;
1289
+ options?: {
1290
+ apiKey?: string;
1291
+ baseURL?: string;
1292
+ /**
1293
+ * GitHub Enterprise URL for copilot authentication
1294
+ */
1295
+ enterpriseUrl?: string;
1296
+ /**
1297
+ * Enable promptCacheKey for this provider (default false)
1298
+ */
1299
+ setCacheKey?: boolean;
1300
+ /**
1301
+ * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
1302
+ */
1303
+ timeout?: number | false;
1304
+ [key: string]: unknown | string | boolean | number | false | undefined;
1305
+ };
1306
+ };
1307
+ export type McpLocalConfig = {
1308
+ /**
1309
+ * Type of MCP server connection
1310
+ */
1311
+ type: "local";
1312
+ /**
1313
+ * Command and arguments to run the MCP server
1314
+ */
1315
+ command: Array<string>;
1316
+ /**
1317
+ * Environment variables to set when running the MCP server
1318
+ */
1319
+ environment?: {
1320
+ [key: string]: string;
1321
+ };
1322
+ /**
1323
+ * Enable or disable the MCP server on startup
1324
+ */
1325
+ enabled?: boolean;
1326
+ /**
1327
+ * Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.
1328
+ */
1329
+ timeout?: number;
1330
+ };
1331
+ export type McpOAuthConfig = {
1332
+ /**
1333
+ * OAuth client ID. If not provided, dynamic client registration (RFC 7591) will be attempted.
1334
+ */
1335
+ clientId?: string;
1336
+ /**
1337
+ * OAuth client secret (if required by the authorization server)
1338
+ */
1339
+ clientSecret?: string;
1340
+ /**
1341
+ * OAuth scopes to request during authorization
1342
+ */
1343
+ scope?: string;
1344
+ };
1345
+ export type McpRemoteConfig = {
1346
+ /**
1347
+ * Type of MCP server connection
1348
+ */
1349
+ type: "remote";
1350
+ /**
1351
+ * URL of the remote MCP server
1352
+ */
1353
+ url: string;
1354
+ /**
1355
+ * Enable or disable the MCP server on startup
1356
+ */
1357
+ enabled?: boolean;
1358
+ /**
1359
+ * Headers to send with the request
1360
+ */
1361
+ headers?: {
1362
+ [key: string]: string;
1363
+ };
1364
+ /**
1365
+ * OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection.
1366
+ */
1367
+ oauth?: McpOAuthConfig | false;
1368
+ /**
1369
+ * Timeout in ms for MCP server requests. Defaults to 5000 (5 seconds) if not specified.
1370
+ */
1371
+ timeout?: number;
1372
+ };
1373
+ /**
1374
+ * @deprecated Always uses stretch layout.
1375
+ */
1376
+ export type LayoutConfig = "auto" | "stretch";
1377
+ export type Config = {
1378
+ /**
1379
+ * JSON schema reference for configuration validation
1380
+ */
1381
+ $schema?: string;
1382
+ /**
1383
+ * Theme name to use for the interface
1384
+ */
1385
+ theme?: string;
1386
+ keybinds?: KeybindsConfig;
1387
+ logLevel?: LogLevel;
1388
+ /**
1389
+ * TUI specific settings
1390
+ */
1391
+ tui?: {
1392
+ /**
1393
+ * TUI scroll speed
1394
+ */
1395
+ scroll_speed?: number;
1396
+ /**
1397
+ * Scroll acceleration settings
1398
+ */
1399
+ scroll_acceleration?: {
1400
+ /**
1401
+ * Enable scroll acceleration
1402
+ */
1403
+ enabled: boolean;
1404
+ };
1405
+ /**
1406
+ * Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column
1407
+ */
1408
+ diff_style?: "auto" | "stacked";
1409
+ };
1410
+ server?: ServerConfig;
1411
+ /**
1412
+ * Command configuration, see https://opencode.ai/docs/commands
1413
+ */
1414
+ command?: {
1415
+ [key: string]: {
1416
+ template: string;
1417
+ description?: string;
1418
+ agent?: string;
1419
+ model?: string;
1420
+ subtask?: boolean;
1421
+ };
1422
+ };
1423
+ watcher?: {
1424
+ ignore?: Array<string>;
1425
+ };
1426
+ plugin?: Array<string>;
1427
+ snapshot?: boolean;
1428
+ /**
1429
+ * Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
1430
+ */
1431
+ share?: "manual" | "auto" | "disabled";
1432
+ /**
1433
+ * @deprecated Use 'share' field instead. Share newly created sessions automatically
1434
+ */
1435
+ autoshare?: boolean;
1436
+ /**
1437
+ * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
1438
+ */
1439
+ autoupdate?: boolean | "notify";
1440
+ /**
1441
+ * Disable providers that are loaded automatically
1442
+ */
1443
+ disabled_providers?: Array<string>;
1444
+ /**
1445
+ * When set, ONLY these providers will be enabled. All other providers will be ignored
1446
+ */
1447
+ enabled_providers?: Array<string>;
1448
+ /**
1449
+ * Model to use in the format of provider/model, eg anthropic/claude-2
1450
+ */
1451
+ model?: string;
1452
+ /**
1453
+ * Small model to use for tasks like title generation in the format of provider/model
1454
+ */
1455
+ small_model?: string;
1456
+ /**
1457
+ * Default agent to use when none is specified. Must be a primary agent. Falls back to 'build' if not set or if the specified agent is invalid.
1458
+ */
1459
+ default_agent?: string;
1460
+ /**
1461
+ * Custom username to display in conversations instead of system username
1462
+ */
1463
+ username?: string;
1464
+ /**
1465
+ * @deprecated Use `agent` field instead.
1466
+ */
1467
+ mode?: {
1468
+ build?: AgentConfig;
1469
+ plan?: AgentConfig;
1470
+ [key: string]: AgentConfig | undefined;
1471
+ };
1472
+ /**
1473
+ * Agent configuration, see https://opencode.ai/docs/agents
1474
+ */
1475
+ agent?: {
1476
+ plan?: AgentConfig;
1477
+ build?: AgentConfig;
1478
+ general?: AgentConfig;
1479
+ explore?: AgentConfig;
1480
+ title?: AgentConfig;
1481
+ summary?: AgentConfig;
1482
+ compaction?: AgentConfig;
1483
+ [key: string]: AgentConfig | undefined;
1484
+ };
1485
+ /**
1486
+ * Custom provider configurations and model overrides
1487
+ */
1488
+ provider?: {
1489
+ [key: string]: ProviderConfig;
1490
+ };
1491
+ /**
1492
+ * MCP (Model Context Protocol) server configurations
1493
+ */
1494
+ mcp?: {
1495
+ [key: string]: McpLocalConfig | McpRemoteConfig | {
1496
+ enabled: boolean;
1497
+ };
1498
+ };
1499
+ formatter?: false | {
1500
+ [key: string]: {
1501
+ disabled?: boolean;
1502
+ command?: Array<string>;
1503
+ environment?: {
1504
+ [key: string]: string;
1505
+ };
1506
+ extensions?: Array<string>;
1507
+ };
1508
+ };
1509
+ lsp?: false | {
1510
+ [key: string]: {
1511
+ disabled: true;
1512
+ } | {
1513
+ command: Array<string>;
1514
+ extensions?: Array<string>;
1515
+ disabled?: boolean;
1516
+ env?: {
1517
+ [key: string]: string;
1518
+ };
1519
+ initialization?: {
1520
+ [key: string]: unknown;
1521
+ };
1522
+ };
1523
+ };
1524
+ /**
1525
+ * Additional instruction files or patterns to include
1526
+ */
1527
+ instructions?: Array<string>;
1528
+ layout?: LayoutConfig;
1529
+ permission?: PermissionConfig;
1530
+ tools?: {
1531
+ [key: string]: boolean;
1532
+ };
1533
+ enterprise?: {
1534
+ /**
1535
+ * Enterprise URL
1536
+ */
1537
+ url?: string;
1538
+ };
1539
+ compaction?: {
1540
+ /**
1541
+ * Enable automatic compaction when context is full (default: true)
1542
+ */
1543
+ auto?: boolean;
1544
+ /**
1545
+ * Enable pruning of old tool outputs (default: true)
1546
+ */
1547
+ prune?: boolean;
1548
+ };
1549
+ experimental?: {
1550
+ hook?: {
1551
+ file_edited?: {
1552
+ [key: string]: Array<{
1553
+ command: Array<string>;
1554
+ environment?: {
1555
+ [key: string]: string;
1556
+ };
1557
+ }>;
1558
+ };
1559
+ session_completed?: Array<{
1560
+ command: Array<string>;
1561
+ environment?: {
1562
+ [key: string]: string;
1563
+ };
1564
+ }>;
1565
+ };
1566
+ /**
1567
+ * Number of retries for chat completions on failure
1568
+ */
1569
+ chatMaxRetries?: number;
1570
+ disable_paste_summary?: boolean;
1571
+ /**
1572
+ * Enable the batch tool
1573
+ */
1574
+ batch_tool?: boolean;
1575
+ /**
1576
+ * Enable OpenTelemetry spans for AI SDK calls (using the 'experimental_telemetry' flag)
1577
+ */
1578
+ openTelemetry?: boolean;
1579
+ /**
1580
+ * Tools that should only be available to primary agents.
1581
+ */
1582
+ primary_tools?: Array<string>;
1583
+ /**
1584
+ * Continue the agent loop when a tool call is denied
1585
+ */
1586
+ continue_loop_on_deny?: boolean;
1587
+ /**
1588
+ * Timeout in milliseconds for model context protocol (MCP) requests
1589
+ */
1590
+ mcp_timeout?: number;
1591
+ };
1592
+ };
1593
+ export type Model = {
1594
+ id: string;
1595
+ providerID: string;
1596
+ api: {
1597
+ id: string;
1598
+ url: string;
1599
+ npm: string;
1600
+ };
1601
+ name: string;
1602
+ family?: string;
1603
+ capabilities: {
1604
+ temperature: boolean;
1605
+ reasoning: boolean;
1606
+ attachment: boolean;
1607
+ toolcall: boolean;
1608
+ input: {
1609
+ text: boolean;
1610
+ audio: boolean;
1611
+ image: boolean;
1612
+ video: boolean;
1613
+ pdf: boolean;
1614
+ };
1615
+ output: {
1616
+ text: boolean;
1617
+ audio: boolean;
1618
+ image: boolean;
1619
+ video: boolean;
1620
+ pdf: boolean;
1621
+ };
1622
+ interleaved: boolean | {
1623
+ field: "reasoning_content" | "reasoning_details";
1624
+ };
1625
+ };
1626
+ cost: {
1627
+ input: number;
1628
+ output: number;
1629
+ cache: {
1630
+ read: number;
1631
+ write: number;
1632
+ };
1633
+ experimentalOver200K?: {
1634
+ input: number;
1635
+ output: number;
1636
+ cache: {
1637
+ read: number;
1638
+ write: number;
1639
+ };
1640
+ };
1641
+ };
1642
+ limit: {
1643
+ context: number;
1644
+ input?: number;
1645
+ output: number;
1646
+ };
1647
+ status: "alpha" | "beta" | "deprecated" | "active";
1648
+ options: {
1649
+ [key: string]: unknown;
1650
+ };
1651
+ headers: {
1652
+ [key: string]: string;
1653
+ };
1654
+ release_date: string;
1655
+ variants?: {
1656
+ [key: string]: {
1657
+ [key: string]: unknown;
1658
+ };
1659
+ };
1660
+ };
1661
+ export type Provider = {
1662
+ id: string;
1663
+ name: string;
1664
+ source: "env" | "config" | "custom" | "api";
1665
+ env: Array<string>;
1666
+ key?: string;
1667
+ options: {
1668
+ [key: string]: unknown;
1669
+ };
1670
+ models: {
1671
+ [key: string]: Model;
1672
+ };
1673
+ };
1674
+ export type ToolIds = Array<string>;
1675
+ export type ToolListItem = {
1676
+ id: string;
1677
+ description: string;
1678
+ parameters: unknown;
1679
+ };
1680
+ export type ToolList = Array<ToolListItem>;
1681
+ export type Worktree = {
1682
+ name: string;
1683
+ branch: string;
1684
+ directory: string;
1685
+ };
1686
+ export type WorktreeCreateInput = {
1687
+ name?: string;
1688
+ startCommand?: string;
1689
+ };
1690
+ export type McpResource = {
1691
+ name: string;
1692
+ uri: string;
1693
+ description?: string;
1694
+ mimeType?: string;
1695
+ client: string;
1696
+ };
1697
+ export type TextPartInput = {
1698
+ id?: string;
1699
+ type: "text";
1700
+ text: string;
1701
+ synthetic?: boolean;
1702
+ ignored?: boolean;
1703
+ time?: {
1704
+ start: number;
1705
+ end?: number;
1706
+ };
1707
+ metadata?: {
1708
+ [key: string]: unknown;
1709
+ };
1710
+ };
1711
+ export type FilePartInput = {
1712
+ id?: string;
1713
+ type: "file";
1714
+ mime: string;
1715
+ filename?: string;
1716
+ url: string;
1717
+ source?: FilePartSource;
1718
+ };
1719
+ export type AgentPartInput = {
1720
+ id?: string;
1721
+ type: "agent";
1722
+ name: string;
1723
+ source?: {
1724
+ value: string;
1725
+ start: number;
1726
+ end: number;
1727
+ };
1728
+ };
1729
+ export type SubtaskPartInput = {
1730
+ id?: string;
1731
+ type: "subtask";
1732
+ prompt: string;
1733
+ description: string;
1734
+ agent: string;
1735
+ model?: {
1736
+ providerID: string;
1737
+ modelID: string;
1738
+ };
1739
+ command?: string;
1740
+ };
1741
+ export type QuestionAskInput = {
1742
+ sessionID: string;
1743
+ /**
1744
+ * Questions to ask
1745
+ */
1746
+ questions: Array<QuestionInfo>;
1747
+ tool?: {
1748
+ messageID: string;
1749
+ callID: string;
1750
+ };
1751
+ };
1752
+ export type ProviderAuthMethod = {
1753
+ type: "oauth" | "api";
1754
+ label: string;
1755
+ };
1756
+ export type ProviderAuthAuthorization = {
1757
+ url: string;
1758
+ method: "auto" | "code";
1759
+ instructions: string;
1760
+ };
1761
+ export type Symbol = {
1762
+ name: string;
1763
+ kind: number;
1764
+ location: {
1765
+ uri: string;
1766
+ range: Range;
1767
+ };
1768
+ };
1769
+ export type FileNode = {
1770
+ name: string;
1771
+ path: string;
1772
+ absolute: string;
1773
+ type: "file" | "directory";
1774
+ ignored: boolean;
1775
+ };
1776
+ export type FileContent = {
1777
+ type: "text";
1778
+ content: string;
1779
+ diff?: string;
1780
+ patch?: {
1781
+ oldFileName: string;
1782
+ newFileName: string;
1783
+ oldHeader?: string;
1784
+ newHeader?: string;
1785
+ hunks: Array<{
1786
+ oldStart: number;
1787
+ oldLines: number;
1788
+ newStart: number;
1789
+ newLines: number;
1790
+ lines: Array<string>;
1791
+ }>;
1792
+ index?: string;
1793
+ };
1794
+ encoding?: "base64";
1795
+ mimeType?: string;
1796
+ };
1797
+ export type File = {
1798
+ path: string;
1799
+ added: number;
1800
+ removed: number;
1801
+ status: "added" | "deleted" | "modified";
1802
+ };
1803
+ export type McpStatusConnected = {
1804
+ status: "connected";
1805
+ };
1806
+ export type McpStatusDisabled = {
1807
+ status: "disabled";
1808
+ };
1809
+ export type McpStatusFailed = {
1810
+ status: "failed";
1811
+ error: string;
1812
+ };
1813
+ export type McpStatusNeedsAuth = {
1814
+ status: "needs_auth";
1815
+ };
1816
+ export type McpStatusNeedsClientRegistration = {
1817
+ status: "needs_client_registration";
1818
+ error: string;
1819
+ };
1820
+ export type McpStatus = McpStatusConnected | McpStatusDisabled | McpStatusFailed | McpStatusNeedsAuth | McpStatusNeedsClientRegistration;
1821
+ export type Path = {
1822
+ home: string;
1823
+ state: string;
1824
+ config: string;
1825
+ worktree: string;
1826
+ directory: string;
1827
+ };
1828
+ export type VcsInfo = {
1829
+ branch: string;
1830
+ };
1831
+ export type Command = {
1832
+ name: string;
1833
+ description?: string;
1834
+ agent?: string;
1835
+ model?: string;
1836
+ mcp?: boolean;
1837
+ template: string;
1838
+ subtask?: boolean;
1839
+ hints: Array<string>;
1840
+ };
1841
+ export type Agent = {
1842
+ name: string;
1843
+ description?: string;
1844
+ mode: "subagent" | "primary" | "all";
1845
+ native?: boolean;
1846
+ hidden?: boolean;
1847
+ topP?: number;
1848
+ temperature?: number;
1849
+ color?: string;
1850
+ permission: PermissionRuleset;
1851
+ model?: {
1852
+ modelID: string;
1853
+ providerID: string;
1854
+ };
1855
+ prompt?: string;
1856
+ options: {
1857
+ [key: string]: unknown;
1858
+ };
1859
+ steps?: number;
1860
+ };
1861
+ export type LspStatus = {
1862
+ id: string;
1863
+ name: string;
1864
+ root: string;
1865
+ status: "connected" | "error";
1866
+ };
1867
+ export type FormatterStatus = {
1868
+ name: string;
1869
+ extensions: Array<string>;
1870
+ enabled: boolean;
1871
+ };
1872
+ export type OAuth = {
1873
+ type: "oauth";
1874
+ refresh: string;
1875
+ access: string;
1876
+ expires: number;
1877
+ accountId?: string;
1878
+ enterpriseUrl?: string;
1879
+ };
1880
+ export type ApiAuth = {
1881
+ type: "api";
1882
+ key: string;
1883
+ };
1884
+ export type WellKnownAuth = {
1885
+ type: "wellknown";
1886
+ key: string;
1887
+ token: string;
1888
+ };
1889
+ export type Auth = OAuth | ApiAuth | WellKnownAuth;
1890
+ export type GlobalHealthData = {
1891
+ body?: never;
1892
+ path?: never;
1893
+ query?: never;
1894
+ url: "/global/health";
1895
+ };
1896
+ export type GlobalHealthResponses = {
1897
+ /**
1898
+ * Health information
1899
+ */
1900
+ 200: {
1901
+ healthy: true;
1902
+ version: string;
1903
+ };
1904
+ };
1905
+ export type GlobalHealthResponse = GlobalHealthResponses[keyof GlobalHealthResponses];
1906
+ export type GlobalEventData = {
1907
+ body?: never;
1908
+ path?: never;
1909
+ query?: never;
1910
+ url: "/global/event";
1911
+ };
1912
+ export type GlobalEventResponses = {
1913
+ /**
1914
+ * Event stream
1915
+ */
1916
+ 200: GlobalEvent;
1917
+ };
1918
+ export type GlobalEventResponse = GlobalEventResponses[keyof GlobalEventResponses];
1919
+ export type GlobalDisposeData = {
1920
+ body?: never;
1921
+ path?: never;
1922
+ query?: never;
1923
+ url: "/global/dispose";
1924
+ };
1925
+ export type GlobalDisposeResponses = {
1926
+ /**
1927
+ * Global disposed
1928
+ */
1929
+ 200: boolean;
1930
+ };
1931
+ export type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses];
1932
+ export type ProjectListData = {
1933
+ body?: never;
1934
+ path?: never;
1935
+ query?: {
1936
+ directory?: string;
1937
+ };
1938
+ url: "/project";
1939
+ };
1940
+ export type ProjectListResponses = {
1941
+ /**
1942
+ * List of projects
1943
+ */
1944
+ 200: Array<Project>;
1945
+ };
1946
+ export type ProjectListResponse = ProjectListResponses[keyof ProjectListResponses];
1947
+ export type ProjectCurrentData = {
1948
+ body?: never;
1949
+ path?: never;
1950
+ query?: {
1951
+ directory?: string;
1952
+ };
1953
+ url: "/project/current";
1954
+ };
1955
+ export type ProjectCurrentResponses = {
1956
+ /**
1957
+ * Current project information
1958
+ */
1959
+ 200: Project;
1960
+ };
1961
+ export type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses];
1962
+ export type ProjectUpdateData = {
1963
+ body?: {
1964
+ name?: string;
1965
+ icon?: {
1966
+ url?: string;
1967
+ color?: string;
1968
+ };
1969
+ };
1970
+ path: {
1971
+ projectID: string;
1972
+ };
1973
+ query?: {
1974
+ directory?: string;
1975
+ };
1976
+ url: "/project/{projectID}";
1977
+ };
1978
+ export type ProjectUpdateErrors = {
1979
+ /**
1980
+ * Bad request
1981
+ */
1982
+ 400: BadRequestError;
1983
+ /**
1984
+ * Not found
1985
+ */
1986
+ 404: NotFoundError;
1987
+ };
1988
+ export type ProjectUpdateError = ProjectUpdateErrors[keyof ProjectUpdateErrors];
1989
+ export type ProjectUpdateResponses = {
1990
+ /**
1991
+ * Updated project information
1992
+ */
1993
+ 200: Project;
1994
+ };
1995
+ export type ProjectUpdateResponse = ProjectUpdateResponses[keyof ProjectUpdateResponses];
1996
+ export type PtyListData = {
1997
+ body?: never;
1998
+ path?: never;
1999
+ query?: {
2000
+ directory?: string;
2001
+ };
2002
+ url: "/pty";
2003
+ };
2004
+ export type PtyListResponses = {
2005
+ /**
2006
+ * List of sessions
2007
+ */
2008
+ 200: Array<Pty>;
2009
+ };
2010
+ export type PtyListResponse = PtyListResponses[keyof PtyListResponses];
2011
+ export type PtyCreateData = {
2012
+ body?: {
2013
+ command?: string;
2014
+ args?: Array<string>;
2015
+ cwd?: string;
2016
+ title?: string;
2017
+ env?: {
2018
+ [key: string]: string;
2019
+ };
2020
+ };
2021
+ path?: never;
2022
+ query?: {
2023
+ directory?: string;
2024
+ };
2025
+ url: "/pty";
2026
+ };
2027
+ export type PtyCreateErrors = {
2028
+ /**
2029
+ * Bad request
2030
+ */
2031
+ 400: BadRequestError;
2032
+ };
2033
+ export type PtyCreateError = PtyCreateErrors[keyof PtyCreateErrors];
2034
+ export type PtyCreateResponses = {
2035
+ /**
2036
+ * Created session
2037
+ */
2038
+ 200: Pty;
2039
+ };
2040
+ export type PtyCreateResponse = PtyCreateResponses[keyof PtyCreateResponses];
2041
+ export type PtyRemoveData = {
2042
+ body?: never;
2043
+ path: {
2044
+ ptyID: string;
2045
+ };
2046
+ query?: {
2047
+ directory?: string;
2048
+ };
2049
+ url: "/pty/{ptyID}";
2050
+ };
2051
+ export type PtyRemoveErrors = {
2052
+ /**
2053
+ * Not found
2054
+ */
2055
+ 404: NotFoundError;
2056
+ };
2057
+ export type PtyRemoveError = PtyRemoveErrors[keyof PtyRemoveErrors];
2058
+ export type PtyRemoveResponses = {
2059
+ /**
2060
+ * Session removed
2061
+ */
2062
+ 200: boolean;
2063
+ };
2064
+ export type PtyRemoveResponse = PtyRemoveResponses[keyof PtyRemoveResponses];
2065
+ export type PtyGetData = {
2066
+ body?: never;
2067
+ path: {
2068
+ ptyID: string;
2069
+ };
2070
+ query?: {
2071
+ directory?: string;
2072
+ };
2073
+ url: "/pty/{ptyID}";
2074
+ };
2075
+ export type PtyGetErrors = {
2076
+ /**
2077
+ * Not found
2078
+ */
2079
+ 404: NotFoundError;
2080
+ };
2081
+ export type PtyGetError = PtyGetErrors[keyof PtyGetErrors];
2082
+ export type PtyGetResponses = {
2083
+ /**
2084
+ * Session info
2085
+ */
2086
+ 200: Pty;
2087
+ };
2088
+ export type PtyGetResponse = PtyGetResponses[keyof PtyGetResponses];
2089
+ export type PtyUpdateData = {
2090
+ body?: {
2091
+ title?: string;
2092
+ size?: {
2093
+ rows: number;
2094
+ cols: number;
2095
+ };
2096
+ };
2097
+ path: {
2098
+ ptyID: string;
2099
+ };
2100
+ query?: {
2101
+ directory?: string;
2102
+ };
2103
+ url: "/pty/{ptyID}";
2104
+ };
2105
+ export type PtyUpdateErrors = {
2106
+ /**
2107
+ * Bad request
2108
+ */
2109
+ 400: BadRequestError;
2110
+ };
2111
+ export type PtyUpdateError = PtyUpdateErrors[keyof PtyUpdateErrors];
2112
+ export type PtyUpdateResponses = {
2113
+ /**
2114
+ * Updated session
2115
+ */
2116
+ 200: Pty;
2117
+ };
2118
+ export type PtyUpdateResponse = PtyUpdateResponses[keyof PtyUpdateResponses];
2119
+ export type PtyConnectData = {
2120
+ body?: never;
2121
+ path: {
2122
+ ptyID: string;
2123
+ };
2124
+ query?: {
2125
+ directory?: string;
2126
+ };
2127
+ url: "/pty/{ptyID}/connect";
2128
+ };
2129
+ export type PtyConnectErrors = {
2130
+ /**
2131
+ * Not found
2132
+ */
2133
+ 404: NotFoundError;
2134
+ };
2135
+ export type PtyConnectError = PtyConnectErrors[keyof PtyConnectErrors];
2136
+ export type PtyConnectResponses = {
2137
+ /**
2138
+ * Connected session
2139
+ */
2140
+ 200: boolean;
2141
+ };
2142
+ export type PtyConnectResponse = PtyConnectResponses[keyof PtyConnectResponses];
2143
+ export type ConfigGetData = {
2144
+ body?: never;
2145
+ path?: never;
2146
+ query?: {
2147
+ directory?: string;
2148
+ };
2149
+ url: "/config";
2150
+ };
2151
+ export type ConfigGetResponses = {
2152
+ /**
2153
+ * Get config info
2154
+ */
2155
+ 200: Config;
2156
+ };
2157
+ export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses];
2158
+ export type ConfigUpdateData = {
2159
+ body?: Config;
2160
+ path?: never;
2161
+ query?: {
2162
+ directory?: string;
2163
+ };
2164
+ url: "/config";
2165
+ };
2166
+ export type ConfigUpdateErrors = {
2167
+ /**
2168
+ * Bad request
2169
+ */
2170
+ 400: BadRequestError;
2171
+ };
2172
+ export type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors];
2173
+ export type ConfigUpdateResponses = {
2174
+ /**
2175
+ * Successfully updated config
2176
+ */
2177
+ 200: Config;
2178
+ };
2179
+ export type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses];
2180
+ export type ConfigProvidersData = {
2181
+ body?: never;
2182
+ path?: never;
2183
+ query?: {
2184
+ directory?: string;
2185
+ };
2186
+ url: "/config/providers";
2187
+ };
2188
+ export type ConfigProvidersResponses = {
2189
+ /**
2190
+ * List of providers
2191
+ */
2192
+ 200: {
2193
+ providers: Array<Provider>;
2194
+ default: {
2195
+ [key: string]: string;
2196
+ };
2197
+ };
2198
+ };
2199
+ export type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses];
2200
+ export type ToolIdsData = {
2201
+ body?: never;
2202
+ path?: never;
2203
+ query?: {
2204
+ directory?: string;
2205
+ };
2206
+ url: "/experimental/tool/ids";
2207
+ };
2208
+ export type ToolIdsErrors = {
2209
+ /**
2210
+ * Bad request
2211
+ */
2212
+ 400: BadRequestError;
2213
+ };
2214
+ export type ToolIdsError = ToolIdsErrors[keyof ToolIdsErrors];
2215
+ export type ToolIdsResponses = {
2216
+ /**
2217
+ * Tool IDs
2218
+ */
2219
+ 200: ToolIds;
2220
+ };
2221
+ export type ToolIdsResponse = ToolIdsResponses[keyof ToolIdsResponses];
2222
+ export type ToolListData = {
2223
+ body?: never;
2224
+ path?: never;
2225
+ query: {
2226
+ directory?: string;
2227
+ provider: string;
2228
+ model: string;
2229
+ };
2230
+ url: "/experimental/tool";
2231
+ };
2232
+ export type ToolListErrors = {
2233
+ /**
2234
+ * Bad request
2235
+ */
2236
+ 400: BadRequestError;
2237
+ };
2238
+ export type ToolListError = ToolListErrors[keyof ToolListErrors];
2239
+ export type ToolListResponses = {
2240
+ /**
2241
+ * Tools
2242
+ */
2243
+ 200: ToolList;
2244
+ };
2245
+ export type ToolListResponse = ToolListResponses[keyof ToolListResponses];
2246
+ export type WorktreeListData = {
2247
+ body?: never;
2248
+ path?: never;
2249
+ query?: {
2250
+ directory?: string;
2251
+ };
2252
+ url: "/experimental/worktree";
2253
+ };
2254
+ export type WorktreeListResponses = {
2255
+ /**
2256
+ * List of worktree directories
2257
+ */
2258
+ 200: Array<string>;
2259
+ };
2260
+ export type WorktreeListResponse = WorktreeListResponses[keyof WorktreeListResponses];
2261
+ export type WorktreeCreateData = {
2262
+ body?: WorktreeCreateInput;
2263
+ path?: never;
2264
+ query?: {
2265
+ directory?: string;
2266
+ };
2267
+ url: "/experimental/worktree";
2268
+ };
2269
+ export type WorktreeCreateErrors = {
2270
+ /**
2271
+ * Bad request
2272
+ */
2273
+ 400: BadRequestError;
2274
+ };
2275
+ export type WorktreeCreateError = WorktreeCreateErrors[keyof WorktreeCreateErrors];
2276
+ export type WorktreeCreateResponses = {
2277
+ /**
2278
+ * Worktree created
2279
+ */
2280
+ 200: Worktree;
2281
+ };
2282
+ export type WorktreeCreateResponse = WorktreeCreateResponses[keyof WorktreeCreateResponses];
2283
+ export type ExperimentalResourceListData = {
2284
+ body?: never;
2285
+ path?: never;
2286
+ query?: {
2287
+ directory?: string;
2288
+ };
2289
+ url: "/experimental/resource";
2290
+ };
2291
+ export type ExperimentalResourceListResponses = {
2292
+ /**
2293
+ * MCP resources
2294
+ */
2295
+ 200: {
2296
+ [key: string]: McpResource;
2297
+ };
2298
+ };
2299
+ export type ExperimentalResourceListResponse = ExperimentalResourceListResponses[keyof ExperimentalResourceListResponses];
2300
+ export type SessionListData = {
2301
+ body?: never;
2302
+ path?: never;
2303
+ query?: {
2304
+ /**
2305
+ * Filter sessions by project directory
2306
+ */
2307
+ directory?: string;
2308
+ /**
2309
+ * Only return root sessions (no parentID)
2310
+ */
2311
+ roots?: boolean;
2312
+ /**
2313
+ * Filter sessions updated on or after this timestamp (milliseconds since epoch)
2314
+ */
2315
+ start?: number;
2316
+ /**
2317
+ * Filter sessions by title (case-insensitive)
2318
+ */
2319
+ search?: string;
2320
+ /**
2321
+ * Maximum number of sessions to return
2322
+ */
2323
+ limit?: number;
2324
+ };
2325
+ url: "/session";
2326
+ };
2327
+ export type SessionListResponses = {
2328
+ /**
2329
+ * List of sessions
2330
+ */
2331
+ 200: Array<Session>;
2332
+ };
2333
+ export type SessionListResponse = SessionListResponses[keyof SessionListResponses];
2334
+ export type SessionCreateData = {
2335
+ body?: {
2336
+ parentID?: string;
2337
+ title?: string;
2338
+ permission?: PermissionRuleset;
2339
+ };
2340
+ path?: never;
2341
+ query?: {
2342
+ directory?: string;
2343
+ };
2344
+ url: "/session";
2345
+ };
2346
+ export type SessionCreateErrors = {
2347
+ /**
2348
+ * Bad request
2349
+ */
2350
+ 400: BadRequestError;
2351
+ };
2352
+ export type SessionCreateError = SessionCreateErrors[keyof SessionCreateErrors];
2353
+ export type SessionCreateResponses = {
2354
+ /**
2355
+ * Successfully created session
2356
+ */
2357
+ 200: Session;
2358
+ };
2359
+ export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses];
2360
+ export type SessionStatusData = {
2361
+ body?: never;
2362
+ path?: never;
2363
+ query?: {
2364
+ directory?: string;
2365
+ };
2366
+ url: "/session/status";
2367
+ };
2368
+ export type SessionStatusErrors = {
2369
+ /**
2370
+ * Bad request
2371
+ */
2372
+ 400: BadRequestError;
2373
+ };
2374
+ export type SessionStatusError = SessionStatusErrors[keyof SessionStatusErrors];
2375
+ export type SessionStatusResponses = {
2376
+ /**
2377
+ * Get session status
2378
+ */
2379
+ 200: {
2380
+ [key: string]: SessionStatus;
2381
+ };
2382
+ };
2383
+ export type SessionStatusResponse = SessionStatusResponses[keyof SessionStatusResponses];
2384
+ export type SessionDeleteData = {
2385
+ body?: never;
2386
+ path: {
2387
+ sessionID: string;
2388
+ };
2389
+ query?: {
2390
+ directory?: string;
2391
+ };
2392
+ url: "/session/{sessionID}";
2393
+ };
2394
+ export type SessionDeleteErrors = {
2395
+ /**
2396
+ * Bad request
2397
+ */
2398
+ 400: BadRequestError;
2399
+ /**
2400
+ * Not found
2401
+ */
2402
+ 404: NotFoundError;
2403
+ };
2404
+ export type SessionDeleteError = SessionDeleteErrors[keyof SessionDeleteErrors];
2405
+ export type SessionDeleteResponses = {
2406
+ /**
2407
+ * Successfully deleted session
2408
+ */
2409
+ 200: boolean;
2410
+ };
2411
+ export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses];
2412
+ export type SessionGetData = {
2413
+ body?: never;
2414
+ path: {
2415
+ sessionID: string;
2416
+ };
2417
+ query?: {
2418
+ directory?: string;
2419
+ };
2420
+ url: "/session/{sessionID}";
2421
+ };
2422
+ export type SessionGetErrors = {
2423
+ /**
2424
+ * Bad request
2425
+ */
2426
+ 400: BadRequestError;
2427
+ /**
2428
+ * Not found
2429
+ */
2430
+ 404: NotFoundError;
2431
+ };
2432
+ export type SessionGetError = SessionGetErrors[keyof SessionGetErrors];
2433
+ export type SessionGetResponses = {
2434
+ /**
2435
+ * Get session
2436
+ */
2437
+ 200: Session;
2438
+ };
2439
+ export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses];
2440
+ export type SessionUpdateData = {
2441
+ body?: {
2442
+ title?: string;
2443
+ time?: {
2444
+ archived?: number;
2445
+ };
2446
+ };
2447
+ path: {
2448
+ sessionID: string;
2449
+ };
2450
+ query?: {
2451
+ directory?: string;
2452
+ };
2453
+ url: "/session/{sessionID}";
2454
+ };
2455
+ export type SessionUpdateErrors = {
2456
+ /**
2457
+ * Bad request
2458
+ */
2459
+ 400: BadRequestError;
2460
+ /**
2461
+ * Not found
2462
+ */
2463
+ 404: NotFoundError;
2464
+ };
2465
+ export type SessionUpdateError = SessionUpdateErrors[keyof SessionUpdateErrors];
2466
+ export type SessionUpdateResponses = {
2467
+ /**
2468
+ * Successfully updated session
2469
+ */
2470
+ 200: Session;
2471
+ };
2472
+ export type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses];
2473
+ export type SessionChildrenData = {
2474
+ body?: never;
2475
+ path: {
2476
+ sessionID: string;
2477
+ };
2478
+ query?: {
2479
+ directory?: string;
2480
+ };
2481
+ url: "/session/{sessionID}/children";
2482
+ };
2483
+ export type SessionChildrenErrors = {
2484
+ /**
2485
+ * Bad request
2486
+ */
2487
+ 400: BadRequestError;
2488
+ /**
2489
+ * Not found
2490
+ */
2491
+ 404: NotFoundError;
2492
+ };
2493
+ export type SessionChildrenError = SessionChildrenErrors[keyof SessionChildrenErrors];
2494
+ export type SessionChildrenResponses = {
2495
+ /**
2496
+ * List of children
2497
+ */
2498
+ 200: Array<Session>;
2499
+ };
2500
+ export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses];
2501
+ export type SessionTodoData = {
2502
+ body?: never;
2503
+ path: {
2504
+ /**
2505
+ * Session ID
2506
+ */
2507
+ sessionID: string;
2508
+ };
2509
+ query?: {
2510
+ directory?: string;
2511
+ };
2512
+ url: "/session/{sessionID}/todo";
2513
+ };
2514
+ export type SessionTodoErrors = {
2515
+ /**
2516
+ * Bad request
2517
+ */
2518
+ 400: BadRequestError;
2519
+ /**
2520
+ * Not found
2521
+ */
2522
+ 404: NotFoundError;
2523
+ };
2524
+ export type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors];
2525
+ export type SessionTodoResponses = {
2526
+ /**
2527
+ * Todo list
2528
+ */
2529
+ 200: Array<Todo>;
2530
+ };
2531
+ export type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses];
2532
+ export type SessionInitData = {
2533
+ body?: {
2534
+ modelID: string;
2535
+ providerID: string;
2536
+ messageID: string;
2537
+ };
2538
+ path: {
2539
+ /**
2540
+ * Session ID
2541
+ */
2542
+ sessionID: string;
2543
+ };
2544
+ query?: {
2545
+ directory?: string;
2546
+ };
2547
+ url: "/session/{sessionID}/init";
2548
+ };
2549
+ export type SessionInitErrors = {
2550
+ /**
2551
+ * Bad request
2552
+ */
2553
+ 400: BadRequestError;
2554
+ /**
2555
+ * Not found
2556
+ */
2557
+ 404: NotFoundError;
2558
+ };
2559
+ export type SessionInitError = SessionInitErrors[keyof SessionInitErrors];
2560
+ export type SessionInitResponses = {
2561
+ /**
2562
+ * 200
2563
+ */
2564
+ 200: boolean;
2565
+ };
2566
+ export type SessionInitResponse = SessionInitResponses[keyof SessionInitResponses];
2567
+ export type SessionForkData = {
2568
+ body?: {
2569
+ messageID?: string;
2570
+ };
2571
+ path: {
2572
+ sessionID: string;
2573
+ };
2574
+ query?: {
2575
+ directory?: string;
2576
+ };
2577
+ url: "/session/{sessionID}/fork";
2578
+ };
2579
+ export type SessionForkResponses = {
2580
+ /**
2581
+ * 200
2582
+ */
2583
+ 200: Session;
2584
+ };
2585
+ export type SessionForkResponse = SessionForkResponses[keyof SessionForkResponses];
2586
+ export type SessionAbortData = {
2587
+ body?: never;
2588
+ path: {
2589
+ sessionID: string;
2590
+ };
2591
+ query?: {
2592
+ directory?: string;
2593
+ };
2594
+ url: "/session/{sessionID}/abort";
2595
+ };
2596
+ export type SessionAbortErrors = {
2597
+ /**
2598
+ * Bad request
2599
+ */
2600
+ 400: BadRequestError;
2601
+ /**
2602
+ * Not found
2603
+ */
2604
+ 404: NotFoundError;
2605
+ };
2606
+ export type SessionAbortError = SessionAbortErrors[keyof SessionAbortErrors];
2607
+ export type SessionAbortResponses = {
2608
+ /**
2609
+ * Aborted session
2610
+ */
2611
+ 200: boolean;
2612
+ };
2613
+ export type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses];
2614
+ export type SessionUnshareData = {
2615
+ body?: never;
2616
+ path: {
2617
+ sessionID: string;
2618
+ };
2619
+ query?: {
2620
+ directory?: string;
2621
+ };
2622
+ url: "/session/{sessionID}/share";
2623
+ };
2624
+ export type SessionUnshareErrors = {
2625
+ /**
2626
+ * Bad request
2627
+ */
2628
+ 400: BadRequestError;
2629
+ /**
2630
+ * Not found
2631
+ */
2632
+ 404: NotFoundError;
2633
+ };
2634
+ export type SessionUnshareError = SessionUnshareErrors[keyof SessionUnshareErrors];
2635
+ export type SessionUnshareResponses = {
2636
+ /**
2637
+ * Successfully unshared session
2638
+ */
2639
+ 200: Session;
2640
+ };
2641
+ export type SessionUnshareResponse = SessionUnshareResponses[keyof SessionUnshareResponses];
2642
+ export type SessionShareData = {
2643
+ body?: never;
2644
+ path: {
2645
+ sessionID: string;
2646
+ };
2647
+ query?: {
2648
+ directory?: string;
2649
+ };
2650
+ url: "/session/{sessionID}/share";
2651
+ };
2652
+ export type SessionShareErrors = {
2653
+ /**
2654
+ * Bad request
2655
+ */
2656
+ 400: BadRequestError;
2657
+ /**
2658
+ * Not found
2659
+ */
2660
+ 404: NotFoundError;
2661
+ };
2662
+ export type SessionShareError = SessionShareErrors[keyof SessionShareErrors];
2663
+ export type SessionShareResponses = {
2664
+ /**
2665
+ * Successfully shared session
2666
+ */
2667
+ 200: Session;
2668
+ };
2669
+ export type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses];
2670
+ export type SessionDiffData = {
2671
+ body?: never;
2672
+ path: {
2673
+ sessionID: string;
2674
+ };
2675
+ query?: {
2676
+ directory?: string;
2677
+ messageID?: string;
2678
+ };
2679
+ url: "/session/{sessionID}/diff";
2680
+ };
2681
+ export type SessionDiffResponses = {
2682
+ /**
2683
+ * Successfully retrieved diff
2684
+ */
2685
+ 200: Array<FileDiff>;
2686
+ };
2687
+ export type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses];
2688
+ export type SessionSummarizeData = {
2689
+ body?: {
2690
+ providerID: string;
2691
+ modelID: string;
2692
+ auto?: boolean;
2693
+ };
2694
+ path: {
2695
+ /**
2696
+ * Session ID
2697
+ */
2698
+ sessionID: string;
2699
+ };
2700
+ query?: {
2701
+ directory?: string;
2702
+ };
2703
+ url: "/session/{sessionID}/summarize";
2704
+ };
2705
+ export type SessionSummarizeErrors = {
2706
+ /**
2707
+ * Bad request
2708
+ */
2709
+ 400: BadRequestError;
2710
+ /**
2711
+ * Not found
2712
+ */
2713
+ 404: NotFoundError;
2714
+ };
2715
+ export type SessionSummarizeError = SessionSummarizeErrors[keyof SessionSummarizeErrors];
2716
+ export type SessionSummarizeResponses = {
2717
+ /**
2718
+ * Summarized session
2719
+ */
2720
+ 200: boolean;
2721
+ };
2722
+ export type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSummarizeResponses];
2723
+ export type SessionMessagesData = {
2724
+ body?: never;
2725
+ path: {
2726
+ /**
2727
+ * Session ID
2728
+ */
2729
+ sessionID: string;
2730
+ };
2731
+ query?: {
2732
+ directory?: string;
2733
+ limit?: number;
2734
+ };
2735
+ url: "/session/{sessionID}/message";
2736
+ };
2737
+ export type SessionMessagesErrors = {
2738
+ /**
2739
+ * Bad request
2740
+ */
2741
+ 400: BadRequestError;
2742
+ /**
2743
+ * Not found
2744
+ */
2745
+ 404: NotFoundError;
2746
+ };
2747
+ export type SessionMessagesError = SessionMessagesErrors[keyof SessionMessagesErrors];
2748
+ export type SessionMessagesResponses = {
2749
+ /**
2750
+ * List of messages
2751
+ */
2752
+ 200: Array<{
2753
+ info: Message;
2754
+ parts: Array<Part>;
2755
+ }>;
2756
+ };
2757
+ export type SessionMessagesResponse = SessionMessagesResponses[keyof SessionMessagesResponses];
2758
+ export type SessionPromptData = {
2759
+ body?: {
2760
+ messageID?: string;
2761
+ model?: {
2762
+ providerID: string;
2763
+ modelID: string;
2764
+ };
2765
+ agent?: string;
2766
+ noReply?: boolean;
2767
+ /**
2768
+ * @deprecated tools and permissions have been merged, you can set permissions on the session itself now
2769
+ */
2770
+ tools?: {
2771
+ [key: string]: boolean;
2772
+ };
2773
+ system?: string;
2774
+ variant?: string;
2775
+ parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
2776
+ };
2777
+ path: {
2778
+ /**
2779
+ * Session ID
2780
+ */
2781
+ sessionID: string;
2782
+ };
2783
+ query?: {
2784
+ directory?: string;
2785
+ };
2786
+ url: "/session/{sessionID}/message";
2787
+ };
2788
+ export type SessionPromptErrors = {
2789
+ /**
2790
+ * Bad request
2791
+ */
2792
+ 400: BadRequestError;
2793
+ /**
2794
+ * Not found
2795
+ */
2796
+ 404: NotFoundError;
2797
+ };
2798
+ export type SessionPromptError = SessionPromptErrors[keyof SessionPromptErrors];
2799
+ export type SessionPromptResponses = {
2800
+ /**
2801
+ * Created message
2802
+ */
2803
+ 200: {
2804
+ info: AssistantMessage;
2805
+ parts: Array<Part>;
2806
+ };
2807
+ };
2808
+ export type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses];
2809
+ export type SessionMessageData = {
2810
+ body?: never;
2811
+ path: {
2812
+ /**
2813
+ * Session ID
2814
+ */
2815
+ sessionID: string;
2816
+ /**
2817
+ * Message ID
2818
+ */
2819
+ messageID: string;
2820
+ };
2821
+ query?: {
2822
+ directory?: string;
2823
+ };
2824
+ url: "/session/{sessionID}/message/{messageID}";
2825
+ };
2826
+ export type SessionMessageErrors = {
2827
+ /**
2828
+ * Bad request
2829
+ */
2830
+ 400: BadRequestError;
2831
+ /**
2832
+ * Not found
2833
+ */
2834
+ 404: NotFoundError;
2835
+ };
2836
+ export type SessionMessageError = SessionMessageErrors[keyof SessionMessageErrors];
2837
+ export type SessionMessageResponses = {
2838
+ /**
2839
+ * Message
2840
+ */
2841
+ 200: {
2842
+ info: Message;
2843
+ parts: Array<Part>;
2844
+ };
2845
+ };
2846
+ export type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses];
2847
+ export type PartDeleteData = {
2848
+ body?: never;
2849
+ path: {
2850
+ /**
2851
+ * Session ID
2852
+ */
2853
+ sessionID: string;
2854
+ /**
2855
+ * Message ID
2856
+ */
2857
+ messageID: string;
2858
+ /**
2859
+ * Part ID
2860
+ */
2861
+ partID: string;
2862
+ };
2863
+ query?: {
2864
+ directory?: string;
2865
+ };
2866
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}";
2867
+ };
2868
+ export type PartDeleteErrors = {
2869
+ /**
2870
+ * Bad request
2871
+ */
2872
+ 400: BadRequestError;
2873
+ /**
2874
+ * Not found
2875
+ */
2876
+ 404: NotFoundError;
2877
+ };
2878
+ export type PartDeleteError = PartDeleteErrors[keyof PartDeleteErrors];
2879
+ export type PartDeleteResponses = {
2880
+ /**
2881
+ * Successfully deleted part
2882
+ */
2883
+ 200: boolean;
2884
+ };
2885
+ export type PartDeleteResponse = PartDeleteResponses[keyof PartDeleteResponses];
2886
+ export type PartUpdateData = {
2887
+ body?: Part;
2888
+ path: {
2889
+ /**
2890
+ * Session ID
2891
+ */
2892
+ sessionID: string;
2893
+ /**
2894
+ * Message ID
2895
+ */
2896
+ messageID: string;
2897
+ /**
2898
+ * Part ID
2899
+ */
2900
+ partID: string;
2901
+ };
2902
+ query?: {
2903
+ directory?: string;
2904
+ };
2905
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}";
2906
+ };
2907
+ export type PartUpdateErrors = {
2908
+ /**
2909
+ * Bad request
2910
+ */
2911
+ 400: BadRequestError;
2912
+ /**
2913
+ * Not found
2914
+ */
2915
+ 404: NotFoundError;
2916
+ };
2917
+ export type PartUpdateError = PartUpdateErrors[keyof PartUpdateErrors];
2918
+ export type PartUpdateResponses = {
2919
+ /**
2920
+ * Successfully updated part
2921
+ */
2922
+ 200: Part;
2923
+ };
2924
+ export type PartUpdateResponse = PartUpdateResponses[keyof PartUpdateResponses];
2925
+ export type SessionPromptAsyncData = {
2926
+ body?: {
2927
+ messageID?: string;
2928
+ model?: {
2929
+ providerID: string;
2930
+ modelID: string;
2931
+ };
2932
+ agent?: string;
2933
+ noReply?: boolean;
2934
+ /**
2935
+ * @deprecated tools and permissions have been merged, you can set permissions on the session itself now
2936
+ */
2937
+ tools?: {
2938
+ [key: string]: boolean;
2939
+ };
2940
+ system?: string;
2941
+ variant?: string;
2942
+ parts: Array<TextPartInput | FilePartInput | AgentPartInput | SubtaskPartInput>;
2943
+ };
2944
+ path: {
2945
+ /**
2946
+ * Session ID
2947
+ */
2948
+ sessionID: string;
2949
+ };
2950
+ query?: {
2951
+ directory?: string;
2952
+ };
2953
+ url: "/session/{sessionID}/prompt_async";
2954
+ };
2955
+ export type SessionPromptAsyncErrors = {
2956
+ /**
2957
+ * Bad request
2958
+ */
2959
+ 400: BadRequestError;
2960
+ /**
2961
+ * Not found
2962
+ */
2963
+ 404: NotFoundError;
2964
+ };
2965
+ export type SessionPromptAsyncError = SessionPromptAsyncErrors[keyof SessionPromptAsyncErrors];
2966
+ export type SessionPromptAsyncResponses = {
2967
+ /**
2968
+ * Prompt accepted
2969
+ */
2970
+ 204: void;
2971
+ };
2972
+ export type SessionPromptAsyncResponse = SessionPromptAsyncResponses[keyof SessionPromptAsyncResponses];
2973
+ export type SessionCommandData = {
2974
+ body?: {
2975
+ messageID?: string;
2976
+ agent?: string;
2977
+ model?: string;
2978
+ arguments: string;
2979
+ command: string;
2980
+ variant?: string;
2981
+ parts?: Array<{
2982
+ id?: string;
2983
+ type: "file";
2984
+ mime: string;
2985
+ filename?: string;
2986
+ url: string;
2987
+ source?: FilePartSource;
2988
+ }>;
2989
+ };
2990
+ path: {
2991
+ /**
2992
+ * Session ID
2993
+ */
2994
+ sessionID: string;
2995
+ };
2996
+ query?: {
2997
+ directory?: string;
2998
+ };
2999
+ url: "/session/{sessionID}/command";
3000
+ };
3001
+ export type SessionCommandErrors = {
3002
+ /**
3003
+ * Bad request
3004
+ */
3005
+ 400: BadRequestError;
3006
+ /**
3007
+ * Not found
3008
+ */
3009
+ 404: NotFoundError;
3010
+ };
3011
+ export type SessionCommandError = SessionCommandErrors[keyof SessionCommandErrors];
3012
+ export type SessionCommandResponses = {
3013
+ /**
3014
+ * Created message
3015
+ */
3016
+ 200: {
3017
+ info: AssistantMessage;
3018
+ parts: Array<Part>;
3019
+ };
3020
+ };
3021
+ export type SessionCommandResponse = SessionCommandResponses[keyof SessionCommandResponses];
3022
+ export type SessionShellData = {
3023
+ body?: {
3024
+ agent: string;
3025
+ model?: {
3026
+ providerID: string;
3027
+ modelID: string;
3028
+ };
3029
+ command: string;
3030
+ };
3031
+ path: {
3032
+ /**
3033
+ * Session ID
3034
+ */
3035
+ sessionID: string;
3036
+ };
3037
+ query?: {
3038
+ directory?: string;
3039
+ };
3040
+ url: "/session/{sessionID}/shell";
3041
+ };
3042
+ export type SessionShellErrors = {
3043
+ /**
3044
+ * Bad request
3045
+ */
3046
+ 400: BadRequestError;
3047
+ /**
3048
+ * Not found
3049
+ */
3050
+ 404: NotFoundError;
3051
+ };
3052
+ export type SessionShellError = SessionShellErrors[keyof SessionShellErrors];
3053
+ export type SessionShellResponses = {
3054
+ /**
3055
+ * Created message
3056
+ */
3057
+ 200: AssistantMessage;
3058
+ };
3059
+ export type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses];
3060
+ export type SessionRevertData = {
3061
+ body?: {
3062
+ messageID: string;
3063
+ partID?: string;
3064
+ };
3065
+ path: {
3066
+ sessionID: string;
3067
+ };
3068
+ query?: {
3069
+ directory?: string;
3070
+ };
3071
+ url: "/session/{sessionID}/revert";
3072
+ };
3073
+ export type SessionRevertErrors = {
3074
+ /**
3075
+ * Bad request
3076
+ */
3077
+ 400: BadRequestError;
3078
+ /**
3079
+ * Not found
3080
+ */
3081
+ 404: NotFoundError;
3082
+ };
3083
+ export type SessionRevertError = SessionRevertErrors[keyof SessionRevertErrors];
3084
+ export type SessionRevertResponses = {
3085
+ /**
3086
+ * Updated session
3087
+ */
3088
+ 200: Session;
3089
+ };
3090
+ export type SessionRevertResponse = SessionRevertResponses[keyof SessionRevertResponses];
3091
+ export type SessionUnrevertData = {
3092
+ body?: never;
3093
+ path: {
3094
+ sessionID: string;
3095
+ };
3096
+ query?: {
3097
+ directory?: string;
3098
+ };
3099
+ url: "/session/{sessionID}/unrevert";
3100
+ };
3101
+ export type SessionUnrevertErrors = {
3102
+ /**
3103
+ * Bad request
3104
+ */
3105
+ 400: BadRequestError;
3106
+ /**
3107
+ * Not found
3108
+ */
3109
+ 404: NotFoundError;
3110
+ };
3111
+ export type SessionUnrevertError = SessionUnrevertErrors[keyof SessionUnrevertErrors];
3112
+ export type SessionUnrevertResponses = {
3113
+ /**
3114
+ * Updated session
3115
+ */
3116
+ 200: Session;
3117
+ };
3118
+ export type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses];
3119
+ export type PermissionRespondData = {
3120
+ body?: {
3121
+ response: "once" | "always" | "reject";
3122
+ };
3123
+ path: {
3124
+ sessionID: string;
3125
+ permissionID: string;
3126
+ };
3127
+ query?: {
3128
+ directory?: string;
3129
+ };
3130
+ url: "/session/{sessionID}/permissions/{permissionID}";
3131
+ };
3132
+ export type PermissionRespondErrors = {
3133
+ /**
3134
+ * Bad request
3135
+ */
3136
+ 400: BadRequestError;
3137
+ /**
3138
+ * Not found
3139
+ */
3140
+ 404: NotFoundError;
3141
+ };
3142
+ export type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors];
3143
+ export type PermissionRespondResponses = {
3144
+ /**
3145
+ * Permission processed successfully
3146
+ */
3147
+ 200: boolean;
3148
+ };
3149
+ export type PermissionRespondResponse = PermissionRespondResponses[keyof PermissionRespondResponses];
3150
+ export type PermissionReplyData = {
3151
+ body?: {
3152
+ reply: "once" | "always" | "reject";
3153
+ message?: string;
3154
+ };
3155
+ path: {
3156
+ requestID: string;
3157
+ };
3158
+ query?: {
3159
+ directory?: string;
3160
+ };
3161
+ url: "/permission/{requestID}/reply";
3162
+ };
3163
+ export type PermissionReplyErrors = {
3164
+ /**
3165
+ * Bad request
3166
+ */
3167
+ 400: BadRequestError;
3168
+ /**
3169
+ * Not found
3170
+ */
3171
+ 404: NotFoundError;
3172
+ };
3173
+ export type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors];
3174
+ export type PermissionReplyResponses = {
3175
+ /**
3176
+ * Permission processed successfully
3177
+ */
3178
+ 200: boolean;
3179
+ };
3180
+ export type PermissionReplyResponse = PermissionReplyResponses[keyof PermissionReplyResponses];
3181
+ export type PermissionListData = {
3182
+ body?: never;
3183
+ path?: never;
3184
+ query?: {
3185
+ directory?: string;
3186
+ };
3187
+ url: "/permission";
3188
+ };
3189
+ export type PermissionListResponses = {
3190
+ /**
3191
+ * List of pending permissions
3192
+ */
3193
+ 200: Array<PermissionRequest>;
3194
+ };
3195
+ export type PermissionListResponse = PermissionListResponses[keyof PermissionListResponses];
3196
+ export type QuestionListData = {
3197
+ body?: never;
3198
+ path?: never;
3199
+ query?: {
3200
+ directory?: string;
3201
+ };
3202
+ url: "/question";
3203
+ };
3204
+ export type QuestionListResponses = {
3205
+ /**
3206
+ * List of pending questions
3207
+ */
3208
+ 200: Array<QuestionRequest>;
3209
+ };
3210
+ export type QuestionListResponse = QuestionListResponses[keyof QuestionListResponses];
3211
+ export type QuestionAskData = {
3212
+ body?: QuestionAskInput;
3213
+ path?: never;
3214
+ query?: {
3215
+ directory?: string;
3216
+ };
3217
+ url: "/question/ask";
3218
+ };
3219
+ export type QuestionAskErrors = {
3220
+ /**
3221
+ * Bad request
3222
+ */
3223
+ 400: BadRequestError;
3224
+ /**
3225
+ * Not found
3226
+ */
3227
+ 404: NotFoundError;
3228
+ };
3229
+ export type QuestionAskError = QuestionAskErrors[keyof QuestionAskErrors];
3230
+ export type QuestionAskResponses = {
3231
+ /**
3232
+ * Created question request
3233
+ */
3234
+ 200: {
3235
+ id: string;
3236
+ };
3237
+ };
3238
+ export type QuestionAskResponse = QuestionAskResponses[keyof QuestionAskResponses];
3239
+ export type QuestionReplyData = {
3240
+ body?: {
3241
+ /**
3242
+ * User answers in order of questions (each answer is an array of selected labels)
3243
+ */
3244
+ answers: Array<QuestionAnswer>;
3245
+ };
3246
+ path: {
3247
+ requestID: string;
3248
+ };
3249
+ query?: {
3250
+ directory?: string;
3251
+ };
3252
+ url: "/question/{requestID}/reply";
3253
+ };
3254
+ export type QuestionReplyErrors = {
3255
+ /**
3256
+ * Bad request
3257
+ */
3258
+ 400: BadRequestError;
3259
+ /**
3260
+ * Not found
3261
+ */
3262
+ 404: NotFoundError;
3263
+ };
3264
+ export type QuestionReplyError = QuestionReplyErrors[keyof QuestionReplyErrors];
3265
+ export type QuestionReplyResponses = {
3266
+ /**
3267
+ * Question answered successfully
3268
+ */
3269
+ 200: boolean;
3270
+ };
3271
+ export type QuestionReplyResponse = QuestionReplyResponses[keyof QuestionReplyResponses];
3272
+ export type QuestionRejectData = {
3273
+ body?: never;
3274
+ path: {
3275
+ requestID: string;
3276
+ };
3277
+ query?: {
3278
+ directory?: string;
3279
+ };
3280
+ url: "/question/{requestID}/reject";
3281
+ };
3282
+ export type QuestionRejectErrors = {
3283
+ /**
3284
+ * Bad request
3285
+ */
3286
+ 400: BadRequestError;
3287
+ /**
3288
+ * Not found
3289
+ */
3290
+ 404: NotFoundError;
3291
+ };
3292
+ export type QuestionRejectError = QuestionRejectErrors[keyof QuestionRejectErrors];
3293
+ export type QuestionRejectResponses = {
3294
+ /**
3295
+ * Question rejected successfully
3296
+ */
3297
+ 200: boolean;
3298
+ };
3299
+ export type QuestionRejectResponse = QuestionRejectResponses[keyof QuestionRejectResponses];
3300
+ export type ProviderListData = {
3301
+ body?: never;
3302
+ path?: never;
3303
+ query?: {
3304
+ directory?: string;
3305
+ };
3306
+ url: "/provider";
3307
+ };
3308
+ export type ProviderListResponses = {
3309
+ /**
3310
+ * List of providers
3311
+ */
3312
+ 200: {
3313
+ all: Array<{
3314
+ api?: string;
3315
+ name: string;
3316
+ env: Array<string>;
3317
+ id: string;
3318
+ npm?: string;
3319
+ models: {
3320
+ [key: string]: {
3321
+ id: string;
3322
+ name: string;
3323
+ family?: string;
3324
+ release_date: string;
3325
+ attachment: boolean;
3326
+ reasoning: boolean;
3327
+ temperature: boolean;
3328
+ tool_call: boolean;
3329
+ interleaved?: true | {
3330
+ field: "reasoning_content" | "reasoning_details";
3331
+ };
3332
+ cost?: {
3333
+ input: number;
3334
+ output: number;
3335
+ cache_read?: number;
3336
+ cache_write?: number;
3337
+ context_over_200k?: {
3338
+ input: number;
3339
+ output: number;
3340
+ cache_read?: number;
3341
+ cache_write?: number;
3342
+ };
3343
+ };
3344
+ limit: {
3345
+ context: number;
3346
+ input?: number;
3347
+ output: number;
3348
+ };
3349
+ modalities?: {
3350
+ input: Array<"text" | "audio" | "image" | "video" | "pdf">;
3351
+ output: Array<"text" | "audio" | "image" | "video" | "pdf">;
3352
+ };
3353
+ experimental?: boolean;
3354
+ status?: "alpha" | "beta" | "deprecated";
3355
+ options: {
3356
+ [key: string]: unknown;
3357
+ };
3358
+ headers?: {
3359
+ [key: string]: string;
3360
+ };
3361
+ provider?: {
3362
+ npm: string;
3363
+ };
3364
+ variants?: {
3365
+ [key: string]: {
3366
+ [key: string]: unknown;
3367
+ };
3368
+ };
3369
+ };
3370
+ };
3371
+ }>;
3372
+ default: {
3373
+ [key: string]: string;
3374
+ };
3375
+ connected: Array<string>;
3376
+ };
3377
+ };
3378
+ export type ProviderListResponse = ProviderListResponses[keyof ProviderListResponses];
3379
+ export type ProviderAuthData = {
3380
+ body?: never;
3381
+ path?: never;
3382
+ query?: {
3383
+ directory?: string;
3384
+ };
3385
+ url: "/provider/auth";
3386
+ };
3387
+ export type ProviderAuthResponses = {
3388
+ /**
3389
+ * Provider auth methods
3390
+ */
3391
+ 200: {
3392
+ [key: string]: Array<ProviderAuthMethod>;
3393
+ };
3394
+ };
3395
+ export type ProviderAuthResponse = ProviderAuthResponses[keyof ProviderAuthResponses];
3396
+ export type ProviderOauthAuthorizeData = {
3397
+ body?: {
3398
+ /**
3399
+ * Auth method index
3400
+ */
3401
+ method: number;
3402
+ };
3403
+ path: {
3404
+ /**
3405
+ * Provider ID
3406
+ */
3407
+ providerID: string;
3408
+ };
3409
+ query?: {
3410
+ directory?: string;
3411
+ };
3412
+ url: "/provider/{providerID}/oauth/authorize";
3413
+ };
3414
+ export type ProviderOauthAuthorizeErrors = {
3415
+ /**
3416
+ * Bad request
3417
+ */
3418
+ 400: BadRequestError;
3419
+ };
3420
+ export type ProviderOauthAuthorizeError = ProviderOauthAuthorizeErrors[keyof ProviderOauthAuthorizeErrors];
3421
+ export type ProviderOauthAuthorizeResponses = {
3422
+ /**
3423
+ * Authorization URL and method
3424
+ */
3425
+ 200: ProviderAuthAuthorization;
3426
+ };
3427
+ export type ProviderOauthAuthorizeResponse = ProviderOauthAuthorizeResponses[keyof ProviderOauthAuthorizeResponses];
3428
+ export type ProviderOauthCallbackData = {
3429
+ body?: {
3430
+ /**
3431
+ * Auth method index
3432
+ */
3433
+ method: number;
3434
+ /**
3435
+ * OAuth authorization code
3436
+ */
3437
+ code?: string;
3438
+ };
3439
+ path: {
3440
+ /**
3441
+ * Provider ID
3442
+ */
3443
+ providerID: string;
3444
+ };
3445
+ query?: {
3446
+ directory?: string;
3447
+ };
3448
+ url: "/provider/{providerID}/oauth/callback";
3449
+ };
3450
+ export type ProviderOauthCallbackErrors = {
3451
+ /**
3452
+ * Bad request
3453
+ */
3454
+ 400: BadRequestError;
3455
+ };
3456
+ export type ProviderOauthCallbackError = ProviderOauthCallbackErrors[keyof ProviderOauthCallbackErrors];
3457
+ export type ProviderOauthCallbackResponses = {
3458
+ /**
3459
+ * OAuth callback processed successfully
3460
+ */
3461
+ 200: boolean;
3462
+ };
3463
+ export type ProviderOauthCallbackResponse = ProviderOauthCallbackResponses[keyof ProviderOauthCallbackResponses];
3464
+ export type FindTextData = {
3465
+ body?: never;
3466
+ path?: never;
3467
+ query: {
3468
+ directory?: string;
3469
+ pattern: string;
3470
+ };
3471
+ url: "/find";
3472
+ };
3473
+ export type FindTextResponses = {
3474
+ /**
3475
+ * Matches
3476
+ */
3477
+ 200: Array<{
3478
+ path: {
3479
+ text: string;
3480
+ };
3481
+ lines: {
3482
+ text: string;
3483
+ };
3484
+ line_number: number;
3485
+ absolute_offset: number;
3486
+ submatches: Array<{
3487
+ match: {
3488
+ text: string;
3489
+ };
3490
+ start: number;
3491
+ end: number;
3492
+ }>;
3493
+ }>;
3494
+ };
3495
+ export type FindTextResponse = FindTextResponses[keyof FindTextResponses];
3496
+ export type FindFilesData = {
3497
+ body?: never;
3498
+ path?: never;
3499
+ query: {
3500
+ directory?: string;
3501
+ query: string;
3502
+ dirs?: "true" | "false";
3503
+ type?: "file" | "directory";
3504
+ limit?: number;
3505
+ };
3506
+ url: "/find/file";
3507
+ };
3508
+ export type FindFilesResponses = {
3509
+ /**
3510
+ * File paths
3511
+ */
3512
+ 200: Array<string>;
3513
+ };
3514
+ export type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses];
3515
+ export type FindSymbolsData = {
3516
+ body?: never;
3517
+ path?: never;
3518
+ query: {
3519
+ directory?: string;
3520
+ query: string;
3521
+ };
3522
+ url: "/find/symbol";
3523
+ };
3524
+ export type FindSymbolsResponses = {
3525
+ /**
3526
+ * Symbols
3527
+ */
3528
+ 200: Array<Symbol>;
3529
+ };
3530
+ export type FindSymbolsResponse = FindSymbolsResponses[keyof FindSymbolsResponses];
3531
+ export type FileListData = {
3532
+ body?: never;
3533
+ path?: never;
3534
+ query: {
3535
+ directory?: string;
3536
+ path: string;
3537
+ };
3538
+ url: "/file";
3539
+ };
3540
+ export type FileListResponses = {
3541
+ /**
3542
+ * Files and directories
3543
+ */
3544
+ 200: Array<FileNode>;
3545
+ };
3546
+ export type FileListResponse = FileListResponses[keyof FileListResponses];
3547
+ export type FileReadData = {
3548
+ body?: never;
3549
+ path?: never;
3550
+ query: {
3551
+ directory?: string;
3552
+ path: string;
3553
+ };
3554
+ url: "/file/content";
3555
+ };
3556
+ export type FileReadResponses = {
3557
+ /**
3558
+ * File content
3559
+ */
3560
+ 200: FileContent;
3561
+ };
3562
+ export type FileReadResponse = FileReadResponses[keyof FileReadResponses];
3563
+ export type FileStatusData = {
3564
+ body?: never;
3565
+ path?: never;
3566
+ query?: {
3567
+ directory?: string;
3568
+ };
3569
+ url: "/file/status";
3570
+ };
3571
+ export type FileStatusResponses = {
3572
+ /**
3573
+ * File status
3574
+ */
3575
+ 200: Array<File>;
3576
+ };
3577
+ export type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses];
3578
+ export type McpStatusData = {
3579
+ body?: never;
3580
+ path?: never;
3581
+ query?: {
3582
+ directory?: string;
3583
+ };
3584
+ url: "/mcp";
3585
+ };
3586
+ export type McpStatusResponses = {
3587
+ /**
3588
+ * MCP server status
3589
+ */
3590
+ 200: {
3591
+ [key: string]: McpStatus;
3592
+ };
3593
+ };
3594
+ export type McpStatusResponse = McpStatusResponses[keyof McpStatusResponses];
3595
+ export type McpAddData = {
3596
+ body?: {
3597
+ name: string;
3598
+ config: McpLocalConfig | McpRemoteConfig;
3599
+ };
3600
+ path?: never;
3601
+ query?: {
3602
+ directory?: string;
3603
+ };
3604
+ url: "/mcp";
3605
+ };
3606
+ export type McpAddErrors = {
3607
+ /**
3608
+ * Bad request
3609
+ */
3610
+ 400: BadRequestError;
3611
+ };
3612
+ export type McpAddError = McpAddErrors[keyof McpAddErrors];
3613
+ export type McpAddResponses = {
3614
+ /**
3615
+ * MCP server added successfully
3616
+ */
3617
+ 200: {
3618
+ [key: string]: McpStatus;
3619
+ };
3620
+ };
3621
+ export type McpAddResponse = McpAddResponses[keyof McpAddResponses];
3622
+ export type McpAuthRemoveData = {
3623
+ body?: never;
3624
+ path: {
3625
+ name: string;
3626
+ };
3627
+ query?: {
3628
+ directory?: string;
3629
+ };
3630
+ url: "/mcp/{name}/auth";
3631
+ };
3632
+ export type McpAuthRemoveErrors = {
3633
+ /**
3634
+ * Not found
3635
+ */
3636
+ 404: NotFoundError;
3637
+ };
3638
+ export type McpAuthRemoveError = McpAuthRemoveErrors[keyof McpAuthRemoveErrors];
3639
+ export type McpAuthRemoveResponses = {
3640
+ /**
3641
+ * OAuth credentials removed
3642
+ */
3643
+ 200: {
3644
+ success: true;
3645
+ };
3646
+ };
3647
+ export type McpAuthRemoveResponse = McpAuthRemoveResponses[keyof McpAuthRemoveResponses];
3648
+ export type McpAuthStartData = {
3649
+ body?: never;
3650
+ path: {
3651
+ name: string;
3652
+ };
3653
+ query?: {
3654
+ directory?: string;
3655
+ };
3656
+ url: "/mcp/{name}/auth";
3657
+ };
3658
+ export type McpAuthStartErrors = {
3659
+ /**
3660
+ * Bad request
3661
+ */
3662
+ 400: BadRequestError;
3663
+ /**
3664
+ * Not found
3665
+ */
3666
+ 404: NotFoundError;
3667
+ };
3668
+ export type McpAuthStartError = McpAuthStartErrors[keyof McpAuthStartErrors];
3669
+ export type McpAuthStartResponses = {
3670
+ /**
3671
+ * OAuth flow started
3672
+ */
3673
+ 200: {
3674
+ /**
3675
+ * URL to open in browser for authorization
3676
+ */
3677
+ authorizationUrl: string;
3678
+ };
3679
+ };
3680
+ export type McpAuthStartResponse = McpAuthStartResponses[keyof McpAuthStartResponses];
3681
+ export type McpAuthCallbackData = {
3682
+ body?: {
3683
+ /**
3684
+ * Authorization code from OAuth callback
3685
+ */
3686
+ code: string;
3687
+ };
3688
+ path: {
3689
+ name: string;
3690
+ };
3691
+ query?: {
3692
+ directory?: string;
3693
+ };
3694
+ url: "/mcp/{name}/auth/callback";
3695
+ };
3696
+ export type McpAuthCallbackErrors = {
3697
+ /**
3698
+ * Bad request
3699
+ */
3700
+ 400: BadRequestError;
3701
+ /**
3702
+ * Not found
3703
+ */
3704
+ 404: NotFoundError;
3705
+ };
3706
+ export type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors];
3707
+ export type McpAuthCallbackResponses = {
3708
+ /**
3709
+ * OAuth authentication completed
3710
+ */
3711
+ 200: McpStatus;
3712
+ };
3713
+ export type McpAuthCallbackResponse = McpAuthCallbackResponses[keyof McpAuthCallbackResponses];
3714
+ export type McpAuthAuthenticateData = {
3715
+ body?: never;
3716
+ path: {
3717
+ name: string;
3718
+ };
3719
+ query?: {
3720
+ directory?: string;
3721
+ };
3722
+ url: "/mcp/{name}/auth/authenticate";
3723
+ };
3724
+ export type McpAuthAuthenticateErrors = {
3725
+ /**
3726
+ * Bad request
3727
+ */
3728
+ 400: BadRequestError;
3729
+ /**
3730
+ * Not found
3731
+ */
3732
+ 404: NotFoundError;
3733
+ };
3734
+ export type McpAuthAuthenticateError = McpAuthAuthenticateErrors[keyof McpAuthAuthenticateErrors];
3735
+ export type McpAuthAuthenticateResponses = {
3736
+ /**
3737
+ * OAuth authentication completed
3738
+ */
3739
+ 200: McpStatus;
3740
+ };
3741
+ export type McpAuthAuthenticateResponse = McpAuthAuthenticateResponses[keyof McpAuthAuthenticateResponses];
3742
+ export type McpConnectData = {
3743
+ body?: never;
3744
+ path: {
3745
+ name: string;
3746
+ };
3747
+ query?: {
3748
+ directory?: string;
3749
+ };
3750
+ url: "/mcp/{name}/connect";
3751
+ };
3752
+ export type McpConnectResponses = {
3753
+ /**
3754
+ * MCP server connected successfully
3755
+ */
3756
+ 200: boolean;
3757
+ };
3758
+ export type McpConnectResponse = McpConnectResponses[keyof McpConnectResponses];
3759
+ export type McpDisconnectData = {
3760
+ body?: never;
3761
+ path: {
3762
+ name: string;
3763
+ };
3764
+ query?: {
3765
+ directory?: string;
3766
+ };
3767
+ url: "/mcp/{name}/disconnect";
3768
+ };
3769
+ export type McpDisconnectResponses = {
3770
+ /**
3771
+ * MCP server disconnected successfully
3772
+ */
3773
+ 200: boolean;
3774
+ };
3775
+ export type McpDisconnectResponse = McpDisconnectResponses[keyof McpDisconnectResponses];
3776
+ export type TuiAppendPromptData = {
3777
+ body?: {
3778
+ text: string;
3779
+ };
3780
+ path?: never;
3781
+ query?: {
3782
+ directory?: string;
3783
+ };
3784
+ url: "/tui/append-prompt";
3785
+ };
3786
+ export type TuiAppendPromptErrors = {
3787
+ /**
3788
+ * Bad request
3789
+ */
3790
+ 400: BadRequestError;
3791
+ };
3792
+ export type TuiAppendPromptError = TuiAppendPromptErrors[keyof TuiAppendPromptErrors];
3793
+ export type TuiAppendPromptResponses = {
3794
+ /**
3795
+ * Prompt processed successfully
3796
+ */
3797
+ 200: boolean;
3798
+ };
3799
+ export type TuiAppendPromptResponse = TuiAppendPromptResponses[keyof TuiAppendPromptResponses];
3800
+ export type TuiOpenHelpData = {
3801
+ body?: never;
3802
+ path?: never;
3803
+ query?: {
3804
+ directory?: string;
3805
+ };
3806
+ url: "/tui/open-help";
3807
+ };
3808
+ export type TuiOpenHelpResponses = {
3809
+ /**
3810
+ * Help dialog opened successfully
3811
+ */
3812
+ 200: boolean;
3813
+ };
3814
+ export type TuiOpenHelpResponse = TuiOpenHelpResponses[keyof TuiOpenHelpResponses];
3815
+ export type TuiOpenSessionsData = {
3816
+ body?: never;
3817
+ path?: never;
3818
+ query?: {
3819
+ directory?: string;
3820
+ };
3821
+ url: "/tui/open-sessions";
3822
+ };
3823
+ export type TuiOpenSessionsResponses = {
3824
+ /**
3825
+ * Session dialog opened successfully
3826
+ */
3827
+ 200: boolean;
3828
+ };
3829
+ export type TuiOpenSessionsResponse = TuiOpenSessionsResponses[keyof TuiOpenSessionsResponses];
3830
+ export type TuiOpenThemesData = {
3831
+ body?: never;
3832
+ path?: never;
3833
+ query?: {
3834
+ directory?: string;
3835
+ };
3836
+ url: "/tui/open-themes";
3837
+ };
3838
+ export type TuiOpenThemesResponses = {
3839
+ /**
3840
+ * Theme dialog opened successfully
3841
+ */
3842
+ 200: boolean;
3843
+ };
3844
+ export type TuiOpenThemesResponse = TuiOpenThemesResponses[keyof TuiOpenThemesResponses];
3845
+ export type TuiOpenModelsData = {
3846
+ body?: never;
3847
+ path?: never;
3848
+ query?: {
3849
+ directory?: string;
3850
+ };
3851
+ url: "/tui/open-models";
3852
+ };
3853
+ export type TuiOpenModelsResponses = {
3854
+ /**
3855
+ * Model dialog opened successfully
3856
+ */
3857
+ 200: boolean;
3858
+ };
3859
+ export type TuiOpenModelsResponse = TuiOpenModelsResponses[keyof TuiOpenModelsResponses];
3860
+ export type TuiSubmitPromptData = {
3861
+ body?: never;
3862
+ path?: never;
3863
+ query?: {
3864
+ directory?: string;
3865
+ };
3866
+ url: "/tui/submit-prompt";
3867
+ };
3868
+ export type TuiSubmitPromptResponses = {
3869
+ /**
3870
+ * Prompt submitted successfully
3871
+ */
3872
+ 200: boolean;
3873
+ };
3874
+ export type TuiSubmitPromptResponse = TuiSubmitPromptResponses[keyof TuiSubmitPromptResponses];
3875
+ export type TuiClearPromptData = {
3876
+ body?: never;
3877
+ path?: never;
3878
+ query?: {
3879
+ directory?: string;
3880
+ };
3881
+ url: "/tui/clear-prompt";
3882
+ };
3883
+ export type TuiClearPromptResponses = {
3884
+ /**
3885
+ * Prompt cleared successfully
3886
+ */
3887
+ 200: boolean;
3888
+ };
3889
+ export type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromptResponses];
3890
+ export type TuiExecuteCommandData = {
3891
+ body?: {
3892
+ command: string;
3893
+ };
3894
+ path?: never;
3895
+ query?: {
3896
+ directory?: string;
3897
+ };
3898
+ url: "/tui/execute-command";
3899
+ };
3900
+ export type TuiExecuteCommandErrors = {
3901
+ /**
3902
+ * Bad request
3903
+ */
3904
+ 400: BadRequestError;
3905
+ };
3906
+ export type TuiExecuteCommandError = TuiExecuteCommandErrors[keyof TuiExecuteCommandErrors];
3907
+ export type TuiExecuteCommandResponses = {
3908
+ /**
3909
+ * Command executed successfully
3910
+ */
3911
+ 200: boolean;
3912
+ };
3913
+ export type TuiExecuteCommandResponse = TuiExecuteCommandResponses[keyof TuiExecuteCommandResponses];
3914
+ export type TuiShowToastData = {
3915
+ body?: {
3916
+ title?: string;
3917
+ message: string;
3918
+ variant: "info" | "success" | "warning" | "error";
3919
+ /**
3920
+ * Duration in milliseconds
3921
+ */
3922
+ duration?: number;
3923
+ };
3924
+ path?: never;
3925
+ query?: {
3926
+ directory?: string;
3927
+ };
3928
+ url: "/tui/show-toast";
3929
+ };
3930
+ export type TuiShowToastResponses = {
3931
+ /**
3932
+ * Toast notification shown successfully
3933
+ */
3934
+ 200: boolean;
3935
+ };
3936
+ export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses];
3937
+ export type TuiPublishData = {
3938
+ body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect;
3939
+ path?: never;
3940
+ query?: {
3941
+ directory?: string;
3942
+ };
3943
+ url: "/tui/publish";
3944
+ };
3945
+ export type TuiPublishErrors = {
3946
+ /**
3947
+ * Bad request
3948
+ */
3949
+ 400: BadRequestError;
3950
+ };
3951
+ export type TuiPublishError = TuiPublishErrors[keyof TuiPublishErrors];
3952
+ export type TuiPublishResponses = {
3953
+ /**
3954
+ * Event published successfully
3955
+ */
3956
+ 200: boolean;
3957
+ };
3958
+ export type TuiPublishResponse = TuiPublishResponses[keyof TuiPublishResponses];
3959
+ export type TuiSelectSessionData = {
3960
+ body?: {
3961
+ /**
3962
+ * Session ID to navigate to
3963
+ */
3964
+ sessionID: string;
3965
+ };
3966
+ path?: never;
3967
+ query?: {
3968
+ directory?: string;
3969
+ };
3970
+ url: "/tui/select-session";
3971
+ };
3972
+ export type TuiSelectSessionErrors = {
3973
+ /**
3974
+ * Bad request
3975
+ */
3976
+ 400: BadRequestError;
3977
+ /**
3978
+ * Not found
3979
+ */
3980
+ 404: NotFoundError;
3981
+ };
3982
+ export type TuiSelectSessionError = TuiSelectSessionErrors[keyof TuiSelectSessionErrors];
3983
+ export type TuiSelectSessionResponses = {
3984
+ /**
3985
+ * Session selected successfully
3986
+ */
3987
+ 200: boolean;
3988
+ };
3989
+ export type TuiSelectSessionResponse = TuiSelectSessionResponses[keyof TuiSelectSessionResponses];
3990
+ export type TuiControlNextData = {
3991
+ body?: never;
3992
+ path?: never;
3993
+ query?: {
3994
+ directory?: string;
3995
+ };
3996
+ url: "/tui/control/next";
3997
+ };
3998
+ export type TuiControlNextResponses = {
3999
+ /**
4000
+ * Next TUI request
4001
+ */
4002
+ 200: {
4003
+ path: string;
4004
+ body: unknown;
4005
+ };
4006
+ };
4007
+ export type TuiControlNextResponse = TuiControlNextResponses[keyof TuiControlNextResponses];
4008
+ export type TuiControlResponseData = {
4009
+ body?: unknown;
4010
+ path?: never;
4011
+ query?: {
4012
+ directory?: string;
4013
+ };
4014
+ url: "/tui/control/response";
4015
+ };
4016
+ export type TuiControlResponseResponses = {
4017
+ /**
4018
+ * Response submitted successfully
4019
+ */
4020
+ 200: boolean;
4021
+ };
4022
+ export type TuiControlResponseResponse = TuiControlResponseResponses[keyof TuiControlResponseResponses];
4023
+ export type InstanceDisposeData = {
4024
+ body?: never;
4025
+ path?: never;
4026
+ query?: {
4027
+ directory?: string;
4028
+ };
4029
+ url: "/instance/dispose";
4030
+ };
4031
+ export type InstanceDisposeResponses = {
4032
+ /**
4033
+ * Instance disposed
4034
+ */
4035
+ 200: boolean;
4036
+ };
4037
+ export type InstanceDisposeResponse = InstanceDisposeResponses[keyof InstanceDisposeResponses];
4038
+ export type PathGetData = {
4039
+ body?: never;
4040
+ path?: never;
4041
+ query?: {
4042
+ directory?: string;
4043
+ };
4044
+ url: "/path";
4045
+ };
4046
+ export type PathGetResponses = {
4047
+ /**
4048
+ * Path
4049
+ */
4050
+ 200: Path;
4051
+ };
4052
+ export type PathGetResponse = PathGetResponses[keyof PathGetResponses];
4053
+ export type VcsGetData = {
4054
+ body?: never;
4055
+ path?: never;
4056
+ query?: {
4057
+ directory?: string;
4058
+ };
4059
+ url: "/vcs";
4060
+ };
4061
+ export type VcsGetResponses = {
4062
+ /**
4063
+ * VCS info
4064
+ */
4065
+ 200: VcsInfo;
4066
+ };
4067
+ export type VcsGetResponse = VcsGetResponses[keyof VcsGetResponses];
4068
+ export type CommandListData = {
4069
+ body?: never;
4070
+ path?: never;
4071
+ query?: {
4072
+ directory?: string;
4073
+ };
4074
+ url: "/command";
4075
+ };
4076
+ export type CommandListResponses = {
4077
+ /**
4078
+ * List of commands
4079
+ */
4080
+ 200: Array<Command>;
4081
+ };
4082
+ export type CommandListResponse = CommandListResponses[keyof CommandListResponses];
4083
+ export type AppLogData = {
4084
+ body?: {
4085
+ /**
4086
+ * Service name for the log entry
4087
+ */
4088
+ service: string;
4089
+ /**
4090
+ * Log level
4091
+ */
4092
+ level: "debug" | "info" | "error" | "warn";
4093
+ /**
4094
+ * Log message
4095
+ */
4096
+ message: string;
4097
+ /**
4098
+ * Additional metadata for the log entry
4099
+ */
4100
+ extra?: {
4101
+ [key: string]: unknown;
4102
+ };
4103
+ };
4104
+ path?: never;
4105
+ query?: {
4106
+ directory?: string;
4107
+ };
4108
+ url: "/log";
4109
+ };
4110
+ export type AppLogErrors = {
4111
+ /**
4112
+ * Bad request
4113
+ */
4114
+ 400: BadRequestError;
4115
+ };
4116
+ export type AppLogError = AppLogErrors[keyof AppLogErrors];
4117
+ export type AppLogResponses = {
4118
+ /**
4119
+ * Log entry written successfully
4120
+ */
4121
+ 200: boolean;
4122
+ };
4123
+ export type AppLogResponse = AppLogResponses[keyof AppLogResponses];
4124
+ export type AppAgentsData = {
4125
+ body?: never;
4126
+ path?: never;
4127
+ query?: {
4128
+ directory?: string;
4129
+ };
4130
+ url: "/agent";
4131
+ };
4132
+ export type AppAgentsResponses = {
4133
+ /**
4134
+ * List of agents
4135
+ */
4136
+ 200: Array<Agent>;
4137
+ };
4138
+ export type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses];
4139
+ export type AppSkillsData = {
4140
+ body?: never;
4141
+ path?: never;
4142
+ query?: {
4143
+ directory?: string;
4144
+ };
4145
+ url: "/skill";
4146
+ };
4147
+ export type AppSkillsResponses = {
4148
+ /**
4149
+ * List of skills
4150
+ */
4151
+ 200: Array<{
4152
+ name: string;
4153
+ description: string;
4154
+ location: string;
4155
+ }>;
4156
+ };
4157
+ export type AppSkillsResponse = AppSkillsResponses[keyof AppSkillsResponses];
4158
+ export type LspStatusData = {
4159
+ body?: never;
4160
+ path?: never;
4161
+ query?: {
4162
+ directory?: string;
4163
+ };
4164
+ url: "/lsp";
4165
+ };
4166
+ export type LspStatusResponses = {
4167
+ /**
4168
+ * LSP server status
4169
+ */
4170
+ 200: Array<LspStatus>;
4171
+ };
4172
+ export type LspStatusResponse = LspStatusResponses[keyof LspStatusResponses];
4173
+ export type FormatterStatusData = {
4174
+ body?: never;
4175
+ path?: never;
4176
+ query?: {
4177
+ directory?: string;
4178
+ };
4179
+ url: "/formatter";
4180
+ };
4181
+ export type FormatterStatusResponses = {
4182
+ /**
4183
+ * Formatter status
4184
+ */
4185
+ 200: Array<FormatterStatus>;
4186
+ };
4187
+ export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses];
4188
+ export type AuthSetData = {
4189
+ body?: Auth;
4190
+ path: {
4191
+ providerID: string;
4192
+ };
4193
+ query?: {
4194
+ directory?: string;
4195
+ };
4196
+ url: "/auth/{providerID}";
4197
+ };
4198
+ export type AuthSetErrors = {
4199
+ /**
4200
+ * Bad request
4201
+ */
4202
+ 400: BadRequestError;
4203
+ };
4204
+ export type AuthSetError = AuthSetErrors[keyof AuthSetErrors];
4205
+ export type AuthSetResponses = {
4206
+ /**
4207
+ * Successfully set authentication credentials
4208
+ */
4209
+ 200: boolean;
4210
+ };
4211
+ export type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses];
4212
+ export type EventSubscribeData = {
4213
+ body?: never;
4214
+ path?: never;
4215
+ query?: {
4216
+ directory?: string;
4217
+ };
4218
+ url: "/event";
4219
+ };
4220
+ export type EventSubscribeResponses = {
4221
+ /**
4222
+ * Event stream
4223
+ */
4224
+ 200: Event;
4225
+ };
4226
+ export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];