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