@ericsanchezok/synergy-sdk 0.0.0-dev-202601171118

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