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/get-prompt": {
1415 "post": {
1416 "consumes": [
1417 "application/json"
1418 ],
1419 "produces": [
1420 "application/json"
1421 ],
1422 "tags": [
1423 "mcp"
1424 ],
1425 "summary": "Get MCP prompt",
1426 "parameters": [
1427 {
1428 "type": "string",
1429 "description": "Workspace ID",
1430 "name": "id",
1431 "in": "path",
1432 "required": true
1433 },
1434 {
1435 "description": "MCP get prompt request",
1436 "name": "request",
1437 "in": "body",
1438 "required": true,
1439 "schema": {
1440 "$ref": "#/definitions/proto.MCPGetPromptRequest"
1441 }
1442 }
1443 ],
1444 "responses": {
1445 "200": {
1446 "description": "OK",
1447 "schema": {
1448 "$ref": "#/definitions/proto.MCPGetPromptResponse"
1449 }
1450 },
1451 "400": {
1452 "description": "Bad Request",
1453 "schema": {
1454 "$ref": "#/definitions/proto.Error"
1455 }
1456 },
1457 "404": {
1458 "description": "Not Found",
1459 "schema": {
1460 "$ref": "#/definitions/proto.Error"
1461 }
1462 },
1463 "500": {
1464 "description": "Internal Server Error",
1465 "schema": {
1466 "$ref": "#/definitions/proto.Error"
1467 }
1468 }
1469 }
1470 }
1471 },
1472 "/workspaces/{id}/mcp/read-resource": {
1473 "post": {
1474 "consumes": [
1475 "application/json"
1476 ],
1477 "produces": [
1478 "application/json"
1479 ],
1480 "tags": [
1481 "mcp"
1482 ],
1483 "summary": "Read MCP resource",
1484 "parameters": [
1485 {
1486 "type": "string",
1487 "description": "Workspace ID",
1488 "name": "id",
1489 "in": "path",
1490 "required": true
1491 },
1492 {
1493 "description": "MCP read resource request",
1494 "name": "request",
1495 "in": "body",
1496 "required": true,
1497 "schema": {
1498 "$ref": "#/definitions/proto.MCPReadResourceRequest"
1499 }
1500 }
1501 ],
1502 "responses": {
1503 "200": {
1504 "description": "OK",
1505 "schema": {
1506 "type": "object"
1507 }
1508 },
1509 "400": {
1510 "description": "Bad Request",
1511 "schema": {
1512 "$ref": "#/definitions/proto.Error"
1513 }
1514 },
1515 "404": {
1516 "description": "Not Found",
1517 "schema": {
1518 "$ref": "#/definitions/proto.Error"
1519 }
1520 },
1521 "500": {
1522 "description": "Internal Server Error",
1523 "schema": {
1524 "$ref": "#/definitions/proto.Error"
1525 }
1526 }
1527 }
1528 }
1529 },
1530 "/workspaces/{id}/mcp/refresh-prompts": {
1531 "post": {
1532 "consumes": [
1533 "application/json"
1534 ],
1535 "tags": [
1536 "mcp"
1537 ],
1538 "summary": "Refresh MCP prompts",
1539 "parameters": [
1540 {
1541 "type": "string",
1542 "description": "Workspace ID",
1543 "name": "id",
1544 "in": "path",
1545 "required": true
1546 },
1547 {
1548 "description": "MCP name request",
1549 "name": "request",
1550 "in": "body",
1551 "required": true,
1552 "schema": {
1553 "$ref": "#/definitions/proto.MCPNameRequest"
1554 }
1555 }
1556 ],
1557 "responses": {
1558 "200": {
1559 "description": "OK"
1560 },
1561 "400": {
1562 "description": "Bad Request",
1563 "schema": {
1564 "$ref": "#/definitions/proto.Error"
1565 }
1566 },
1567 "404": {
1568 "description": "Not Found",
1569 "schema": {
1570 "$ref": "#/definitions/proto.Error"
1571 }
1572 },
1573 "500": {
1574 "description": "Internal Server Error",
1575 "schema": {
1576 "$ref": "#/definitions/proto.Error"
1577 }
1578 }
1579 }
1580 }
1581 },
1582 "/workspaces/{id}/mcp/refresh-resources": {
1583 "post": {
1584 "consumes": [
1585 "application/json"
1586 ],
1587 "tags": [
1588 "mcp"
1589 ],
1590 "summary": "Refresh MCP resources",
1591 "parameters": [
1592 {
1593 "type": "string",
1594 "description": "Workspace ID",
1595 "name": "id",
1596 "in": "path",
1597 "required": true
1598 },
1599 {
1600 "description": "MCP name request",
1601 "name": "request",
1602 "in": "body",
1603 "required": true,
1604 "schema": {
1605 "$ref": "#/definitions/proto.MCPNameRequest"
1606 }
1607 }
1608 ],
1609 "responses": {
1610 "200": {
1611 "description": "OK"
1612 },
1613 "400": {
1614 "description": "Bad Request",
1615 "schema": {
1616 "$ref": "#/definitions/proto.Error"
1617 }
1618 },
1619 "404": {
1620 "description": "Not Found",
1621 "schema": {
1622 "$ref": "#/definitions/proto.Error"
1623 }
1624 },
1625 "500": {
1626 "description": "Internal Server Error",
1627 "schema": {
1628 "$ref": "#/definitions/proto.Error"
1629 }
1630 }
1631 }
1632 }
1633 },
1634 "/workspaces/{id}/mcp/refresh-tools": {
1635 "post": {
1636 "consumes": [
1637 "application/json"
1638 ],
1639 "tags": [
1640 "mcp"
1641 ],
1642 "summary": "Refresh MCP tools",
1643 "parameters": [
1644 {
1645 "type": "string",
1646 "description": "Workspace ID",
1647 "name": "id",
1648 "in": "path",
1649 "required": true
1650 },
1651 {
1652 "description": "MCP name request",
1653 "name": "request",
1654 "in": "body",
1655 "required": true,
1656 "schema": {
1657 "$ref": "#/definitions/proto.MCPNameRequest"
1658 }
1659 }
1660 ],
1661 "responses": {
1662 "200": {
1663 "description": "OK"
1664 },
1665 "400": {
1666 "description": "Bad Request",
1667 "schema": {
1668 "$ref": "#/definitions/proto.Error"
1669 }
1670 },
1671 "404": {
1672 "description": "Not Found",
1673 "schema": {
1674 "$ref": "#/definitions/proto.Error"
1675 }
1676 },
1677 "500": {
1678 "description": "Internal Server Error",
1679 "schema": {
1680 "$ref": "#/definitions/proto.Error"
1681 }
1682 }
1683 }
1684 }
1685 },
1686 "/workspaces/{id}/mcp/states": {
1687 "get": {
1688 "produces": [
1689 "application/json"
1690 ],
1691 "tags": [
1692 "mcp"
1693 ],
1694 "summary": "Get MCP client states",
1695 "parameters": [
1696 {
1697 "type": "string",
1698 "description": "Workspace ID",
1699 "name": "id",
1700 "in": "path",
1701 "required": true
1702 }
1703 ],
1704 "responses": {
1705 "200": {
1706 "description": "OK",
1707 "schema": {
1708 "type": "object",
1709 "additionalProperties": {
1710 "$ref": "#/definitions/proto.MCPClientInfo"
1711 }
1712 }
1713 },
1714 "404": {
1715 "description": "Not Found",
1716 "schema": {
1717 "$ref": "#/definitions/proto.Error"
1718 }
1719 },
1720 "500": {
1721 "description": "Internal Server Error",
1722 "schema": {
1723 "$ref": "#/definitions/proto.Error"
1724 }
1725 }
1726 }
1727 }
1728 },
1729 "/workspaces/{id}/messages/user": {
1730 "get": {
1731 "produces": [
1732 "application/json"
1733 ],
1734 "tags": [
1735 "workspaces"
1736 ],
1737 "summary": "Get all user messages for workspace",
1738 "parameters": [
1739 {
1740 "type": "string",
1741 "description": "Workspace ID",
1742 "name": "id",
1743 "in": "path",
1744 "required": true
1745 }
1746 ],
1747 "responses": {
1748 "200": {
1749 "description": "OK",
1750 "schema": {
1751 "type": "array",
1752 "items": {
1753 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_proto.Message"
1754 }
1755 }
1756 },
1757 "404": {
1758 "description": "Not Found",
1759 "schema": {
1760 "$ref": "#/definitions/proto.Error"
1761 }
1762 },
1763 "500": {
1764 "description": "Internal Server Error",
1765 "schema": {
1766 "$ref": "#/definitions/proto.Error"
1767 }
1768 }
1769 }
1770 }
1771 },
1772 "/workspaces/{id}/permissions/grant": {
1773 "post": {
1774 "consumes": [
1775 "application/json"
1776 ],
1777 "tags": [
1778 "permissions"
1779 ],
1780 "summary": "Grant permission",
1781 "parameters": [
1782 {
1783 "type": "string",
1784 "description": "Workspace ID",
1785 "name": "id",
1786 "in": "path",
1787 "required": true
1788 },
1789 {
1790 "description": "Permission grant",
1791 "name": "request",
1792 "in": "body",
1793 "required": true,
1794 "schema": {
1795 "$ref": "#/definitions/proto.PermissionGrant"
1796 }
1797 }
1798 ],
1799 "responses": {
1800 "200": {
1801 "description": "OK"
1802 },
1803 "400": {
1804 "description": "Bad Request",
1805 "schema": {
1806 "$ref": "#/definitions/proto.Error"
1807 }
1808 },
1809 "404": {
1810 "description": "Not Found",
1811 "schema": {
1812 "$ref": "#/definitions/proto.Error"
1813 }
1814 },
1815 "500": {
1816 "description": "Internal Server Error",
1817 "schema": {
1818 "$ref": "#/definitions/proto.Error"
1819 }
1820 }
1821 }
1822 }
1823 },
1824 "/workspaces/{id}/permissions/skip": {
1825 "get": {
1826 "produces": [
1827 "application/json"
1828 ],
1829 "tags": [
1830 "permissions"
1831 ],
1832 "summary": "Get skip permissions status",
1833 "parameters": [
1834 {
1835 "type": "string",
1836 "description": "Workspace ID",
1837 "name": "id",
1838 "in": "path",
1839 "required": true
1840 }
1841 ],
1842 "responses": {
1843 "200": {
1844 "description": "OK",
1845 "schema": {
1846 "$ref": "#/definitions/proto.PermissionSkipRequest"
1847 }
1848 },
1849 "404": {
1850 "description": "Not Found",
1851 "schema": {
1852 "$ref": "#/definitions/proto.Error"
1853 }
1854 },
1855 "500": {
1856 "description": "Internal Server Error",
1857 "schema": {
1858 "$ref": "#/definitions/proto.Error"
1859 }
1860 }
1861 }
1862 },
1863 "post": {
1864 "consumes": [
1865 "application/json"
1866 ],
1867 "tags": [
1868 "permissions"
1869 ],
1870 "summary": "Set skip permissions",
1871 "parameters": [
1872 {
1873 "type": "string",
1874 "description": "Workspace ID",
1875 "name": "id",
1876 "in": "path",
1877 "required": true
1878 },
1879 {
1880 "description": "Permission skip request",
1881 "name": "request",
1882 "in": "body",
1883 "required": true,
1884 "schema": {
1885 "$ref": "#/definitions/proto.PermissionSkipRequest"
1886 }
1887 }
1888 ],
1889 "responses": {
1890 "200": {
1891 "description": "OK"
1892 },
1893 "400": {
1894 "description": "Bad Request",
1895 "schema": {
1896 "$ref": "#/definitions/proto.Error"
1897 }
1898 },
1899 "404": {
1900 "description": "Not Found",
1901 "schema": {
1902 "$ref": "#/definitions/proto.Error"
1903 }
1904 },
1905 "500": {
1906 "description": "Internal Server Error",
1907 "schema": {
1908 "$ref": "#/definitions/proto.Error"
1909 }
1910 }
1911 }
1912 }
1913 },
1914 "/workspaces/{id}/project/init": {
1915 "post": {
1916 "tags": [
1917 "project"
1918 ],
1919 "summary": "Mark project as initialized",
1920 "parameters": [
1921 {
1922 "type": "string",
1923 "description": "Workspace ID",
1924 "name": "id",
1925 "in": "path",
1926 "required": true
1927 }
1928 ],
1929 "responses": {
1930 "200": {
1931 "description": "OK"
1932 },
1933 "404": {
1934 "description": "Not Found",
1935 "schema": {
1936 "$ref": "#/definitions/proto.Error"
1937 }
1938 },
1939 "500": {
1940 "description": "Internal Server Error",
1941 "schema": {
1942 "$ref": "#/definitions/proto.Error"
1943 }
1944 }
1945 }
1946 }
1947 },
1948 "/workspaces/{id}/project/init-prompt": {
1949 "get": {
1950 "produces": [
1951 "application/json"
1952 ],
1953 "tags": [
1954 "project"
1955 ],
1956 "summary": "Get project initialization prompt",
1957 "parameters": [
1958 {
1959 "type": "string",
1960 "description": "Workspace ID",
1961 "name": "id",
1962 "in": "path",
1963 "required": true
1964 }
1965 ],
1966 "responses": {
1967 "200": {
1968 "description": "OK",
1969 "schema": {
1970 "$ref": "#/definitions/proto.ProjectInitPromptResponse"
1971 }
1972 },
1973 "404": {
1974 "description": "Not Found",
1975 "schema": {
1976 "$ref": "#/definitions/proto.Error"
1977 }
1978 },
1979 "500": {
1980 "description": "Internal Server Error",
1981 "schema": {
1982 "$ref": "#/definitions/proto.Error"
1983 }
1984 }
1985 }
1986 }
1987 },
1988 "/workspaces/{id}/project/needs-init": {
1989 "get": {
1990 "produces": [
1991 "application/json"
1992 ],
1993 "tags": [
1994 "project"
1995 ],
1996 "summary": "Check if project needs initialization",
1997 "parameters": [
1998 {
1999 "type": "string",
2000 "description": "Workspace ID",
2001 "name": "id",
2002 "in": "path",
2003 "required": true
2004 }
2005 ],
2006 "responses": {
2007 "200": {
2008 "description": "OK",
2009 "schema": {
2010 "$ref": "#/definitions/proto.ProjectNeedsInitResponse"
2011 }
2012 },
2013 "404": {
2014 "description": "Not Found",
2015 "schema": {
2016 "$ref": "#/definitions/proto.Error"
2017 }
2018 },
2019 "500": {
2020 "description": "Internal Server Error",
2021 "schema": {
2022 "$ref": "#/definitions/proto.Error"
2023 }
2024 }
2025 }
2026 }
2027 },
2028 "/workspaces/{id}/providers": {
2029 "get": {
2030 "produces": [
2031 "application/json"
2032 ],
2033 "tags": [
2034 "workspaces"
2035 ],
2036 "summary": "Get workspace providers",
2037 "parameters": [
2038 {
2039 "type": "string",
2040 "description": "Workspace ID",
2041 "name": "id",
2042 "in": "path",
2043 "required": true
2044 }
2045 ],
2046 "responses": {
2047 "200": {
2048 "description": "OK",
2049 "schema": {
2050 "type": "object"
2051 }
2052 },
2053 "404": {
2054 "description": "Not Found",
2055 "schema": {
2056 "$ref": "#/definitions/proto.Error"
2057 }
2058 },
2059 "500": {
2060 "description": "Internal Server Error",
2061 "schema": {
2062 "$ref": "#/definitions/proto.Error"
2063 }
2064 }
2065 }
2066 }
2067 },
2068 "/workspaces/{id}/sessions": {
2069 "get": {
2070 "produces": [
2071 "application/json"
2072 ],
2073 "tags": [
2074 "sessions"
2075 ],
2076 "summary": "List sessions",
2077 "parameters": [
2078 {
2079 "type": "string",
2080 "description": "Workspace ID",
2081 "name": "id",
2082 "in": "path",
2083 "required": true
2084 }
2085 ],
2086 "responses": {
2087 "200": {
2088 "description": "OK",
2089 "schema": {
2090 "type": "array",
2091 "items": {
2092 "$ref": "#/definitions/proto.Session"
2093 }
2094 }
2095 },
2096 "404": {
2097 "description": "Not Found",
2098 "schema": {
2099 "$ref": "#/definitions/proto.Error"
2100 }
2101 },
2102 "500": {
2103 "description": "Internal Server Error",
2104 "schema": {
2105 "$ref": "#/definitions/proto.Error"
2106 }
2107 }
2108 }
2109 },
2110 "post": {
2111 "consumes": [
2112 "application/json"
2113 ],
2114 "produces": [
2115 "application/json"
2116 ],
2117 "tags": [
2118 "sessions"
2119 ],
2120 "summary": "Create session",
2121 "parameters": [
2122 {
2123 "type": "string",
2124 "description": "Workspace ID",
2125 "name": "id",
2126 "in": "path",
2127 "required": true
2128 },
2129 {
2130 "description": "Session creation params (title)",
2131 "name": "request",
2132 "in": "body",
2133 "required": true,
2134 "schema": {
2135 "$ref": "#/definitions/proto.Session"
2136 }
2137 }
2138 ],
2139 "responses": {
2140 "200": {
2141 "description": "OK",
2142 "schema": {
2143 "$ref": "#/definitions/proto.Session"
2144 }
2145 },
2146 "400": {
2147 "description": "Bad Request",
2148 "schema": {
2149 "$ref": "#/definitions/proto.Error"
2150 }
2151 },
2152 "404": {
2153 "description": "Not Found",
2154 "schema": {
2155 "$ref": "#/definitions/proto.Error"
2156 }
2157 },
2158 "500": {
2159 "description": "Internal Server Error",
2160 "schema": {
2161 "$ref": "#/definitions/proto.Error"
2162 }
2163 }
2164 }
2165 }
2166 },
2167 "/workspaces/{id}/sessions/{sid}": {
2168 "get": {
2169 "produces": [
2170 "application/json"
2171 ],
2172 "tags": [
2173 "sessions"
2174 ],
2175 "summary": "Get session",
2176 "parameters": [
2177 {
2178 "type": "string",
2179 "description": "Workspace ID",
2180 "name": "id",
2181 "in": "path",
2182 "required": true
2183 },
2184 {
2185 "type": "string",
2186 "description": "Session ID",
2187 "name": "sid",
2188 "in": "path",
2189 "required": true
2190 }
2191 ],
2192 "responses": {
2193 "200": {
2194 "description": "OK",
2195 "schema": {
2196 "$ref": "#/definitions/proto.Session"
2197 }
2198 },
2199 "404": {
2200 "description": "Not Found",
2201 "schema": {
2202 "$ref": "#/definitions/proto.Error"
2203 }
2204 },
2205 "500": {
2206 "description": "Internal Server Error",
2207 "schema": {
2208 "$ref": "#/definitions/proto.Error"
2209 }
2210 }
2211 }
2212 },
2213 "put": {
2214 "consumes": [
2215 "application/json"
2216 ],
2217 "produces": [
2218 "application/json"
2219 ],
2220 "tags": [
2221 "sessions"
2222 ],
2223 "summary": "Update session",
2224 "parameters": [
2225 {
2226 "type": "string",
2227 "description": "Workspace ID",
2228 "name": "id",
2229 "in": "path",
2230 "required": true
2231 },
2232 {
2233 "type": "string",
2234 "description": "Session ID",
2235 "name": "sid",
2236 "in": "path",
2237 "required": true
2238 },
2239 {
2240 "description": "Updated session",
2241 "name": "request",
2242 "in": "body",
2243 "required": true,
2244 "schema": {
2245 "$ref": "#/definitions/proto.Session"
2246 }
2247 }
2248 ],
2249 "responses": {
2250 "200": {
2251 "description": "OK",
2252 "schema": {
2253 "$ref": "#/definitions/proto.Session"
2254 }
2255 },
2256 "400": {
2257 "description": "Bad Request",
2258 "schema": {
2259 "$ref": "#/definitions/proto.Error"
2260 }
2261 },
2262 "404": {
2263 "description": "Not Found",
2264 "schema": {
2265 "$ref": "#/definitions/proto.Error"
2266 }
2267 },
2268 "500": {
2269 "description": "Internal Server Error",
2270 "schema": {
2271 "$ref": "#/definitions/proto.Error"
2272 }
2273 }
2274 }
2275 },
2276 "delete": {
2277 "tags": [
2278 "sessions"
2279 ],
2280 "summary": "Delete session",
2281 "parameters": [
2282 {
2283 "type": "string",
2284 "description": "Workspace ID",
2285 "name": "id",
2286 "in": "path",
2287 "required": true
2288 },
2289 {
2290 "type": "string",
2291 "description": "Session ID",
2292 "name": "sid",
2293 "in": "path",
2294 "required": true
2295 }
2296 ],
2297 "responses": {
2298 "200": {
2299 "description": "OK"
2300 },
2301 "404": {
2302 "description": "Not Found",
2303 "schema": {
2304 "$ref": "#/definitions/proto.Error"
2305 }
2306 },
2307 "500": {
2308 "description": "Internal Server Error",
2309 "schema": {
2310 "$ref": "#/definitions/proto.Error"
2311 }
2312 }
2313 }
2314 }
2315 },
2316 "/workspaces/{id}/sessions/{sid}/filetracker/files": {
2317 "get": {
2318 "produces": [
2319 "application/json"
2320 ],
2321 "tags": [
2322 "filetracker"
2323 ],
2324 "summary": "List tracked files for session",
2325 "parameters": [
2326 {
2327 "type": "string",
2328 "description": "Workspace ID",
2329 "name": "id",
2330 "in": "path",
2331 "required": true
2332 },
2333 {
2334 "type": "string",
2335 "description": "Session ID",
2336 "name": "sid",
2337 "in": "path",
2338 "required": true
2339 }
2340 ],
2341 "responses": {
2342 "200": {
2343 "description": "OK",
2344 "schema": {
2345 "type": "array",
2346 "items": {
2347 "type": "string"
2348 }
2349 }
2350 },
2351 "404": {
2352 "description": "Not Found",
2353 "schema": {
2354 "$ref": "#/definitions/proto.Error"
2355 }
2356 },
2357 "500": {
2358 "description": "Internal Server Error",
2359 "schema": {
2360 "$ref": "#/definitions/proto.Error"
2361 }
2362 }
2363 }
2364 }
2365 },
2366 "/workspaces/{id}/sessions/{sid}/history": {
2367 "get": {
2368 "produces": [
2369 "application/json"
2370 ],
2371 "tags": [
2372 "sessions"
2373 ],
2374 "summary": "Get session history",
2375 "parameters": [
2376 {
2377 "type": "string",
2378 "description": "Workspace ID",
2379 "name": "id",
2380 "in": "path",
2381 "required": true
2382 },
2383 {
2384 "type": "string",
2385 "description": "Session ID",
2386 "name": "sid",
2387 "in": "path",
2388 "required": true
2389 }
2390 ],
2391 "responses": {
2392 "200": {
2393 "description": "OK",
2394 "schema": {
2395 "type": "array",
2396 "items": {
2397 "$ref": "#/definitions/proto.File"
2398 }
2399 }
2400 },
2401 "404": {
2402 "description": "Not Found",
2403 "schema": {
2404 "$ref": "#/definitions/proto.Error"
2405 }
2406 },
2407 "500": {
2408 "description": "Internal Server Error",
2409 "schema": {
2410 "$ref": "#/definitions/proto.Error"
2411 }
2412 }
2413 }
2414 }
2415 },
2416 "/workspaces/{id}/sessions/{sid}/messages": {
2417 "get": {
2418 "produces": [
2419 "application/json"
2420 ],
2421 "tags": [
2422 "sessions"
2423 ],
2424 "summary": "Get session messages",
2425 "parameters": [
2426 {
2427 "type": "string",
2428 "description": "Workspace ID",
2429 "name": "id",
2430 "in": "path",
2431 "required": true
2432 },
2433 {
2434 "type": "string",
2435 "description": "Session ID",
2436 "name": "sid",
2437 "in": "path",
2438 "required": true
2439 }
2440 ],
2441 "responses": {
2442 "200": {
2443 "description": "OK",
2444 "schema": {
2445 "type": "array",
2446 "items": {
2447 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_proto.Message"
2448 }
2449 }
2450 },
2451 "404": {
2452 "description": "Not Found",
2453 "schema": {
2454 "$ref": "#/definitions/proto.Error"
2455 }
2456 },
2457 "500": {
2458 "description": "Internal Server Error",
2459 "schema": {
2460 "$ref": "#/definitions/proto.Error"
2461 }
2462 }
2463 }
2464 }
2465 },
2466 "/workspaces/{id}/sessions/{sid}/messages/user": {
2467 "get": {
2468 "produces": [
2469 "application/json"
2470 ],
2471 "tags": [
2472 "sessions"
2473 ],
2474 "summary": "Get user messages for session",
2475 "parameters": [
2476 {
2477 "type": "string",
2478 "description": "Workspace ID",
2479 "name": "id",
2480 "in": "path",
2481 "required": true
2482 },
2483 {
2484 "type": "string",
2485 "description": "Session ID",
2486 "name": "sid",
2487 "in": "path",
2488 "required": true
2489 }
2490 ],
2491 "responses": {
2492 "200": {
2493 "description": "OK",
2494 "schema": {
2495 "type": "array",
2496 "items": {
2497 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_proto.Message"
2498 }
2499 }
2500 },
2501 "404": {
2502 "description": "Not Found",
2503 "schema": {
2504 "$ref": "#/definitions/proto.Error"
2505 }
2506 },
2507 "500": {
2508 "description": "Internal Server Error",
2509 "schema": {
2510 "$ref": "#/definitions/proto.Error"
2511 }
2512 }
2513 }
2514 }
2515 }
2516 },
2517 "definitions": {
2518 "catwalk.Model": {
2519 "type": "object",
2520 "properties": {
2521 "can_reason": {
2522 "type": "boolean"
2523 },
2524 "context_window": {
2525 "type": "integer"
2526 },
2527 "cost_per_1m_in": {
2528 "type": "number"
2529 },
2530 "cost_per_1m_in_cached": {
2531 "type": "number"
2532 },
2533 "cost_per_1m_out": {
2534 "type": "number"
2535 },
2536 "cost_per_1m_out_cached": {
2537 "type": "number"
2538 },
2539 "default_max_tokens": {
2540 "type": "integer"
2541 },
2542 "default_reasoning_effort": {
2543 "type": "string"
2544 },
2545 "id": {
2546 "type": "string"
2547 },
2548 "name": {
2549 "type": "string"
2550 },
2551 "options": {
2552 "$ref": "#/definitions/catwalk.ModelOptions"
2553 },
2554 "reasoning_levels": {
2555 "type": "array",
2556 "items": {
2557 "type": "string"
2558 }
2559 },
2560 "supports_attachments": {
2561 "type": "boolean"
2562 }
2563 }
2564 },
2565 "catwalk.ModelOptions": {
2566 "type": "object",
2567 "properties": {
2568 "frequency_penalty": {
2569 "type": "number"
2570 },
2571 "presence_penalty": {
2572 "type": "number"
2573 },
2574 "provider_options": {
2575 "type": "object",
2576 "additionalProperties": {}
2577 },
2578 "temperature": {
2579 "type": "number"
2580 },
2581 "top_k": {
2582 "type": "integer"
2583 },
2584 "top_p": {
2585 "type": "number"
2586 }
2587 }
2588 },
2589 "config.Attribution": {
2590 "type": "object",
2591 "properties": {
2592 "co_authored_by": {
2593 "type": "boolean"
2594 },
2595 "generated_with": {
2596 "type": "boolean"
2597 },
2598 "trailer_style": {
2599 "$ref": "#/definitions/config.TrailerStyle"
2600 }
2601 }
2602 },
2603 "config.Completions": {
2604 "type": "object",
2605 "properties": {
2606 "max_depth": {
2607 "type": "integer"
2608 },
2609 "max_items": {
2610 "type": "integer"
2611 }
2612 }
2613 },
2614 "config.LSPConfig": {
2615 "type": "object",
2616 "properties": {
2617 "args": {
2618 "type": "array",
2619 "items": {
2620 "type": "string"
2621 }
2622 },
2623 "command": {
2624 "type": "string"
2625 },
2626 "disabled": {
2627 "type": "boolean"
2628 },
2629 "env": {
2630 "type": "object",
2631 "additionalProperties": {
2632 "type": "string"
2633 }
2634 },
2635 "filetypes": {
2636 "type": "array",
2637 "items": {
2638 "type": "string"
2639 }
2640 },
2641 "init_options": {
2642 "type": "object",
2643 "additionalProperties": {}
2644 },
2645 "options": {
2646 "type": "object",
2647 "additionalProperties": {}
2648 },
2649 "root_markers": {
2650 "type": "array",
2651 "items": {
2652 "type": "string"
2653 }
2654 },
2655 "timeout": {
2656 "type": "integer"
2657 }
2658 }
2659 },
2660 "config.LSPs": {
2661 "type": "object",
2662 "additionalProperties": {
2663 "$ref": "#/definitions/config.LSPConfig"
2664 }
2665 },
2666 "config.MCPConfig": {
2667 "type": "object",
2668 "properties": {
2669 "args": {
2670 "type": "array",
2671 "items": {
2672 "type": "string"
2673 }
2674 },
2675 "command": {
2676 "type": "string"
2677 },
2678 "disabled": {
2679 "type": "boolean"
2680 },
2681 "disabled_tools": {
2682 "type": "array",
2683 "items": {
2684 "type": "string"
2685 }
2686 },
2687 "env": {
2688 "type": "object",
2689 "additionalProperties": {
2690 "type": "string"
2691 }
2692 },
2693 "headers": {
2694 "description": "TODO: maybe make it possible to get the value from the env",
2695 "type": "object",
2696 "additionalProperties": {
2697 "type": "string"
2698 }
2699 },
2700 "timeout": {
2701 "type": "integer"
2702 },
2703 "type": {
2704 "$ref": "#/definitions/config.MCPType"
2705 },
2706 "url": {
2707 "type": "string"
2708 }
2709 }
2710 },
2711 "config.MCPType": {
2712 "type": "string",
2713 "enum": [
2714 "stdio",
2715 "sse",
2716 "http"
2717 ],
2718 "x-enum-varnames": [
2719 "MCPStdio",
2720 "MCPSSE",
2721 "MCPHttp"
2722 ]
2723 },
2724 "config.MCPs": {
2725 "type": "object",
2726 "additionalProperties": {
2727 "$ref": "#/definitions/config.MCPConfig"
2728 }
2729 },
2730 "config.Permissions": {
2731 "type": "object",
2732 "properties": {
2733 "allowed_tools": {
2734 "type": "array",
2735 "items": {
2736 "type": "string"
2737 }
2738 }
2739 }
2740 },
2741 "config.Scope": {
2742 "type": "integer",
2743 "enum": [
2744 0,
2745 1
2746 ],
2747 "x-enum-varnames": [
2748 "ScopeGlobal",
2749 "ScopeWorkspace"
2750 ]
2751 },
2752 "config.SelectedModel": {
2753 "type": "object",
2754 "properties": {
2755 "frequency_penalty": {
2756 "type": "number"
2757 },
2758 "max_tokens": {
2759 "description": "Overrides the default model configuration.",
2760 "type": "integer"
2761 },
2762 "model": {
2763 "description": "The model id as used by the provider API.\nRequired.",
2764 "type": "string"
2765 },
2766 "presence_penalty": {
2767 "type": "number"
2768 },
2769 "provider": {
2770 "description": "The model provider, same as the key/id used in the providers config.\nRequired.",
2771 "type": "string"
2772 },
2773 "provider_options": {
2774 "description": "Override provider specific options.",
2775 "type": "object",
2776 "additionalProperties": {}
2777 },
2778 "reasoning_effort": {
2779 "description": "Only used by models that use the openai provider and need this set.",
2780 "type": "string"
2781 },
2782 "temperature": {
2783 "type": "number"
2784 },
2785 "think": {
2786 "description": "Used by anthropic models that can reason to indicate if the model should think.",
2787 "type": "boolean"
2788 },
2789 "top_k": {
2790 "type": "integer"
2791 },
2792 "top_p": {
2793 "type": "number"
2794 }
2795 }
2796 },
2797 "config.SelectedModelType": {
2798 "type": "string",
2799 "enum": [
2800 "large",
2801 "small"
2802 ],
2803 "x-enum-varnames": [
2804 "SelectedModelTypeLarge",
2805 "SelectedModelTypeSmall"
2806 ]
2807 },
2808 "config.TUIOptions": {
2809 "type": "object",
2810 "properties": {
2811 "compact_mode": {
2812 "type": "boolean"
2813 },
2814 "completions": {
2815 "$ref": "#/definitions/config.Completions"
2816 },
2817 "diff_mode": {
2818 "type": "string"
2819 },
2820 "transparent": {
2821 "type": "boolean"
2822 }
2823 }
2824 },
2825 "config.ToolGrep": {
2826 "type": "object",
2827 "properties": {
2828 "timeout": {
2829 "$ref": "#/definitions/time.Duration"
2830 }
2831 }
2832 },
2833 "config.ToolLs": {
2834 "type": "object",
2835 "properties": {
2836 "max_depth": {
2837 "type": "integer"
2838 },
2839 "max_items": {
2840 "type": "integer"
2841 }
2842 }
2843 },
2844 "config.Tools": {
2845 "type": "object",
2846 "properties": {
2847 "grep": {
2848 "$ref": "#/definitions/config.ToolGrep"
2849 },
2850 "ls": {
2851 "$ref": "#/definitions/config.ToolLs"
2852 }
2853 }
2854 },
2855 "config.TrailerStyle": {
2856 "type": "string",
2857 "enum": [
2858 "none",
2859 "co-authored-by",
2860 "assisted-by"
2861 ],
2862 "x-enum-varnames": [
2863 "TrailerStyleNone",
2864 "TrailerStyleCoAuthoredBy",
2865 "TrailerStyleAssistedBy"
2866 ]
2867 },
2868 "csync.Map-string-config_ProviderConfig": {
2869 "type": "object"
2870 },
2871 "github_com_charmbracelet_crush_internal_config.Config": {
2872 "type": "object",
2873 "properties": {
2874 "$schema": {
2875 "type": "string"
2876 },
2877 "lsp": {
2878 "$ref": "#/definitions/config.LSPs"
2879 },
2880 "mcp": {
2881 "$ref": "#/definitions/config.MCPs"
2882 },
2883 "models": {
2884 "description": "We currently only support large/small as values here.",
2885 "type": "object",
2886 "additionalProperties": {
2887 "$ref": "#/definitions/config.SelectedModel"
2888 }
2889 },
2890 "options": {
2891 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_config.Options"
2892 },
2893 "permissions": {
2894 "$ref": "#/definitions/config.Permissions"
2895 },
2896 "providers": {
2897 "description": "The providers that are configured",
2898 "allOf": [
2899 {
2900 "$ref": "#/definitions/csync.Map-string-config_ProviderConfig"
2901 }
2902 ]
2903 },
2904 "recent_models": {
2905 "description": "Recently used models stored in the data directory config.",
2906 "type": "object",
2907 "additionalProperties": {
2908 "type": "array",
2909 "items": {
2910 "$ref": "#/definitions/config.SelectedModel"
2911 }
2912 }
2913 },
2914 "tools": {
2915 "$ref": "#/definitions/config.Tools"
2916 }
2917 }
2918 },
2919 "github_com_charmbracelet_crush_internal_config.Options": {
2920 "type": "object",
2921 "properties": {
2922 "attribution": {
2923 "$ref": "#/definitions/config.Attribution"
2924 },
2925 "auto_lsp": {
2926 "type": "boolean"
2927 },
2928 "context_paths": {
2929 "type": "array",
2930 "items": {
2931 "type": "string"
2932 }
2933 },
2934 "data_directory": {
2935 "description": "Relative to the cwd",
2936 "type": "string"
2937 },
2938 "debug": {
2939 "type": "boolean"
2940 },
2941 "debug_lsp": {
2942 "type": "boolean"
2943 },
2944 "disable_auto_summarize": {
2945 "type": "boolean"
2946 },
2947 "disable_default_providers": {
2948 "type": "boolean"
2949 },
2950 "disable_metrics": {
2951 "type": "boolean"
2952 },
2953 "disable_notifications": {
2954 "type": "boolean"
2955 },
2956 "disable_provider_auto_update": {
2957 "type": "boolean"
2958 },
2959 "disabled_tools": {
2960 "type": "array",
2961 "items": {
2962 "type": "string"
2963 }
2964 },
2965 "initialize_as": {
2966 "type": "string"
2967 },
2968 "progress": {
2969 "type": "boolean"
2970 },
2971 "skills_paths": {
2972 "type": "array",
2973 "items": {
2974 "type": "string"
2975 }
2976 },
2977 "tui": {
2978 "$ref": "#/definitions/config.TUIOptions"
2979 }
2980 }
2981 },
2982 "github_com_charmbracelet_crush_internal_proto.Message": {
2983 "type": "object",
2984 "properties": {
2985 "created_at": {
2986 "type": "integer"
2987 },
2988 "id": {
2989 "type": "string"
2990 },
2991 "model": {
2992 "type": "string"
2993 },
2994 "parts": {
2995 "type": "array",
2996 "items": {}
2997 },
2998 "provider": {
2999 "type": "string"
3000 },
3001 "role": {
3002 "$ref": "#/definitions/proto.MessageRole"
3003 },
3004 "session_id": {
3005 "type": "string"
3006 },
3007 "updated_at": {
3008 "type": "integer"
3009 }
3010 }
3011 },
3012 "lsp.ServerState": {
3013 "type": "integer",
3014 "enum": [
3015 0,
3016 1,
3017 2,
3018 3,
3019 4,
3020 5
3021 ],
3022 "x-enum-varnames": [
3023 "StateUnstarted",
3024 "StateStarting",
3025 "StateReady",
3026 "StateError",
3027 "StateStopped",
3028 "StateDisabled"
3029 ]
3030 },
3031 "proto.AgentInfo": {
3032 "type": "object",
3033 "properties": {
3034 "is_busy": {
3035 "type": "boolean"
3036 },
3037 "is_ready": {
3038 "type": "boolean"
3039 },
3040 "model": {
3041 "$ref": "#/definitions/catwalk.Model"
3042 },
3043 "model_cfg": {
3044 "$ref": "#/definitions/config.SelectedModel"
3045 }
3046 }
3047 },
3048 "proto.AgentMessage": {
3049 "type": "object",
3050 "properties": {
3051 "attachments": {
3052 "type": "array",
3053 "items": {
3054 "$ref": "#/definitions/proto.Attachment"
3055 }
3056 },
3057 "prompt": {
3058 "type": "string"
3059 },
3060 "session_id": {
3061 "type": "string"
3062 }
3063 }
3064 },
3065 "proto.AgentSession": {
3066 "type": "object",
3067 "properties": {
3068 "completion_tokens": {
3069 "type": "integer"
3070 },
3071 "cost": {
3072 "type": "number"
3073 },
3074 "created_at": {
3075 "type": "integer"
3076 },
3077 "id": {
3078 "type": "string"
3079 },
3080 "is_busy": {
3081 "type": "boolean"
3082 },
3083 "message_count": {
3084 "type": "integer"
3085 },
3086 "parent_session_id": {
3087 "type": "string"
3088 },
3089 "prompt_tokens": {
3090 "type": "integer"
3091 },
3092 "summary_message_id": {
3093 "type": "string"
3094 },
3095 "title": {
3096 "type": "string"
3097 },
3098 "updated_at": {
3099 "type": "integer"
3100 }
3101 }
3102 },
3103 "proto.Attachment": {
3104 "type": "object",
3105 "properties": {
3106 "content": {
3107 "type": "array",
3108 "items": {
3109 "type": "integer"
3110 }
3111 },
3112 "file_name": {
3113 "type": "string"
3114 },
3115 "file_path": {
3116 "type": "string"
3117 },
3118 "mime_type": {
3119 "type": "string"
3120 }
3121 }
3122 },
3123 "proto.ConfigCompactRequest": {
3124 "type": "object",
3125 "properties": {
3126 "enabled": {
3127 "type": "boolean"
3128 },
3129 "scope": {
3130 "$ref": "#/definitions/config.Scope"
3131 }
3132 }
3133 },
3134 "proto.ConfigModelRequest": {
3135 "type": "object",
3136 "properties": {
3137 "model": {
3138 "$ref": "#/definitions/config.SelectedModel"
3139 },
3140 "model_type": {
3141 "$ref": "#/definitions/config.SelectedModelType"
3142 },
3143 "scope": {
3144 "$ref": "#/definitions/config.Scope"
3145 }
3146 }
3147 },
3148 "proto.ConfigProviderKeyRequest": {
3149 "type": "object",
3150 "properties": {
3151 "api_key": {},
3152 "provider_id": {
3153 "type": "string"
3154 },
3155 "scope": {
3156 "$ref": "#/definitions/config.Scope"
3157 }
3158 }
3159 },
3160 "proto.ConfigRefreshOAuthRequest": {
3161 "type": "object",
3162 "properties": {
3163 "provider_id": {
3164 "type": "string"
3165 },
3166 "scope": {
3167 "$ref": "#/definitions/config.Scope"
3168 }
3169 }
3170 },
3171 "proto.ConfigRemoveRequest": {
3172 "type": "object",
3173 "properties": {
3174 "key": {
3175 "type": "string"
3176 },
3177 "scope": {
3178 "$ref": "#/definitions/config.Scope"
3179 }
3180 }
3181 },
3182 "proto.ConfigSetRequest": {
3183 "type": "object",
3184 "properties": {
3185 "key": {
3186 "type": "string"
3187 },
3188 "scope": {
3189 "$ref": "#/definitions/config.Scope"
3190 },
3191 "value": {}
3192 }
3193 },
3194 "proto.Error": {
3195 "type": "object",
3196 "properties": {
3197 "message": {
3198 "type": "string"
3199 }
3200 }
3201 },
3202 "proto.File": {
3203 "type": "object",
3204 "properties": {
3205 "content": {
3206 "type": "string"
3207 },
3208 "created_at": {
3209 "type": "integer"
3210 },
3211 "id": {
3212 "type": "string"
3213 },
3214 "path": {
3215 "type": "string"
3216 },
3217 "session_id": {
3218 "type": "string"
3219 },
3220 "updated_at": {
3221 "type": "integer"
3222 },
3223 "version": {
3224 "type": "integer"
3225 }
3226 }
3227 },
3228 "proto.FileTrackerReadRequest": {
3229 "type": "object",
3230 "properties": {
3231 "path": {
3232 "type": "string"
3233 },
3234 "session_id": {
3235 "type": "string"
3236 }
3237 }
3238 },
3239 "proto.ImportCopilotResponse": {
3240 "type": "object",
3241 "properties": {
3242 "success": {
3243 "type": "boolean"
3244 },
3245 "token": {}
3246 }
3247 },
3248 "proto.LSPClientInfo": {
3249 "type": "object",
3250 "properties": {
3251 "connected_at": {
3252 "type": "string"
3253 },
3254 "diagnostic_count": {
3255 "type": "integer"
3256 },
3257 "error": {},
3258 "name": {
3259 "type": "string"
3260 },
3261 "state": {
3262 "$ref": "#/definitions/lsp.ServerState"
3263 }
3264 }
3265 },
3266 "proto.LSPStartRequest": {
3267 "type": "object",
3268 "properties": {
3269 "path": {
3270 "type": "string"
3271 }
3272 }
3273 },
3274 "proto.MCPClientInfo": {
3275 "type": "object",
3276 "properties": {
3277 "connected_at": {
3278 "type": "string"
3279 },
3280 "error": {},
3281 "name": {
3282 "type": "string"
3283 },
3284 "prompt_count": {
3285 "type": "integer"
3286 },
3287 "resource_count": {
3288 "type": "integer"
3289 },
3290 "state": {
3291 "$ref": "#/definitions/proto.MCPState"
3292 },
3293 "tool_count": {
3294 "type": "integer"
3295 }
3296 }
3297 },
3298 "proto.MCPGetPromptRequest": {
3299 "type": "object",
3300 "properties": {
3301 "args": {
3302 "type": "object",
3303 "additionalProperties": {
3304 "type": "string"
3305 }
3306 },
3307 "client_id": {
3308 "type": "string"
3309 },
3310 "prompt_id": {
3311 "type": "string"
3312 }
3313 }
3314 },
3315 "proto.MCPGetPromptResponse": {
3316 "type": "object",
3317 "properties": {
3318 "prompt": {
3319 "type": "string"
3320 }
3321 }
3322 },
3323 "proto.MCPNameRequest": {
3324 "type": "object",
3325 "properties": {
3326 "name": {
3327 "type": "string"
3328 }
3329 }
3330 },
3331 "proto.MCPReadResourceRequest": {
3332 "type": "object",
3333 "properties": {
3334 "name": {
3335 "type": "string"
3336 },
3337 "uri": {
3338 "type": "string"
3339 }
3340 }
3341 },
3342 "proto.MCPState": {
3343 "type": "integer",
3344 "enum": [
3345 0,
3346 1,
3347 2,
3348 3
3349 ],
3350 "x-enum-varnames": [
3351 "MCPStateDisabled",
3352 "MCPStateStarting",
3353 "MCPStateConnected",
3354 "MCPStateError"
3355 ]
3356 },
3357 "proto.MessageRole": {
3358 "type": "string",
3359 "enum": [
3360 "assistant",
3361 "user",
3362 "system",
3363 "tool"
3364 ],
3365 "x-enum-varnames": [
3366 "Assistant",
3367 "User",
3368 "System",
3369 "Tool"
3370 ]
3371 },
3372 "proto.PermissionAction": {
3373 "type": "string",
3374 "enum": [
3375 "allow",
3376 "allow_session",
3377 "deny"
3378 ],
3379 "x-enum-varnames": [
3380 "PermissionAllow",
3381 "PermissionAllowForSession",
3382 "PermissionDeny"
3383 ]
3384 },
3385 "proto.PermissionGrant": {
3386 "type": "object",
3387 "properties": {
3388 "action": {
3389 "$ref": "#/definitions/proto.PermissionAction"
3390 },
3391 "permission": {
3392 "$ref": "#/definitions/proto.PermissionRequest"
3393 }
3394 }
3395 },
3396 "proto.PermissionRequest": {
3397 "type": "object",
3398 "properties": {
3399 "action": {
3400 "type": "string"
3401 },
3402 "description": {
3403 "type": "string"
3404 },
3405 "id": {
3406 "type": "string"
3407 },
3408 "params": {},
3409 "path": {
3410 "type": "string"
3411 },
3412 "session_id": {
3413 "type": "string"
3414 },
3415 "tool_call_id": {
3416 "type": "string"
3417 },
3418 "tool_name": {
3419 "type": "string"
3420 }
3421 }
3422 },
3423 "proto.PermissionSkipRequest": {
3424 "type": "object",
3425 "properties": {
3426 "skip": {
3427 "type": "boolean"
3428 }
3429 }
3430 },
3431 "proto.ProjectInitPromptResponse": {
3432 "type": "object",
3433 "properties": {
3434 "prompt": {
3435 "type": "string"
3436 }
3437 }
3438 },
3439 "proto.ProjectNeedsInitResponse": {
3440 "type": "object",
3441 "properties": {
3442 "needs_init": {
3443 "type": "boolean"
3444 }
3445 }
3446 },
3447 "proto.ServerControl": {
3448 "type": "object",
3449 "properties": {
3450 "command": {
3451 "type": "string"
3452 }
3453 }
3454 },
3455 "proto.Session": {
3456 "type": "object",
3457 "properties": {
3458 "completion_tokens": {
3459 "type": "integer"
3460 },
3461 "cost": {
3462 "type": "number"
3463 },
3464 "created_at": {
3465 "type": "integer"
3466 },
3467 "id": {
3468 "type": "string"
3469 },
3470 "message_count": {
3471 "type": "integer"
3472 },
3473 "parent_session_id": {
3474 "type": "string"
3475 },
3476 "prompt_tokens": {
3477 "type": "integer"
3478 },
3479 "summary_message_id": {
3480 "type": "string"
3481 },
3482 "title": {
3483 "type": "string"
3484 },
3485 "updated_at": {
3486 "type": "integer"
3487 }
3488 }
3489 },
3490 "proto.VersionInfo": {
3491 "type": "object",
3492 "properties": {
3493 "commit": {
3494 "type": "string"
3495 },
3496 "go_version": {
3497 "type": "string"
3498 },
3499 "platform": {
3500 "type": "string"
3501 },
3502 "version": {
3503 "type": "string"
3504 }
3505 }
3506 },
3507 "proto.Workspace": {
3508 "type": "object",
3509 "properties": {
3510 "config": {
3511 "$ref": "#/definitions/github_com_charmbracelet_crush_internal_config.Config"
3512 },
3513 "data_dir": {
3514 "type": "string"
3515 },
3516 "debug": {
3517 "type": "boolean"
3518 },
3519 "env": {
3520 "type": "array",
3521 "items": {
3522 "type": "string"
3523 }
3524 },
3525 "id": {
3526 "type": "string"
3527 },
3528 "path": {
3529 "type": "string"
3530 },
3531 "version": {
3532 "type": "string"
3533 },
3534 "yolo": {
3535 "type": "boolean"
3536 }
3537 }
3538 },
3539 "time.Duration": {
3540 "type": "integer",
3541 "format": "int64",
3542 "enum": [
3543 -9223372036854775808,
3544 9223372036854775807,
3545 1,
3546 1000,
3547 1000000,
3548 1000000000,
3549 60000000000,
3550 3600000000000
3551 ],
3552 "x-enum-varnames": [
3553 "minDuration",
3554 "maxDuration",
3555 "Nanosecond",
3556 "Microsecond",
3557 "Millisecond",
3558 "Second",
3559 "Minute",
3560 "Hour"
3561 ]
3562 }
3563 }
3564}