@kilocode/sdk 1.0.0

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