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