This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
api.proto
1167 lines (929 loc) · 29 KB
/
api.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
syntax = "proto3";
import "google/protobuf/timestamp.proto";
package api;
option go_package = "/api";
message Command {
reserved 250, 252, 253, 254, 255;
// channel and session act as namespaces with 0 being global.
// both session and channel must match for a client to receive a command.
int32 channel = 1;
// < 0 : all user sessions except abs(id)
// 0 : all user sessions
// 1 : internal message to conman
// > 1 : user session with given id
int32 session = 2;
oneof body {
// global messages
// these should always be on channel 0
OpenChannel openChan = 3;
OpenChannelRes openChanRes = 4;
CloseChannel closeChan = 5;
CloseChannelRes closeChanRes = 6;
ContainerState containerState = 9;
PortOpen portOpen = 10;
Toast toast = 11;
// A protocol error. Will result in a disconnection.
ProtocolError protocolError = 45;
Redirect redirect = 12;
AlwaysOn alwaysOn = 13;
// service specific messages
RunMain runMain = 16;
Clear clear = 17;
string eval = 20;
string result = 21;
string input = 22;
string output = 23;
string error = 24;
string stderr = 46;
string log = 47;
SaneTerm saneTerm = 26;
ResizeTerm resizeTerm = 27;
State state = 28;
OK ok = 30;
File persist = 31;
File persistMirror = 41;
File write = 32;
File remove = 33;
Move move = 34;
File tryRemove = 36;
File mkdir = 39;
File stat = 368;
StatResult statRes = 369;
TransferStart transferStart = 320;
TransferChunk transferChunk = 321;
TransferComplete transferComplete = 322;
Transfer transferCancel = 323;
Transfer transfer = 324;
File read = 35;
File readdir = 37;
Files files = 38;
File file = 40;
CheckChanges checkChanges = 42;
Files changedFiles = 43;
LintResults lintResults = 44;
ContainedTest runContainedTest = 70;
TestResult testResult = 71;
string debuggerStart = 90;
RunMain debuggerStep = 91;
DebugStatus debuggerStatus = 92;
EnsurePackages ensurePackages = 100;
Ping ping = 120;
Pong pong = 121;
Hello hello = 122;
Goodbye goodbye = 123;
Hint hint = 130;
Connect connect = 150;
Send send = 151;
Recv recv = 152;
Disconnect disconnect = 153;
FileAuthReq fileAuthReq = 200;
FileAuthRes fileAuthRes = 201;
MultiFileAuthRes mutliFileAuthRes = 202;
ListObjects listObjects = 205;
ListObjectsResp listObjectsResp = 206;
OTPacket ot = 220;
OTStatus otstatus = 221;
OTLinkFile otLinkFile = 222;
OTLinkFileResponse otLinkFileResponse = 229;
OTCursor otNewCursor = 223;
OTCursor otDeleteCursor = 224;
OTFetchRequest otFetchRequest = 225;
OTFetchResponse otFetchResponse = 226;
OTTransformSelectionRequest otTransformSelectionRequest = 227;
OTTransformSelectionResponse otTransformSelectionResponse = 228;
Flush flush = 251;
Debug debug = 230;
StartVCR startVCR = 231;
ReadVCR readVCR = 232;
VCRLog VCRLog = 233;
Auth auth = 235;
ExecInfo execInfo = 240;
SubscribeFile subscribeFile = 256;
FileEvent fileEvent = 257;
// Presence service messages
Roster roster = 260;
User join = 261;
User part = 262;
OpenFile openFile = 263;
FileOpened fileOpened = 264;
FollowUser followUser = 265;
UnfollowUser unfollowUser = 268;
UpdateSessionTimestamp updateSessionTimestamp = 266;
SessionTimestampUpdated sessionTimestampUpdated = 267;
Exec exec = 270;
PackageSearch packageSearch = 280;
PackageSearchResp packageSearchResp = 281;
PackageInfo packageInfo = 282;
PackageInfoResp packageInfoResp = 283;
PackageAdd packageAdd = 284;
PackageRemove packageRemove = 285;
PackageInstall packageInstall = 286;
PackageListSpecfile packageListSpecfile = 287;
PackageListSpecfileResp packageListSpecfileResp = 288;
PackageCacheSave packageCacheSave = 289;
ChatMessage chatMessage = 310;
ChatTyping chatTyping = 311;
ChatScrollback chatScrollback = 312;
FSSnapshot fsSnapshot = 330;
FSLock fsTakeLock = 331;
FSLock fsReleaseLock = 332;
bool hasCap = 335;
// used to configure pid1 at runtime
Pid1Config pid1Config = 340;
Metrics metrics = 350;
BootStatus bootStatus = 351;
// metadata store
ReadMetaRequest readMetaRequest = 360;
ReadMetaResponse readMetaResponse = 384;
WriteMetaRequest writeMetaRequest = 361;
WriteMetaResponse writeMetaResponse = 385;
AppendMetaRequest appendMetaRequest = 362;
AppendMetaResponse appendMetaResponse = 386;
// audio
Audio audio = 363;
PprofRequest pprofRequest = 364;
PprofResponse pprofResponse = 365;
Audio2 audio2 = 366;
// used to set configure pty settings
PTYConfig PTYConfig = 367;
// Debugger
//
// When the channel is created, a DebugSessions message will be sent to the
// channel with the current list of all active sessions. When a session is
// created / terminated, another DebugSessions message will be broadcast.
// Request to start debugging the main file for the project. This will
// atomically start a new session or join an existing one, identified by
// the `session` name. Clients will receive a DebugState message followed by
// a DebugMainReply on success, or an error on failure.
//
// Following a success, all channels will receive a DebugSessions with
// the newly-created session. Also, further debug messages sent from the
// client must contain the same session identifier.
//
// Clients can create any number of concurrent sessions. The main debugging
// session is called "main" by convention.
DebugMain debugMain = 370;
DebugState debugState = 371;
DebugMainReply debugMainReply = 372;
// DebugInput can be sent to write to the adapter or the debuggee (as
// stdin). This will reply with OK on success, or an error on failure.
DebugInput debugInput = 373;
// DebugOutput will be sent every time there is new output from the
// debuggee (stdout / stderr) or the adapter.
DebugOutput debugOutput = 374;
// DebugStop can be sent to stop and clean up a debugger session. This will
// reply with OK on success, or an error on failure.
DebugStop debugStop = 375;
// DebugLeave can be sent to stop receiving notifications for a debugger
// session. This will reply with OK on success, or an error on failure.
DebugLeave debugLeave = 376;
DebugSessions debugSessions = 377;
// DebugAddBreakpointRequest/DebugUpdateBreakpointRequest/DebugRemoveBreakpointRequest
// can be sent to add/update/remove a breakpoint. A DebugBreakpointEvent
// will be broadcast if the breakpoints changed. These will reply with OK on
// success, or an error on failure.
DebugAddBreakpointRequest debugAddBreakpointRequest = 380;
DebugUpdateBreakpointRequest debugUpdateBreakpointRequest = 387;
DebugRemoveBreakpointRequest debugRemoveBreakpointRequest = 381;
// DebugBreakpointEvent is sent to all clients when a list of breakpoints
// changes.
DebugBreakpointEvent debugBreakpointEvent = 383;
// DotReplit
//
// The dotreplit service lets the caller get the pre-parsed contents of
// .replit in a proto format.
// DotReplitGetRequest requests the contents of the .replit file. The
// response will be a DotReplitGetResponse or an Error.
DotReplitGetRequest dotReplitGetRequest = 378;
DotReplitGetResponse dotReplitGetResponse = 379;
}
string ref = 1000;
}
message Audio { repeated int32 data = 1; }
message Audio2 {
repeated sint32 data = 1;
int64 samples = 2;
}
// Preconditions that need to be met before an operation starts. If they are
// not met, the operation will fail.
message Preconditions {
// generation/metageneration are the expected generation numbers of the
// metadata file in the storage layer. If set, the write will fail if the
// generation does not match the expected value.
int64 generation = 1;
int64 metageneration = 2;
// doesNotExist requires the file to not exist beforehand.
bool doesNotExist = 3;
}
message ReadMetaRequest {
string key = 1;
bool exists = 2;
bytes data = 3;
}
message ReadMetaResponse {
string key = 1;
bool exists = 2;
bytes data = 3;
// generation/metageneration are the generation numbers of the metadata file
// in the storage layer. Will always be non-zero if exists is true.
int64 generation = 4;
int64 metageneration = 5;
}
message WriteMetaRequest {
reserved 3, 4;
string key = 1;
bytes data = 2;
// Preconditions that need to be met before the file is written to.
Preconditions preconditions = 5;
}
message WriteMetaResponse {
// generation/metageneration are the new generation numbers of the metadata
// file in the storage layer after being written to.
int64 generation = 1;
int64 metageneration = 2;
}
message AppendMetaRequest {
reserved 3, 4;
string key = 1;
bytes data = 2;
// Preconditions that need to be met before the file is appended to.
Preconditions preconditions = 5;
}
message AppendMetaResponse {
// generation/metageneration are the new generation numbers of the metadata
// file in the storage layer after being written to.
int64 generation = 1;
int64 metageneration = 2;
}
message BootStatus {
enum Stage {
HANDSHAKE = 0;
ACQUIRING = 3;
COMPLETE = 4;
PROXY = 5;
PULL_FILES = 6;
LOAD_BLOCK = 7;
RETRY = 8;
};
Stage stage = 1;
// progress/total is context dependant. Most stages have no progress info,
// this is sent as 0/0 (the default value).
uint32 progress = 2;
uint32 total = 3;
}
message Pid1Config {
string cwd = 1;
string language = 2;
map<string, string> env = 3;
}
message FSLock { string name = 1; }
message FSSnapshot {}
message SubscribeFile { repeated File files = 1; }
message FileEvent {
File file = 1;
// when the Op is a Move dest is set to the destination of the move.
File dest = 3;
enum Op {
Create = 0;
Move = 1;
Remove = 2;
Modify = 3;
}
Op op = 2;
}
message Flush {}
message OTLinkFile {
File file = 1;
bool highConsistency = 2;
// The service will now always consider modtime of the file when
// comparing history with disk content.
bool OBSOLETE_useModTime = 3 [deprecated = true];
}
// OTLinkFileResponse contains the latest OT
// version as well as the linked file, with path and contents populated.
message OTLinkFileResponse {
uint32 version = 1;
File linkedFile = 2;
}
message Auth {
string token = 1;
string containerID = 2;
}
message VCREntry {
uint64 timestamp = 1;
enum Direction {
IN = 0;
OUT = 1;
}
Direction direction = 2;
Command command = 3;
string uid = 4;
string replid = 5;
}
message StartVCR {}
message ReadVCR {}
message VCRLog {
repeated VCREntry log = 1;
File logfile = 2;
}
message ExecInfo {
repeated string command = 1;
string reason = 2;
}
message Debug { string text = 1; }
enum FileAuthMethod {
GET = 0;
HEAD = 1;
PUT = 2;
DELETE = 3;
}
message FileAuthReq {
File file = 1;
FileAuthMethod method = 2;
}
message MultiFileAuthRes {
FileAuthRes put = 1;
FileAuthRes del = 2;
FileAuthRes get = 3;
}
message FileAuthRes {
File file = 1;
string url = 2;
FileAuthMethod method = 3;
int64 expire = 4;
string error = 5;
// Whether this error applies to the whole repl or only to the requested file.
bool replError = 7;
}
message ListObjects { string prefix = 1; }
message ListObjectsResp { repeated string objects = 1; }
message Disconnect { string error = 1; }
message Send { bytes buff = 1; }
message Recv { bytes buff = 1; }
message Connect {
string proto = 1;
string addr = 2;
}
message Hint { string text = 1; }
message Ping {}
message Pong {}
message Hello {
uint32 userid = 1;
string username = 2;
string token = 3;
}
message Goodbye {}
enum State {
Stopped = 0;
Running = 1;
}
message CheckChanges {}
message EnsurePackages {
bool install = 1;
File file = 2;
}
message Start {}
message DebugStatus {
bool done = 1;
repeated StackFrame stack = 2;
}
message StackFrame {
string function = 1;
uint32 line = 2;
}
message ContainedTest {
File suite = 1;
repeated File project = 2;
}
message TestResult {
bool passed = 1;
string stderr = 2;
repeated TestFailure fails = 3;
}
message TestFailure {
string name = 1;
string trace = 2;
}
message ResizeTerm {
uint32 rows = 1;
uint32 cols = 2;
}
message SaneTerm {}
message LintResults { repeated LintResult results = 1; }
message LintResult {
string text = 1;
int32 row = 2;
int32 column = 3;
string type = 4;
}
message OK {}
message Move {
string oldPath = 1;
string newPath = 2;
}
message Files { repeated File files = 1; }
message StatResult {
bool exists = 1;
File.Type type = 2;
int64 size = 3;
string fileMode = 4;
int64 modTime = 5;
}
message File {
string path = 1;
enum Type {
REGULAR = 0;
DIRECTORY = 1;
}
Type type = 2;
bytes content = 3;
}
// Transfer represents an active file transfer.
message Transfer {
// The opaque id the server assigned to this transfer. Should be used by the client
// for every call that refers to this transfer.
string id = 1;
}
// TransferStart is used to initiate a new file transfer. The server is supposed
// to reply to this message with a Transfer, that contains the id to refer to it.
// Transfers are used to send large files to the server, the client can split
// content into chunks and send them one-by-one.
message TransferStart {
// Relative location for the destination file (same as File.path).
string path = 1;
// The expected file size of the file. The server can refuse to initiate
// the transfer if the file size is too large.
int64 size = 2;
}
// TransferChunk is used by client to send a chunk of a file. The content will be
// appended to the end of the current buffer file. The server can refuse a chunk
// if it would result in a file larger than initially expected.
message TransferChunk {
// The opaque id the server assigned to this transfer
string id = 1;
// The content to append.
bytes content = 2;
}
// TransferComplete is used by client to indicate that it's done sending the file
// and the server is supposed to finalize the transfer: atomically create a new
// file in the `path` specified earlier. The client needs to specify the checksum,
// the server will abort the transfer if the checksum doesn't match, or if the
// total file size is different from the specified via TransferStart.
message TransferComplete {
// The opaque id the server assigned to this transfer.
string id = 1;
// CRC-32-IEEE checksum of the whole file content.
uint32 crc32 = 2;
}
message Clear {}
message Toast { string text = 1; }
message ProtocolError { string text = 1; }
// Redirect indicates that a client should attempt to connect through another
// URL. This is needed since most browser WebSockets implementations do not
// support following standard HTTP redirects.
message Redirect {
// The URL to try again. If empty, the negotiation to figure out the URL for
// a repl needs to start from scratch.
string url = 1;
}
// AlwaysOn tells conman that always on should be enabled or disabled.
message AlwaysOn {
bool enable = 1;
}
message RunMain {}
message OpenChannel {
string service = 1;
string name = 2;
enum Action {
CREATE = 0;
ATTACH = 1;
ATTACH_OR_CREATE = 2;
}
Action action = 3;
int32 id = 4;
}
message OpenChannelRes {
int32 id = 1;
enum State {
CREATED = 0;
ATTACHED = 1;
ERROR = 2;
}
State state = 2;
string error = 3;
}
message CloseChannel {
int32 id = 1;
enum Action {
DISCONNECT = 0;
TRY_CLOSE = 1;
CLOSE = 2;
}
Action action = 2;
}
message CloseChannelRes {
int32 id = 1;
enum Status {
DISCONNECT = 0;
CLOSE = 1;
NOTHING = 2;
}
Status status = 2;
}
message ContainerState {
enum State {
SLEEP = 0;
READY = 1;
}
State state = 1;
}
message PortOpen {
bool forwarded = 1;
uint32 port = 2;
string address = 3;
}
message OTFetchRequest {
uint32 versionFrom = 1;
uint32 versionTo = 2;
}
message OTFetchResponse {
repeated OTPacket packets = 1;
}
// OTTransformSelectionRequest asks the OT Service to transform a selection
// (represented by a start and end index) from one version to another by
// applying OT ops.
message OTTransformSelectionRequest {
uint32 indexStart = 1;
uint32 indexEnd = 2;
uint32 versionFrom = 3;
uint32 versionTo = 4;
}
// When the OT Service successfully transforms a selection, the resulting
// indexStart, indexEnd pair is returned
message OTTransformSelectionResponse {
// selection
uint32 indexStart = 1;
uint32 indexEnd = 2;
// version
uint32 version = 3;
}
message OTPacket {
// so here's the deal. Once uppon a time `spookyVersion` was `version` and things
// worked okay. Then one day someone came along and decided our handling of
// version 0 was all kinds of messed up. Sending a version that already existed
// never transformed the packet by that particular version. It was as if
// `version` was treated as `version + 1`. This could not stand and thus the
// great rift of versions was created. `version` does the right thing and
// `spookyVersion` maintains backwards compatibility.
uint32 spookyVersion = 1;
uint32 version = 5;
repeated OTRuneTransformOp ops = 2;
uint32 crc32 = 3;
google.protobuf.Timestamp committed = 4;
uint32 nonce = 6;
}
message OTRuneTransformOp {
oneof op {
uint32 skip = 1;
uint32 delete = 2;
string insert = 3;
}
}
message OTStatus {
string contents = 1;
uint32 version = 2;
File linkedFile = 3;
repeated OTCursor cursors = 4;
}
message OTCursor {
uint32 position = 1;
uint32 selectionStart = 2;
uint32 selectionEnd = 3;
User user = 4;
string id = 5;
}
message ChatMessage {
string username = 1;
string text = 2;
}
message ChatTyping {
string username = 1;
bool typing = 2;
}
// A user connected to a multiplayer session
message User {
uint32 id = 1;
string name = 2;
repeated string roles = 3;
int32 session = 4;
}
// When the presence channel is created, a roster will be
// sent to the channel with the current list of
// connected users and their active files
message Roster {
repeated User user = 1;
repeated FileOpened files = 2;
}
// OpenFile can be sent to notify other connected
// clients that the user has switched files
message OpenFile {
string file = 1;
}
// FileOpened is sent by pid1 to the client any time
// another connected user sends the OpenFile message
message FileOpened {
uint32 userId = 1;
string file = 2;
int32 session = 3;
google.protobuf.Timestamp timestamp = 4;
}
// Updates the timestamp on the current session
// which indicates that this is the user's most recent,
// and therefore active, session.
message UpdateSessionTimestamp {}
// Indicates that another user's session timestamp has been updated
// which implies that it is that user's active session.
// Every client will receive this message from pid1 even if they're
// not following a user so that their local store is always up to date.
message SessionTimestampUpdated {
int32 session = 1;
google.protobuf.Timestamp timestamp = 2;
}
// Notify a user that their cursor is being followed.
message FollowUser {
int32 session = 1;
}
// Notify a user that their cursor is being unfollowed.
message UnfollowUser {
int32 session = 1;
}
message Exec {
repeated string args = 1;
map<string, string> env = 2;
// Blocking is deprecated. Prefer to use lifecycle = BLOCKING instead.
bool blocking = 3 [deprecated = true];
enum Lifecycle {
// NON_BLOCKING is the default. This lets the process run in the background.
NON_BLOCKING = 0;
// BLOCKING starts and waits until the process has finished executing.
BLOCKING = 1;
// STDIN starts the process in the background and opens a pipe to stdin.
// TODO: Add an explicit message to be able to close the stdin.
STDIN = 2;
};
Lifecycle lifecycle = 6;
// splitStderr can be set to true in order to send stderr as separate
// messages. Note that there is no synchronization between stdout and stderr.
bool splitStderr = 4;
// splitLogs can be set to true if the underlying program will log
// JSON-formatted logs to the file descriptor pointed to by the `LOG_FD`
// environment variable available to the child process. These logs will be
// send through separate messages.
bool splitLogs = 5;
}
message Package {
// Used always.
string name = 1;
// Used only for add and remove.
string spec = 2;
// Used only for search and info.
string description = 10;
string version = 11;
string homepageURL = 12;
string documentationURL = 13;
string sourceCodeURL = 14;
string bugTrackerURL = 15;
string author = 16;
string license = 17;
repeated Package dependencies = 18;
}
message PackageSearch { string query = 1; }
message PackageSearchResp { repeated Package results = 1; }
message PackageInfo { Package pkg = 1; }
message PackageInfoResp { Package pkg = 1; }
message PackageAdd { repeated Package pkgs = 1; }
message PackageRemove { repeated Package pkgs = 1; }
message PackageInstall {}
message PackageListSpecfile {}
message PackageListSpecfileResp { repeated Package pkgs = 1; }
message PackageCacheSave {}
message ChatScrollback { repeated ChatMessage scrollback = 1; }
message Metrics { repeated bytes prometheusMetricFamilies = 1; }
message PprofRequest {
string id = 1;
oneof body {
PprofCpuProfileRequest pprofCpuProfileRequest = 2;
PprofHeapProfileRequest pprofHeapProfileRequest = 3;
PprofAllocsProfileRequest pprofAllocsProfileRequest = 4;
PprofBlockProfileRequest pprofBlockProfileRequest = 5;
PprofMutexProfileRequest pprofMutexProfileRequest = 6;
}
}
message PprofAllocsProfileRequest {
bool debug = 1;
}
message PprofBlockProfileRequest {
bool debug = 1;
}
message PprofCpuProfileRequest {
int64 seconds = 1;
}
message PprofHeapProfileRequest {
bool gc = 1;
bool debug = 2;
}
message PprofMutexProfileRequest {
bool debug = 1;
}
message PprofResponse {
string id = 1;
bytes profile = 2;
}
// Message used to configure PTY
message PTYConfig {
// Whether "PipeMode" should be enabled or not
// PipeMode is the equivelent of stty raw icrnl isig -echo.
// This is designed for comparing and output - the output
// should be as close as possible to its original state.
bool pipeMode = 1;
}
// The message used to request to start a new debug session with the main
// program (i.e. the same one that would be run with the Run button) as
// debuggee.
message DebugMain {
// The user-chosen session name. This same session must be provided in all
// other debugger-related messages. By convention, the "main" session is the
// default one.
string session = 1;
// Whether this session is read-only. Those sessions won't be able to change
// the execution state (play, pause, change breakpoints, etc.).
bool readOnly = 2;
}
// The reply message of DebugMain.
message DebugMainReply {
// If the DebugMain request was the first one for the session, joined will be
// false. Otherwise, joined will be true. The protocol may also have enough
// hints to convey this.
bool joined = 1;
enum Protocol {
// The adapter speaks the Debug Adapter Protocol:
// https://microsoft.github.io/debug-adapter-protocol/
DAP = 0;
}
// The protocol that the adapter is using.
Protocol protocol = 2;
}
// The state of a debug session. This is sent before the reply to DebugMain is
// sent, as well as whenever the adapter exits.
message DebugState {
string session = 1;
State state = 2;
}
// The message used to write to the debuggee or the adapter.
message DebugInput {
string session = 1;
oneof stream {
// The UTF-8 encoded input for the debuggee.
string input = 2;