1{
2 "swagger": "2.0",
3 "info": {
4 "description": "Crush is a terminal-based AI coding assistant. This API is served over a Unix socket (or Windows named pipe) and provides programmatic access to workspaces, sessions, agents, LSP, MCP, and more.",
5 "title": "Crush API",
6 "contact": {
7 "name": "Charm",
8 "url": "https://charm.sh"
9 },
10 "license": {
11 "name": "MIT",
12 "url": "https://github.com/charmbracelet/crush/blob/main/LICENSE"
13 },
14 "version": "1.0"
15 },
16 "basePath": "/v1",
17 "paths": {
18 "/config": {
19 "get": {
20 "produces": [
21 "application/json"
22 ],
23 "tags": [
24 "system"
25 ],
26 "summary": "Get server config",
27 "responses": {
28 "200": {
29 "description": "OK",
30 "schema": {
31 "type": "object"
32 }
33 }
34 }
35 }
36 },
37 "/control": {
38 "post": {
39 "consumes": [
40 "application/json"
41 ],
42 "tags": [
43 "system"
44 ],
45 "summary": "Send server control command",
46 "parameters": [
47 {
48 "description": "Control command (e.g. shutdown)",
49 "name": "request",
50 "in": "body",
51 "required": true,
52 "schema": {
53 "$ref": "#/definitions/proto.ServerControl"
54 }
55 }
56 ],
57 "responses": {
58 "200": {
59 "description": "OK"
60 },
61 "400": {
62 "description": "Bad Request",
63 "schema": {
64 "$ref": "#/definitions/proto.Error"
65 }
66 }
67 }
68 }
69 },
70 "/health": {
71 "get": {
72 "tags": [
73 "system"
74 ],
75 "summary": "Health check",
76 "responses": {
77 "200": {
78 "description": "OK"
79 }
80 }
81 }
82 },
83 "/version": {
84 "get": {
85 "produces": [
86 "application/json"
87 ],
88 "tags": [
89 "system"
90 ],
91 "summary": "Get server version",
92 "responses": {
93 "200": {
94 "description": "OK",
95 "schema": {
96 "$ref": "#/definitions/proto.VersionInfo"
97 }
98 }
99 }
100 }
101 },
102 "/workspaces": {
103 "get": {
104 "produces": [
105 "application/json"
106 ],
107 "tags": [
108 "workspaces"
109 ],
110 "summary": "List workspaces",
111 "responses": {
112 "200": {
113 "description": "OK",
114 "schema": {
115 "type": "array",
116 "items": {
117 "$ref": "#/definitions/proto.Workspace"
118 }
119 }
120 }
121 }
122 },
123 "post": {
124 "consumes": [
125 "application/json"
126 ],
127 "produces": [
128 "application/json"
129 ],
130 "tags": [
131 "workspaces"
132 ],
133 "summary": "Create workspace",
134 "parameters": [
135 {
136 "description": "Workspace creation params",
137 "name": "request",
138 "in": "body",
139 "required": true,
140 "schema": {
141 "$ref": "#/definitions/proto.Workspace"
142 }
143 }
144 ],
145 "responses": {
146 "200": {
147 "description": "OK",
148 "schema": {
149 "$ref": "#/definitions/proto.Workspace"
150 }
151 },
152 "400": {
153 "description": "Bad Request",
154 "schema": {
155 "$ref": "#/definitions/proto.Error"
156 }
157 },
158 "500": {
159 "description": "Internal Server Error",
160 "schema": {
161 "$ref": "#/definitions/proto.Error"
162 }
163 }
164 }
165 }
166 },
167 "/workspaces/{id}": {
168 "get": {
169 "produces": [
170 "application/json"
171 ],
172 "tags": [
173 "workspaces"
174 ],
175 "summary": "Get workspace",
176 "parameters": [
177 {
178 "type": "string",
179 "description": "Workspace ID",
180 "name": "id",
181 "in": "path",
182 "required": true
183 }
184 ],
185 "responses": {
186 "200": {
187 "description": "OK",
188 "schema": {
189 "$ref": "#/definitions/proto.Workspace"
190 }
191 },
192 "404": {
193 "description": "Not Found",
194 "schema": {
195 "$ref": "#/definitions/proto.Error"
196 }
197 },
198 "500": {
199 "description": "Internal Server Error",
200 "schema": {
201 "$ref": "#/definitions/proto.Error"
202 }
203 }
204 }
205 },
206 "delete": {
207 "tags": [
208 "workspaces"
209 ],
210 "summary": "Delete workspace",
211 "parameters": [
212 {
213 "type": "string",
214 "description": "Workspace ID",
215 "name": "id",
216 "in": "path",
217 "required": true
218 }
219 ],
220 "responses": {
221 "200": {
222 "description": "OK"
223 },
224 "404": {
225 "description": "Not Found",
226 "schema": {
227 "$ref": "#/definitions/proto.Error"
228 }
229 }
230 }
231 }
232 },
233 "/workspaces/{id}/agent": {
234 "get": {
235 "produces": [
236 "application/json"
237 ],
238 "tags": [
239 "agent"
240 ],
241 "summary": "Get agent info",
242 "parameters": [
243 {
244 "type": "string",
245 "description": "Workspace ID",
246 "name": "id",
247 "in": "path",
248 "required": true
249 }
250 ],
251 "responses": {
252 "200": {
253 "description": "OK",
254 "schema": {
255 "$ref": "#/definitions/proto.AgentInfo"
256 }
257 },
258 "404": {
259 "description": "Not Found",
260 "schema": {
261 "$ref": "#/definitions/proto.Error"
262 }
263 },
264 "500": {
265 "description": "Internal Server Error",
266 "schema": {
267 "$ref": "#/definitions/proto.Error"
268 }
269 }
270 }
271 },
272 "post": {
273 "consumes": [
274 "application/json"
275 ],
276 "tags": [
277 "agent"
278 ],
279 "summary": "Send message to agent",
280 "parameters": [
281 {
282 "type": "string",
283 "description": "Workspace ID",
284 "name": "id",
285 "in": "path",
286 "required": true
287 },
288 {
289 "description": "Agent message",
290 "name": "request",
291 "in": "body",
292 "required": true,
293 "schema": {
294 "$ref": "#/definitions/proto.AgentMessage"
295 }
296 }
297 ],
298 "responses": {
299 "200": {
300 "description": "OK"
301 },
302 "400": {
303 "description": "Bad Request",
304 "schema": {
305 "$ref": "#/definitions/proto.Error"
306 }
307 },
308 "404": {
309 "description": "Not Found",
310 "schema": {
311 "$ref": "#/definitions/proto.Error"
312 }
313 },
314 "500": {
315 "description": "Internal Server Error",
316 "schema": {
317 "$ref": "#/definitions/proto.Error"
318 }
319 }
320 }
321 }
322 },
323 "/workspaces/{id}/agent/default-small-model": {
324 "get": {
325 "produces": [
326 "application/json"
327 ],
328 "tags": [
329 "agent"
330 ],
331 "summary": "Get default small model",
332 "parameters": [
333 {
334 "type": "string",
335 "description": "Workspace ID",
336 "name": "id",
337 "in": "path",
338 "required": true
339 },
340 {
341 "type": "string",
342 "description": "Provider ID",
343 "name": "provider_id",
344 "in": "query"
345 }
346 ],
347 "responses": {
348 "200": {
349 "description": "OK",
350 "schema": {
351 "type": "object"
352 }
353 },
354 "404": {
355 "description": "Not Found",
356 "schema": {
357 "$ref": "#/definitions/proto.Error"
358 }
359 },
360 "500": {
361 "description": "Internal Server Error",
362 "schema": {
363 "$ref": "#/definitions/proto.Error"
364 }
365 }
366 }
367 }
368 },
369 "/workspaces/{id}/agent/init": {
370 "post": {
371 "tags": [
372 "agent"
373 ],
374 "summary": "Initialize agent",
375 "parameters": [
376 {
377 "type": "string",
378 "description": "Workspace ID",
379 "name": "id",
380 "in": "path",
381 "required": true
382 }
383 ],
384 "responses": {
385 "200": {
386 "description": "OK"
387 },
388 "404": {
389 "description": "Not Found",
390 "schema": {
391 "$ref": "#/definitions/proto.Error"
392 }
393 },
394 "500": {
395 "description": "Internal Server Error",
396 "schema": {
397 "$ref": "#/definitions/proto.Error"
398 }
399 }
400 }
401 }
402 },
403 "/workspaces/{id}/agent/sessions/{sid}": {
404 "get": {
405 "produces": [
406 "application/json"
407 ],
408 "tags": [
409 "agent"
410 ],
411 "summary": "Get agent session",
412 "parameters": [
413 {
414 "type": "string",
415 "description": "Workspace ID",
416 "name": "id",
417 "in": "path",
418 "required": true
419 },
420 {
421 "type": "string",
422 "description": "Session ID",
423 "name": "sid",
424 "in": "path",
425 "required": true
426 }
427 ],
428 "responses": {
429 "200": {
430 "description": "OK",
431 "schema": {
432 "$ref": "#/definitions/proto.AgentSession"
433 }
434 },
435 "404": {
436 "description": "Not Found",
437 "schema": {
438 "$ref": "#/definitions/proto.Error"
439 }
440 },
441 "500": {
442 "description": "Internal Server Error",
443 "schema": {
444 "$ref": "#/definitions/proto.Error"
445 }
446 }
447 }
448 }
449 },
450 "/workspaces/{id}/agent/sessions/{sid}/cancel": {
451 "post": {
452 "tags": [
453 "agent"
454 ],
455 "summary": "Cancel agent session",
456 "parameters": [
457 {
458 "type": "string",
459 "description": "Workspace ID",
460 "name": "id",
461 "in": "path",
462 "required": true
463 },
464 {
465 "type": "string",
466 "description": "Session ID",
467 "name": "sid",
468 "in": "path",
469 "required": true
470 }
471 ],
472 "responses": {
473 "200": {
474 "description": "OK"
475 },
476 "404": {
477 "description": "Not Found",
478 "schema": {
479 "$ref": "#/definitions/proto.Error"
480 }
481 },
482 "500": {
483 "description": "Internal Server Error",
484 "schema": {
485 "$ref": "#/definitions/proto.Error"
486 }
487 }
488 }
489 }
490 },
491 "/workspaces/{id}/agent/sessions/{sid}/prompts/clear": {
492 "post": {
493 "tags": [
494 "agent"
495 ],
496 "summary": "Clear prompt queue",
497 "parameters": [
498 {
499 "type": "string",
500 "description": "Workspace ID",
501 "name": "id",
502 "in": "path",
503 "required": true
504 },
505 {
506 "type": "string",
507 "description": "Session ID",
508 "name": "sid",
509 "in": "path",
510 "required": true
511 }
512 ],
513 "responses": {
514 "200": {
515 "description": "OK"
516 },
517 "404": {
518 "description": "Not Found",
519 "schema": {
520 "$ref": "#/definitions/proto.Error"
521 }
522 },
523 "500": {
524 "description": "Internal Server Error",
525 "schema": {
526 "$ref": "#/definitions/proto.Error"
527 }
528 }
529 }
530 }
531 },
532 "/workspaces/{id}/agent/sessions/{sid}/prompts/list": {
533 "get": {
534 "produces": [
535 "application/json"
536 ],
537 "tags": [
538 "agent"
539 ],
540 "summary": "List queued prompts",
541 "parameters": [
542 {
543 "type": "string",
544 "description": "Workspace ID",
545 "name": "id",
546 "in": "path",
547 "required": true
548 },
549 {
550 "type": "string",
551 "description": "Session ID",
552 "name": "sid",
553 "in": "path",
554 "required": true
555 }
556 ],
557 "responses": {
558 "200": {
559 "description": "OK",
560 "schema": {
561 "type": "array",
562 "items": {
563 "type": "string"
564 }
565 }
566 },
567 "404": {
568 "description": "Not Found",
569 "schema": {
570 "$ref": "#/definitions/proto.Error"
571 }
572 },
573 "500": {
574 "description": "Internal Server Error",
575 "schema": {
576 "$ref": "#/definitions/proto.Error"
577 }
578 }
579 }
580 }
581 },
582 "/workspaces/{id}/agent/sessions/{sid}/prompts/queued": {
583 "get": {
584 "produces": [
585 "application/json"
586 ],
587 "tags": [
588 "agent"
589 ],
590 "summary": "Get queued prompt status",
591 "parameters": [
592 {
593 "type": "string",
594 "description": "Workspace ID",
595 "name": "id",
596 "in": "path",
597 "required": true
598 },
599 {
600 "type": "string",
601 "description": "Session ID",
602 "name": "sid",
603 "in": "path",
604 "required": true
605 }
606 ],
607 "responses": {
608 "200": {
609 "description": "OK",
610 "schema": {
611 "type": "object"
612 }
613 },
614 "404": {
615 "description": "Not Found",
616 "schema": {
617 "$ref": "#/definitions/proto.Error"
618 }
619 },
620 "500": {
621 "description": "Internal Server Error",
622 "schema": {
623 "$ref": "#/definitions/proto.Error"
624 }
625 }
626 }
627 }
628 },
629 "/workspaces/{id}/agent/sessions/{sid}/summarize": {
630 "post": {
631 "tags": [
632 "agent"
633 ],
634 "summary": "Summarize session",
635 "parameters": [
636 {
637 "type": "string",
638 "description": "Workspace ID",
639 "name": "id",
640 "in": "path",
641 "required": true
642 },
643 {
644 "type": "string",
645 "description": "Session ID",
646 "name": "sid",
647 "in": "path",
648 "required": true
649 }
650 ],
651 "responses": {
652 "200": {
653 "description": "OK"
654 },
655 "404": {
656 "description": "Not Found",
657 "schema": {
658 "$ref": "#/definitions/proto.Error"
659 }
660 },
661 "500": {
662 "description": "Internal Server Error",
663 "schema": {
664 "$ref": "#/definitions/proto.Error"
665 }
666 }
667 }
668 }
669 },
670 "/workspaces/{id}/agent/update": {
671 "post": {
672 "tags": [
673 "agent"
674 ],
675 "summary": "Update agent",
676 "parameters": [
677 {
678 "type": "string",
679 "description": "Workspace ID",
680 "name": "id",
681 "in": "path",
682 "required": true
683 }
684 ],
685 "responses": {
686 "200": {
687 "description": "OK"
688 },
689 "404": {
690 "description": "Not Found",
691 "schema": {
692 "$ref": "#/definitions/proto.Error"
693 }
694 },
695 "500": {
696 "description": "Internal Server Error",
697 "schema": {
698 "$ref": "#/definitions/proto.Error"
699 }
700 }
701 }
702 }
703 },
704 "/workspaces/{id}/config": {
705 "get": {
706 "produces": [
707 "application/json"
708 ],
709 "tags": [
710 "workspaces"
711 ],
712 "summary": "Get workspace config",
713 "parameters": [
714 {
715 "type": "string",
716 "description": "Workspace ID",
717 "name": "id",
718 "in": "path",
719 "required": true
720 }
721 ],
722 "responses": {
723 "200": {
724 "description": "OK",
725 "schema": {
726 "type": "object"
727 }
728 },
729 "404": {
730 "description": "Not Found",
731 "schema": {
732 "$ref": "#/definitions/proto.Error"
733 }
734 },
735 "500": {
736 "description": "Internal Server Error",
737 "schema": {
738 "$ref": "#/definitions/proto.Error"
739 }
740 }
741 }
742 }
743 },
744 "/workspaces/{id}/config/compact": {
745 "post": {
746 "consumes": [
747 "application/json"
748 ],
749 "tags": [
750 "config"
751 ],
752 "summary": "Set compact mode",
753 "parameters": [
754 {
755 "type": "string",
756 "description": "Workspace ID",
757 "name": "id",
758 "in": "path",
759 "required": true
760 },
761 {
762 "description": "Config compact request",
763 "name": "request",
764 "in": "body",
765 "required": true,
766 "schema": {
767 "$ref": "#/definitions/proto.ConfigCompactRequest"
768 }
769 }
770 ],
771 "responses": {
772 "200": {
773 "description": "OK"
774 },
775 "400": {
776 "description": "Bad Request",
777 "schema": {
778 "$ref": "#/definitions/proto.Error"
779 }
780 },
781 "404": {
782 "description": "Not Found",
783 "schema": {
784 "$ref": "#/definitions/proto.Error"
785 }
786 },
787 "500": {
788 "description": "Internal Server Error",
789 "schema": {
790 "$ref": "#/definitions/proto.Error"
791 }
792 }
793 }
794 }
795 },
796 "/workspaces/{id}/config/import-copilot": {
797 "post": {
798 "produces": [
799 "application/json"
800 ],
801 "tags": [
802 "config"
803 ],
804 "summary": "Import Copilot credentials",
805 "parameters": [
806 {
807 "type": "string",
808 "description": "Workspace ID",
809 "name": "id",
810 "in": "path",
811 "required": true
812 }
813 ],
814 "responses": {
815 "200": {
816 "description": "OK",
817 "schema": {
818 "$ref": "#/definitions/proto.ImportCopilotResponse"
819 }
820 },
821 "404": {
822 "description": "Not Found",
823 "schema": {
824 "$ref": "#/definitions/proto.Error"
825 }
826 },
827 "500": {
828 "description": "Internal Server Error",
829 "schema": {
830 "$ref": "#/definitions/proto.Error"
831 }
832 }
833 }
834 }
835 },
836 "/workspaces/{id}/config/model": {
837 "post": {
838 "consumes": [
839 "application/json"
840 ],
841 "tags": [
842 "config"
843 ],
844 "summary": "Set the preferred model",
845 "parameters": [
846 {
847 "type": "string",
848 "description": "Workspace ID",
849 "name": "id",
850 "in": "path",
851 "required": true
852 },
853 {
854 "description": "Config model request",
855 "name": "request",
856 "in": "body",
857 "required": true,
858 "schema": {
859 "$ref": "#/definitions/proto.ConfigModelRequest"
860 }
861 }
862 ],
863 "responses": {
864 "200": {
865 "description": "OK"
866 },
867 "400": {
868 "description": "Bad Request",
869 "schema": {
870 "$ref": "#/definitions/proto.Error"
871 }
872 },
873 "404": {
874 "description": "Not Found",
875 "schema": {
876 "$ref": "#/definitions/proto.Error"
877 }
878 },
879 "500": {
880 "description": "Internal Server Error",
881 "schema": {
882 "$ref": "#/definitions/proto.Error"
883 }
884 }
885 }
886 }
887 },
888 "/workspaces/{id}/config/provider-key": {
889 "post": {
890 "consumes": [
891 "application/json"
892 ],
893 "tags": [
894 "config"
895 ],
896 "summary": "Set provider API key",
897 "parameters": [
898 {
899 "type": "string",
900 "description": "Workspace ID",
901 "name": "id",
902 "in": "path",
903 "required": true
904 },
905 {
906 "description": "Config provider key request",
907 "name": "request",
908 "in": "body",
909 "required": true,
910 "schema": {
911 "$ref": "#/definitions/proto.ConfigProviderKeyRequest"
912 }
913 }
914 ],
915 "responses": {
916 "200": {
917 "description": "OK"
918 },
919 "400": {
920 "description": "Bad Request",
921 "schema": {
922 "$ref": "#/definitions/proto.Error"
923 }
924 },
925 "404": {
926 "description": "Not Found",
927 "schema": {
928 "$ref": "#/definitions/proto.Error"
929 }
930 },
931 "500": {
932 "description": "Internal Server Error",
933 "schema": {
934 "$ref": "#/definitions/proto.Error"
935 }
936 }
937 }
938 }
939 },
940 "/workspaces/{id}/config/refresh-oauth": {
941 "post": {
942 "consumes": [
943 "application/json"
944 ],
945 "tags": [
946 "config"
947 ],
948 "summary": "Refresh OAuth token",
949 "parameters": [
950 {
951 "type": "string",
952 "description": "Workspace ID",
953 "name": "id",
954 "in": "path",
955 "required": true
956 },
957 {
958 "description": "Refresh OAuth request",
959 "name": "request",
960 "in": "body",
961 "required": true,
962 "schema": {
963 "$ref": "#/definitions/proto.ConfigRefreshOAuthRequest"
964 }
965 }
966 ],
967 "responses": {
968 "200": {
969 "description": "OK"
970 },
971 "400": {
972 "description": "Bad Request",
973 "schema": {
974 "$ref": "#/definitions/proto.Error"
975 }
976 },
977 "404": {
978 "description": "Not Found",
979 "schema": {
980 "$ref": "#/definitions/proto.Error"
981 }
982 },
983 "500": {
984 "description": "Internal Server Error",
985 "schema": {
986 "$ref": "#/definitions/proto.Error"
987 }
988 }
989 }
990 }
991 },
992 "/workspaces/{id}/config/remove": {
993 "post": {
994 "consumes": [
995 "application/json"
996 ],
997 "tags": [
998 "config"
999 ],
1000 "summary": "Remove a config field",
1001 "parameters": [
1002 {
1003 "type": "string",
1004 "description": "Workspace ID",
1005 "name": "id",
1006 "in": "path",
1007 "required": true
1008 },
1009 {
1010 "description": "Config remove request",
1011 "name": "request",
1012 "in": "body",
1013 "required": true,
1014 "schema": {
1015 "$ref": "#/definitions/proto.ConfigRemoveRequest"
1016 }
1017 }
1018 ],
1019 "responses": {
1020 "200": {
1021 "description": "OK"
1022 },
1023 "400": {
1024 "description": "Bad Request",
1025 "schema": {
1026 "$ref": "#/definitions/proto.Error"
1027 }
1028 },
1029 "404": {
1030 "description": "Not Found",
1031 "schema": {
1032 "$ref": "#/definitions/proto.Error"
1033 }
1034 },
1035 "500": {
1036 "description": "Internal Server Error",
1037 "schema": {
1038 "$ref": "#/definitions/proto.Error"
1039 }
1040 }
1041 }
1042 }
1043 },
1044 "/workspaces/{id}/config/set": {
1045 "post": {
1046 "consumes": [
1047 "application/json"
1048 ],
1049 "tags": [
1050 "config"
1051 ],
1052 "summary": "Set a config field",
1053 "parameters": [
1054 {
1055 "type": "string",
1056 "description": "Workspace ID",
1057 "name": "id",
1058 "in": "path",
1059 "required": true
1060 },
1061 {
1062 "description": "Config set request",
1063 "name": "request",
1064 "in": "body",
1065 "required": true,
1066 "schema": {
1067 "$ref": "#/definitions/proto.ConfigSetRequest"
1068 }
1069 }
1070 ],
1071 "responses": {
1072 "200": {
1073 "description": "OK"
1074 },
1075 "400": {
1076 "description": "Bad Request",
1077 "schema": {
1078 "$ref": "#/definitions/proto.Error"
1079 }
1080 },
1081 "404": {
1082 "description": "Not Found",
1083 "schema": {
1084 "$ref": "#/definitions/proto.Error"
1085 }
1086 },
1087 "500": {
1088 "description": "Internal Server Error",
1089 "schema": {
1090 "$ref": "#/definitions/proto.Error"
1091 }
1092 }
1093 }
1094 }
1095 },
1096 "/workspaces/{id}/events": {
1097 "get": {
1098 "produces": [
1099 "text/event-stream"
1100 ],
1101 "tags": [
1102 "workspaces"
1103 ],
1104 "summary": "Stream workspace events (SSE)",
1105 "parameters": [
1106 {
1107 "type": "string",
1108 "description": "Workspace ID",
1109 "name": "id",
1110 "in": "path",
1111 "required": true
1112 }
1113 ],
1114 "responses": {
1115 "200": {
1116 "description": "OK"
1117 },
1118 "404": {
1119 "description": "Not Found",
1120 "schema": {
1121 "$ref": "#/definitions/proto.Error"
1122 }
1123 },
1124 "500": {
1125 "description": "Internal Server Error",
1126 "schema": {
1127 "$ref": "#/definitions/proto.Error"
1128 }
1129 }
1130 }
1131 }
1132 },
1133 "/workspaces/{id}/filetracker/lastread": {
1134 "get": {
1135 "produces": [
1136 "application/json"
1137 ],
1138 "tags": [
1139 "filetracker"
1140 ],
1141 "summary": "Get last read time for file",
1142 "parameters": [
1143 {
1144 "type": "string",
1145 "description": "Workspace ID",
1146 "name": "id",
1147 "in": "path",
1148 "required": true
1149 },
1150 {
1151 "type": "string",
1152 "description": "Session ID",
1153 "name": "session_id",
1154 "in": "query"
1155 },
1156 {
1157 "type": "string",
1158 "description": "File path",
1159 "name": "path",
1160 "in": "query",
1161 "required": true
1162 }
1163 ],
1164 "responses": {
1165 "200": {
1166 "description": "OK",
1167 "schema": {
1168 "type": "object"
1169 }
1170 },
1171 "404": {
1172 "description": "Not Found",
1173 "schema": {
1174 "$ref": "#/definitions/proto.Error"
1175 }
1176 },
1177 "500": {
1178 "description": "Internal Server Error",
1179 "schema": {
1180 "$ref": "#/definitions/proto.Error"
1181 }
1182 }
1183 }
1184 }
1185 },
1186 "/workspaces/{id}/filetracker/read": {
1187 "post": {
1188 "consumes": [
1189 "application/json"
1190 ],
1191 "tags": [
1192 "filetracker"
1193 ],
1194 "summary": "Record file read",
1195 "parameters": [
1196 {
1197 "type": "string",
1198 "description": "Workspace ID",
1199 "name": "id",
1200 "in": "path",
1201 "required": true
1202 },
1203 {
1204 "description": "File tracker read request",
1205 "name": "request",
1206 "in": "body",
1207 "required": true,
1208 "schema": {
1209 "$ref": "#/definitions/proto.FileTrackerReadRequest"
1210 }
1211 }
1212 ],
1213 "responses": {
1214 "200": {
1215 "description": "OK"
1216 },
1217 "400": {
1218 "description": "Bad Request",
1219 "schema": {
1220 "$ref": "#/definitions/proto.Error"
1221 }
1222 },
1223 "404": {
1224 "description": "Not Found",
1225 "schema": {
1226 "$ref": "#/definitions/proto.Error"
1227 }
1228 },
1229 "500": {
1230 "description": "Internal Server Error",
1231 "schema": {
1232 "$ref": "#/definitions/proto.Error"
1233 }
1234 }
1235 }
1236 }
1237 },
1238 "/workspaces/{id}/lsps": {
1239 "get": {
1240 "produces": [
1241 "application/json"
1242 ],
1243 "tags": [
1244 "lsp"
1245 ],
1246 "summary": "List LSP clients",
1247 "parameters": [
1248 {
1249 "type": "string",
1250 "description": "Workspace ID",
1251 "name": "id",
1252 "in": "path",
1253 "required": true
1254 }
1255 ],
1256 "responses": {
1257 "200": {
1258 "description": "OK",
1259 "schema": {
1260 "type": "object",
1261 "additionalProperties": {
1262 "$ref": "#/definitions/proto.LSPClientInfo"
1263 }
1264 }
1265 },
1266 "404": {
1267 "description": "Not Found",
1268 "schema": {
1269 "$ref": "#/definitions/proto.Error"
1270 }
1271 },
1272 "500": {
1273 "description": "Internal Server Error",
1274 "schema": {
1275 "$ref": "#/definitions/proto.Error"
1276 }
1277 }
1278 }
1279 }
1280 },
1281 "/workspaces/{id}/lsps/start": {
1282 "post": {
1283 "consumes": [
1284 "application/json"
1285 ],
1286 "tags": [
1287 "lsp"
1288 ],
1289 "summary": "Start LSP server",
1290 "parameters": [
1291 {
1292 "type": "string",
1293 "description": "Workspace ID",
1294 "name": "id",
1295 "in": "path",
1296 "required": true
1297 },
1298 {
1299 "description": "LSP start request",
1300 "name": "request",
1301 "in": "body",
1302 "required": true,
1303 "schema": {
1304 "$ref": "#/definitions/proto.LSPStartRequest"
1305 }
1306 }
1307 ],
1308 "responses": {
1309 "200": {
1310 "description": "OK"
1311 },
1312 "400": {
1313 "description": "Bad Request",
1314 "schema": {
1315 "$ref": "#/definitions/proto.Error"
1316 }
1317 },
1318 "404": {
1319 "description": "Not Found",
1320 "schema": {
1321 "$ref": "#/definitions/proto.Error"
1322 }
1323 },
1324 "500": {
1325 "description": "Internal Server Error",
1326 "schema": {
1327 "$ref": "#/definitions/proto.Error"
1328 }
1329 }
1330 }
1331 }
1332 },
1333 "/workspaces/{id}/lsps/stop": {
1334 "post": {
1335 "tags": [
1336 "lsp"
1337 ],
1338 "summary": "Stop all LSP servers",
1339 "parameters": [
1340 {
1341 "type": "string",
1342 "description": "Workspace ID",
1343 "name": "id",
1344 "in": "path",
1345 "required": true
1346 }
1347 ],
1348 "responses": {
1349 "200": {
1350 "description": "OK"
1351 },
1352 "404": {
1353 "description": "Not Found",
1354 "schema": {
1355 "$ref": "#/definitions/proto.Error"
1356 }
1357 },
1358 "500": {
1359 "description": "Internal Server Error",
1360 "schema": {
1361 "$ref": "#/definitions/proto.Error"
1362 }
1363 }
1364 }
1365 }
1366 },
1367 "/workspaces/{id}/lsps/{lsp}/diagnostics": {
1368 "get": {
1369 "produces": [
1370 "application/json"
1371 ],
1372 "tags": [
1373 "lsp"
1374 ],
1375 "summary": "Get LSP diagnostics",
1376 "parameters": [
1377 {
1378 "type": "string",
1379 "description": "Workspace ID",
1380 "name": "id",
1381 "in": "path",
1382 "required": true
1383 },
1384 {
1385 "type": "string",
1386 "description": "LSP client name",
1387 "name": "lsp",
1388 "in": "path",
1389 "required": true
1390 }
1391 ],
1392 "responses": {
1393 "200": {
1394 "description": "OK",
1395 "schema": {
1396 "type": "object"
1397 }
1398 },
1399 "404": {
1400 "description": "Not Found",
1401 "schema": {
1402 "$ref": "#/definitions/proto.Error"
1403 }
1404 },
1405 "500": {
1406 "description": "Internal Server Error",
1407 "schema": {
1408 "$ref": "#/definitions/proto.Error"
1409 }
1410 }
1411 }
1412 }
1413 },
1414 "/workspaces/{id}/mcp/docker/disable": {
1415 "post": {
1416 "tags": [
1417 "mcp"
1418 ],
1419 "summary": "Disable Docker MCP",
1420 "parameters": [
1421 {
1422 "type": "string",
1423 "description": "Workspace ID",
1424 "name": "id",
1425 "in": "path",
1426 "required": true
1427 }
1428 ],
1429 "responses": {
1430 "200": {
1431 "description": "OK"
1432 },
1433 "404": {
1434 "description": "Not Found",
1435 "schema": {
1436 "$ref": "#/definitions/proto.Error"
1437 }
1438 },
1439 "500": {
1440 "description": "Internal Server Error",
1441 "schema": {
1442 "$ref": "#/definitions/proto.Error"
1443 }
1444 }
1445 }
1446 }
1447 },
1448 "/workspaces/{id}/mcp/docker/enable": {
1449 "post": {
1450 "tags": [
1451 "mcp"
1452 ],
1453 "summary": "Enable Docker MCP",
1454 "parameters": [
1455 {
1456 "type": "string",
1457 "description": "Workspace ID",
1458 "name": "id",
1459 "in": "path",
1460 "required": true
1461 }
1462 ],
1463 "responses": {
1464 "200": {
1465 "description": "OK"
1466 },
1467 "404": {
1468 "description": "Not Found",
1469 "schema": {
1470 "$ref": "#/definitions/proto.Error"
1471 }
1472 },
1473 "500": {
1474 "description": "Internal Server Error",
1475 "schema": {
1476 "$ref": "#/definitions/proto.Error"
1477 }
1478 }
1479 }
1480 }
1481 },
1482 "/workspaces/{id}/mcp/get-prompt": {
1483 "post": {
1484 "consumes": [
1485 "application/json"
1486 ],
1487 "produces": [
1488 "application/json"
1489 ],
1490 "tags": [
1491 "mcp"
1492 ],
1493 "summary": "Get MCP prompt",
1494 "parameters": [
1495 {
1496 "type": "string",
1497 "description": "Workspace ID",
1498 "name": "id",
1499 "in": "path",
1500 "required": true
1501 },
1502 {
1503 "description": "MCP get prompt request",
1504 "name": "request",
1505 "in": "body",
1506 "required": true,
1507 "schema": {
1508 "$ref": "#/definitions/proto.MCPGetPromptRequest"
1509 }
1510 }
1511 ],
1512 "responses": {
1513 "200": {
1514 "description": "OK",
1515 "schema": {
1516 "$ref": "#/definitions/proto.MCPGetPromptResponse"
1517 }
1518 },
1519 "400": {
1520 "description": "Bad Request",
1521 "schema": {
1522 "$ref": "#/definitions/proto.Error"
1523 }
1524 },
1525 "404": {
1526 "description": "Not Found",
1527 "schema": {
1528 "$ref": "#/definitions/proto.Error"
1529 }
1530 },
1531 "500": {
1532 "description": "Internal Server Error",
1533 "schema": {
1534 "$ref": "#/definitions/proto.Error"
1535 }
1536 }
1537 }
1538 }
1539 },
1540 "/workspaces/{id}/mcp/read-resource": {
1541 "post": {
1542 "consumes": [
1543 "application/json"
1544 ],
1545 "produces": [
1546 "application/json"
1547 ],
1548 "tags": [
1549 "mcp"
1550 ],
1551 "summary": "Read MCP resource",
1552 "parameters": [
1553 {
1554 "type": "string",
1555 "description": "Workspace ID",
1556 "name": "id",
1557 "in": "path",
1558 "required": true
1559 },
1560 {
1561 "description": "MCP read resource request",
1562 "name": "request",
1563 "in": "body",
1564 "required": true,
1565 "schema": {
1566 "$ref": "#/definitions/proto.MCPReadResourceRequest"
1567 }
1568 }
1569 ],
1570 "responses": {
1571 "200": {
1572 "description": "OK",
1573 "schema": {
1574 "type": "object"
1575 }
1576 },
1577 "400": {
1578 "description": "Bad Request",
1579 "schema": {
1580 "$ref": "#/definitions/proto.Error"
1581 }
1582 },
1583 "404": {
1584 "description": "Not Found",
1585 "schema": {
1586 "$ref": "#/definitions/proto.Error"
1587 }
1588 },
1589 "500": {
1590 "description": "Internal Server Error",
1591 "schema": {
1592 "$ref": "#/definitions/proto.Error"
1593 }
1594 }
1595 }
1596 }
1597 },
1598 "/workspaces/{id}/mcp/refresh-prompts": {
1599 "post": {
1600 "consumes": [
1601 "application/json"
1602 ],
1603 "tags": [
1604 "mcp"
1605 ],
1606 "summary": "Refresh MCP prompts",
1607 "parameters": [
1608 {
1609 "type": "string",
1610 "description": "Workspace ID",
1611 "name": "id",
1612 "in": "path",
1613 "required": true
1614 },
1615 {
1616 "description": "MCP name request",
1617 "name": "request",
1618 "in": "body",
1619 "required": true,
1620 "schema": {
1621 "$ref": "#/definitions/proto.MCPNameRequest"
1622 }
1623 }
1624 ],
1625 "responses": {
1626 "200": {
1627 "description": "OK"
1628 },
1629 "400": {
1630 "description": "Bad Request",
1631 "schema": {
1632 "$ref": "#/definitions/proto.Error"
1633 }
1634 },
1635 "404": {
1636 "description": "Not Found",
1637 "schema": {
1638 "$ref": "#/definitions/proto.Error"
1639 }
1640 },
1641 "500": {
1642 "description": "Internal Server Error",
1643 "schema": {
1644 "$ref": "#/definitions/proto.Error"
1645 }
1646 }
1647 }
1648 }
1649 },
1650 "/workspaces/{id}/mcp/refresh-resources": {
1651 "post": {
1652 "consumes": [
1653 "application/json"
1654 ],
1655 "tags": [
1656 "mcp"
1657 ],
1658 "summary": "Refresh MCP resources",
1659 "parameters": [
1660 {
1661 "type": "string",
1662 "description": "Workspace ID",
1663 "name": "id",
1664 "in": "path",
1665 "required": true
1666 },
1667 {
1668 "description": "MCP name request",
1669 "name": "request",
1670 "in": "body",
1671 "required": true,
1672 "schema": {
1673 "$ref": "#/definitions/proto.MCPNameRequest"
1674 }
1675 }
1676 ],
1677 "responses": {
1678 "200": {
1679 "description": "OK"
1680 },
1681 "400": {
1682 "description": "Bad Request",
1683 "schema": {
1684 "$ref": "#/definitions/proto.Error"
1685 }
1686 },
1687 "404": {
1688 "description": "Not Found",
1689 "schema": {
1690 "$ref": "#/definitions/proto.Error"
1691 }
1692 },
1693 "500": {
1694 "description": "Internal Server Error",
1695 "schema": {
1696 "$ref": "#/definitions/proto.Error"
1697 }
1698 }
1699 }
1700 }
1701 },
1702 "/workspaces/{id}/mcp/refresh-tools": {
1703 "post": {
1704 "consumes": [
1705 "application/json"
1706 ],
1707 "tags": [
1708 "mcp"
1709 ],
1710 "summary": "Refresh MCP tools",
1711 "parameters": [
1712 {
1713 "type": "string",
1714 "description": "Workspace ID",
1715 "name": "id",
1716 "in": "path",
1717 "required": true
1718 },
1719 {
1720 "description": "MCP name request",
1721 "name": "request",
1722 "in": "body",
1723 "required": true,
1724 "schema": {
1725 "$ref": "#/definitions/proto.MCPNameRequest"
1726 }
1727 }
1728 ],
1729 "responses": {
1730 "200": {
1731 "description": "OK"
1732 },
1733 "400": {
1734 "description": "Bad Request",
1735 "schema": {
1736 "$ref": "#/definitions/proto.Error"
1737 }
1738 },
1739 "404": {
1740 "description": "Not Found",
1741 "schema": {
1742 "$ref": "#/definitions/proto.Error"
1743 }
1744 },
1745 "500": {
1746 "description": "Internal Server Error",
1747 "schema": {
1748 "$ref": "#/definitions/proto.Error"
1749 }
1750 }
1751 }
1752 }
1753 },
1754 "/workspaces/{id}/mcp/states": {
1755 "get": {
1756 "produces": [
1757 "application/json"
1758 ],
1759 "tags": [
1760 "mcp"
1761 ],
1762 "summary": "Get MCP client states",
1763 "parameters": [
1764 {
1765 "type": "string",
1766 "description": "Workspace ID",
1767 "name": "id",
1768 "in": "path",
1769 "required": true
1770 }
1771 ],
1772 "responses": {
1773 "200": {
1774 "description": "OK",
1775 "schema": {
1776 "type": "object",
1777 "additionalProperties": {
1778 "$ref": "#/definitions/proto.MCPClientInfo"
1779 }
1780 }
1781 },
1782 "404": {
1783 "description": "Not Found",
1784 "schema": {
1785 "$ref": "#/definitions/proto.Error"
1786 }
1787 },
1788 "500": {
1789 "description": "Internal Server Error",
1790 "schema": {
1791 "$ref": "#/definitions/proto.Error"
1792 }
1793 }
1794 }
1795 }
1796 },
1797 "/workspaces/{id}/messages/user": {
1798 "get": {
1799 "produces": [
1800 "application/json"
1801 ],
1802 "tags": [
1803 "workspaces"
1804 ],
1805 "summary": "Get all user messages for workspace",
1806 "parameters": [
1807 {
1808 "type": "string",
1809 "description": "Workspace ID",
1810 "name": "id",
1811 "in": "path",
1812 "required": true
1813 }
1814 ],
1815 "responses": {
1816 "200": {
1817 "description": "OK",
1818 "schema": {
1819 "type": "array",
1820 "items": {
1821 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_proto.Message"
1822 }
1823 }
1824 },
1825 "404": {
1826 "description": "Not Found",
1827 "schema": {
1828 "$ref": "#/definitions/proto.Error"
1829 }
1830 },
1831 "500": {
1832 "description": "Internal Server Error",
1833 "schema": {
1834 "$ref": "#/definitions/proto.Error"
1835 }
1836 }
1837 }
1838 }
1839 },
1840 "/workspaces/{id}/permissions/grant": {
1841 "post": {
1842 "consumes": [
1843 "application/json"
1844 ],
1845 "tags": [
1846 "permissions"
1847 ],
1848 "summary": "Grant permission",
1849 "parameters": [
1850 {
1851 "type": "string",
1852 "description": "Workspace ID",
1853 "name": "id",
1854 "in": "path",
1855 "required": true
1856 },
1857 {
1858 "description": "Permission grant",
1859 "name": "request",
1860 "in": "body",
1861 "required": true,
1862 "schema": {
1863 "$ref": "#/definitions/proto.PermissionGrant"
1864 }
1865 }
1866 ],
1867 "responses": {
1868 "200": {
1869 "description": "OK"
1870 },
1871 "400": {
1872 "description": "Bad Request",
1873 "schema": {
1874 "$ref": "#/definitions/proto.Error"
1875 }
1876 },
1877 "404": {
1878 "description": "Not Found",
1879 "schema": {
1880 "$ref": "#/definitions/proto.Error"
1881 }
1882 },
1883 "500": {
1884 "description": "Internal Server Error",
1885 "schema": {
1886 "$ref": "#/definitions/proto.Error"
1887 }
1888 }
1889 }
1890 }
1891 },
1892 "/workspaces/{id}/permissions/skip": {
1893 "get": {
1894 "produces": [
1895 "application/json"
1896 ],
1897 "tags": [
1898 "permissions"
1899 ],
1900 "summary": "Get skip permissions status",
1901 "parameters": [
1902 {
1903 "type": "string",
1904 "description": "Workspace ID",
1905 "name": "id",
1906 "in": "path",
1907 "required": true
1908 }
1909 ],
1910 "responses": {
1911 "200": {
1912 "description": "OK",
1913 "schema": {
1914 "$ref": "#/definitions/proto.PermissionSkipRequest"
1915 }
1916 },
1917 "404": {
1918 "description": "Not Found",
1919 "schema": {
1920 "$ref": "#/definitions/proto.Error"
1921 }
1922 },
1923 "500": {
1924 "description": "Internal Server Error",
1925 "schema": {
1926 "$ref": "#/definitions/proto.Error"
1927 }
1928 }
1929 }
1930 },
1931 "post": {
1932 "consumes": [
1933 "application/json"
1934 ],
1935 "tags": [
1936 "permissions"
1937 ],
1938 "summary": "Set skip permissions",
1939 "parameters": [
1940 {
1941 "type": "string",
1942 "description": "Workspace ID",
1943 "name": "id",
1944 "in": "path",
1945 "required": true
1946 },
1947 {
1948 "description": "Permission skip request",
1949 "name": "request",
1950 "in": "body",
1951 "required": true,
1952 "schema": {
1953 "$ref": "#/definitions/proto.PermissionSkipRequest"
1954 }
1955 }
1956 ],
1957 "responses": {
1958 "200": {
1959 "description": "OK"
1960 },
1961 "400": {
1962 "description": "Bad Request",
1963 "schema": {
1964 "$ref": "#/definitions/proto.Error"
1965 }
1966 },
1967 "404": {
1968 "description": "Not Found",
1969 "schema": {
1970 "$ref": "#/definitions/proto.Error"
1971 }
1972 },
1973 "500": {
1974 "description": "Internal Server Error",
1975 "schema": {
1976 "$ref": "#/definitions/proto.Error"
1977 }
1978 }
1979 }
1980 }
1981 },
1982 "/workspaces/{id}/project/init": {
1983 "post": {
1984 "tags": [
1985 "project"
1986 ],
1987 "summary": "Mark project as initialized",
1988 "parameters": [
1989 {
1990 "type": "string",
1991 "description": "Workspace ID",
1992 "name": "id",
1993 "in": "path",
1994 "required": true
1995 }
1996 ],
1997 "responses": {
1998 "200": {
1999 "description": "OK"
2000 },
2001 "404": {
2002 "description": "Not Found",
2003 "schema": {
2004 "$ref": "#/definitions/proto.Error"
2005 }
2006 },
2007 "500": {
2008 "description": "Internal Server Error",
2009 "schema": {
2010 "$ref": "#/definitions/proto.Error"
2011 }
2012 }
2013 }
2014 }
2015 },
2016 "/workspaces/{id}/project/init-prompt": {
2017 "get": {
2018 "produces": [
2019 "application/json"
2020 ],
2021 "tags": [
2022 "project"
2023 ],
2024 "summary": "Get project initialization prompt",
2025 "parameters": [
2026 {
2027 "type": "string",
2028 "description": "Workspace ID",
2029 "name": "id",
2030 "in": "path",
2031 "required": true
2032 }
2033 ],
2034 "responses": {
2035 "200": {
2036 "description": "OK",
2037 "schema": {
2038 "$ref": "#/definitions/proto.ProjectInitPromptResponse"
2039 }
2040 },
2041 "404": {
2042 "description": "Not Found",
2043 "schema": {
2044 "$ref": "#/definitions/proto.Error"
2045 }
2046 },
2047 "500": {
2048 "description": "Internal Server Error",
2049 "schema": {
2050 "$ref": "#/definitions/proto.Error"
2051 }
2052 }
2053 }
2054 }
2055 },
2056 "/workspaces/{id}/project/needs-init": {
2057 "get": {
2058 "produces": [
2059 "application/json"
2060 ],
2061 "tags": [
2062 "project"
2063 ],
2064 "summary": "Check if project needs initialization",
2065 "parameters": [
2066 {
2067 "type": "string",
2068 "description": "Workspace ID",
2069 "name": "id",
2070 "in": "path",
2071 "required": true
2072 }
2073 ],
2074 "responses": {
2075 "200": {
2076 "description": "OK",
2077 "schema": {
2078 "$ref": "#/definitions/proto.ProjectNeedsInitResponse"
2079 }
2080 },
2081 "404": {
2082 "description": "Not Found",
2083 "schema": {
2084 "$ref": "#/definitions/proto.Error"
2085 }
2086 },
2087 "500": {
2088 "description": "Internal Server Error",
2089 "schema": {
2090 "$ref": "#/definitions/proto.Error"
2091 }
2092 }
2093 }
2094 }
2095 },
2096 "/workspaces/{id}/providers": {
2097 "get": {
2098 "produces": [
2099 "application/json"
2100 ],
2101 "tags": [
2102 "workspaces"
2103 ],
2104 "summary": "Get workspace providers",
2105 "parameters": [
2106 {
2107 "type": "string",
2108 "description": "Workspace ID",
2109 "name": "id",
2110 "in": "path",
2111 "required": true
2112 }
2113 ],
2114 "responses": {
2115 "200": {
2116 "description": "OK",
2117 "schema": {
2118 "type": "object"
2119 }
2120 },
2121 "404": {
2122 "description": "Not Found",
2123 "schema": {
2124 "$ref": "#/definitions/proto.Error"
2125 }
2126 },
2127 "500": {
2128 "description": "Internal Server Error",
2129 "schema": {
2130 "$ref": "#/definitions/proto.Error"
2131 }
2132 }
2133 }
2134 }
2135 },
2136 "/workspaces/{id}/sessions": {
2137 "get": {
2138 "produces": [
2139 "application/json"
2140 ],
2141 "tags": [
2142 "sessions"
2143 ],
2144 "summary": "List sessions",
2145 "parameters": [
2146 {
2147 "type": "string",
2148 "description": "Workspace ID",
2149 "name": "id",
2150 "in": "path",
2151 "required": true
2152 }
2153 ],
2154 "responses": {
2155 "200": {
2156 "description": "OK",
2157 "schema": {
2158 "type": "array",
2159 "items": {
2160 "$ref": "#/definitions/proto.Session"
2161 }
2162 }
2163 },
2164 "404": {
2165 "description": "Not Found",
2166 "schema": {
2167 "$ref": "#/definitions/proto.Error"
2168 }
2169 },
2170 "500": {
2171 "description": "Internal Server Error",
2172 "schema": {
2173 "$ref": "#/definitions/proto.Error"
2174 }
2175 }
2176 }
2177 },
2178 "post": {
2179 "consumes": [
2180 "application/json"
2181 ],
2182 "produces": [
2183 "application/json"
2184 ],
2185 "tags": [
2186 "sessions"
2187 ],
2188 "summary": "Create session",
2189 "parameters": [
2190 {
2191 "type": "string",
2192 "description": "Workspace ID",
2193 "name": "id",
2194 "in": "path",
2195 "required": true
2196 },
2197 {
2198 "description": "Session creation params (title)",
2199 "name": "request",
2200 "in": "body",
2201 "required": true,
2202 "schema": {
2203 "$ref": "#/definitions/proto.Session"
2204 }
2205 }
2206 ],
2207 "responses": {
2208 "200": {
2209 "description": "OK",
2210 "schema": {
2211 "$ref": "#/definitions/proto.Session"
2212 }
2213 },
2214 "400": {
2215 "description": "Bad Request",
2216 "schema": {
2217 "$ref": "#/definitions/proto.Error"
2218 }
2219 },
2220 "404": {
2221 "description": "Not Found",
2222 "schema": {
2223 "$ref": "#/definitions/proto.Error"
2224 }
2225 },
2226 "500": {
2227 "description": "Internal Server Error",
2228 "schema": {
2229 "$ref": "#/definitions/proto.Error"
2230 }
2231 }
2232 }
2233 }
2234 },
2235 "/workspaces/{id}/sessions/{sid}": {
2236 "get": {
2237 "produces": [
2238 "application/json"
2239 ],
2240 "tags": [
2241 "sessions"
2242 ],
2243 "summary": "Get session",
2244 "parameters": [
2245 {
2246 "type": "string",
2247 "description": "Workspace ID",
2248 "name": "id",
2249 "in": "path",
2250 "required": true
2251 },
2252 {
2253 "type": "string",
2254 "description": "Session ID",
2255 "name": "sid",
2256 "in": "path",
2257 "required": true
2258 }
2259 ],
2260 "responses": {
2261 "200": {
2262 "description": "OK",
2263 "schema": {
2264 "$ref": "#/definitions/proto.Session"
2265 }
2266 },
2267 "404": {
2268 "description": "Not Found",
2269 "schema": {
2270 "$ref": "#/definitions/proto.Error"
2271 }
2272 },
2273 "500": {
2274 "description": "Internal Server Error",
2275 "schema": {
2276 "$ref": "#/definitions/proto.Error"
2277 }
2278 }
2279 }
2280 },
2281 "put": {
2282 "consumes": [
2283 "application/json"
2284 ],
2285 "produces": [
2286 "application/json"
2287 ],
2288 "tags": [
2289 "sessions"
2290 ],
2291 "summary": "Update session",
2292 "parameters": [
2293 {
2294 "type": "string",
2295 "description": "Workspace ID",
2296 "name": "id",
2297 "in": "path",
2298 "required": true
2299 },
2300 {
2301 "type": "string",
2302 "description": "Session ID",
2303 "name": "sid",
2304 "in": "path",
2305 "required": true
2306 },
2307 {
2308 "description": "Updated session",
2309 "name": "request",
2310 "in": "body",
2311 "required": true,
2312 "schema": {
2313 "$ref": "#/definitions/proto.Session"
2314 }
2315 }
2316 ],
2317 "responses": {
2318 "200": {
2319 "description": "OK",
2320 "schema": {
2321 "$ref": "#/definitions/proto.Session"
2322 }
2323 },
2324 "400": {
2325 "description": "Bad Request",
2326 "schema": {
2327 "$ref": "#/definitions/proto.Error"
2328 }
2329 },
2330 "404": {
2331 "description": "Not Found",
2332 "schema": {
2333 "$ref": "#/definitions/proto.Error"
2334 }
2335 },
2336 "500": {
2337 "description": "Internal Server Error",
2338 "schema": {
2339 "$ref": "#/definitions/proto.Error"
2340 }
2341 }
2342 }
2343 },
2344 "delete": {
2345 "tags": [
2346 "sessions"
2347 ],
2348 "summary": "Delete session",
2349 "parameters": [
2350 {
2351 "type": "string",
2352 "description": "Workspace ID",
2353 "name": "id",
2354 "in": "path",
2355 "required": true
2356 },
2357 {
2358 "type": "string",
2359 "description": "Session ID",
2360 "name": "sid",
2361 "in": "path",
2362 "required": true
2363 }
2364 ],
2365 "responses": {
2366 "200": {
2367 "description": "OK"
2368 },
2369 "404": {
2370 "description": "Not Found",
2371 "schema": {
2372 "$ref": "#/definitions/proto.Error"
2373 }
2374 },
2375 "500": {
2376 "description": "Internal Server Error",
2377 "schema": {
2378 "$ref": "#/definitions/proto.Error"
2379 }
2380 }
2381 }
2382 }
2383 },
2384 "/workspaces/{id}/sessions/{sid}/filetracker/files": {
2385 "get": {
2386 "produces": [
2387 "application/json"
2388 ],
2389 "tags": [
2390 "filetracker"
2391 ],
2392 "summary": "List tracked files for session",
2393 "parameters": [
2394 {
2395 "type": "string",
2396 "description": "Workspace ID",
2397 "name": "id",
2398 "in": "path",
2399 "required": true
2400 },
2401 {
2402 "type": "string",
2403 "description": "Session ID",
2404 "name": "sid",
2405 "in": "path",
2406 "required": true
2407 }
2408 ],
2409 "responses": {
2410 "200": {
2411 "description": "OK",
2412 "schema": {
2413 "type": "array",
2414 "items": {
2415 "type": "string"
2416 }
2417 }
2418 },
2419 "404": {
2420 "description": "Not Found",
2421 "schema": {
2422 "$ref": "#/definitions/proto.Error"
2423 }
2424 },
2425 "500": {
2426 "description": "Internal Server Error",
2427 "schema": {
2428 "$ref": "#/definitions/proto.Error"
2429 }
2430 }
2431 }
2432 }
2433 },
2434 "/workspaces/{id}/sessions/{sid}/history": {
2435 "get": {
2436 "produces": [
2437 "application/json"
2438 ],
2439 "tags": [
2440 "sessions"
2441 ],
2442 "summary": "Get session history",
2443 "parameters": [
2444 {
2445 "type": "string",
2446 "description": "Workspace ID",
2447 "name": "id",
2448 "in": "path",
2449 "required": true
2450 },
2451 {
2452 "type": "string",
2453 "description": "Session ID",
2454 "name": "sid",
2455 "in": "path",
2456 "required": true
2457 }
2458 ],
2459 "responses": {
2460 "200": {
2461 "description": "OK",
2462 "schema": {
2463 "type": "array",
2464 "items": {
2465 "$ref": "#/definitions/proto.File"
2466 }
2467 }
2468 },
2469 "404": {
2470 "description": "Not Found",
2471 "schema": {
2472 "$ref": "#/definitions/proto.Error"
2473 }
2474 },
2475 "500": {
2476 "description": "Internal Server Error",
2477 "schema": {
2478 "$ref": "#/definitions/proto.Error"
2479 }
2480 }
2481 }
2482 }
2483 },
2484 "/workspaces/{id}/sessions/{sid}/messages": {
2485 "get": {
2486 "produces": [
2487 "application/json"
2488 ],
2489 "tags": [
2490 "sessions"
2491 ],
2492 "summary": "Get session messages",
2493 "parameters": [
2494 {
2495 "type": "string",
2496 "description": "Workspace ID",
2497 "name": "id",
2498 "in": "path",
2499 "required": true
2500 },
2501 {
2502 "type": "string",
2503 "description": "Session ID",
2504 "name": "sid",
2505 "in": "path",
2506 "required": true
2507 }
2508 ],
2509 "responses": {
2510 "200": {
2511 "description": "OK",
2512 "schema": {
2513 "type": "array",
2514 "items": {
2515 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_proto.Message"
2516 }
2517 }
2518 },
2519 "404": {
2520 "description": "Not Found",
2521 "schema": {
2522 "$ref": "#/definitions/proto.Error"
2523 }
2524 },
2525 "500": {
2526 "description": "Internal Server Error",
2527 "schema": {
2528 "$ref": "#/definitions/proto.Error"
2529 }
2530 }
2531 }
2532 }
2533 },
2534 "/workspaces/{id}/sessions/{sid}/messages/user": {
2535 "get": {
2536 "produces": [
2537 "application/json"
2538 ],
2539 "tags": [
2540 "sessions"
2541 ],
2542 "summary": "Get user messages for session",
2543 "parameters": [
2544 {
2545 "type": "string",
2546 "description": "Workspace ID",
2547 "name": "id",
2548 "in": "path",
2549 "required": true
2550 },
2551 {
2552 "type": "string",
2553 "description": "Session ID",
2554 "name": "sid",
2555 "in": "path",
2556 "required": true
2557 }
2558 ],
2559 "responses": {
2560 "200": {
2561 "description": "OK",
2562 "schema": {
2563 "type": "array",
2564 "items": {
2565 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_proto.Message"
2566 }
2567 }
2568 },
2569 "404": {
2570 "description": "Not Found",
2571 "schema": {
2572 "$ref": "#/definitions/proto.Error"
2573 }
2574 },
2575 "500": {
2576 "description": "Internal Server Error",
2577 "schema": {
2578 "$ref": "#/definitions/proto.Error"
2579 }
2580 }
2581 }
2582 }
2583 }
2584 },
2585 "definitions": {
2586 "catwalk.Model": {
2587 "type": "object",
2588 "properties": {
2589 "can_reason": {
2590 "type": "boolean"
2591 },
2592 "context_window": {
2593 "type": "integer"
2594 },
2595 "cost_per_1m_in": {
2596 "type": "number"
2597 },
2598 "cost_per_1m_in_cached": {
2599 "type": "number"
2600 },
2601 "cost_per_1m_out": {
2602 "type": "number"
2603 },
2604 "cost_per_1m_out_cached": {
2605 "type": "number"
2606 },
2607 "default_max_tokens": {
2608 "type": "integer"
2609 },
2610 "default_reasoning_effort": {
2611 "type": "string"
2612 },
2613 "id": {
2614 "type": "string"
2615 },
2616 "name": {
2617 "type": "string"
2618 },
2619 "options": {
2620 "$ref": "#/definitions/catwalk.ModelOptions"
2621 },
2622 "reasoning_levels": {
2623 "type": "array",
2624 "items": {
2625 "type": "string"
2626 }
2627 },
2628 "supports_attachments": {
2629 "type": "boolean"
2630 }
2631 }
2632 },
2633 "catwalk.ModelOptions": {
2634 "type": "object",
2635 "properties": {
2636 "frequency_penalty": {
2637 "type": "number"
2638 },
2639 "presence_penalty": {
2640 "type": "number"
2641 },
2642 "provider_options": {
2643 "type": "object",
2644 "additionalProperties": {}
2645 },
2646 "temperature": {
2647 "type": "number"
2648 },
2649 "top_k": {
2650 "type": "integer"
2651 },
2652 "top_p": {
2653 "type": "number"
2654 }
2655 }
2656 },
2657 "config.Attribution": {
2658 "type": "object",
2659 "properties": {
2660 "co_authored_by": {
2661 "type": "boolean"
2662 },
2663 "generated_with": {
2664 "type": "boolean"
2665 },
2666 "trailer_style": {
2667 "$ref": "#/definitions/config.TrailerStyle"
2668 }
2669 }
2670 },
2671 "config.Completions": {
2672 "type": "object",
2673 "properties": {
2674 "max_depth": {
2675 "type": "integer"
2676 },
2677 "max_items": {
2678 "type": "integer"
2679 }
2680 }
2681 },
2682 "config.HookConfig": {
2683 "type": "object",
2684 "properties": {
2685 "command": {
2686 "description": "Shell command to execute.",
2687 "type": "string"
2688 },
2689 "matcher": {
2690 "description": "Regex pattern tested against the tool name. Empty means match all.",
2691 "type": "string"
2692 },
2693 "timeout": {
2694 "description": "Timeout in seconds. Default 30.",
2695 "type": "integer"
2696 }
2697 }
2698 },
2699 "config.LSPConfig": {
2700 "type": "object",
2701 "properties": {
2702 "args": {
2703 "type": "array",
2704 "items": {
2705 "type": "string"
2706 }
2707 },
2708 "command": {
2709 "type": "string"
2710 },
2711 "disabled": {
2712 "type": "boolean"
2713 },
2714 "env": {
2715 "type": "object",
2716 "additionalProperties": {
2717 "type": "string"
2718 }
2719 },
2720 "filetypes": {
2721 "type": "array",
2722 "items": {
2723 "type": "string"
2724 }
2725 },
2726 "init_options": {
2727 "type": "object",
2728 "additionalProperties": {}
2729 },
2730 "options": {
2731 "type": "object",
2732 "additionalProperties": {}
2733 },
2734 "root_markers": {
2735 "type": "array",
2736 "items": {
2737 "type": "string"
2738 }
2739 },
2740 "timeout": {
2741 "type": "integer"
2742 }
2743 }
2744 },
2745 "config.LSPs": {
2746 "type": "object",
2747 "additionalProperties": {
2748 "$ref": "#/definitions/config.LSPConfig"
2749 }
2750 },
2751 "config.MCPConfig": {
2752 "type": "object",
2753 "properties": {
2754 "args": {
2755 "type": "array",
2756 "items": {
2757 "type": "string"
2758 }
2759 },
2760 "command": {
2761 "type": "string"
2762 },
2763 "disabled": {
2764 "type": "boolean"
2765 },
2766 "disabled_tools": {
2767 "type": "array",
2768 "items": {
2769 "type": "string"
2770 }
2771 },
2772 "enabled_tools": {
2773 "type": "array",
2774 "items": {
2775 "type": "string"
2776 }
2777 },
2778 "env": {
2779 "type": "object",
2780 "additionalProperties": {
2781 "type": "string"
2782 }
2783 },
2784 "headers": {
2785 "description": "Headers are HTTP headers for HTTP/SSE MCP servers. Values run\nthrough shell expansion at MCP startup, so $VAR and $(cmd)\nwork. A header whose value resolves to the empty string (unset\nbare $VAR under lenient nounset, $(echo), or literal \"\") is\nomitted from the outgoing request rather than sent as\n\"Header:\".",
2786 "type": "object",
2787 "additionalProperties": {
2788 "type": "string"
2789 }
2790 },
2791 "timeout": {
2792 "type": "integer"
2793 },
2794 "type": {
2795 "$ref": "#/definitions/config.MCPType"
2796 },
2797 "url": {
2798 "type": "string"
2799 }
2800 }
2801 },
2802 "config.MCPType": {
2803 "type": "string",
2804 "enum": [
2805 "stdio",
2806 "sse",
2807 "http"
2808 ],
2809 "x-enum-varnames": [
2810 "MCPStdio",
2811 "MCPSSE",
2812 "MCPHttp"
2813 ]
2814 },
2815 "config.MCPs": {
2816 "type": "object",
2817 "additionalProperties": {
2818 "$ref": "#/definitions/config.MCPConfig"
2819 }
2820 },
2821 "config.Permissions": {
2822 "type": "object",
2823 "properties": {
2824 "allowed_tools": {
2825 "type": "array",
2826 "items": {
2827 "type": "string"
2828 }
2829 }
2830 }
2831 },
2832 "config.Scope": {
2833 "type": "integer",
2834 "enum": [
2835 0,
2836 1
2837 ],
2838 "x-enum-varnames": [
2839 "ScopeGlobal",
2840 "ScopeWorkspace"
2841 ]
2842 },
2843 "config.SelectedModel": {
2844 "type": "object",
2845 "properties": {
2846 "frequency_penalty": {
2847 "type": "number"
2848 },
2849 "max_tokens": {
2850 "description": "Overrides the default model configuration.",
2851 "type": "integer"
2852 },
2853 "model": {
2854 "description": "The model id as used by the provider API.\nRequired.",
2855 "type": "string"
2856 },
2857 "presence_penalty": {
2858 "type": "number"
2859 },
2860 "provider": {
2861 "description": "The model provider, same as the key/id used in the providers config.\nRequired.",
2862 "type": "string"
2863 },
2864 "provider_options": {
2865 "description": "Override provider specific options.",
2866 "type": "object",
2867 "additionalProperties": {}
2868 },
2869 "reasoning_effort": {
2870 "description": "Only used by models that use the openai provider and need this set.",
2871 "type": "string"
2872 },
2873 "temperature": {
2874 "type": "number"
2875 },
2876 "think": {
2877 "description": "Used by anthropic models that can reason to indicate if the model should think.",
2878 "type": "boolean"
2879 },
2880 "top_k": {
2881 "type": "integer"
2882 },
2883 "top_p": {
2884 "type": "number"
2885 }
2886 }
2887 },
2888 "config.SelectedModelType": {
2889 "type": "string",
2890 "enum": [
2891 "large",
2892 "small"
2893 ],
2894 "x-enum-varnames": [
2895 "SelectedModelTypeLarge",
2896 "SelectedModelTypeSmall"
2897 ]
2898 },
2899 "config.TUIOptions": {
2900 "type": "object",
2901 "properties": {
2902 "compact_mode": {
2903 "type": "boolean"
2904 },
2905 "completions": {
2906 "$ref": "#/definitions/config.Completions"
2907 },
2908 "diff_mode": {
2909 "type": "string"
2910 },
2911 "transparent": {
2912 "type": "boolean"
2913 }
2914 }
2915 },
2916 "config.ToolGrep": {
2917 "type": "object",
2918 "properties": {
2919 "timeout": {
2920 "$ref": "#/definitions/time.Duration"
2921 }
2922 }
2923 },
2924 "config.ToolLs": {
2925 "type": "object",
2926 "properties": {
2927 "max_depth": {
2928 "type": "integer"
2929 },
2930 "max_items": {
2931 "type": "integer"
2932 }
2933 }
2934 },
2935 "config.Tools": {
2936 "type": "object",
2937 "properties": {
2938 "grep": {
2939 "$ref": "#/definitions/config.ToolGrep"
2940 },
2941 "ls": {
2942 "$ref": "#/definitions/config.ToolLs"
2943 }
2944 }
2945 },
2946 "config.TrailerStyle": {
2947 "type": "string",
2948 "enum": [
2949 "none",
2950 "co-authored-by",
2951 "assisted-by"
2952 ],
2953 "x-enum-varnames": [
2954 "TrailerStyleNone",
2955 "TrailerStyleCoAuthoredBy",
2956 "TrailerStyleAssistedBy"
2957 ]
2958 },
2959 "csync.Map-string-config_ProviderConfig": {
2960 "type": "object"
2961 },
2962 "github_com_charmbracelet_crush_internal_config.Config": {
2963 "type": "object",
2964 "properties": {
2965 "$schema": {
2966 "type": "string"
2967 },
2968 "hooks": {
2969 "type": "object",
2970 "additionalProperties": {
2971 "type": "array",
2972 "items": {
2973 "$ref": "#/definitions/config.HookConfig"
2974 }
2975 }
2976 },
2977 "lsp": {
2978 "$ref": "#/definitions/config.LSPs"
2979 },
2980 "mcp": {
2981 "$ref": "#/definitions/config.MCPs"
2982 },
2983 "models": {
2984 "description": "We currently only support large/small as values here.",
2985 "type": "object",
2986 "additionalProperties": {
2987 "$ref": "#/definitions/config.SelectedModel"
2988 }
2989 },
2990 "options": {
2991 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_config.Options"
2992 },
2993 "permissions": {
2994 "$ref": "#/definitions/config.Permissions"
2995 },
2996 "providers": {
2997 "description": "The providers that are configured",
2998 "allOf": [
2999 {
3000 "$ref": "#/definitions/csync.Map-string-config_ProviderConfig"
3001 }
3002 ]
3003 },
3004 "recent_models": {
3005 "description": "Recently used models stored in the data directory config.",
3006 "type": "object",
3007 "additionalProperties": {
3008 "type": "array",
3009 "items": {
3010 "$ref": "#/definitions/config.SelectedModel"
3011 }
3012 }
3013 },
3014 "tools": {
3015 "$ref": "#/definitions/config.Tools"
3016 }
3017 }
3018 },
3019 "github_com_charmbracelet_crush_internal_config.Options": {
3020 "type": "object",
3021 "properties": {
3022 "attribution": {
3023 "$ref": "#/definitions/config.Attribution"
3024 },
3025 "auto_lsp": {
3026 "type": "boolean"
3027 },
3028 "context_paths": {
3029 "type": "array",
3030 "items": {
3031 "type": "string"
3032 }
3033 },
3034 "data_directory": {
3035 "description": "DataDirectory is where Crush keeps per-project state such as\nthe SQLite database and workspace overrides. Relative paths are\nresolved against the working directory; absolute paths are used\nverbatim. After defaulting the stored value is always absolute.",
3036 "type": "string"
3037 },
3038 "debug": {
3039 "type": "boolean"
3040 },
3041 "debug_lsp": {
3042 "type": "boolean"
3043 },
3044 "disable_auto_summarize": {
3045 "type": "boolean"
3046 },
3047 "disable_default_providers": {
3048 "type": "boolean"
3049 },
3050 "disable_metrics": {
3051 "type": "boolean"
3052 },
3053 "disable_notifications": {
3054 "type": "boolean"
3055 },
3056 "disable_provider_auto_update": {
3057 "type": "boolean"
3058 },
3059 "disabled_skills": {
3060 "type": "array",
3061 "items": {
3062 "type": "string"
3063 }
3064 },
3065 "disabled_tools": {
3066 "type": "array",
3067 "items": {
3068 "type": "string"
3069 }
3070 },
3071 "initialize_as": {
3072 "type": "string"
3073 },
3074 "progress": {
3075 "type": "boolean"
3076 },
3077 "skills_paths": {
3078 "type": "array",
3079 "items": {
3080 "type": "string"
3081 }
3082 },
3083 "tui": {
3084 "$ref": "#/definitions/config.TUIOptions"
3085 }
3086 }
3087 },
3088 "github_com_charmbracelet_crush_internal_proto.Message": {
3089 "type": "object",
3090 "properties": {
3091 "created_at": {
3092 "type": "integer"
3093 },
3094 "id": {
3095 "type": "string"
3096 },
3097 "model": {
3098 "type": "string"
3099 },
3100 "parts": {
3101 "type": "array",
3102 "items": {}
3103 },
3104 "provider": {
3105 "type": "string"
3106 },
3107 "role": {
3108 "$ref": "#/definitions/proto.MessageRole"
3109 },
3110 "session_id": {
3111 "type": "string"
3112 },
3113 "updated_at": {
3114 "type": "integer"
3115 }
3116 }
3117 },
3118 "lsp.ServerState": {
3119 "type": "integer",
3120 "enum": [
3121 0,
3122 1,
3123 2,
3124 3,
3125 4,
3126 5
3127 ],
3128 "x-enum-varnames": [
3129 "StateUnstarted",
3130 "StateStarting",
3131 "StateReady",
3132 "StateError",
3133 "StateStopped",
3134 "StateDisabled"
3135 ]
3136 },
3137 "proto.APIKeyKind": {
3138 "type": "string",
3139 "enum": [
3140 "string",
3141 "oauth"
3142 ],
3143 "x-enum-varnames": [
3144 "APIKeyKindString",
3145 "APIKeyKindOAuth"
3146 ]
3147 },
3148 "proto.AgentInfo": {
3149 "type": "object",
3150 "properties": {
3151 "is_busy": {
3152 "type": "boolean"
3153 },
3154 "is_ready": {
3155 "type": "boolean"
3156 },
3157 "model": {
3158 "$ref": "#/definitions/catwalk.Model"
3159 },
3160 "model_cfg": {
3161 "$ref": "#/definitions/config.SelectedModel"
3162 }
3163 }
3164 },
3165 "proto.AgentMessage": {
3166 "type": "object",
3167 "properties": {
3168 "attachments": {
3169 "type": "array",
3170 "items": {
3171 "$ref": "#/definitions/proto.Attachment"
3172 }
3173 },
3174 "prompt": {
3175 "type": "string"
3176 },
3177 "session_id": {
3178 "type": "string"
3179 }
3180 }
3181 },
3182 "proto.AgentSession": {
3183 "type": "object",
3184 "properties": {
3185 "completion_tokens": {
3186 "type": "integer"
3187 },
3188 "cost": {
3189 "type": "number"
3190 },
3191 "created_at": {
3192 "type": "integer"
3193 },
3194 "id": {
3195 "type": "string"
3196 },
3197 "is_busy": {
3198 "type": "boolean"
3199 },
3200 "message_count": {
3201 "type": "integer"
3202 },
3203 "parent_session_id": {
3204 "type": "string"
3205 },
3206 "prompt_tokens": {
3207 "type": "integer"
3208 },
3209 "summary_message_id": {
3210 "type": "string"
3211 },
3212 "title": {
3213 "type": "string"
3214 },
3215 "updated_at": {
3216 "type": "integer"
3217 }
3218 }
3219 },
3220 "proto.Attachment": {
3221 "type": "object",
3222 "properties": {
3223 "content": {
3224 "type": "array",
3225 "items": {
3226 "type": "integer"
3227 }
3228 },
3229 "file_name": {
3230 "type": "string"
3231 },
3232 "file_path": {
3233 "type": "string"
3234 },
3235 "mime_type": {
3236 "type": "string"
3237 }
3238 }
3239 },
3240 "proto.ConfigCompactRequest": {
3241 "type": "object",
3242 "properties": {
3243 "enabled": {
3244 "type": "boolean"
3245 },
3246 "scope": {
3247 "$ref": "#/definitions/config.Scope"
3248 }
3249 }
3250 },
3251 "proto.ConfigModelRequest": {
3252 "type": "object",
3253 "properties": {
3254 "model": {
3255 "$ref": "#/definitions/config.SelectedModel"
3256 },
3257 "model_type": {
3258 "$ref": "#/definitions/config.SelectedModelType"
3259 },
3260 "scope": {
3261 "$ref": "#/definitions/config.Scope"
3262 }
3263 }
3264 },
3265 "proto.ConfigProviderKeyRequest": {
3266 "type": "object",
3267 "properties": {
3268 "api_key": {
3269 "type": "array",
3270 "items": {
3271 "type": "integer"
3272 }
3273 },
3274 "kind": {
3275 "$ref": "#/definitions/proto.APIKeyKind"
3276 },
3277 "provider_id": {
3278 "type": "string"
3279 },
3280 "scope": {
3281 "$ref": "#/definitions/config.Scope"
3282 }
3283 }
3284 },
3285 "proto.ConfigRefreshOAuthRequest": {
3286 "type": "object",
3287 "properties": {
3288 "provider_id": {
3289 "type": "string"
3290 },
3291 "scope": {
3292 "$ref": "#/definitions/config.Scope"
3293 }
3294 }
3295 },
3296 "proto.ConfigRemoveRequest": {
3297 "type": "object",
3298 "properties": {
3299 "key": {
3300 "type": "string"
3301 },
3302 "scope": {
3303 "$ref": "#/definitions/config.Scope"
3304 }
3305 }
3306 },
3307 "proto.ConfigSetRequest": {
3308 "type": "object",
3309 "properties": {
3310 "key": {
3311 "type": "string"
3312 },
3313 "scope": {
3314 "$ref": "#/definitions/config.Scope"
3315 },
3316 "value": {}
3317 }
3318 },
3319 "proto.Error": {
3320 "type": "object",
3321 "properties": {
3322 "message": {
3323 "type": "string"
3324 }
3325 }
3326 },
3327 "proto.File": {
3328 "type": "object",
3329 "properties": {
3330 "content": {
3331 "type": "string"
3332 },
3333 "created_at": {
3334 "type": "integer"
3335 },
3336 "id": {
3337 "type": "string"
3338 },
3339 "path": {
3340 "type": "string"
3341 },
3342 "session_id": {
3343 "type": "string"
3344 },
3345 "updated_at": {
3346 "type": "integer"
3347 },
3348 "version": {
3349 "type": "integer"
3350 }
3351 }
3352 },
3353 "proto.FileTrackerReadRequest": {
3354 "type": "object",
3355 "properties": {
3356 "path": {
3357 "type": "string"
3358 },
3359 "session_id": {
3360 "type": "string"
3361 }
3362 }
3363 },
3364 "proto.ImportCopilotResponse": {
3365 "type": "object",
3366 "properties": {
3367 "success": {
3368 "type": "boolean"
3369 },
3370 "token": {}
3371 }
3372 },
3373 "proto.LSPClientInfo": {
3374 "type": "object",
3375 "properties": {
3376 "connected_at": {
3377 "type": "string"
3378 },
3379 "diagnostic_count": {
3380 "type": "integer"
3381 },
3382 "error": {},
3383 "name": {
3384 "type": "string"
3385 },
3386 "state": {
3387 "$ref": "#/definitions/lsp.ServerState"
3388 }
3389 }
3390 },
3391 "proto.LSPStartRequest": {
3392 "type": "object",
3393 "properties": {
3394 "path": {
3395 "type": "string"
3396 }
3397 }
3398 },
3399 "proto.MCPClientInfo": {
3400 "type": "object",
3401 "properties": {
3402 "connected_at": {
3403 "type": "string"
3404 },
3405 "error": {},
3406 "name": {
3407 "type": "string"
3408 },
3409 "prompt_count": {
3410 "type": "integer"
3411 },
3412 "resource_count": {
3413 "type": "integer"
3414 },
3415 "state": {
3416 "$ref": "#/definitions/proto.MCPState"
3417 },
3418 "tool_count": {
3419 "type": "integer"
3420 }
3421 }
3422 },
3423 "proto.MCPGetPromptRequest": {
3424 "type": "object",
3425 "properties": {
3426 "args": {
3427 "type": "object",
3428 "additionalProperties": {
3429 "type": "string"
3430 }
3431 },
3432 "client_id": {
3433 "type": "string"
3434 },
3435 "prompt_id": {
3436 "type": "string"
3437 }
3438 }
3439 },
3440 "proto.MCPGetPromptResponse": {
3441 "type": "object",
3442 "properties": {
3443 "prompt": {
3444 "type": "string"
3445 }
3446 }
3447 },
3448 "proto.MCPNameRequest": {
3449 "type": "object",
3450 "properties": {
3451 "name": {
3452 "type": "string"
3453 }
3454 }
3455 },
3456 "proto.MCPReadResourceRequest": {
3457 "type": "object",
3458 "properties": {
3459 "name": {
3460 "type": "string"
3461 },
3462 "uri": {
3463 "type": "string"
3464 }
3465 }
3466 },
3467 "proto.MCPState": {
3468 "type": "integer",
3469 "enum": [
3470 0,
3471 1,
3472 2,
3473 3
3474 ],
3475 "x-enum-varnames": [
3476 "MCPStateDisabled",
3477 "MCPStateStarting",
3478 "MCPStateConnected",
3479 "MCPStateError"
3480 ]
3481 },
3482 "proto.MessageRole": {
3483 "type": "string",
3484 "enum": [
3485 "assistant",
3486 "user",
3487 "system",
3488 "tool"
3489 ],
3490 "x-enum-varnames": [
3491 "Assistant",
3492 "User",
3493 "System",
3494 "Tool"
3495 ]
3496 },
3497 "proto.PermissionAction": {
3498 "type": "string",
3499 "enum": [
3500 "allow",
3501 "allow_session",
3502 "deny"
3503 ],
3504 "x-enum-varnames": [
3505 "PermissionAllow",
3506 "PermissionAllowForSession",
3507 "PermissionDeny"
3508 ]
3509 },
3510 "proto.PermissionGrant": {
3511 "type": "object",
3512 "properties": {
3513 "action": {
3514 "$ref": "#/definitions/proto.PermissionAction"
3515 },
3516 "permission": {
3517 "$ref": "#/definitions/proto.PermissionRequest"
3518 }
3519 }
3520 },
3521 "proto.PermissionRequest": {
3522 "type": "object",
3523 "properties": {
3524 "action": {
3525 "type": "string"
3526 },
3527 "description": {
3528 "type": "string"
3529 },
3530 "id": {
3531 "type": "string"
3532 },
3533 "params": {},
3534 "path": {
3535 "type": "string"
3536 },
3537 "session_id": {
3538 "type": "string"
3539 },
3540 "tool_call_id": {
3541 "type": "string"
3542 },
3543 "tool_name": {
3544 "type": "string"
3545 }
3546 }
3547 },
3548 "proto.PermissionSkipRequest": {
3549 "type": "object",
3550 "properties": {
3551 "skip": {
3552 "type": "boolean"
3553 }
3554 }
3555 },
3556 "proto.ProjectInitPromptResponse": {
3557 "type": "object",
3558 "properties": {
3559 "prompt": {
3560 "type": "string"
3561 }
3562 }
3563 },
3564 "proto.ProjectNeedsInitResponse": {
3565 "type": "object",
3566 "properties": {
3567 "needs_init": {
3568 "type": "boolean"
3569 }
3570 }
3571 },
3572 "proto.ServerControl": {
3573 "type": "object",
3574 "properties": {
3575 "command": {
3576 "type": "string"
3577 }
3578 }
3579 },
3580 "proto.Session": {
3581 "type": "object",
3582 "properties": {
3583 "completion_tokens": {
3584 "type": "integer"
3585 },
3586 "cost": {
3587 "type": "number"
3588 },
3589 "created_at": {
3590 "type": "integer"
3591 },
3592 "id": {
3593 "type": "string"
3594 },
3595 "message_count": {
3596 "type": "integer"
3597 },
3598 "parent_session_id": {
3599 "type": "string"
3600 },
3601 "prompt_tokens": {
3602 "type": "integer"
3603 },
3604 "summary_message_id": {
3605 "type": "string"
3606 },
3607 "title": {
3608 "type": "string"
3609 },
3610 "updated_at": {
3611 "type": "integer"
3612 }
3613 }
3614 },
3615 "proto.VersionInfo": {
3616 "type": "object",
3617 "properties": {
3618 "build_id": {
3619 "type": "string"
3620 },
3621 "commit": {
3622 "type": "string"
3623 },
3624 "go_version": {
3625 "type": "string"
3626 },
3627 "platform": {
3628 "type": "string"
3629 },
3630 "version": {
3631 "type": "string"
3632 }
3633 }
3634 },
3635 "proto.Workspace": {
3636 "type": "object",
3637 "properties": {
3638 "config": {
3639 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_config.Config"
3640 },
3641 "data_dir": {
3642 "type": "string"
3643 },
3644 "debug": {
3645 "type": "boolean"
3646 },
3647 "env": {
3648 "type": "array",
3649 "items": {
3650 "type": "string"
3651 }
3652 },
3653 "id": {
3654 "type": "string"
3655 },
3656 "path": {
3657 "type": "string"
3658 },
3659 "version": {
3660 "type": "string"
3661 },
3662 "yolo": {
3663 "type": "boolean"
3664 }
3665 }
3666 },
3667 "time.Duration": {
3668 "type": "integer",
3669 "format": "int64",
3670 "enum": [
3671 -9223372036854775808,
3672 9223372036854775807,
3673 1,
3674 1000,
3675 1000000,
3676 1000000000,
3677 60000000000,
3678 3600000000000
3679 ],
3680 "x-enum-varnames": [
3681 "minDuration",
3682 "maxDuration",
3683 "Nanosecond",
3684 "Microsecond",
3685 "Millisecond",
3686 "Second",
3687 "Minute",
3688 "Hour"
3689 ]
3690 }
3691 }
3692}