@xutest1/sdk 0.1.7 → 0.2.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.
@@ -0,0 +1,2868 @@
1
+ export type Project = {
2
+ id: string;
3
+ worktree: string;
4
+ vcs?: "git";
5
+ time: {
6
+ created: number;
7
+ initialized?: number;
8
+ };
9
+ };
10
+ /**
11
+ * Custom keybind configurations
12
+ */
13
+ export type KeybindsConfig = {
14
+ /**
15
+ * Leader key for keybind combinations
16
+ */
17
+ leader?: string;
18
+ /**
19
+ * Show help dialog
20
+ */
21
+ app_help?: string;
22
+ /**
23
+ * Exit the application
24
+ */
25
+ app_exit?: string;
26
+ /**
27
+ * Open external editor
28
+ */
29
+ editor_open?: string;
30
+ /**
31
+ * List available themes
32
+ */
33
+ theme_list?: string;
34
+ /**
35
+ * Create/update AGENTS.md
36
+ */
37
+ project_init?: string;
38
+ /**
39
+ * Toggle tool details
40
+ */
41
+ tool_details?: string;
42
+ /**
43
+ * Toggle thinking blocks
44
+ */
45
+ thinking_blocks?: string;
46
+ /**
47
+ * Export session to editor
48
+ */
49
+ session_export?: string;
50
+ /**
51
+ * Create a new session
52
+ */
53
+ session_new?: string;
54
+ /**
55
+ * List all sessions
56
+ */
57
+ session_list?: string;
58
+ /**
59
+ * Show session timeline
60
+ */
61
+ session_timeline?: string;
62
+ /**
63
+ * Share current session
64
+ */
65
+ session_share?: string;
66
+ /**
67
+ * Unshare current session
68
+ */
69
+ session_unshare?: string;
70
+ /**
71
+ * Interrupt current session
72
+ */
73
+ session_interrupt?: string;
74
+ /**
75
+ * Compact the session
76
+ */
77
+ session_compact?: string;
78
+ /**
79
+ * Cycle to next child session
80
+ */
81
+ session_child_cycle?: string;
82
+ /**
83
+ * Cycle to previous child session
84
+ */
85
+ session_child_cycle_reverse?: string;
86
+ /**
87
+ * Scroll messages up by one page
88
+ */
89
+ messages_page_up?: string;
90
+ /**
91
+ * Scroll messages down by one page
92
+ */
93
+ messages_page_down?: string;
94
+ /**
95
+ * Scroll messages up by half page
96
+ */
97
+ messages_half_page_up?: string;
98
+ /**
99
+ * Scroll messages down by half page
100
+ */
101
+ messages_half_page_down?: string;
102
+ /**
103
+ * Navigate to first message
104
+ */
105
+ messages_first?: string;
106
+ /**
107
+ * Navigate to last message
108
+ */
109
+ messages_last?: string;
110
+ /**
111
+ * Copy message
112
+ */
113
+ messages_copy?: string;
114
+ /**
115
+ * Undo message
116
+ */
117
+ messages_undo?: string;
118
+ /**
119
+ * Redo message
120
+ */
121
+ messages_redo?: string;
122
+ /**
123
+ * List available models
124
+ */
125
+ model_list?: string;
126
+ /**
127
+ * Next recent model
128
+ */
129
+ model_cycle_recent?: string;
130
+ /**
131
+ * Previous recent model
132
+ */
133
+ model_cycle_recent_reverse?: string;
134
+ /**
135
+ * List agents
136
+ */
137
+ agent_list?: string;
138
+ /**
139
+ * Next agent
140
+ */
141
+ agent_cycle?: string;
142
+ /**
143
+ * Previous agent
144
+ */
145
+ agent_cycle_reverse?: string;
146
+ /**
147
+ * Clear input field
148
+ */
149
+ input_clear?: string;
150
+ /**
151
+ * Paste from clipboard
152
+ */
153
+ input_paste?: string;
154
+ /**
155
+ * Submit input
156
+ */
157
+ input_submit?: string;
158
+ /**
159
+ * Insert newline in input
160
+ */
161
+ input_newline?: string;
162
+ /**
163
+ * @deprecated use agent_cycle. Next mode
164
+ */
165
+ switch_mode?: string;
166
+ /**
167
+ * @deprecated use agent_cycle_reverse. Previous mode
168
+ */
169
+ switch_mode_reverse?: string;
170
+ /**
171
+ * @deprecated use agent_cycle. Next agent
172
+ */
173
+ switch_agent?: string;
174
+ /**
175
+ * @deprecated use agent_cycle_reverse. Previous agent
176
+ */
177
+ switch_agent_reverse?: string;
178
+ /**
179
+ * @deprecated Currently not available. List files
180
+ */
181
+ file_list?: string;
182
+ /**
183
+ * @deprecated Close file
184
+ */
185
+ file_close?: string;
186
+ /**
187
+ * @deprecated Search file
188
+ */
189
+ file_search?: string;
190
+ /**
191
+ * @deprecated Split/unified diff
192
+ */
193
+ file_diff_toggle?: string;
194
+ /**
195
+ * @deprecated Navigate to previous message
196
+ */
197
+ messages_previous?: string;
198
+ /**
199
+ * @deprecated Navigate to next message
200
+ */
201
+ messages_next?: string;
202
+ /**
203
+ * @deprecated Toggle layout
204
+ */
205
+ messages_layout_toggle?: string;
206
+ /**
207
+ * @deprecated use messages_undo. Revert message
208
+ */
209
+ messages_revert?: string;
210
+ };
211
+ export type AgentConfig = {
212
+ model?: string;
213
+ temperature?: number;
214
+ top_p?: number;
215
+ prompt?: string;
216
+ tools?: {
217
+ [key: string]: boolean;
218
+ };
219
+ disable?: boolean;
220
+ /**
221
+ * Description of when to use the agent
222
+ */
223
+ description?: string;
224
+ mode?: "subagent" | "primary" | "all";
225
+ permission?: {
226
+ edit?: "ask" | "allow" | "deny";
227
+ bash?: ("ask" | "allow" | "deny") | {
228
+ [key: string]: "ask" | "allow" | "deny";
229
+ };
230
+ webfetch?: "ask" | "allow" | "deny";
231
+ };
232
+ [key: string]: unknown | string | number | {
233
+ [key: string]: boolean;
234
+ } | boolean | ("subagent" | "primary" | "all") | {
235
+ edit?: "ask" | "allow" | "deny";
236
+ bash?: ("ask" | "allow" | "deny") | {
237
+ [key: string]: "ask" | "allow" | "deny";
238
+ };
239
+ webfetch?: "ask" | "allow" | "deny";
240
+ } | undefined;
241
+ };
242
+ export type McpLocalConfig = {
243
+ /**
244
+ * Type of MCP server connection
245
+ */
246
+ type: "local";
247
+ /**
248
+ * Command and arguments to run the MCP server
249
+ */
250
+ command: Array<string>;
251
+ /**
252
+ * Environment variables to set when running the MCP server
253
+ */
254
+ environment?: {
255
+ [key: string]: string;
256
+ };
257
+ /**
258
+ * Enable or disable the MCP server on startup
259
+ */
260
+ enabled?: boolean;
261
+ };
262
+ export type McpRemoteConfig = {
263
+ /**
264
+ * Type of MCP server connection
265
+ */
266
+ type: "remote";
267
+ /**
268
+ * URL of the remote MCP server
269
+ */
270
+ url: string;
271
+ /**
272
+ * Enable or disable the MCP server on startup
273
+ */
274
+ enabled?: boolean;
275
+ /**
276
+ * Headers to send with the request
277
+ */
278
+ headers?: {
279
+ [key: string]: string;
280
+ };
281
+ };
282
+ /**
283
+ * @deprecated Always uses stretch layout.
284
+ */
285
+ export type LayoutConfig = "auto" | "stretch";
286
+ export type Config = {
287
+ /**
288
+ * JSON schema reference for configuration validation
289
+ */
290
+ $schema?: string;
291
+ /**
292
+ * Theme name to use for the interface
293
+ */
294
+ theme?: string;
295
+ keybinds?: KeybindsConfig;
296
+ /**
297
+ * TUI specific settings
298
+ */
299
+ tui?: {
300
+ /**
301
+ * TUI scroll speed
302
+ */
303
+ scroll_speed?: number;
304
+ };
305
+ /**
306
+ * Command configuration, see https://opencode.ai/docs/commands
307
+ */
308
+ command?: {
309
+ [key: string]: {
310
+ template: string;
311
+ description?: string;
312
+ agent?: string;
313
+ model?: string;
314
+ subtask?: boolean;
315
+ };
316
+ };
317
+ watcher?: {
318
+ ignore?: Array<string>;
319
+ };
320
+ plugin?: Array<string>;
321
+ snapshot?: boolean;
322
+ /**
323
+ * Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing
324
+ */
325
+ share?: "manual" | "auto" | "disabled";
326
+ /**
327
+ * @deprecated Use 'share' field instead. Share newly created sessions automatically
328
+ */
329
+ autoshare?: boolean;
330
+ /**
331
+ * Automatically update to the latest version
332
+ */
333
+ autoupdate?: boolean;
334
+ /**
335
+ * Custom update server URL for checking and downloading updates
336
+ */
337
+ updateServer?: string;
338
+ /**
339
+ * Disable providers that are loaded automatically
340
+ */
341
+ disabled_providers?: Array<string>;
342
+ /**
343
+ * Model to use in the format of provider/model, eg anthropic/claude-2
344
+ */
345
+ model?: string;
346
+ /**
347
+ * Small model to use for tasks like title generation in the format of provider/model
348
+ */
349
+ small_model?: string;
350
+ /**
351
+ * Custom username to display in conversations instead of system username
352
+ */
353
+ username?: string;
354
+ /**
355
+ * @deprecated Use `agent` field instead.
356
+ */
357
+ mode?: {
358
+ build?: AgentConfig;
359
+ plan?: AgentConfig;
360
+ [key: string]: AgentConfig | undefined;
361
+ };
362
+ /**
363
+ * Agent configuration, see https://opencode.ai/docs/agent
364
+ */
365
+ agent?: {
366
+ plan?: AgentConfig;
367
+ build?: AgentConfig;
368
+ general?: AgentConfig;
369
+ [key: string]: AgentConfig | undefined;
370
+ };
371
+ /**
372
+ * Custom provider configurations and model overrides
373
+ */
374
+ provider?: {
375
+ [key: string]: {
376
+ api?: string;
377
+ name?: string;
378
+ env?: Array<string>;
379
+ id?: string;
380
+ npm?: string;
381
+ models?: {
382
+ [key: string]: {
383
+ id?: string;
384
+ name?: string;
385
+ release_date?: string;
386
+ attachment?: boolean;
387
+ reasoning?: boolean;
388
+ temperature?: boolean;
389
+ tool_call?: boolean;
390
+ cost?: {
391
+ input: number;
392
+ output: number;
393
+ cache_read?: number;
394
+ cache_write?: number;
395
+ };
396
+ limit?: {
397
+ context: number;
398
+ output: number;
399
+ };
400
+ modalities?: {
401
+ input: Array<"text" | "audio" | "image" | "video" | "pdf">;
402
+ output: Array<"text" | "audio" | "image" | "video" | "pdf">;
403
+ };
404
+ experimental?: boolean;
405
+ status?: "alpha" | "beta";
406
+ options?: {
407
+ [key: string]: unknown;
408
+ };
409
+ provider?: {
410
+ npm: string;
411
+ };
412
+ };
413
+ };
414
+ options?: {
415
+ apiKey?: string;
416
+ baseURL?: string;
417
+ /**
418
+ * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
419
+ */
420
+ timeout?: number | false;
421
+ [key: string]: unknown | string | (number | false) | undefined;
422
+ };
423
+ };
424
+ };
425
+ /**
426
+ * MCP (Model Context Protocol) server configurations
427
+ */
428
+ mcp?: {
429
+ [key: string]: McpLocalConfig | McpRemoteConfig;
430
+ };
431
+ formatter?: {
432
+ [key: string]: {
433
+ disabled?: boolean;
434
+ command?: Array<string>;
435
+ environment?: {
436
+ [key: string]: string;
437
+ };
438
+ extensions?: Array<string>;
439
+ };
440
+ };
441
+ lsp?: {
442
+ [key: string]: {
443
+ disabled: true;
444
+ } | {
445
+ command: Array<string>;
446
+ extensions?: Array<string>;
447
+ disabled?: boolean;
448
+ env?: {
449
+ [key: string]: string;
450
+ };
451
+ initialization?: {
452
+ [key: string]: unknown;
453
+ };
454
+ };
455
+ };
456
+ /**
457
+ * Additional instruction files or patterns to include
458
+ */
459
+ instructions?: Array<string>;
460
+ layout?: LayoutConfig;
461
+ permission?: {
462
+ edit?: "ask" | "allow" | "deny";
463
+ bash?: ("ask" | "allow" | "deny") | {
464
+ [key: string]: "ask" | "allow" | "deny";
465
+ };
466
+ webfetch?: "ask" | "allow" | "deny";
467
+ };
468
+ tools?: {
469
+ [key: string]: boolean;
470
+ };
471
+ experimental?: {
472
+ hook?: {
473
+ file_edited?: {
474
+ [key: string]: Array<{
475
+ command: Array<string>;
476
+ environment?: {
477
+ [key: string]: string;
478
+ };
479
+ }>;
480
+ };
481
+ session_completed?: Array<{
482
+ command: Array<string>;
483
+ environment?: {
484
+ [key: string]: string;
485
+ };
486
+ }>;
487
+ };
488
+ /**
489
+ * Number of retries for chat completions on failure
490
+ */
491
+ chatMaxRetries?: number;
492
+ disable_paste_summary?: boolean;
493
+ };
494
+ /**
495
+ * Enable data science mode for Jupyter notebook support
496
+ */
497
+ dataScienceMode?: boolean;
498
+ /**
499
+ * Enable spec trajectory evaluation mode for improving specs based on execution feedback
500
+ */
501
+ specTrajectoryMode?: boolean;
502
+ /**
503
+ * List of enabled MCP server IDs
504
+ */
505
+ enabledMcps?: Array<string>;
506
+ /**
507
+ * Whether the selected model is a public model
508
+ */
509
+ public?: boolean;
510
+ };
511
+ export type BadRequestError = {
512
+ data: unknown | null;
513
+ errors: Array<{
514
+ [key: string]: unknown;
515
+ }>;
516
+ success: false;
517
+ };
518
+ export type ToolIds = Array<string>;
519
+ export type ToolListItem = {
520
+ id: string;
521
+ description: string;
522
+ parameters: unknown;
523
+ };
524
+ export type ToolList = Array<ToolListItem>;
525
+ export type Path = {
526
+ state: string;
527
+ config: string;
528
+ worktree: string;
529
+ directory: string;
530
+ };
531
+ export type FileDiff = {
532
+ file: string;
533
+ before: string;
534
+ after: string;
535
+ additions: number;
536
+ deletions: number;
537
+ };
538
+ export type Session = {
539
+ id: string;
540
+ projectID: string;
541
+ directory: string;
542
+ parentID?: string;
543
+ userContext?: string;
544
+ summary?: {
545
+ diffs: Array<FileDiff>;
546
+ };
547
+ share?: {
548
+ url: string;
549
+ };
550
+ title: string;
551
+ version: string;
552
+ time: {
553
+ created: number;
554
+ updated: number;
555
+ compacting?: number;
556
+ };
557
+ revert?: {
558
+ messageID: string;
559
+ partID?: string;
560
+ snapshot?: string;
561
+ diff?: string;
562
+ };
563
+ };
564
+ export type NotFoundError = {
565
+ name: "NotFoundError";
566
+ data: {
567
+ message: string;
568
+ };
569
+ };
570
+ export type Todo = {
571
+ /**
572
+ * Brief description of the task
573
+ */
574
+ content: string;
575
+ /**
576
+ * Current status of the task: pending, in_progress, completed, cancelled
577
+ */
578
+ status: string;
579
+ /**
580
+ * Priority level of the task: high, medium, low
581
+ */
582
+ priority: string;
583
+ /**
584
+ * Unique identifier for the todo item
585
+ */
586
+ id: string;
587
+ };
588
+ export type UserMessage = {
589
+ id: string;
590
+ sessionID: string;
591
+ role: "user";
592
+ time: {
593
+ created: number;
594
+ };
595
+ summary?: {
596
+ title?: string;
597
+ body?: string;
598
+ diffs: Array<FileDiff>;
599
+ };
600
+ };
601
+ export type ProviderAuthError = {
602
+ name: "ProviderAuthError";
603
+ data: {
604
+ providerID: string;
605
+ message: string;
606
+ };
607
+ };
608
+ export type UnknownError = {
609
+ name: "UnknownError";
610
+ data: {
611
+ message: string;
612
+ };
613
+ };
614
+ export type MessageOutputLengthError = {
615
+ name: "MessageOutputLengthError";
616
+ data: {
617
+ [key: string]: unknown;
618
+ };
619
+ };
620
+ export type MessageAbortedError = {
621
+ name: "MessageAbortedError";
622
+ data: {
623
+ message: string;
624
+ };
625
+ };
626
+ export type ApiError = {
627
+ name: "APIError";
628
+ data: {
629
+ message: string;
630
+ statusCode?: number;
631
+ isRetryable: boolean;
632
+ responseHeaders?: {
633
+ [key: string]: string;
634
+ };
635
+ responseBody?: string;
636
+ };
637
+ };
638
+ export type AssistantMessage = {
639
+ id: string;
640
+ sessionID: string;
641
+ role: "assistant";
642
+ time: {
643
+ created: number;
644
+ completed?: number;
645
+ };
646
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
647
+ system: Array<string>;
648
+ parentID: string;
649
+ modelID: string;
650
+ providerID: string;
651
+ mode: string;
652
+ path: {
653
+ cwd: string;
654
+ root: string;
655
+ };
656
+ summary?: boolean;
657
+ cost: number;
658
+ tokens: {
659
+ input: number;
660
+ output: number;
661
+ reasoning: number;
662
+ cache: {
663
+ read: number;
664
+ write: number;
665
+ };
666
+ };
667
+ };
668
+ export type Message = UserMessage | AssistantMessage;
669
+ export type TextPart = {
670
+ id: string;
671
+ sessionID: string;
672
+ messageID: string;
673
+ type: "text";
674
+ text: string;
675
+ synthetic?: boolean;
676
+ time?: {
677
+ start: number;
678
+ end?: number;
679
+ };
680
+ metadata?: {
681
+ [key: string]: unknown;
682
+ };
683
+ };
684
+ export type ReasoningPart = {
685
+ id: string;
686
+ sessionID: string;
687
+ messageID: string;
688
+ type: "reasoning";
689
+ text: string;
690
+ metadata?: {
691
+ [key: string]: unknown;
692
+ };
693
+ time: {
694
+ start: number;
695
+ end?: number;
696
+ };
697
+ };
698
+ export type FilePartSourceText = {
699
+ value: string;
700
+ start: number;
701
+ end: number;
702
+ };
703
+ export type FileSource = {
704
+ text: FilePartSourceText;
705
+ type: "file";
706
+ path: string;
707
+ };
708
+ export type Range = {
709
+ start: {
710
+ line: number;
711
+ character: number;
712
+ };
713
+ end: {
714
+ line: number;
715
+ character: number;
716
+ };
717
+ };
718
+ export type SymbolSource = {
719
+ text: FilePartSourceText;
720
+ type: "symbol";
721
+ path: string;
722
+ range: Range;
723
+ name: string;
724
+ kind: number;
725
+ };
726
+ export type FilePartSource = FileSource | SymbolSource;
727
+ export type FilePart = {
728
+ id: string;
729
+ sessionID: string;
730
+ messageID: string;
731
+ type: "file";
732
+ mime: string;
733
+ filename?: string;
734
+ url: string;
735
+ source?: FilePartSource;
736
+ };
737
+ export type ToolStatePending = {
738
+ status: "pending";
739
+ };
740
+ export type ToolStateRunning = {
741
+ status: "running";
742
+ input: unknown;
743
+ title?: string;
744
+ metadata?: {
745
+ [key: string]: unknown;
746
+ };
747
+ time: {
748
+ start: number;
749
+ };
750
+ };
751
+ export type ToolStateCompleted = {
752
+ status: "completed";
753
+ input: {
754
+ [key: string]: unknown;
755
+ };
756
+ output: string;
757
+ title: string;
758
+ metadata: {
759
+ [key: string]: unknown;
760
+ };
761
+ time: {
762
+ start: number;
763
+ end: number;
764
+ compacted?: number;
765
+ };
766
+ attachments?: Array<FilePart>;
767
+ };
768
+ export type ToolStateError = {
769
+ status: "error";
770
+ input: {
771
+ [key: string]: unknown;
772
+ };
773
+ error: string;
774
+ metadata?: {
775
+ [key: string]: unknown;
776
+ };
777
+ time: {
778
+ start: number;
779
+ end: number;
780
+ };
781
+ };
782
+ export type ToolState = ToolStatePending | ToolStateRunning | ToolStateCompleted | ToolStateError;
783
+ export type ToolPart = {
784
+ id: string;
785
+ sessionID: string;
786
+ messageID: string;
787
+ type: "tool";
788
+ callID: string;
789
+ tool: string;
790
+ state: ToolState;
791
+ metadata?: {
792
+ [key: string]: unknown;
793
+ };
794
+ };
795
+ export type StepStartPart = {
796
+ id: string;
797
+ sessionID: string;
798
+ messageID: string;
799
+ type: "step-start";
800
+ snapshot?: string;
801
+ };
802
+ export type StepFinishPart = {
803
+ id: string;
804
+ sessionID: string;
805
+ messageID: string;
806
+ type: "step-finish";
807
+ reason: string;
808
+ snapshot?: string;
809
+ cost: number;
810
+ tokens: {
811
+ input: number;
812
+ output: number;
813
+ reasoning: number;
814
+ cache: {
815
+ read: number;
816
+ write: number;
817
+ };
818
+ };
819
+ };
820
+ export type SnapshotPart = {
821
+ id: string;
822
+ sessionID: string;
823
+ messageID: string;
824
+ type: "snapshot";
825
+ snapshot: string;
826
+ };
827
+ export type PatchPart = {
828
+ id: string;
829
+ sessionID: string;
830
+ messageID: string;
831
+ type: "patch";
832
+ hash: string;
833
+ files: Array<string>;
834
+ };
835
+ export type AgentPart = {
836
+ id: string;
837
+ sessionID: string;
838
+ messageID: string;
839
+ type: "agent";
840
+ name: string;
841
+ source?: {
842
+ value: string;
843
+ start: number;
844
+ end: number;
845
+ };
846
+ };
847
+ export type RetryPart = {
848
+ id: string;
849
+ sessionID: string;
850
+ messageID: string;
851
+ type: "retry";
852
+ attempt: number;
853
+ error: ApiError;
854
+ time: {
855
+ created: number;
856
+ };
857
+ };
858
+ export type Part = TextPart | ReasoningPart | FilePart | ToolPart | StepStartPart | StepFinishPart | SnapshotPart | PatchPart | AgentPart | RetryPart;
859
+ export type TextPartInput = {
860
+ id?: string;
861
+ type: "text";
862
+ text: string;
863
+ synthetic?: boolean;
864
+ time?: {
865
+ start: number;
866
+ end?: number;
867
+ };
868
+ metadata?: {
869
+ [key: string]: unknown;
870
+ };
871
+ };
872
+ export type FilePartInput = {
873
+ id?: string;
874
+ type: "file";
875
+ mime: string;
876
+ filename?: string;
877
+ url: string;
878
+ source?: FilePartSource;
879
+ };
880
+ export type AgentPartInput = {
881
+ id?: string;
882
+ type: "agent";
883
+ name: string;
884
+ source?: {
885
+ value: string;
886
+ start: number;
887
+ end: number;
888
+ };
889
+ };
890
+ export type Command = {
891
+ name: string;
892
+ description?: string;
893
+ agent?: string;
894
+ model?: string;
895
+ template: string;
896
+ subtask?: boolean;
897
+ };
898
+ export type Model = {
899
+ id: string;
900
+ name: string;
901
+ release_date: string;
902
+ attachment: boolean;
903
+ reasoning: boolean;
904
+ temperature: boolean;
905
+ tool_call: boolean;
906
+ cost: {
907
+ input: number;
908
+ output: number;
909
+ cache_read?: number;
910
+ cache_write?: number;
911
+ };
912
+ limit: {
913
+ context: number;
914
+ output: number;
915
+ };
916
+ modalities?: {
917
+ input: Array<"text" | "audio" | "image" | "video" | "pdf">;
918
+ output: Array<"text" | "audio" | "image" | "video" | "pdf">;
919
+ };
920
+ experimental?: boolean;
921
+ status?: "alpha" | "beta";
922
+ options: {
923
+ [key: string]: unknown;
924
+ };
925
+ provider?: {
926
+ npm: string;
927
+ };
928
+ };
929
+ export type Provider = {
930
+ api?: string;
931
+ name: string;
932
+ env: Array<string>;
933
+ id: string;
934
+ npm?: string;
935
+ models: {
936
+ [key: string]: Model;
937
+ };
938
+ };
939
+ export type Symbol = {
940
+ name: string;
941
+ kind: number;
942
+ location: {
943
+ uri: string;
944
+ range: Range;
945
+ };
946
+ };
947
+ export type FileNode = {
948
+ name: string;
949
+ path: string;
950
+ absolute: string;
951
+ type: "file" | "directory";
952
+ ignored: boolean;
953
+ };
954
+ export type FileContent = {
955
+ type: "text";
956
+ content: string;
957
+ diff?: string;
958
+ patch?: {
959
+ oldFileName: string;
960
+ newFileName: string;
961
+ oldHeader?: string;
962
+ newHeader?: string;
963
+ hunks: Array<{
964
+ oldStart: number;
965
+ oldLines: number;
966
+ newStart: number;
967
+ newLines: number;
968
+ lines: Array<string>;
969
+ }>;
970
+ index?: string;
971
+ };
972
+ encoding?: "base64";
973
+ mimeType?: string;
974
+ };
975
+ export type File = {
976
+ path: string;
977
+ added: number;
978
+ removed: number;
979
+ status: "added" | "deleted" | "modified";
980
+ };
981
+ export type Agent = {
982
+ name: string;
983
+ description?: string;
984
+ mode: "subagent" | "primary" | "all";
985
+ builtIn: boolean;
986
+ topP?: number;
987
+ temperature?: number;
988
+ permission: {
989
+ edit: "ask" | "allow" | "deny";
990
+ bash: {
991
+ [key: string]: "ask" | "allow" | "deny";
992
+ };
993
+ webfetch?: "ask" | "allow" | "deny";
994
+ };
995
+ model?: {
996
+ modelID: string;
997
+ providerID: string;
998
+ };
999
+ prompt?: string;
1000
+ tools: {
1001
+ [key: string]: boolean;
1002
+ };
1003
+ options: {
1004
+ [key: string]: unknown;
1005
+ };
1006
+ };
1007
+ export type OAuth = {
1008
+ type: "oauth";
1009
+ refresh: string;
1010
+ access: string;
1011
+ expires: number;
1012
+ };
1013
+ export type ApiAuth = {
1014
+ type: "api";
1015
+ key: string;
1016
+ };
1017
+ export type WellKnownAuth = {
1018
+ type: "wellknown";
1019
+ key: string;
1020
+ token: string;
1021
+ };
1022
+ export type Auth = OAuth | ApiAuth | WellKnownAuth;
1023
+ export type EventInstallationUpdated = {
1024
+ type: "installation.updated";
1025
+ properties: {
1026
+ version: string;
1027
+ };
1028
+ };
1029
+ export type EventLspClientDiagnostics = {
1030
+ type: "lsp.client.diagnostics";
1031
+ properties: {
1032
+ serverID: string;
1033
+ path: string;
1034
+ };
1035
+ };
1036
+ export type EventMessageUpdated = {
1037
+ type: "message.updated";
1038
+ properties: {
1039
+ info: Message;
1040
+ };
1041
+ };
1042
+ export type EventMessageRemoved = {
1043
+ type: "message.removed";
1044
+ properties: {
1045
+ sessionID: string;
1046
+ messageID: string;
1047
+ };
1048
+ };
1049
+ export type EventMessagePartUpdated = {
1050
+ type: "message.part.updated";
1051
+ properties: {
1052
+ part: Part;
1053
+ delta?: string;
1054
+ };
1055
+ };
1056
+ export type EventMessagePartRemoved = {
1057
+ type: "message.part.removed";
1058
+ properties: {
1059
+ sessionID: string;
1060
+ messageID: string;
1061
+ partID: string;
1062
+ };
1063
+ };
1064
+ export type EventSessionCompacted = {
1065
+ type: "session.compacted";
1066
+ properties: {
1067
+ sessionID: string;
1068
+ };
1069
+ };
1070
+ export type Permission = {
1071
+ id: string;
1072
+ type: string;
1073
+ pattern?: string | Array<string>;
1074
+ sessionID: string;
1075
+ messageID: string;
1076
+ callID?: string;
1077
+ title: string;
1078
+ metadata: {
1079
+ [key: string]: unknown;
1080
+ };
1081
+ time: {
1082
+ created: number;
1083
+ };
1084
+ };
1085
+ export type EventPermissionUpdated = {
1086
+ type: "permission.updated";
1087
+ properties: Permission;
1088
+ };
1089
+ export type EventPermissionReplied = {
1090
+ type: "permission.replied";
1091
+ properties: {
1092
+ sessionID: string;
1093
+ permissionID: string;
1094
+ response: string;
1095
+ };
1096
+ };
1097
+ export type EventFileEdited = {
1098
+ type: "file.edited";
1099
+ properties: {
1100
+ file: string;
1101
+ };
1102
+ };
1103
+ export type EventFileWatcherUpdated = {
1104
+ type: "file.watcher.updated";
1105
+ properties: {
1106
+ file: string;
1107
+ event: "add" | "change" | "unlink";
1108
+ };
1109
+ };
1110
+ export type EventTodoUpdated = {
1111
+ type: "todo.updated";
1112
+ properties: {
1113
+ sessionID: string;
1114
+ todos: Array<Todo>;
1115
+ };
1116
+ };
1117
+ export type EventSessionIdle = {
1118
+ type: "session.idle";
1119
+ properties: {
1120
+ sessionID: string;
1121
+ };
1122
+ };
1123
+ export type EventSessionCreated = {
1124
+ type: "session.created";
1125
+ properties: {
1126
+ info: Session;
1127
+ };
1128
+ };
1129
+ export type EventSessionUpdated = {
1130
+ type: "session.updated";
1131
+ properties: {
1132
+ info: Session;
1133
+ };
1134
+ };
1135
+ export type EventSessionDeleted = {
1136
+ type: "session.deleted";
1137
+ properties: {
1138
+ info: Session;
1139
+ };
1140
+ };
1141
+ export type EventSessionError = {
1142
+ type: "session.error";
1143
+ properties: {
1144
+ sessionID?: string;
1145
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | ApiError;
1146
+ };
1147
+ };
1148
+ export type EventServerConnected = {
1149
+ type: "server.connected";
1150
+ properties: {
1151
+ [key: string]: unknown;
1152
+ };
1153
+ };
1154
+ export type EventIdeInstalled = {
1155
+ type: "ide.installed";
1156
+ properties: {
1157
+ ide: string;
1158
+ };
1159
+ };
1160
+ export type Event = EventInstallationUpdated | EventLspClientDiagnostics | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionCompacted | EventPermissionUpdated | EventPermissionReplied | EventFileEdited | EventFileWatcherUpdated | EventTodoUpdated | EventSessionIdle | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionError | EventServerConnected | EventIdeInstalled;
1161
+ export type ProjectListData = {
1162
+ body?: never;
1163
+ path?: never;
1164
+ query?: {
1165
+ directory?: string;
1166
+ };
1167
+ url: "/project";
1168
+ };
1169
+ export type ProjectListResponses = {
1170
+ /**
1171
+ * List of projects
1172
+ */
1173
+ 200: Array<Project>;
1174
+ };
1175
+ export type ProjectListResponse = ProjectListResponses[keyof ProjectListResponses];
1176
+ export type ProjectCurrentData = {
1177
+ body?: never;
1178
+ path?: never;
1179
+ query?: {
1180
+ directory?: string;
1181
+ };
1182
+ url: "/project/current";
1183
+ };
1184
+ export type ProjectCurrentResponses = {
1185
+ /**
1186
+ * Current project
1187
+ */
1188
+ 200: Project;
1189
+ };
1190
+ export type ProjectCurrentResponse = ProjectCurrentResponses[keyof ProjectCurrentResponses];
1191
+ export type FdsDependenciesData = {
1192
+ body?: never;
1193
+ path?: never;
1194
+ query?: {
1195
+ directory?: string;
1196
+ };
1197
+ url: "/fds/dependencies";
1198
+ };
1199
+ export type FdsDependenciesResponses = {
1200
+ /**
1201
+ * Dependency check result
1202
+ */
1203
+ 200: {
1204
+ available: boolean;
1205
+ message: string;
1206
+ };
1207
+ };
1208
+ export type FdsDependenciesResponse = FdsDependenciesResponses[keyof FdsDependenciesResponses];
1209
+ export type FdsPaperLoadData = {
1210
+ body?: {
1211
+ /**
1212
+ * File path or URL to the paper
1213
+ */
1214
+ source: string;
1215
+ };
1216
+ path?: never;
1217
+ query?: {
1218
+ directory?: string;
1219
+ };
1220
+ url: "/fds/paper/load";
1221
+ };
1222
+ export type FdsPaperLoadResponses = {
1223
+ /**
1224
+ * Paper loaded successfully
1225
+ */
1226
+ 200: {
1227
+ success: boolean;
1228
+ paperId?: string;
1229
+ metadata?: {
1230
+ title: string;
1231
+ authors: Array<string>;
1232
+ year: string;
1233
+ abstract: string;
1234
+ source: string;
1235
+ pages: number;
1236
+ arxivId?: string;
1237
+ };
1238
+ preview?: string;
1239
+ error?: string;
1240
+ };
1241
+ };
1242
+ export type FdsPaperLoadResponse = FdsPaperLoadResponses[keyof FdsPaperLoadResponses];
1243
+ export type FdsPaperCurrentContextData = {
1244
+ body?: never;
1245
+ path?: never;
1246
+ query?: {
1247
+ directory?: string;
1248
+ };
1249
+ url: "/fds/paper/current/context";
1250
+ };
1251
+ export type FdsPaperCurrentContextErrors = {
1252
+ /**
1253
+ * No paper loaded
1254
+ */
1255
+ 404: unknown;
1256
+ };
1257
+ export type FdsPaperCurrentContextResponses = {
1258
+ /**
1259
+ * Paper context for LLM
1260
+ */
1261
+ 200: {
1262
+ context: string;
1263
+ paperId: string;
1264
+ phase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
1265
+ completedPhases: Array<"setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report">;
1266
+ };
1267
+ };
1268
+ export type FdsPaperCurrentContextResponse = FdsPaperCurrentContextResponses[keyof FdsPaperCurrentContextResponses];
1269
+ export type FdsPaperContextData = {
1270
+ body?: never;
1271
+ path: {
1272
+ /**
1273
+ * Paper ID
1274
+ */
1275
+ id: string;
1276
+ };
1277
+ query?: {
1278
+ directory?: string;
1279
+ };
1280
+ url: "/fds/paper/{id}/context";
1281
+ };
1282
+ export type FdsPaperContextErrors = {
1283
+ /**
1284
+ * Paper not found
1285
+ */
1286
+ 404: unknown;
1287
+ };
1288
+ export type FdsPaperContextResponses = {
1289
+ /**
1290
+ * Paper context for LLM
1291
+ */
1292
+ 200: {
1293
+ context: string;
1294
+ paperId: string;
1295
+ phase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
1296
+ completedPhases: Array<"setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report">;
1297
+ };
1298
+ };
1299
+ export type FdsPaperContextResponse = FdsPaperContextResponses[keyof FdsPaperContextResponses];
1300
+ export type FdsPaperDeleteData = {
1301
+ body?: never;
1302
+ path: {
1303
+ id: string;
1304
+ };
1305
+ query?: {
1306
+ directory?: string;
1307
+ };
1308
+ url: "/fds/paper/{id}";
1309
+ };
1310
+ export type FdsPaperDeleteResponses = {
1311
+ /**
1312
+ * Paper deleted
1313
+ */
1314
+ 200: {
1315
+ success: boolean;
1316
+ };
1317
+ };
1318
+ export type FdsPaperDeleteResponse = FdsPaperDeleteResponses[keyof FdsPaperDeleteResponses];
1319
+ export type FdsPaperGetData = {
1320
+ body?: never;
1321
+ path: {
1322
+ id: string;
1323
+ };
1324
+ query?: {
1325
+ directory?: string;
1326
+ };
1327
+ url: "/fds/paper/{id}";
1328
+ };
1329
+ export type FdsPaperGetErrors = {
1330
+ /**
1331
+ * Paper not found
1332
+ */
1333
+ 404: unknown;
1334
+ };
1335
+ export type FdsPaperGetResponses = {
1336
+ /**
1337
+ * Paper details
1338
+ */
1339
+ 200: {
1340
+ id: string;
1341
+ metadata: {
1342
+ title: string;
1343
+ authors: Array<string>;
1344
+ year: string;
1345
+ abstract: string;
1346
+ source: string;
1347
+ pages: number;
1348
+ arxivId?: string;
1349
+ };
1350
+ fdsSpec: {
1351
+ paper?: {
1352
+ title: string;
1353
+ arxivId?: string;
1354
+ source: string;
1355
+ };
1356
+ classification?: {
1357
+ paperType?: "forecasting" | "trading_strategy" | "hybrid";
1358
+ modelOutputType?: "forecast" | "signal" | "position_weight";
1359
+ optimizationLevel?: "pointwise" | "portfolio";
1360
+ };
1361
+ dataRequirements?: {
1362
+ source?: string;
1363
+ dateRange?: {
1364
+ start: string;
1365
+ end: string;
1366
+ };
1367
+ assets?: string;
1368
+ features?: Array<string>;
1369
+ universeFilters?: {
1370
+ [key: string]: unknown;
1371
+ };
1372
+ };
1373
+ preprocessing?: {
1374
+ standardization?: string;
1375
+ outlierHandling?: string;
1376
+ lookbackWindow?: number;
1377
+ missingData?: string;
1378
+ };
1379
+ modelArchitecture?: {
1380
+ type?: string;
1381
+ layers?: Array<string>;
1382
+ lossFunction?: string;
1383
+ hyperparameters?: {
1384
+ [key: string]: unknown;
1385
+ };
1386
+ };
1387
+ signalGeneration?: {
1388
+ method?: string;
1389
+ threshold?: string;
1390
+ tradingRules?: {
1391
+ [key: string]: unknown;
1392
+ };
1393
+ };
1394
+ instrumentMechanics?: {
1395
+ type?: "futures" | "equity" | "fx" | "crypto" | "options";
1396
+ rollRules?: {
1397
+ method?: string;
1398
+ rollWindow?: number;
1399
+ };
1400
+ contractMultiplier?: number;
1401
+ currency?: string;
1402
+ };
1403
+ positionMapping?: {
1404
+ type?: "linear" | "sign" | "nonlinear";
1405
+ leverageBounds?: [number, number];
1406
+ };
1407
+ portfolioConstruction?: {
1408
+ crossAssetWeighting?: "equal" | "inverse_vol" | "risk_parity";
1409
+ rebalanceFrequency?: "daily" | "weekly" | "monthly";
1410
+ grossExposureTarget?: number;
1411
+ };
1412
+ reestimationPolicy?: {
1413
+ type?: "fixed" | "expanding" | "rolling";
1414
+ retrainFrequency?: string;
1415
+ initialTrainWindow?: string;
1416
+ };
1417
+ transactionCosts?: {
1418
+ commissionBps?: number;
1419
+ slippageBps?: number;
1420
+ marketImpactModel?: string;
1421
+ };
1422
+ backtestConfig?: {
1423
+ methodology?: string;
1424
+ metrics?: Array<string>;
1425
+ trainTestSplit?: string;
1426
+ bootstrapMethod?: string;
1427
+ nSamples?: number;
1428
+ };
1429
+ } | null;
1430
+ currentPhase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
1431
+ fullMarkdown: string;
1432
+ implementationStatus: {
1433
+ completedPhases: Array<"setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report">;
1434
+ currentPhaseStatus: string;
1435
+ };
1436
+ classification?: {
1437
+ paperType: "forecasting" | "trading_strategy" | "hybrid";
1438
+ confidence: "high" | "medium" | "low";
1439
+ recommendedGuide: "nixtla" | "trading" | "both";
1440
+ reasoning: string;
1441
+ };
1442
+ };
1443
+ };
1444
+ export type FdsPaperGetResponse = FdsPaperGetResponses[keyof FdsPaperGetResponses];
1445
+ export type FdsPaperListData = {
1446
+ body?: never;
1447
+ path?: never;
1448
+ query?: {
1449
+ directory?: string;
1450
+ };
1451
+ url: "/fds/paper";
1452
+ };
1453
+ export type FdsPaperListResponses = {
1454
+ /**
1455
+ * List of papers
1456
+ */
1457
+ 200: Array<{
1458
+ id: string;
1459
+ title: string;
1460
+ pages: number;
1461
+ source: string;
1462
+ arxivId?: string;
1463
+ currentPhase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
1464
+ }>;
1465
+ };
1466
+ export type FdsPaperListResponse = FdsPaperListResponses[keyof FdsPaperListResponses];
1467
+ export type FdsPaperPhaseData = {
1468
+ body?: {
1469
+ phase: "setup" | "data" | "preprocess" | "model" | "signal" | "backtest" | "validate" | "report";
1470
+ };
1471
+ path: {
1472
+ id: string;
1473
+ };
1474
+ query?: {
1475
+ directory?: string;
1476
+ };
1477
+ url: "/fds/paper/{id}/phase";
1478
+ };
1479
+ export type FdsPaperPhaseResponses = {
1480
+ /**
1481
+ * Phase updated
1482
+ */
1483
+ 200: {
1484
+ success: boolean;
1485
+ };
1486
+ };
1487
+ export type FdsPaperPhaseResponse = FdsPaperPhaseResponses[keyof FdsPaperPhaseResponses];
1488
+ export type FdsPaperSpecSetData = {
1489
+ body?: {
1490
+ paper?: {
1491
+ title: string;
1492
+ arxivId?: string;
1493
+ source: string;
1494
+ };
1495
+ classification?: {
1496
+ paperType?: "forecasting" | "trading_strategy" | "hybrid";
1497
+ modelOutputType?: "forecast" | "signal" | "position_weight";
1498
+ optimizationLevel?: "pointwise" | "portfolio";
1499
+ };
1500
+ dataRequirements?: {
1501
+ source?: string;
1502
+ dateRange?: {
1503
+ start: string;
1504
+ end: string;
1505
+ };
1506
+ assets?: string;
1507
+ features?: Array<string>;
1508
+ universeFilters?: {
1509
+ [key: string]: unknown;
1510
+ };
1511
+ };
1512
+ preprocessing?: {
1513
+ standardization?: string;
1514
+ outlierHandling?: string;
1515
+ lookbackWindow?: number;
1516
+ missingData?: string;
1517
+ };
1518
+ modelArchitecture?: {
1519
+ type?: string;
1520
+ layers?: Array<string>;
1521
+ lossFunction?: string;
1522
+ hyperparameters?: {
1523
+ [key: string]: unknown;
1524
+ };
1525
+ };
1526
+ signalGeneration?: {
1527
+ method?: string;
1528
+ threshold?: string;
1529
+ tradingRules?: {
1530
+ [key: string]: unknown;
1531
+ };
1532
+ };
1533
+ instrumentMechanics?: {
1534
+ type?: "futures" | "equity" | "fx" | "crypto" | "options";
1535
+ rollRules?: {
1536
+ method?: string;
1537
+ rollWindow?: number;
1538
+ };
1539
+ contractMultiplier?: number;
1540
+ currency?: string;
1541
+ };
1542
+ positionMapping?: {
1543
+ type?: "linear" | "sign" | "nonlinear";
1544
+ leverageBounds?: [number, number];
1545
+ };
1546
+ portfolioConstruction?: {
1547
+ crossAssetWeighting?: "equal" | "inverse_vol" | "risk_parity";
1548
+ rebalanceFrequency?: "daily" | "weekly" | "monthly";
1549
+ grossExposureTarget?: number;
1550
+ };
1551
+ reestimationPolicy?: {
1552
+ type?: "fixed" | "expanding" | "rolling";
1553
+ retrainFrequency?: string;
1554
+ initialTrainWindow?: string;
1555
+ };
1556
+ transactionCosts?: {
1557
+ commissionBps?: number;
1558
+ slippageBps?: number;
1559
+ marketImpactModel?: string;
1560
+ };
1561
+ backtestConfig?: {
1562
+ methodology?: string;
1563
+ metrics?: Array<string>;
1564
+ trainTestSplit?: string;
1565
+ bootstrapMethod?: string;
1566
+ nSamples?: number;
1567
+ };
1568
+ };
1569
+ path: {
1570
+ id: string;
1571
+ };
1572
+ query?: {
1573
+ directory?: string;
1574
+ };
1575
+ url: "/fds/paper/{id}/spec";
1576
+ };
1577
+ export type FdsPaperSpecSetResponses = {
1578
+ /**
1579
+ * Spec set
1580
+ */
1581
+ 200: {
1582
+ success: boolean;
1583
+ };
1584
+ };
1585
+ export type FdsPaperSpecSetResponse = FdsPaperSpecSetResponses[keyof FdsPaperSpecSetResponses];
1586
+ export type ConfigGetData = {
1587
+ body?: never;
1588
+ path?: never;
1589
+ query?: {
1590
+ directory?: string;
1591
+ };
1592
+ url: "/config";
1593
+ };
1594
+ export type ConfigGetResponses = {
1595
+ /**
1596
+ * Get config info
1597
+ */
1598
+ 200: Config;
1599
+ };
1600
+ export type ConfigGetResponse = ConfigGetResponses[keyof ConfigGetResponses];
1601
+ export type ConfigUpdateData = {
1602
+ body?: Config;
1603
+ path?: never;
1604
+ query?: {
1605
+ directory?: string;
1606
+ };
1607
+ url: "/config";
1608
+ };
1609
+ export type ConfigUpdateErrors = {
1610
+ /**
1611
+ * Bad request
1612
+ */
1613
+ 400: BadRequestError;
1614
+ };
1615
+ export type ConfigUpdateError = ConfigUpdateErrors[keyof ConfigUpdateErrors];
1616
+ export type ConfigUpdateResponses = {
1617
+ /**
1618
+ * Successfully updated config
1619
+ */
1620
+ 200: Config;
1621
+ };
1622
+ export type ConfigUpdateResponse = ConfigUpdateResponses[keyof ConfigUpdateResponses];
1623
+ export type ToolIdsData = {
1624
+ body?: never;
1625
+ path?: never;
1626
+ query?: {
1627
+ directory?: string;
1628
+ };
1629
+ url: "/experimental/tool/ids";
1630
+ };
1631
+ export type ToolIdsErrors = {
1632
+ /**
1633
+ * Bad request
1634
+ */
1635
+ 400: BadRequestError;
1636
+ };
1637
+ export type ToolIdsError = ToolIdsErrors[keyof ToolIdsErrors];
1638
+ export type ToolIdsResponses = {
1639
+ /**
1640
+ * Tool IDs
1641
+ */
1642
+ 200: ToolIds;
1643
+ };
1644
+ export type ToolIdsResponse = ToolIdsResponses[keyof ToolIdsResponses];
1645
+ export type ToolListData = {
1646
+ body?: never;
1647
+ path?: never;
1648
+ query: {
1649
+ directory?: string;
1650
+ provider: string;
1651
+ model: string;
1652
+ };
1653
+ url: "/experimental/tool";
1654
+ };
1655
+ export type ToolListErrors = {
1656
+ /**
1657
+ * Bad request
1658
+ */
1659
+ 400: BadRequestError;
1660
+ };
1661
+ export type ToolListError = ToolListErrors[keyof ToolListErrors];
1662
+ export type ToolListResponses = {
1663
+ /**
1664
+ * Tools
1665
+ */
1666
+ 200: ToolList;
1667
+ };
1668
+ export type ToolListResponse = ToolListResponses[keyof ToolListResponses];
1669
+ export type PathGetData = {
1670
+ body?: never;
1671
+ path?: never;
1672
+ query?: {
1673
+ directory?: string;
1674
+ };
1675
+ url: "/path";
1676
+ };
1677
+ export type PathGetResponses = {
1678
+ /**
1679
+ * Path
1680
+ */
1681
+ 200: Path;
1682
+ };
1683
+ export type PathGetResponse = PathGetResponses[keyof PathGetResponses];
1684
+ export type SessionListData = {
1685
+ body?: never;
1686
+ path?: never;
1687
+ query?: {
1688
+ directory?: string;
1689
+ };
1690
+ url: "/session";
1691
+ };
1692
+ export type SessionListResponses = {
1693
+ /**
1694
+ * List of sessions
1695
+ */
1696
+ 200: Array<Session>;
1697
+ };
1698
+ export type SessionListResponse = SessionListResponses[keyof SessionListResponses];
1699
+ export type SessionCreateData = {
1700
+ body?: {
1701
+ parentID?: string;
1702
+ title?: string;
1703
+ };
1704
+ path?: never;
1705
+ query?: {
1706
+ directory?: string;
1707
+ };
1708
+ url: "/session";
1709
+ };
1710
+ export type SessionCreateErrors = {
1711
+ /**
1712
+ * Bad request
1713
+ */
1714
+ 400: BadRequestError;
1715
+ };
1716
+ export type SessionCreateError = SessionCreateErrors[keyof SessionCreateErrors];
1717
+ export type SessionCreateResponses = {
1718
+ /**
1719
+ * Successfully created session
1720
+ */
1721
+ 200: Session;
1722
+ };
1723
+ export type SessionCreateResponse = SessionCreateResponses[keyof SessionCreateResponses];
1724
+ export type SessionDeleteData = {
1725
+ body?: never;
1726
+ path: {
1727
+ id: string;
1728
+ };
1729
+ query?: {
1730
+ directory?: string;
1731
+ };
1732
+ url: "/session/{id}";
1733
+ };
1734
+ export type SessionDeleteErrors = {
1735
+ /**
1736
+ * Bad request
1737
+ */
1738
+ 400: BadRequestError;
1739
+ /**
1740
+ * Not found
1741
+ */
1742
+ 404: NotFoundError;
1743
+ };
1744
+ export type SessionDeleteError = SessionDeleteErrors[keyof SessionDeleteErrors];
1745
+ export type SessionDeleteResponses = {
1746
+ /**
1747
+ * Successfully deleted session
1748
+ */
1749
+ 200: boolean;
1750
+ };
1751
+ export type SessionDeleteResponse = SessionDeleteResponses[keyof SessionDeleteResponses];
1752
+ export type SessionGetData = {
1753
+ body?: never;
1754
+ path: {
1755
+ id: string;
1756
+ };
1757
+ query?: {
1758
+ directory?: string;
1759
+ };
1760
+ url: "/session/{id}";
1761
+ };
1762
+ export type SessionGetErrors = {
1763
+ /**
1764
+ * Bad request
1765
+ */
1766
+ 400: BadRequestError;
1767
+ /**
1768
+ * Not found
1769
+ */
1770
+ 404: NotFoundError;
1771
+ };
1772
+ export type SessionGetError = SessionGetErrors[keyof SessionGetErrors];
1773
+ export type SessionGetResponses = {
1774
+ /**
1775
+ * Get session
1776
+ */
1777
+ 200: Session;
1778
+ };
1779
+ export type SessionGetResponse = SessionGetResponses[keyof SessionGetResponses];
1780
+ export type SessionUpdateData = {
1781
+ body?: {
1782
+ title?: string;
1783
+ };
1784
+ path: {
1785
+ id: string;
1786
+ };
1787
+ query?: {
1788
+ directory?: string;
1789
+ };
1790
+ url: "/session/{id}";
1791
+ };
1792
+ export type SessionUpdateErrors = {
1793
+ /**
1794
+ * Bad request
1795
+ */
1796
+ 400: BadRequestError;
1797
+ /**
1798
+ * Not found
1799
+ */
1800
+ 404: NotFoundError;
1801
+ };
1802
+ export type SessionUpdateError = SessionUpdateErrors[keyof SessionUpdateErrors];
1803
+ export type SessionUpdateResponses = {
1804
+ /**
1805
+ * Successfully updated session
1806
+ */
1807
+ 200: Session;
1808
+ };
1809
+ export type SessionUpdateResponse = SessionUpdateResponses[keyof SessionUpdateResponses];
1810
+ export type SessionChildrenData = {
1811
+ body?: never;
1812
+ path: {
1813
+ id: string;
1814
+ };
1815
+ query?: {
1816
+ directory?: string;
1817
+ };
1818
+ url: "/session/{id}/children";
1819
+ };
1820
+ export type SessionChildrenErrors = {
1821
+ /**
1822
+ * Bad request
1823
+ */
1824
+ 400: BadRequestError;
1825
+ /**
1826
+ * Not found
1827
+ */
1828
+ 404: NotFoundError;
1829
+ };
1830
+ export type SessionChildrenError = SessionChildrenErrors[keyof SessionChildrenErrors];
1831
+ export type SessionChildrenResponses = {
1832
+ /**
1833
+ * List of children
1834
+ */
1835
+ 200: Array<Session>;
1836
+ };
1837
+ export type SessionChildrenResponse = SessionChildrenResponses[keyof SessionChildrenResponses];
1838
+ export type SessionTodoData = {
1839
+ body?: never;
1840
+ path: {
1841
+ /**
1842
+ * Session ID
1843
+ */
1844
+ id: string;
1845
+ };
1846
+ query?: {
1847
+ directory?: string;
1848
+ };
1849
+ url: "/session/{id}/todo";
1850
+ };
1851
+ export type SessionTodoErrors = {
1852
+ /**
1853
+ * Bad request
1854
+ */
1855
+ 400: BadRequestError;
1856
+ /**
1857
+ * Not found
1858
+ */
1859
+ 404: NotFoundError;
1860
+ };
1861
+ export type SessionTodoError = SessionTodoErrors[keyof SessionTodoErrors];
1862
+ export type SessionTodoResponses = {
1863
+ /**
1864
+ * Todo list
1865
+ */
1866
+ 200: Array<Todo>;
1867
+ };
1868
+ export type SessionTodoResponse = SessionTodoResponses[keyof SessionTodoResponses];
1869
+ export type SessionInitData = {
1870
+ body?: {
1871
+ modelID: string;
1872
+ providerID: string;
1873
+ messageID: string;
1874
+ };
1875
+ path: {
1876
+ /**
1877
+ * Session ID
1878
+ */
1879
+ id: string;
1880
+ };
1881
+ query?: {
1882
+ directory?: string;
1883
+ };
1884
+ url: "/session/{id}/init";
1885
+ };
1886
+ export type SessionInitErrors = {
1887
+ /**
1888
+ * Bad request
1889
+ */
1890
+ 400: BadRequestError;
1891
+ /**
1892
+ * Not found
1893
+ */
1894
+ 404: NotFoundError;
1895
+ };
1896
+ export type SessionInitError = SessionInitErrors[keyof SessionInitErrors];
1897
+ export type SessionInitResponses = {
1898
+ /**
1899
+ * 200
1900
+ */
1901
+ 200: boolean;
1902
+ };
1903
+ export type SessionInitResponse = SessionInitResponses[keyof SessionInitResponses];
1904
+ export type SessionForkData = {
1905
+ body?: {
1906
+ messageID?: string;
1907
+ };
1908
+ path: {
1909
+ id: string;
1910
+ };
1911
+ query?: {
1912
+ directory?: string;
1913
+ };
1914
+ url: "/session/{id}/fork";
1915
+ };
1916
+ export type SessionForkResponses = {
1917
+ /**
1918
+ * 200
1919
+ */
1920
+ 200: Session;
1921
+ };
1922
+ export type SessionForkResponse = SessionForkResponses[keyof SessionForkResponses];
1923
+ export type SessionAbortData = {
1924
+ body?: never;
1925
+ path: {
1926
+ id: string;
1927
+ };
1928
+ query?: {
1929
+ directory?: string;
1930
+ };
1931
+ url: "/session/{id}/abort";
1932
+ };
1933
+ export type SessionAbortErrors = {
1934
+ /**
1935
+ * Bad request
1936
+ */
1937
+ 400: BadRequestError;
1938
+ /**
1939
+ * Not found
1940
+ */
1941
+ 404: NotFoundError;
1942
+ };
1943
+ export type SessionAbortError = SessionAbortErrors[keyof SessionAbortErrors];
1944
+ export type SessionAbortResponses = {
1945
+ /**
1946
+ * Aborted session
1947
+ */
1948
+ 200: boolean;
1949
+ };
1950
+ export type SessionAbortResponse = SessionAbortResponses[keyof SessionAbortResponses];
1951
+ export type SessionTogglePermissionData = {
1952
+ body?: {
1953
+ enabled: boolean;
1954
+ };
1955
+ path: {
1956
+ id: string;
1957
+ };
1958
+ query?: {
1959
+ directory?: string;
1960
+ };
1961
+ url: "/session/{id}/permission";
1962
+ };
1963
+ export type SessionTogglePermissionErrors = {
1964
+ /**
1965
+ * Bad request
1966
+ */
1967
+ 400: BadRequestError;
1968
+ /**
1969
+ * Not found
1970
+ */
1971
+ 404: NotFoundError;
1972
+ };
1973
+ export type SessionTogglePermissionError = SessionTogglePermissionErrors[keyof SessionTogglePermissionErrors];
1974
+ export type SessionTogglePermissionResponses = {
1975
+ /**
1976
+ * Permission mode updated successfully
1977
+ */
1978
+ 200: {
1979
+ enabled: boolean;
1980
+ };
1981
+ };
1982
+ export type SessionTogglePermissionResponse = SessionTogglePermissionResponses[keyof SessionTogglePermissionResponses];
1983
+ export type SessionUnshareData = {
1984
+ body?: never;
1985
+ path: {
1986
+ id: string;
1987
+ };
1988
+ query?: {
1989
+ directory?: string;
1990
+ };
1991
+ url: "/session/{id}/share";
1992
+ };
1993
+ export type SessionUnshareErrors = {
1994
+ /**
1995
+ * Bad request
1996
+ */
1997
+ 400: BadRequestError;
1998
+ /**
1999
+ * Not found
2000
+ */
2001
+ 404: NotFoundError;
2002
+ };
2003
+ export type SessionUnshareError = SessionUnshareErrors[keyof SessionUnshareErrors];
2004
+ export type SessionUnshareResponses = {
2005
+ /**
2006
+ * Successfully unshared session
2007
+ */
2008
+ 200: Session;
2009
+ };
2010
+ export type SessionUnshareResponse = SessionUnshareResponses[keyof SessionUnshareResponses];
2011
+ export type SessionShareData = {
2012
+ body?: never;
2013
+ path: {
2014
+ id: string;
2015
+ };
2016
+ query?: {
2017
+ directory?: string;
2018
+ };
2019
+ url: "/session/{id}/share";
2020
+ };
2021
+ export type SessionShareErrors = {
2022
+ /**
2023
+ * Bad request
2024
+ */
2025
+ 400: BadRequestError;
2026
+ /**
2027
+ * Not found
2028
+ */
2029
+ 404: NotFoundError;
2030
+ };
2031
+ export type SessionShareError = SessionShareErrors[keyof SessionShareErrors];
2032
+ export type SessionShareResponses = {
2033
+ /**
2034
+ * Successfully shared session
2035
+ */
2036
+ 200: Session;
2037
+ };
2038
+ export type SessionShareResponse = SessionShareResponses[keyof SessionShareResponses];
2039
+ export type SessionDiffData = {
2040
+ body?: never;
2041
+ path: {
2042
+ id: string;
2043
+ };
2044
+ query?: {
2045
+ directory?: string;
2046
+ messageID?: string;
2047
+ };
2048
+ url: "/session/{id}/diff";
2049
+ };
2050
+ export type SessionDiffResponses = {
2051
+ /**
2052
+ * Successfully retrieved diff
2053
+ */
2054
+ 200: Array<FileDiff>;
2055
+ };
2056
+ export type SessionDiffResponse = SessionDiffResponses[keyof SessionDiffResponses];
2057
+ export type SessionSummarizeData = {
2058
+ body?: {
2059
+ providerID: string;
2060
+ modelID: string;
2061
+ };
2062
+ path: {
2063
+ /**
2064
+ * Session ID
2065
+ */
2066
+ id: string;
2067
+ };
2068
+ query?: {
2069
+ directory?: string;
2070
+ };
2071
+ url: "/session/{id}/summarize";
2072
+ };
2073
+ export type SessionSummarizeErrors = {
2074
+ /**
2075
+ * Bad request
2076
+ */
2077
+ 400: BadRequestError;
2078
+ /**
2079
+ * Not found
2080
+ */
2081
+ 404: NotFoundError;
2082
+ };
2083
+ export type SessionSummarizeError = SessionSummarizeErrors[keyof SessionSummarizeErrors];
2084
+ export type SessionSummarizeResponses = {
2085
+ /**
2086
+ * Summarized session
2087
+ */
2088
+ 200: boolean;
2089
+ };
2090
+ export type SessionSummarizeResponse = SessionSummarizeResponses[keyof SessionSummarizeResponses];
2091
+ export type SessionMessagesData = {
2092
+ body?: never;
2093
+ path: {
2094
+ /**
2095
+ * Session ID
2096
+ */
2097
+ id: string;
2098
+ };
2099
+ query?: {
2100
+ directory?: string;
2101
+ };
2102
+ url: "/session/{id}/message";
2103
+ };
2104
+ export type SessionMessagesErrors = {
2105
+ /**
2106
+ * Bad request
2107
+ */
2108
+ 400: BadRequestError;
2109
+ /**
2110
+ * Not found
2111
+ */
2112
+ 404: NotFoundError;
2113
+ };
2114
+ export type SessionMessagesError = SessionMessagesErrors[keyof SessionMessagesErrors];
2115
+ export type SessionMessagesResponses = {
2116
+ /**
2117
+ * List of messages
2118
+ */
2119
+ 200: Array<{
2120
+ info: Message;
2121
+ parts: Array<Part>;
2122
+ }>;
2123
+ };
2124
+ export type SessionMessagesResponse = SessionMessagesResponses[keyof SessionMessagesResponses];
2125
+ export type SessionPromptData = {
2126
+ body?: {
2127
+ messageID?: string;
2128
+ model?: {
2129
+ providerID: string;
2130
+ modelID: string;
2131
+ };
2132
+ agent?: string;
2133
+ noReply?: boolean;
2134
+ system?: string;
2135
+ tools?: {
2136
+ [key: string]: boolean;
2137
+ };
2138
+ parts: Array<TextPartInput | FilePartInput | AgentPartInput>;
2139
+ };
2140
+ path: {
2141
+ /**
2142
+ * Session ID
2143
+ */
2144
+ id: string;
2145
+ };
2146
+ query?: {
2147
+ directory?: string;
2148
+ };
2149
+ url: "/session/{id}/message";
2150
+ };
2151
+ export type SessionPromptErrors = {
2152
+ /**
2153
+ * Bad request
2154
+ */
2155
+ 400: BadRequestError;
2156
+ /**
2157
+ * Not found
2158
+ */
2159
+ 404: NotFoundError;
2160
+ };
2161
+ export type SessionPromptError = SessionPromptErrors[keyof SessionPromptErrors];
2162
+ export type SessionPromptResponses = {
2163
+ /**
2164
+ * Created message
2165
+ */
2166
+ 200: {
2167
+ info: AssistantMessage;
2168
+ parts: Array<Part>;
2169
+ };
2170
+ };
2171
+ export type SessionPromptResponse = SessionPromptResponses[keyof SessionPromptResponses];
2172
+ export type SessionMessageData = {
2173
+ body?: never;
2174
+ path: {
2175
+ /**
2176
+ * Session ID
2177
+ */
2178
+ id: string;
2179
+ /**
2180
+ * Message ID
2181
+ */
2182
+ messageID: string;
2183
+ };
2184
+ query?: {
2185
+ directory?: string;
2186
+ };
2187
+ url: "/session/{id}/message/{messageID}";
2188
+ };
2189
+ export type SessionMessageErrors = {
2190
+ /**
2191
+ * Bad request
2192
+ */
2193
+ 400: BadRequestError;
2194
+ /**
2195
+ * Not found
2196
+ */
2197
+ 404: NotFoundError;
2198
+ };
2199
+ export type SessionMessageError = SessionMessageErrors[keyof SessionMessageErrors];
2200
+ export type SessionMessageResponses = {
2201
+ /**
2202
+ * Message
2203
+ */
2204
+ 200: {
2205
+ info: Message;
2206
+ parts: Array<Part>;
2207
+ };
2208
+ };
2209
+ export type SessionMessageResponse = SessionMessageResponses[keyof SessionMessageResponses];
2210
+ export type SessionCommandData = {
2211
+ body?: {
2212
+ messageID?: string;
2213
+ agent?: string;
2214
+ model?: string;
2215
+ arguments: string;
2216
+ command: string;
2217
+ };
2218
+ path: {
2219
+ /**
2220
+ * Session ID
2221
+ */
2222
+ id: string;
2223
+ };
2224
+ query?: {
2225
+ directory?: string;
2226
+ };
2227
+ url: "/session/{id}/command";
2228
+ };
2229
+ export type SessionCommandErrors = {
2230
+ /**
2231
+ * Bad request
2232
+ */
2233
+ 400: BadRequestError;
2234
+ /**
2235
+ * Not found
2236
+ */
2237
+ 404: NotFoundError;
2238
+ };
2239
+ export type SessionCommandError = SessionCommandErrors[keyof SessionCommandErrors];
2240
+ export type SessionCommandResponses = {
2241
+ /**
2242
+ * Created message
2243
+ */
2244
+ 200: {
2245
+ info: AssistantMessage;
2246
+ parts: Array<Part>;
2247
+ };
2248
+ };
2249
+ export type SessionCommandResponse = SessionCommandResponses[keyof SessionCommandResponses];
2250
+ export type SessionShellData = {
2251
+ body?: {
2252
+ agent: string;
2253
+ command: string;
2254
+ };
2255
+ path: {
2256
+ /**
2257
+ * Session ID
2258
+ */
2259
+ id: string;
2260
+ };
2261
+ query?: {
2262
+ directory?: string;
2263
+ };
2264
+ url: "/session/{id}/shell";
2265
+ };
2266
+ export type SessionShellErrors = {
2267
+ /**
2268
+ * Bad request
2269
+ */
2270
+ 400: BadRequestError;
2271
+ /**
2272
+ * Not found
2273
+ */
2274
+ 404: NotFoundError;
2275
+ };
2276
+ export type SessionShellError = SessionShellErrors[keyof SessionShellErrors];
2277
+ export type SessionShellResponses = {
2278
+ /**
2279
+ * Created message
2280
+ */
2281
+ 200: AssistantMessage;
2282
+ };
2283
+ export type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses];
2284
+ export type SessionRevertData = {
2285
+ body?: {
2286
+ messageID: string;
2287
+ partID?: string;
2288
+ };
2289
+ path: {
2290
+ id: string;
2291
+ };
2292
+ query?: {
2293
+ directory?: string;
2294
+ };
2295
+ url: "/session/{id}/revert";
2296
+ };
2297
+ export type SessionRevertErrors = {
2298
+ /**
2299
+ * Bad request
2300
+ */
2301
+ 400: BadRequestError;
2302
+ /**
2303
+ * Not found
2304
+ */
2305
+ 404: NotFoundError;
2306
+ };
2307
+ export type SessionRevertError = SessionRevertErrors[keyof SessionRevertErrors];
2308
+ export type SessionRevertResponses = {
2309
+ /**
2310
+ * Updated session
2311
+ */
2312
+ 200: Session;
2313
+ };
2314
+ export type SessionRevertResponse = SessionRevertResponses[keyof SessionRevertResponses];
2315
+ export type SessionUnrevertData = {
2316
+ body?: never;
2317
+ path: {
2318
+ id: string;
2319
+ };
2320
+ query?: {
2321
+ directory?: string;
2322
+ };
2323
+ url: "/session/{id}/unrevert";
2324
+ };
2325
+ export type SessionUnrevertErrors = {
2326
+ /**
2327
+ * Bad request
2328
+ */
2329
+ 400: BadRequestError;
2330
+ /**
2331
+ * Not found
2332
+ */
2333
+ 404: NotFoundError;
2334
+ };
2335
+ export type SessionUnrevertError = SessionUnrevertErrors[keyof SessionUnrevertErrors];
2336
+ export type SessionUnrevertResponses = {
2337
+ /**
2338
+ * Updated session
2339
+ */
2340
+ 200: Session;
2341
+ };
2342
+ export type SessionUnrevertResponse = SessionUnrevertResponses[keyof SessionUnrevertResponses];
2343
+ export type PostSessionIdPermissionsPermissionIdData = {
2344
+ body?: {
2345
+ response: "once" | "always" | "reject";
2346
+ };
2347
+ path: {
2348
+ id: string;
2349
+ permissionID: string;
2350
+ };
2351
+ query?: {
2352
+ directory?: string;
2353
+ };
2354
+ url: "/session/{id}/permissions/{permissionID}";
2355
+ };
2356
+ export type PostSessionIdPermissionsPermissionIdErrors = {
2357
+ /**
2358
+ * Bad request
2359
+ */
2360
+ 400: BadRequestError;
2361
+ /**
2362
+ * Not found
2363
+ */
2364
+ 404: NotFoundError;
2365
+ };
2366
+ export type PostSessionIdPermissionsPermissionIdError = PostSessionIdPermissionsPermissionIdErrors[keyof PostSessionIdPermissionsPermissionIdErrors];
2367
+ export type PostSessionIdPermissionsPermissionIdResponses = {
2368
+ /**
2369
+ * Permission processed successfully
2370
+ */
2371
+ 200: boolean;
2372
+ };
2373
+ export type PostSessionIdPermissionsPermissionIdResponse = PostSessionIdPermissionsPermissionIdResponses[keyof PostSessionIdPermissionsPermissionIdResponses];
2374
+ export type CommandListData = {
2375
+ body?: never;
2376
+ path?: never;
2377
+ query?: {
2378
+ directory?: string;
2379
+ };
2380
+ url: "/command";
2381
+ };
2382
+ export type CommandListResponses = {
2383
+ /**
2384
+ * List of commands
2385
+ */
2386
+ 200: Array<Command>;
2387
+ };
2388
+ export type CommandListResponse = CommandListResponses[keyof CommandListResponses];
2389
+ export type ConfigProvidersData = {
2390
+ body?: never;
2391
+ path?: never;
2392
+ query?: {
2393
+ directory?: string;
2394
+ };
2395
+ url: "/config/providers";
2396
+ };
2397
+ export type ConfigProvidersResponses = {
2398
+ /**
2399
+ * List of providers
2400
+ */
2401
+ 200: {
2402
+ providers: Array<Provider>;
2403
+ default: {
2404
+ [key: string]: string;
2405
+ };
2406
+ };
2407
+ };
2408
+ export type ConfigProvidersResponse = ConfigProvidersResponses[keyof ConfigProvidersResponses];
2409
+ export type FindTextData = {
2410
+ body?: never;
2411
+ path?: never;
2412
+ query: {
2413
+ directory?: string;
2414
+ pattern: string;
2415
+ };
2416
+ url: "/find";
2417
+ };
2418
+ export type FindTextResponses = {
2419
+ /**
2420
+ * Matches
2421
+ */
2422
+ 200: Array<{
2423
+ path: {
2424
+ text: string;
2425
+ };
2426
+ lines: {
2427
+ text: string;
2428
+ };
2429
+ line_number: number;
2430
+ absolute_offset: number;
2431
+ submatches: Array<{
2432
+ match: {
2433
+ text: string;
2434
+ };
2435
+ start: number;
2436
+ end: number;
2437
+ }>;
2438
+ }>;
2439
+ };
2440
+ export type FindTextResponse = FindTextResponses[keyof FindTextResponses];
2441
+ export type FindFilesData = {
2442
+ body?: never;
2443
+ path?: never;
2444
+ query: {
2445
+ directory?: string;
2446
+ query: string;
2447
+ };
2448
+ url: "/find/file";
2449
+ };
2450
+ export type FindFilesResponses = {
2451
+ /**
2452
+ * File paths
2453
+ */
2454
+ 200: Array<string>;
2455
+ };
2456
+ export type FindFilesResponse = FindFilesResponses[keyof FindFilesResponses];
2457
+ export type FindSymbolsData = {
2458
+ body?: never;
2459
+ path?: never;
2460
+ query: {
2461
+ directory?: string;
2462
+ query: string;
2463
+ };
2464
+ url: "/find/symbol";
2465
+ };
2466
+ export type FindSymbolsResponses = {
2467
+ /**
2468
+ * Symbols
2469
+ */
2470
+ 200: Array<Symbol>;
2471
+ };
2472
+ export type FindSymbolsResponse = FindSymbolsResponses[keyof FindSymbolsResponses];
2473
+ export type FileListData = {
2474
+ body?: never;
2475
+ path?: never;
2476
+ query: {
2477
+ directory?: string;
2478
+ path: string;
2479
+ };
2480
+ url: "/file";
2481
+ };
2482
+ export type FileListResponses = {
2483
+ /**
2484
+ * Files and directories
2485
+ */
2486
+ 200: Array<FileNode>;
2487
+ };
2488
+ export type FileListResponse = FileListResponses[keyof FileListResponses];
2489
+ export type FileReadData = {
2490
+ body?: never;
2491
+ path?: never;
2492
+ query: {
2493
+ directory?: string;
2494
+ path: string;
2495
+ };
2496
+ url: "/file/content";
2497
+ };
2498
+ export type FileReadResponses = {
2499
+ /**
2500
+ * File content
2501
+ */
2502
+ 200: FileContent;
2503
+ };
2504
+ export type FileReadResponse = FileReadResponses[keyof FileReadResponses];
2505
+ export type FileStatusData = {
2506
+ body?: never;
2507
+ path?: never;
2508
+ query?: {
2509
+ directory?: string;
2510
+ };
2511
+ url: "/file/status";
2512
+ };
2513
+ export type FileStatusResponses = {
2514
+ /**
2515
+ * File status
2516
+ */
2517
+ 200: Array<File>;
2518
+ };
2519
+ export type FileStatusResponse = FileStatusResponses[keyof FileStatusResponses];
2520
+ export type AppLogData = {
2521
+ body?: {
2522
+ /**
2523
+ * Service name for the log entry
2524
+ */
2525
+ service: string;
2526
+ /**
2527
+ * Log level
2528
+ */
2529
+ level: "debug" | "info" | "error" | "warn";
2530
+ /**
2531
+ * Log message
2532
+ */
2533
+ message: string;
2534
+ /**
2535
+ * Additional metadata for the log entry
2536
+ */
2537
+ extra?: {
2538
+ [key: string]: unknown;
2539
+ };
2540
+ };
2541
+ path?: never;
2542
+ query?: {
2543
+ directory?: string;
2544
+ };
2545
+ url: "/log";
2546
+ };
2547
+ export type AppLogErrors = {
2548
+ /**
2549
+ * Bad request
2550
+ */
2551
+ 400: BadRequestError;
2552
+ };
2553
+ export type AppLogError = AppLogErrors[keyof AppLogErrors];
2554
+ export type AppLogResponses = {
2555
+ /**
2556
+ * Log entry written successfully
2557
+ */
2558
+ 200: boolean;
2559
+ };
2560
+ export type AppLogResponse = AppLogResponses[keyof AppLogResponses];
2561
+ export type AppAgentsData = {
2562
+ body?: never;
2563
+ path?: never;
2564
+ query?: {
2565
+ directory?: string;
2566
+ };
2567
+ url: "/agent";
2568
+ };
2569
+ export type AppAgentsResponses = {
2570
+ /**
2571
+ * List of agents
2572
+ */
2573
+ 200: Array<Agent>;
2574
+ };
2575
+ export type AppAgentsResponse = AppAgentsResponses[keyof AppAgentsResponses];
2576
+ export type AgentUpdatePermissionData = {
2577
+ body?: {
2578
+ edit?: "ask" | "allow" | "deny";
2579
+ bash?: {
2580
+ [key: string]: "ask" | "allow" | "deny";
2581
+ };
2582
+ webfetch?: "ask" | "allow" | "deny";
2583
+ };
2584
+ path: {
2585
+ name: string;
2586
+ };
2587
+ query?: {
2588
+ directory?: string;
2589
+ };
2590
+ url: "/agent/{name}/permission";
2591
+ };
2592
+ export type AgentUpdatePermissionErrors = {
2593
+ /**
2594
+ * Bad request
2595
+ */
2596
+ 400: BadRequestError;
2597
+ /**
2598
+ * Not found
2599
+ */
2600
+ 404: NotFoundError;
2601
+ };
2602
+ export type AgentUpdatePermissionError = AgentUpdatePermissionErrors[keyof AgentUpdatePermissionErrors];
2603
+ export type AgentUpdatePermissionResponses = {
2604
+ /**
2605
+ * Permission updated successfully
2606
+ */
2607
+ 200: Agent;
2608
+ };
2609
+ export type AgentUpdatePermissionResponse = AgentUpdatePermissionResponses[keyof AgentUpdatePermissionResponses];
2610
+ export type McpStatusData = {
2611
+ body?: never;
2612
+ path?: never;
2613
+ query?: {
2614
+ directory?: string;
2615
+ };
2616
+ url: "/mcp";
2617
+ };
2618
+ export type McpStatusResponses = {
2619
+ /**
2620
+ * MCP server status
2621
+ */
2622
+ 200: unknown;
2623
+ };
2624
+ export type McpRefreshData = {
2625
+ body?: never;
2626
+ path?: never;
2627
+ query?: {
2628
+ directory?: string;
2629
+ };
2630
+ url: "/mcp/refresh";
2631
+ };
2632
+ export type McpRefreshResponses = {
2633
+ /**
2634
+ * MCP servers refreshed
2635
+ */
2636
+ 200: unknown;
2637
+ };
2638
+ export type McpEnableData = {
2639
+ body?: never;
2640
+ path: {
2641
+ name: string;
2642
+ };
2643
+ query?: {
2644
+ directory?: string;
2645
+ };
2646
+ url: "/mcp/{name}/enable";
2647
+ };
2648
+ export type McpEnableResponses = {
2649
+ /**
2650
+ * MCP server enabled
2651
+ */
2652
+ 200: unknown;
2653
+ };
2654
+ export type McpDisableData = {
2655
+ body?: never;
2656
+ path: {
2657
+ name: string;
2658
+ };
2659
+ query?: {
2660
+ directory?: string;
2661
+ };
2662
+ url: "/mcp/{name}/disable";
2663
+ };
2664
+ export type McpDisableResponses = {
2665
+ /**
2666
+ * MCP server disabled
2667
+ */
2668
+ 200: unknown;
2669
+ };
2670
+ export type TuiAppendPromptData = {
2671
+ body?: {
2672
+ text: string;
2673
+ };
2674
+ path?: never;
2675
+ query?: {
2676
+ directory?: string;
2677
+ };
2678
+ url: "/tui/append-prompt";
2679
+ };
2680
+ export type TuiAppendPromptErrors = {
2681
+ /**
2682
+ * Bad request
2683
+ */
2684
+ 400: BadRequestError;
2685
+ };
2686
+ export type TuiAppendPromptError = TuiAppendPromptErrors[keyof TuiAppendPromptErrors];
2687
+ export type TuiAppendPromptResponses = {
2688
+ /**
2689
+ * Prompt processed successfully
2690
+ */
2691
+ 200: boolean;
2692
+ };
2693
+ export type TuiAppendPromptResponse = TuiAppendPromptResponses[keyof TuiAppendPromptResponses];
2694
+ export type TuiOpenHelpData = {
2695
+ body?: never;
2696
+ path?: never;
2697
+ query?: {
2698
+ directory?: string;
2699
+ };
2700
+ url: "/tui/open-help";
2701
+ };
2702
+ export type TuiOpenHelpResponses = {
2703
+ /**
2704
+ * Help dialog opened successfully
2705
+ */
2706
+ 200: boolean;
2707
+ };
2708
+ export type TuiOpenHelpResponse = TuiOpenHelpResponses[keyof TuiOpenHelpResponses];
2709
+ export type TuiOpenSessionsData = {
2710
+ body?: never;
2711
+ path?: never;
2712
+ query?: {
2713
+ directory?: string;
2714
+ };
2715
+ url: "/tui/open-sessions";
2716
+ };
2717
+ export type TuiOpenSessionsResponses = {
2718
+ /**
2719
+ * Session dialog opened successfully
2720
+ */
2721
+ 200: boolean;
2722
+ };
2723
+ export type TuiOpenSessionsResponse = TuiOpenSessionsResponses[keyof TuiOpenSessionsResponses];
2724
+ export type TuiOpenThemesData = {
2725
+ body?: never;
2726
+ path?: never;
2727
+ query?: {
2728
+ directory?: string;
2729
+ };
2730
+ url: "/tui/open-themes";
2731
+ };
2732
+ export type TuiOpenThemesResponses = {
2733
+ /**
2734
+ * Theme dialog opened successfully
2735
+ */
2736
+ 200: boolean;
2737
+ };
2738
+ export type TuiOpenThemesResponse = TuiOpenThemesResponses[keyof TuiOpenThemesResponses];
2739
+ export type TuiOpenModelsData = {
2740
+ body?: never;
2741
+ path?: never;
2742
+ query?: {
2743
+ directory?: string;
2744
+ };
2745
+ url: "/tui/open-models";
2746
+ };
2747
+ export type TuiOpenModelsResponses = {
2748
+ /**
2749
+ * Model dialog opened successfully
2750
+ */
2751
+ 200: boolean;
2752
+ };
2753
+ export type TuiOpenModelsResponse = TuiOpenModelsResponses[keyof TuiOpenModelsResponses];
2754
+ export type TuiSubmitPromptData = {
2755
+ body?: never;
2756
+ path?: never;
2757
+ query?: {
2758
+ directory?: string;
2759
+ };
2760
+ url: "/tui/submit-prompt";
2761
+ };
2762
+ export type TuiSubmitPromptResponses = {
2763
+ /**
2764
+ * Prompt submitted successfully
2765
+ */
2766
+ 200: boolean;
2767
+ };
2768
+ export type TuiSubmitPromptResponse = TuiSubmitPromptResponses[keyof TuiSubmitPromptResponses];
2769
+ export type TuiClearPromptData = {
2770
+ body?: never;
2771
+ path?: never;
2772
+ query?: {
2773
+ directory?: string;
2774
+ };
2775
+ url: "/tui/clear-prompt";
2776
+ };
2777
+ export type TuiClearPromptResponses = {
2778
+ /**
2779
+ * Prompt cleared successfully
2780
+ */
2781
+ 200: boolean;
2782
+ };
2783
+ export type TuiClearPromptResponse = TuiClearPromptResponses[keyof TuiClearPromptResponses];
2784
+ export type TuiExecuteCommandData = {
2785
+ body?: {
2786
+ command: string;
2787
+ };
2788
+ path?: never;
2789
+ query?: {
2790
+ directory?: string;
2791
+ };
2792
+ url: "/tui/execute-command";
2793
+ };
2794
+ export type TuiExecuteCommandErrors = {
2795
+ /**
2796
+ * Bad request
2797
+ */
2798
+ 400: BadRequestError;
2799
+ };
2800
+ export type TuiExecuteCommandError = TuiExecuteCommandErrors[keyof TuiExecuteCommandErrors];
2801
+ export type TuiExecuteCommandResponses = {
2802
+ /**
2803
+ * Command executed successfully
2804
+ */
2805
+ 200: boolean;
2806
+ };
2807
+ export type TuiExecuteCommandResponse = TuiExecuteCommandResponses[keyof TuiExecuteCommandResponses];
2808
+ export type TuiShowToastData = {
2809
+ body?: {
2810
+ title?: string;
2811
+ message: string;
2812
+ variant: "info" | "success" | "warning" | "error";
2813
+ };
2814
+ path?: never;
2815
+ query?: {
2816
+ directory?: string;
2817
+ };
2818
+ url: "/tui/show-toast";
2819
+ };
2820
+ export type TuiShowToastResponses = {
2821
+ /**
2822
+ * Toast notification shown successfully
2823
+ */
2824
+ 200: boolean;
2825
+ };
2826
+ export type TuiShowToastResponse = TuiShowToastResponses[keyof TuiShowToastResponses];
2827
+ export type AuthSetData = {
2828
+ body?: Auth;
2829
+ path: {
2830
+ id: string;
2831
+ };
2832
+ query?: {
2833
+ directory?: string;
2834
+ };
2835
+ url: "/auth/{id}";
2836
+ };
2837
+ export type AuthSetErrors = {
2838
+ /**
2839
+ * Bad request
2840
+ */
2841
+ 400: BadRequestError;
2842
+ };
2843
+ export type AuthSetError = AuthSetErrors[keyof AuthSetErrors];
2844
+ export type AuthSetResponses = {
2845
+ /**
2846
+ * Successfully set authentication credentials
2847
+ */
2848
+ 200: boolean;
2849
+ };
2850
+ export type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses];
2851
+ export type EventSubscribeData = {
2852
+ body?: never;
2853
+ path?: never;
2854
+ query?: {
2855
+ directory?: string;
2856
+ };
2857
+ url: "/event";
2858
+ };
2859
+ export type EventSubscribeResponses = {
2860
+ /**
2861
+ * Event stream
2862
+ */
2863
+ 200: Event;
2864
+ };
2865
+ export type EventSubscribeResponse = EventSubscribeResponses[keyof EventSubscribeResponses];
2866
+ export type ClientOptions = {
2867
+ baseUrl: `${string}://${string}` | (string & {});
2868
+ };