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