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