geniebox-shared-lib 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,959 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.7
5
+ // protoc v5.28.2
6
+ // source: mcp.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.McpServiceService = exports.MCP_SERVICE_NAME = exports.McpServersResponse = exports.SetToolCustomizationRequest = exports.SetServerCustomizationRequest = exports.DeleteMcpServerRequest = exports.ListMcpServersRequest = exports.GetMcpServerRequest = exports.UpdateMcpServerRequest = exports.CreateMcpServerRequest = exports.McpOAuthSession = exports.McpToolCustomization = exports.McpServerCustomization = exports.McpServer = exports.MCP_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.McpServiceControllerMethods = McpServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const wire_1 = require("@bufbuild/protobuf/wire");
12
+ const microservices_1 = require("@nestjs/microservices");
13
+ const empty_interface_1 = require("./google/protobuf/empty.interface");
14
+ exports.protobufPackage = "mcp";
15
+ exports.MCP_PACKAGE_NAME = "mcp";
16
+ function createBaseMcpServer() {
17
+ return { id: "", name: "", config: "", enabled: false, userId: "", visibility: "", createdAt: "", updatedAt: "" };
18
+ }
19
+ exports.McpServer = {
20
+ encode(message, writer = new wire_1.BinaryWriter()) {
21
+ if (message.id !== "") {
22
+ writer.uint32(10).string(message.id);
23
+ }
24
+ if (message.name !== "") {
25
+ writer.uint32(18).string(message.name);
26
+ }
27
+ if (message.config !== "") {
28
+ writer.uint32(26).string(message.config);
29
+ }
30
+ if (message.enabled !== false) {
31
+ writer.uint32(32).bool(message.enabled);
32
+ }
33
+ if (message.userId !== "") {
34
+ writer.uint32(42).string(message.userId);
35
+ }
36
+ if (message.visibility !== "") {
37
+ writer.uint32(50).string(message.visibility);
38
+ }
39
+ if (message.createdAt !== "") {
40
+ writer.uint32(58).string(message.createdAt);
41
+ }
42
+ if (message.updatedAt !== "") {
43
+ writer.uint32(66).string(message.updatedAt);
44
+ }
45
+ return writer;
46
+ },
47
+ decode(input, length) {
48
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
49
+ const end = length === undefined ? reader.len : reader.pos + length;
50
+ const message = createBaseMcpServer();
51
+ while (reader.pos < end) {
52
+ const tag = reader.uint32();
53
+ switch (tag >>> 3) {
54
+ case 1: {
55
+ if (tag !== 10) {
56
+ break;
57
+ }
58
+ message.id = reader.string();
59
+ continue;
60
+ }
61
+ case 2: {
62
+ if (tag !== 18) {
63
+ break;
64
+ }
65
+ message.name = reader.string();
66
+ continue;
67
+ }
68
+ case 3: {
69
+ if (tag !== 26) {
70
+ break;
71
+ }
72
+ message.config = reader.string();
73
+ continue;
74
+ }
75
+ case 4: {
76
+ if (tag !== 32) {
77
+ break;
78
+ }
79
+ message.enabled = reader.bool();
80
+ continue;
81
+ }
82
+ case 5: {
83
+ if (tag !== 42) {
84
+ break;
85
+ }
86
+ message.userId = reader.string();
87
+ continue;
88
+ }
89
+ case 6: {
90
+ if (tag !== 50) {
91
+ break;
92
+ }
93
+ message.visibility = reader.string();
94
+ continue;
95
+ }
96
+ case 7: {
97
+ if (tag !== 58) {
98
+ break;
99
+ }
100
+ message.createdAt = reader.string();
101
+ continue;
102
+ }
103
+ case 8: {
104
+ if (tag !== 66) {
105
+ break;
106
+ }
107
+ message.updatedAt = reader.string();
108
+ continue;
109
+ }
110
+ }
111
+ if ((tag & 7) === 4 || tag === 0) {
112
+ break;
113
+ }
114
+ reader.skip(tag & 7);
115
+ }
116
+ return message;
117
+ },
118
+ };
119
+ function createBaseMcpServerCustomization() {
120
+ return { id: "", userId: "", mcpServerId: "", prompt: "", createdAt: "", updatedAt: "" };
121
+ }
122
+ exports.McpServerCustomization = {
123
+ encode(message, writer = new wire_1.BinaryWriter()) {
124
+ if (message.id !== "") {
125
+ writer.uint32(10).string(message.id);
126
+ }
127
+ if (message.userId !== "") {
128
+ writer.uint32(18).string(message.userId);
129
+ }
130
+ if (message.mcpServerId !== "") {
131
+ writer.uint32(26).string(message.mcpServerId);
132
+ }
133
+ if (message.prompt !== "") {
134
+ writer.uint32(34).string(message.prompt);
135
+ }
136
+ if (message.createdAt !== "") {
137
+ writer.uint32(42).string(message.createdAt);
138
+ }
139
+ if (message.updatedAt !== "") {
140
+ writer.uint32(50).string(message.updatedAt);
141
+ }
142
+ return writer;
143
+ },
144
+ decode(input, length) {
145
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
146
+ const end = length === undefined ? reader.len : reader.pos + length;
147
+ const message = createBaseMcpServerCustomization();
148
+ while (reader.pos < end) {
149
+ const tag = reader.uint32();
150
+ switch (tag >>> 3) {
151
+ case 1: {
152
+ if (tag !== 10) {
153
+ break;
154
+ }
155
+ message.id = reader.string();
156
+ continue;
157
+ }
158
+ case 2: {
159
+ if (tag !== 18) {
160
+ break;
161
+ }
162
+ message.userId = reader.string();
163
+ continue;
164
+ }
165
+ case 3: {
166
+ if (tag !== 26) {
167
+ break;
168
+ }
169
+ message.mcpServerId = reader.string();
170
+ continue;
171
+ }
172
+ case 4: {
173
+ if (tag !== 34) {
174
+ break;
175
+ }
176
+ message.prompt = reader.string();
177
+ continue;
178
+ }
179
+ case 5: {
180
+ if (tag !== 42) {
181
+ break;
182
+ }
183
+ message.createdAt = reader.string();
184
+ continue;
185
+ }
186
+ case 6: {
187
+ if (tag !== 50) {
188
+ break;
189
+ }
190
+ message.updatedAt = reader.string();
191
+ continue;
192
+ }
193
+ }
194
+ if ((tag & 7) === 4 || tag === 0) {
195
+ break;
196
+ }
197
+ reader.skip(tag & 7);
198
+ }
199
+ return message;
200
+ },
201
+ };
202
+ function createBaseMcpToolCustomization() {
203
+ return { id: "", userId: "", toolName: "", mcpServerId: "", prompt: "", createdAt: "", updatedAt: "" };
204
+ }
205
+ exports.McpToolCustomization = {
206
+ encode(message, writer = new wire_1.BinaryWriter()) {
207
+ if (message.id !== "") {
208
+ writer.uint32(10).string(message.id);
209
+ }
210
+ if (message.userId !== "") {
211
+ writer.uint32(18).string(message.userId);
212
+ }
213
+ if (message.toolName !== "") {
214
+ writer.uint32(26).string(message.toolName);
215
+ }
216
+ if (message.mcpServerId !== "") {
217
+ writer.uint32(34).string(message.mcpServerId);
218
+ }
219
+ if (message.prompt !== "") {
220
+ writer.uint32(42).string(message.prompt);
221
+ }
222
+ if (message.createdAt !== "") {
223
+ writer.uint32(50).string(message.createdAt);
224
+ }
225
+ if (message.updatedAt !== "") {
226
+ writer.uint32(58).string(message.updatedAt);
227
+ }
228
+ return writer;
229
+ },
230
+ decode(input, length) {
231
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
232
+ const end = length === undefined ? reader.len : reader.pos + length;
233
+ const message = createBaseMcpToolCustomization();
234
+ while (reader.pos < end) {
235
+ const tag = reader.uint32();
236
+ switch (tag >>> 3) {
237
+ case 1: {
238
+ if (tag !== 10) {
239
+ break;
240
+ }
241
+ message.id = reader.string();
242
+ continue;
243
+ }
244
+ case 2: {
245
+ if (tag !== 18) {
246
+ break;
247
+ }
248
+ message.userId = reader.string();
249
+ continue;
250
+ }
251
+ case 3: {
252
+ if (tag !== 26) {
253
+ break;
254
+ }
255
+ message.toolName = reader.string();
256
+ continue;
257
+ }
258
+ case 4: {
259
+ if (tag !== 34) {
260
+ break;
261
+ }
262
+ message.mcpServerId = reader.string();
263
+ continue;
264
+ }
265
+ case 5: {
266
+ if (tag !== 42) {
267
+ break;
268
+ }
269
+ message.prompt = reader.string();
270
+ continue;
271
+ }
272
+ case 6: {
273
+ if (tag !== 50) {
274
+ break;
275
+ }
276
+ message.createdAt = reader.string();
277
+ continue;
278
+ }
279
+ case 7: {
280
+ if (tag !== 58) {
281
+ break;
282
+ }
283
+ message.updatedAt = reader.string();
284
+ continue;
285
+ }
286
+ }
287
+ if ((tag & 7) === 4 || tag === 0) {
288
+ break;
289
+ }
290
+ reader.skip(tag & 7);
291
+ }
292
+ return message;
293
+ },
294
+ };
295
+ function createBaseMcpOAuthSession() {
296
+ return {
297
+ id: "",
298
+ mcpServerId: "",
299
+ serverUrl: "",
300
+ clientInfo: "",
301
+ tokens: "",
302
+ codeVerifier: "",
303
+ state: "",
304
+ createdAt: "",
305
+ updatedAt: "",
306
+ };
307
+ }
308
+ exports.McpOAuthSession = {
309
+ encode(message, writer = new wire_1.BinaryWriter()) {
310
+ if (message.id !== "") {
311
+ writer.uint32(10).string(message.id);
312
+ }
313
+ if (message.mcpServerId !== "") {
314
+ writer.uint32(18).string(message.mcpServerId);
315
+ }
316
+ if (message.serverUrl !== "") {
317
+ writer.uint32(26).string(message.serverUrl);
318
+ }
319
+ if (message.clientInfo !== "") {
320
+ writer.uint32(34).string(message.clientInfo);
321
+ }
322
+ if (message.tokens !== "") {
323
+ writer.uint32(42).string(message.tokens);
324
+ }
325
+ if (message.codeVerifier !== "") {
326
+ writer.uint32(50).string(message.codeVerifier);
327
+ }
328
+ if (message.state !== "") {
329
+ writer.uint32(58).string(message.state);
330
+ }
331
+ if (message.createdAt !== "") {
332
+ writer.uint32(66).string(message.createdAt);
333
+ }
334
+ if (message.updatedAt !== "") {
335
+ writer.uint32(74).string(message.updatedAt);
336
+ }
337
+ return writer;
338
+ },
339
+ decode(input, length) {
340
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
341
+ const end = length === undefined ? reader.len : reader.pos + length;
342
+ const message = createBaseMcpOAuthSession();
343
+ while (reader.pos < end) {
344
+ const tag = reader.uint32();
345
+ switch (tag >>> 3) {
346
+ case 1: {
347
+ if (tag !== 10) {
348
+ break;
349
+ }
350
+ message.id = reader.string();
351
+ continue;
352
+ }
353
+ case 2: {
354
+ if (tag !== 18) {
355
+ break;
356
+ }
357
+ message.mcpServerId = reader.string();
358
+ continue;
359
+ }
360
+ case 3: {
361
+ if (tag !== 26) {
362
+ break;
363
+ }
364
+ message.serverUrl = reader.string();
365
+ continue;
366
+ }
367
+ case 4: {
368
+ if (tag !== 34) {
369
+ break;
370
+ }
371
+ message.clientInfo = reader.string();
372
+ continue;
373
+ }
374
+ case 5: {
375
+ if (tag !== 42) {
376
+ break;
377
+ }
378
+ message.tokens = reader.string();
379
+ continue;
380
+ }
381
+ case 6: {
382
+ if (tag !== 50) {
383
+ break;
384
+ }
385
+ message.codeVerifier = reader.string();
386
+ continue;
387
+ }
388
+ case 7: {
389
+ if (tag !== 58) {
390
+ break;
391
+ }
392
+ message.state = reader.string();
393
+ continue;
394
+ }
395
+ case 8: {
396
+ if (tag !== 66) {
397
+ break;
398
+ }
399
+ message.createdAt = reader.string();
400
+ continue;
401
+ }
402
+ case 9: {
403
+ if (tag !== 74) {
404
+ break;
405
+ }
406
+ message.updatedAt = reader.string();
407
+ continue;
408
+ }
409
+ }
410
+ if ((tag & 7) === 4 || tag === 0) {
411
+ break;
412
+ }
413
+ reader.skip(tag & 7);
414
+ }
415
+ return message;
416
+ },
417
+ };
418
+ function createBaseCreateMcpServerRequest() {
419
+ return { userId: "", name: "", config: "", enabled: false, visibility: "" };
420
+ }
421
+ exports.CreateMcpServerRequest = {
422
+ encode(message, writer = new wire_1.BinaryWriter()) {
423
+ if (message.userId !== "") {
424
+ writer.uint32(10).string(message.userId);
425
+ }
426
+ if (message.name !== "") {
427
+ writer.uint32(18).string(message.name);
428
+ }
429
+ if (message.config !== "") {
430
+ writer.uint32(26).string(message.config);
431
+ }
432
+ if (message.enabled !== false) {
433
+ writer.uint32(32).bool(message.enabled);
434
+ }
435
+ if (message.visibility !== "") {
436
+ writer.uint32(42).string(message.visibility);
437
+ }
438
+ return writer;
439
+ },
440
+ decode(input, length) {
441
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
442
+ const end = length === undefined ? reader.len : reader.pos + length;
443
+ const message = createBaseCreateMcpServerRequest();
444
+ while (reader.pos < end) {
445
+ const tag = reader.uint32();
446
+ switch (tag >>> 3) {
447
+ case 1: {
448
+ if (tag !== 10) {
449
+ break;
450
+ }
451
+ message.userId = reader.string();
452
+ continue;
453
+ }
454
+ case 2: {
455
+ if (tag !== 18) {
456
+ break;
457
+ }
458
+ message.name = reader.string();
459
+ continue;
460
+ }
461
+ case 3: {
462
+ if (tag !== 26) {
463
+ break;
464
+ }
465
+ message.config = reader.string();
466
+ continue;
467
+ }
468
+ case 4: {
469
+ if (tag !== 32) {
470
+ break;
471
+ }
472
+ message.enabled = reader.bool();
473
+ continue;
474
+ }
475
+ case 5: {
476
+ if (tag !== 42) {
477
+ break;
478
+ }
479
+ message.visibility = reader.string();
480
+ continue;
481
+ }
482
+ }
483
+ if ((tag & 7) === 4 || tag === 0) {
484
+ break;
485
+ }
486
+ reader.skip(tag & 7);
487
+ }
488
+ return message;
489
+ },
490
+ };
491
+ function createBaseUpdateMcpServerRequest() {
492
+ return { id: "", userId: "" };
493
+ }
494
+ exports.UpdateMcpServerRequest = {
495
+ encode(message, writer = new wire_1.BinaryWriter()) {
496
+ if (message.id !== "") {
497
+ writer.uint32(10).string(message.id);
498
+ }
499
+ if (message.userId !== "") {
500
+ writer.uint32(18).string(message.userId);
501
+ }
502
+ if (message.name !== undefined) {
503
+ writer.uint32(26).string(message.name);
504
+ }
505
+ if (message.config !== undefined) {
506
+ writer.uint32(34).string(message.config);
507
+ }
508
+ if (message.enabled !== undefined) {
509
+ writer.uint32(40).bool(message.enabled);
510
+ }
511
+ if (message.visibility !== undefined) {
512
+ writer.uint32(50).string(message.visibility);
513
+ }
514
+ return writer;
515
+ },
516
+ decode(input, length) {
517
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
518
+ const end = length === undefined ? reader.len : reader.pos + length;
519
+ const message = createBaseUpdateMcpServerRequest();
520
+ while (reader.pos < end) {
521
+ const tag = reader.uint32();
522
+ switch (tag >>> 3) {
523
+ case 1: {
524
+ if (tag !== 10) {
525
+ break;
526
+ }
527
+ message.id = reader.string();
528
+ continue;
529
+ }
530
+ case 2: {
531
+ if (tag !== 18) {
532
+ break;
533
+ }
534
+ message.userId = reader.string();
535
+ continue;
536
+ }
537
+ case 3: {
538
+ if (tag !== 26) {
539
+ break;
540
+ }
541
+ message.name = reader.string();
542
+ continue;
543
+ }
544
+ case 4: {
545
+ if (tag !== 34) {
546
+ break;
547
+ }
548
+ message.config = reader.string();
549
+ continue;
550
+ }
551
+ case 5: {
552
+ if (tag !== 40) {
553
+ break;
554
+ }
555
+ message.enabled = reader.bool();
556
+ continue;
557
+ }
558
+ case 6: {
559
+ if (tag !== 50) {
560
+ break;
561
+ }
562
+ message.visibility = reader.string();
563
+ continue;
564
+ }
565
+ }
566
+ if ((tag & 7) === 4 || tag === 0) {
567
+ break;
568
+ }
569
+ reader.skip(tag & 7);
570
+ }
571
+ return message;
572
+ },
573
+ };
574
+ function createBaseGetMcpServerRequest() {
575
+ return { id: "", userId: "" };
576
+ }
577
+ exports.GetMcpServerRequest = {
578
+ encode(message, writer = new wire_1.BinaryWriter()) {
579
+ if (message.id !== "") {
580
+ writer.uint32(10).string(message.id);
581
+ }
582
+ if (message.userId !== "") {
583
+ writer.uint32(18).string(message.userId);
584
+ }
585
+ return writer;
586
+ },
587
+ decode(input, length) {
588
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
589
+ const end = length === undefined ? reader.len : reader.pos + length;
590
+ const message = createBaseGetMcpServerRequest();
591
+ while (reader.pos < end) {
592
+ const tag = reader.uint32();
593
+ switch (tag >>> 3) {
594
+ case 1: {
595
+ if (tag !== 10) {
596
+ break;
597
+ }
598
+ message.id = reader.string();
599
+ continue;
600
+ }
601
+ case 2: {
602
+ if (tag !== 18) {
603
+ break;
604
+ }
605
+ message.userId = reader.string();
606
+ continue;
607
+ }
608
+ }
609
+ if ((tag & 7) === 4 || tag === 0) {
610
+ break;
611
+ }
612
+ reader.skip(tag & 7);
613
+ }
614
+ return message;
615
+ },
616
+ };
617
+ function createBaseListMcpServersRequest() {
618
+ return { userId: "", limit: 0, offset: 0 };
619
+ }
620
+ exports.ListMcpServersRequest = {
621
+ encode(message, writer = new wire_1.BinaryWriter()) {
622
+ if (message.userId !== "") {
623
+ writer.uint32(10).string(message.userId);
624
+ }
625
+ if (message.limit !== 0) {
626
+ writer.uint32(16).int32(message.limit);
627
+ }
628
+ if (message.offset !== 0) {
629
+ writer.uint32(24).int32(message.offset);
630
+ }
631
+ return writer;
632
+ },
633
+ decode(input, length) {
634
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
635
+ const end = length === undefined ? reader.len : reader.pos + length;
636
+ const message = createBaseListMcpServersRequest();
637
+ while (reader.pos < end) {
638
+ const tag = reader.uint32();
639
+ switch (tag >>> 3) {
640
+ case 1: {
641
+ if (tag !== 10) {
642
+ break;
643
+ }
644
+ message.userId = reader.string();
645
+ continue;
646
+ }
647
+ case 2: {
648
+ if (tag !== 16) {
649
+ break;
650
+ }
651
+ message.limit = reader.int32();
652
+ continue;
653
+ }
654
+ case 3: {
655
+ if (tag !== 24) {
656
+ break;
657
+ }
658
+ message.offset = reader.int32();
659
+ continue;
660
+ }
661
+ }
662
+ if ((tag & 7) === 4 || tag === 0) {
663
+ break;
664
+ }
665
+ reader.skip(tag & 7);
666
+ }
667
+ return message;
668
+ },
669
+ };
670
+ function createBaseDeleteMcpServerRequest() {
671
+ return { id: "", userId: "" };
672
+ }
673
+ exports.DeleteMcpServerRequest = {
674
+ encode(message, writer = new wire_1.BinaryWriter()) {
675
+ if (message.id !== "") {
676
+ writer.uint32(10).string(message.id);
677
+ }
678
+ if (message.userId !== "") {
679
+ writer.uint32(18).string(message.userId);
680
+ }
681
+ return writer;
682
+ },
683
+ decode(input, length) {
684
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
685
+ const end = length === undefined ? reader.len : reader.pos + length;
686
+ const message = createBaseDeleteMcpServerRequest();
687
+ while (reader.pos < end) {
688
+ const tag = reader.uint32();
689
+ switch (tag >>> 3) {
690
+ case 1: {
691
+ if (tag !== 10) {
692
+ break;
693
+ }
694
+ message.id = reader.string();
695
+ continue;
696
+ }
697
+ case 2: {
698
+ if (tag !== 18) {
699
+ break;
700
+ }
701
+ message.userId = reader.string();
702
+ continue;
703
+ }
704
+ }
705
+ if ((tag & 7) === 4 || tag === 0) {
706
+ break;
707
+ }
708
+ reader.skip(tag & 7);
709
+ }
710
+ return message;
711
+ },
712
+ };
713
+ function createBaseSetServerCustomizationRequest() {
714
+ return { userId: "", mcpServerId: "", prompt: "" };
715
+ }
716
+ exports.SetServerCustomizationRequest = {
717
+ encode(message, writer = new wire_1.BinaryWriter()) {
718
+ if (message.userId !== "") {
719
+ writer.uint32(10).string(message.userId);
720
+ }
721
+ if (message.mcpServerId !== "") {
722
+ writer.uint32(18).string(message.mcpServerId);
723
+ }
724
+ if (message.prompt !== "") {
725
+ writer.uint32(26).string(message.prompt);
726
+ }
727
+ return writer;
728
+ },
729
+ decode(input, length) {
730
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
731
+ const end = length === undefined ? reader.len : reader.pos + length;
732
+ const message = createBaseSetServerCustomizationRequest();
733
+ while (reader.pos < end) {
734
+ const tag = reader.uint32();
735
+ switch (tag >>> 3) {
736
+ case 1: {
737
+ if (tag !== 10) {
738
+ break;
739
+ }
740
+ message.userId = reader.string();
741
+ continue;
742
+ }
743
+ case 2: {
744
+ if (tag !== 18) {
745
+ break;
746
+ }
747
+ message.mcpServerId = reader.string();
748
+ continue;
749
+ }
750
+ case 3: {
751
+ if (tag !== 26) {
752
+ break;
753
+ }
754
+ message.prompt = reader.string();
755
+ continue;
756
+ }
757
+ }
758
+ if ((tag & 7) === 4 || tag === 0) {
759
+ break;
760
+ }
761
+ reader.skip(tag & 7);
762
+ }
763
+ return message;
764
+ },
765
+ };
766
+ function createBaseSetToolCustomizationRequest() {
767
+ return { userId: "", mcpServerId: "", toolName: "", prompt: "" };
768
+ }
769
+ exports.SetToolCustomizationRequest = {
770
+ encode(message, writer = new wire_1.BinaryWriter()) {
771
+ if (message.userId !== "") {
772
+ writer.uint32(10).string(message.userId);
773
+ }
774
+ if (message.mcpServerId !== "") {
775
+ writer.uint32(18).string(message.mcpServerId);
776
+ }
777
+ if (message.toolName !== "") {
778
+ writer.uint32(26).string(message.toolName);
779
+ }
780
+ if (message.prompt !== "") {
781
+ writer.uint32(34).string(message.prompt);
782
+ }
783
+ return writer;
784
+ },
785
+ decode(input, length) {
786
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
787
+ const end = length === undefined ? reader.len : reader.pos + length;
788
+ const message = createBaseSetToolCustomizationRequest();
789
+ while (reader.pos < end) {
790
+ const tag = reader.uint32();
791
+ switch (tag >>> 3) {
792
+ case 1: {
793
+ if (tag !== 10) {
794
+ break;
795
+ }
796
+ message.userId = reader.string();
797
+ continue;
798
+ }
799
+ case 2: {
800
+ if (tag !== 18) {
801
+ break;
802
+ }
803
+ message.mcpServerId = reader.string();
804
+ continue;
805
+ }
806
+ case 3: {
807
+ if (tag !== 26) {
808
+ break;
809
+ }
810
+ message.toolName = reader.string();
811
+ continue;
812
+ }
813
+ case 4: {
814
+ if (tag !== 34) {
815
+ break;
816
+ }
817
+ message.prompt = reader.string();
818
+ continue;
819
+ }
820
+ }
821
+ if ((tag & 7) === 4 || tag === 0) {
822
+ break;
823
+ }
824
+ reader.skip(tag & 7);
825
+ }
826
+ return message;
827
+ },
828
+ };
829
+ function createBaseMcpServersResponse() {
830
+ return { servers: [], total: 0 };
831
+ }
832
+ exports.McpServersResponse = {
833
+ encode(message, writer = new wire_1.BinaryWriter()) {
834
+ for (const v of message.servers) {
835
+ exports.McpServer.encode(v, writer.uint32(10).fork()).join();
836
+ }
837
+ if (message.total !== 0) {
838
+ writer.uint32(16).int32(message.total);
839
+ }
840
+ return writer;
841
+ },
842
+ decode(input, length) {
843
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
844
+ const end = length === undefined ? reader.len : reader.pos + length;
845
+ const message = createBaseMcpServersResponse();
846
+ while (reader.pos < end) {
847
+ const tag = reader.uint32();
848
+ switch (tag >>> 3) {
849
+ case 1: {
850
+ if (tag !== 10) {
851
+ break;
852
+ }
853
+ message.servers.push(exports.McpServer.decode(reader, reader.uint32()));
854
+ continue;
855
+ }
856
+ case 2: {
857
+ if (tag !== 16) {
858
+ break;
859
+ }
860
+ message.total = reader.int32();
861
+ continue;
862
+ }
863
+ }
864
+ if ((tag & 7) === 4 || tag === 0) {
865
+ break;
866
+ }
867
+ reader.skip(tag & 7);
868
+ }
869
+ return message;
870
+ },
871
+ };
872
+ function McpServiceControllerMethods() {
873
+ return function (constructor) {
874
+ const grpcMethods = [
875
+ "createServer",
876
+ "getServer",
877
+ "updateServer",
878
+ "deleteServer",
879
+ "listServers",
880
+ "setServerCustomization",
881
+ "setToolCustomization",
882
+ ];
883
+ for (const method of grpcMethods) {
884
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
885
+ (0, microservices_1.GrpcMethod)("McpService", method)(constructor.prototype[method], method, descriptor);
886
+ }
887
+ const grpcStreamMethods = [];
888
+ for (const method of grpcStreamMethods) {
889
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
890
+ (0, microservices_1.GrpcStreamMethod)("McpService", method)(constructor.prototype[method], method, descriptor);
891
+ }
892
+ };
893
+ }
894
+ exports.MCP_SERVICE_NAME = "McpService";
895
+ exports.McpServiceService = {
896
+ createServer: {
897
+ path: "/mcp.McpService/createServer",
898
+ requestStream: false,
899
+ responseStream: false,
900
+ requestSerialize: (value) => Buffer.from(exports.CreateMcpServerRequest.encode(value).finish()),
901
+ requestDeserialize: (value) => exports.CreateMcpServerRequest.decode(value),
902
+ responseSerialize: (value) => Buffer.from(exports.McpServer.encode(value).finish()),
903
+ responseDeserialize: (value) => exports.McpServer.decode(value),
904
+ },
905
+ getServer: {
906
+ path: "/mcp.McpService/getServer",
907
+ requestStream: false,
908
+ responseStream: false,
909
+ requestSerialize: (value) => Buffer.from(exports.GetMcpServerRequest.encode(value).finish()),
910
+ requestDeserialize: (value) => exports.GetMcpServerRequest.decode(value),
911
+ responseSerialize: (value) => Buffer.from(exports.McpServer.encode(value).finish()),
912
+ responseDeserialize: (value) => exports.McpServer.decode(value),
913
+ },
914
+ updateServer: {
915
+ path: "/mcp.McpService/updateServer",
916
+ requestStream: false,
917
+ responseStream: false,
918
+ requestSerialize: (value) => Buffer.from(exports.UpdateMcpServerRequest.encode(value).finish()),
919
+ requestDeserialize: (value) => exports.UpdateMcpServerRequest.decode(value),
920
+ responseSerialize: (value) => Buffer.from(exports.McpServer.encode(value).finish()),
921
+ responseDeserialize: (value) => exports.McpServer.decode(value),
922
+ },
923
+ deleteServer: {
924
+ path: "/mcp.McpService/deleteServer",
925
+ requestStream: false,
926
+ responseStream: false,
927
+ requestSerialize: (value) => Buffer.from(exports.DeleteMcpServerRequest.encode(value).finish()),
928
+ requestDeserialize: (value) => exports.DeleteMcpServerRequest.decode(value),
929
+ responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
930
+ responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
931
+ },
932
+ listServers: {
933
+ path: "/mcp.McpService/listServers",
934
+ requestStream: false,
935
+ responseStream: false,
936
+ requestSerialize: (value) => Buffer.from(exports.ListMcpServersRequest.encode(value).finish()),
937
+ requestDeserialize: (value) => exports.ListMcpServersRequest.decode(value),
938
+ responseSerialize: (value) => Buffer.from(exports.McpServersResponse.encode(value).finish()),
939
+ responseDeserialize: (value) => exports.McpServersResponse.decode(value),
940
+ },
941
+ setServerCustomization: {
942
+ path: "/mcp.McpService/setServerCustomization",
943
+ requestStream: false,
944
+ responseStream: false,
945
+ requestSerialize: (value) => Buffer.from(exports.SetServerCustomizationRequest.encode(value).finish()),
946
+ requestDeserialize: (value) => exports.SetServerCustomizationRequest.decode(value),
947
+ responseSerialize: (value) => Buffer.from(exports.McpServerCustomization.encode(value).finish()),
948
+ responseDeserialize: (value) => exports.McpServerCustomization.decode(value),
949
+ },
950
+ setToolCustomization: {
951
+ path: "/mcp.McpService/setToolCustomization",
952
+ requestStream: false,
953
+ responseStream: false,
954
+ requestSerialize: (value) => Buffer.from(exports.SetToolCustomizationRequest.encode(value).finish()),
955
+ requestDeserialize: (value) => exports.SetToolCustomizationRequest.decode(value),
956
+ responseSerialize: (value) => Buffer.from(exports.McpToolCustomization.encode(value).finish()),
957
+ responseDeserialize: (value) => exports.McpToolCustomization.decode(value),
958
+ },
959
+ };