@theway-ai/sdk 0.1.15 → 0.1.17

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.
@@ -21,6 +21,9 @@ function createBaseDaemonConfig() {
21
21
  toolServiceAddr: undefined,
22
22
  storageServiceAddr: undefined,
23
23
  thinkingLevel: undefined,
24
+ skills: [],
25
+ templates: [],
26
+ mcpServers: [],
24
27
  clearFields: [],
25
28
  };
26
29
  }
@@ -59,6 +62,15 @@ export const DaemonConfig = {
59
62
  if (message.thinkingLevel !== undefined) {
60
63
  writer.uint32(98).string(message.thinkingLevel);
61
64
  }
65
+ for (const v of message.skills) {
66
+ ProvisionedSkill.encode(v, writer.uint32(106).fork()).join();
67
+ }
68
+ for (const v of message.templates) {
69
+ ProvisionedTemplate.encode(v, writer.uint32(114).fork()).join();
70
+ }
71
+ for (const v of message.mcpServers) {
72
+ ProvisionedMcpServer.encode(v, writer.uint32(122).fork()).join();
73
+ }
62
74
  for (const v of message.clearFields) {
63
75
  writer.uint32(90).string(v);
64
76
  }
@@ -148,6 +160,27 @@ export const DaemonConfig = {
148
160
  message.thinkingLevel = reader.string();
149
161
  continue;
150
162
  }
163
+ case 13: {
164
+ if (tag !== 106) {
165
+ break;
166
+ }
167
+ message.skills.push(ProvisionedSkill.decode(reader, reader.uint32()));
168
+ continue;
169
+ }
170
+ case 14: {
171
+ if (tag !== 114) {
172
+ break;
173
+ }
174
+ message.templates.push(ProvisionedTemplate.decode(reader, reader.uint32()));
175
+ continue;
176
+ }
177
+ case 15: {
178
+ if (tag !== 122) {
179
+ break;
180
+ }
181
+ message.mcpServers.push(ProvisionedMcpServer.decode(reader, reader.uint32()));
182
+ continue;
183
+ }
151
184
  case 11: {
152
185
  if (tag !== 90) {
153
186
  break;
@@ -208,6 +241,17 @@ export const DaemonConfig = {
208
241
  : isSet(object.thinking_level)
209
242
  ? globalThis.String(object.thinking_level)
210
243
  : undefined,
244
+ skills: globalThis.Array.isArray(object?.skills)
245
+ ? object.skills.map((e) => ProvisionedSkill.fromJSON(e))
246
+ : [],
247
+ templates: globalThis.Array.isArray(object?.templates)
248
+ ? object.templates.map((e) => ProvisionedTemplate.fromJSON(e))
249
+ : [],
250
+ mcpServers: globalThis.Array.isArray(object?.mcpServers)
251
+ ? object.mcpServers.map((e) => ProvisionedMcpServer.fromJSON(e))
252
+ : globalThis.Array.isArray(object?.mcp_servers)
253
+ ? object.mcp_servers.map((e) => ProvisionedMcpServer.fromJSON(e))
254
+ : [],
211
255
  clearFields: globalThis.Array.isArray(object?.clearFields)
212
256
  ? object.clearFields.map((e) => globalThis.String(e))
213
257
  : globalThis.Array.isArray(object?.clear_fields)
@@ -250,6 +294,15 @@ export const DaemonConfig = {
250
294
  if (message.thinkingLevel !== undefined) {
251
295
  obj.thinkingLevel = message.thinkingLevel;
252
296
  }
297
+ if (message.skills?.length) {
298
+ obj.skills = message.skills.map((e) => ProvisionedSkill.toJSON(e));
299
+ }
300
+ if (message.templates?.length) {
301
+ obj.templates = message.templates.map((e) => ProvisionedTemplate.toJSON(e));
302
+ }
303
+ if (message.mcpServers?.length) {
304
+ obj.mcpServers = message.mcpServers.map((e) => ProvisionedMcpServer.toJSON(e));
305
+ }
253
306
  if (message.clearFields?.length) {
254
307
  obj.clearFields = message.clearFields;
255
308
  }
@@ -271,10 +324,673 @@ export const DaemonConfig = {
271
324
  message.toolServiceAddr = object.toolServiceAddr ?? undefined;
272
325
  message.storageServiceAddr = object.storageServiceAddr ?? undefined;
273
326
  message.thinkingLevel = object.thinkingLevel ?? undefined;
327
+ message.skills = object.skills?.map((e) => ProvisionedSkill.fromPartial(e)) || [];
328
+ message.templates = object.templates?.map((e) => ProvisionedTemplate.fromPartial(e)) || [];
329
+ message.mcpServers = object.mcpServers?.map((e) => ProvisionedMcpServer.fromPartial(e)) || [];
274
330
  message.clearFields = object.clearFields?.map((e) => e) || [];
275
331
  return message;
276
332
  },
277
333
  };
334
+ function createBaseProvisionedSkill() {
335
+ return { name: "", description: "", content: "", filePath: "", source: "", disableModelInvocation: false };
336
+ }
337
+ export const ProvisionedSkill = {
338
+ encode(message, writer = new BinaryWriter()) {
339
+ if (message.name !== "") {
340
+ writer.uint32(10).string(message.name);
341
+ }
342
+ if (message.description !== "") {
343
+ writer.uint32(18).string(message.description);
344
+ }
345
+ if (message.content !== "") {
346
+ writer.uint32(26).string(message.content);
347
+ }
348
+ if (message.filePath !== "") {
349
+ writer.uint32(34).string(message.filePath);
350
+ }
351
+ if (message.source !== "") {
352
+ writer.uint32(42).string(message.source);
353
+ }
354
+ if (message.disableModelInvocation !== false) {
355
+ writer.uint32(48).bool(message.disableModelInvocation);
356
+ }
357
+ return writer;
358
+ },
359
+ decode(input, length) {
360
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
361
+ const end = length === undefined ? reader.len : reader.pos + length;
362
+ const message = createBaseProvisionedSkill();
363
+ while (reader.pos < end) {
364
+ const tag = reader.uint32();
365
+ switch (tag >>> 3) {
366
+ case 1: {
367
+ if (tag !== 10) {
368
+ break;
369
+ }
370
+ message.name = reader.string();
371
+ continue;
372
+ }
373
+ case 2: {
374
+ if (tag !== 18) {
375
+ break;
376
+ }
377
+ message.description = reader.string();
378
+ continue;
379
+ }
380
+ case 3: {
381
+ if (tag !== 26) {
382
+ break;
383
+ }
384
+ message.content = reader.string();
385
+ continue;
386
+ }
387
+ case 4: {
388
+ if (tag !== 34) {
389
+ break;
390
+ }
391
+ message.filePath = reader.string();
392
+ continue;
393
+ }
394
+ case 5: {
395
+ if (tag !== 42) {
396
+ break;
397
+ }
398
+ message.source = reader.string();
399
+ continue;
400
+ }
401
+ case 6: {
402
+ if (tag !== 48) {
403
+ break;
404
+ }
405
+ message.disableModelInvocation = reader.bool();
406
+ continue;
407
+ }
408
+ }
409
+ if ((tag & 7) === 4 || tag === 0) {
410
+ break;
411
+ }
412
+ reader.skip(tag & 7);
413
+ }
414
+ return message;
415
+ },
416
+ fromJSON(object) {
417
+ return {
418
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
419
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
420
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
421
+ filePath: isSet(object.filePath)
422
+ ? globalThis.String(object.filePath)
423
+ : isSet(object.file_path)
424
+ ? globalThis.String(object.file_path)
425
+ : "",
426
+ source: isSet(object.source) ? globalThis.String(object.source) : "",
427
+ disableModelInvocation: isSet(object.disableModelInvocation)
428
+ ? globalThis.Boolean(object.disableModelInvocation)
429
+ : isSet(object.disable_model_invocation)
430
+ ? globalThis.Boolean(object.disable_model_invocation)
431
+ : false,
432
+ };
433
+ },
434
+ toJSON(message) {
435
+ const obj = {};
436
+ if (message.name !== "") {
437
+ obj.name = message.name;
438
+ }
439
+ if (message.description !== "") {
440
+ obj.description = message.description;
441
+ }
442
+ if (message.content !== "") {
443
+ obj.content = message.content;
444
+ }
445
+ if (message.filePath !== "") {
446
+ obj.filePath = message.filePath;
447
+ }
448
+ if (message.source !== "") {
449
+ obj.source = message.source;
450
+ }
451
+ if (message.disableModelInvocation !== false) {
452
+ obj.disableModelInvocation = message.disableModelInvocation;
453
+ }
454
+ return obj;
455
+ },
456
+ create(base) {
457
+ return ProvisionedSkill.fromPartial(base ?? {});
458
+ },
459
+ fromPartial(object) {
460
+ const message = createBaseProvisionedSkill();
461
+ message.name = object.name ?? "";
462
+ message.description = object.description ?? "";
463
+ message.content = object.content ?? "";
464
+ message.filePath = object.filePath ?? "";
465
+ message.source = object.source ?? "";
466
+ message.disableModelInvocation = object.disableModelInvocation ?? false;
467
+ return message;
468
+ },
469
+ };
470
+ function createBaseProvisionedTemplate() {
471
+ return { name: "", description: "", content: "", filePath: "" };
472
+ }
473
+ export const ProvisionedTemplate = {
474
+ encode(message, writer = new BinaryWriter()) {
475
+ if (message.name !== "") {
476
+ writer.uint32(10).string(message.name);
477
+ }
478
+ if (message.description !== "") {
479
+ writer.uint32(18).string(message.description);
480
+ }
481
+ if (message.content !== "") {
482
+ writer.uint32(26).string(message.content);
483
+ }
484
+ if (message.filePath !== "") {
485
+ writer.uint32(34).string(message.filePath);
486
+ }
487
+ return writer;
488
+ },
489
+ decode(input, length) {
490
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
491
+ const end = length === undefined ? reader.len : reader.pos + length;
492
+ const message = createBaseProvisionedTemplate();
493
+ while (reader.pos < end) {
494
+ const tag = reader.uint32();
495
+ switch (tag >>> 3) {
496
+ case 1: {
497
+ if (tag !== 10) {
498
+ break;
499
+ }
500
+ message.name = reader.string();
501
+ continue;
502
+ }
503
+ case 2: {
504
+ if (tag !== 18) {
505
+ break;
506
+ }
507
+ message.description = reader.string();
508
+ continue;
509
+ }
510
+ case 3: {
511
+ if (tag !== 26) {
512
+ break;
513
+ }
514
+ message.content = reader.string();
515
+ continue;
516
+ }
517
+ case 4: {
518
+ if (tag !== 34) {
519
+ break;
520
+ }
521
+ message.filePath = reader.string();
522
+ continue;
523
+ }
524
+ }
525
+ if ((tag & 7) === 4 || tag === 0) {
526
+ break;
527
+ }
528
+ reader.skip(tag & 7);
529
+ }
530
+ return message;
531
+ },
532
+ fromJSON(object) {
533
+ return {
534
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
535
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
536
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
537
+ filePath: isSet(object.filePath)
538
+ ? globalThis.String(object.filePath)
539
+ : isSet(object.file_path)
540
+ ? globalThis.String(object.file_path)
541
+ : "",
542
+ };
543
+ },
544
+ toJSON(message) {
545
+ const obj = {};
546
+ if (message.name !== "") {
547
+ obj.name = message.name;
548
+ }
549
+ if (message.description !== "") {
550
+ obj.description = message.description;
551
+ }
552
+ if (message.content !== "") {
553
+ obj.content = message.content;
554
+ }
555
+ if (message.filePath !== "") {
556
+ obj.filePath = message.filePath;
557
+ }
558
+ return obj;
559
+ },
560
+ create(base) {
561
+ return ProvisionedTemplate.fromPartial(base ?? {});
562
+ },
563
+ fromPartial(object) {
564
+ const message = createBaseProvisionedTemplate();
565
+ message.name = object.name ?? "";
566
+ message.description = object.description ?? "";
567
+ message.content = object.content ?? "";
568
+ message.filePath = object.filePath ?? "";
569
+ return message;
570
+ },
571
+ };
572
+ function createBaseProvisionedMcpServer() {
573
+ return {
574
+ name: "",
575
+ kind: "",
576
+ command: undefined,
577
+ args: [],
578
+ endpoint: undefined,
579
+ auth: undefined,
580
+ requestTimeoutMs: undefined,
581
+ sseIdleTimeoutMs: undefined,
582
+ bodyCapBytes: undefined,
583
+ reconnect: undefined,
584
+ injectSummary: false,
585
+ injectAndRun: false,
586
+ };
587
+ }
588
+ export const ProvisionedMcpServer = {
589
+ encode(message, writer = new BinaryWriter()) {
590
+ if (message.name !== "") {
591
+ writer.uint32(10).string(message.name);
592
+ }
593
+ if (message.kind !== "") {
594
+ writer.uint32(18).string(message.kind);
595
+ }
596
+ if (message.command !== undefined) {
597
+ writer.uint32(26).string(message.command);
598
+ }
599
+ for (const v of message.args) {
600
+ writer.uint32(34).string(v);
601
+ }
602
+ if (message.endpoint !== undefined) {
603
+ writer.uint32(42).string(message.endpoint);
604
+ }
605
+ if (message.auth !== undefined) {
606
+ ProvisionedMcpAuth.encode(message.auth, writer.uint32(50).fork()).join();
607
+ }
608
+ if (message.requestTimeoutMs !== undefined) {
609
+ writer.uint32(56).uint64(message.requestTimeoutMs);
610
+ }
611
+ if (message.sseIdleTimeoutMs !== undefined) {
612
+ writer.uint32(64).uint64(message.sseIdleTimeoutMs);
613
+ }
614
+ if (message.bodyCapBytes !== undefined) {
615
+ writer.uint32(72).uint64(message.bodyCapBytes);
616
+ }
617
+ if (message.reconnect !== undefined) {
618
+ ProvisionedMcpReconnect.encode(message.reconnect, writer.uint32(82).fork()).join();
619
+ }
620
+ if (message.injectSummary !== false) {
621
+ writer.uint32(88).bool(message.injectSummary);
622
+ }
623
+ if (message.injectAndRun !== false) {
624
+ writer.uint32(96).bool(message.injectAndRun);
625
+ }
626
+ return writer;
627
+ },
628
+ decode(input, length) {
629
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
630
+ const end = length === undefined ? reader.len : reader.pos + length;
631
+ const message = createBaseProvisionedMcpServer();
632
+ while (reader.pos < end) {
633
+ const tag = reader.uint32();
634
+ switch (tag >>> 3) {
635
+ case 1: {
636
+ if (tag !== 10) {
637
+ break;
638
+ }
639
+ message.name = reader.string();
640
+ continue;
641
+ }
642
+ case 2: {
643
+ if (tag !== 18) {
644
+ break;
645
+ }
646
+ message.kind = reader.string();
647
+ continue;
648
+ }
649
+ case 3: {
650
+ if (tag !== 26) {
651
+ break;
652
+ }
653
+ message.command = reader.string();
654
+ continue;
655
+ }
656
+ case 4: {
657
+ if (tag !== 34) {
658
+ break;
659
+ }
660
+ message.args.push(reader.string());
661
+ continue;
662
+ }
663
+ case 5: {
664
+ if (tag !== 42) {
665
+ break;
666
+ }
667
+ message.endpoint = reader.string();
668
+ continue;
669
+ }
670
+ case 6: {
671
+ if (tag !== 50) {
672
+ break;
673
+ }
674
+ message.auth = ProvisionedMcpAuth.decode(reader, reader.uint32());
675
+ continue;
676
+ }
677
+ case 7: {
678
+ if (tag !== 56) {
679
+ break;
680
+ }
681
+ message.requestTimeoutMs = reader.uint64().toString();
682
+ continue;
683
+ }
684
+ case 8: {
685
+ if (tag !== 64) {
686
+ break;
687
+ }
688
+ message.sseIdleTimeoutMs = reader.uint64().toString();
689
+ continue;
690
+ }
691
+ case 9: {
692
+ if (tag !== 72) {
693
+ break;
694
+ }
695
+ message.bodyCapBytes = reader.uint64().toString();
696
+ continue;
697
+ }
698
+ case 10: {
699
+ if (tag !== 82) {
700
+ break;
701
+ }
702
+ message.reconnect = ProvisionedMcpReconnect.decode(reader, reader.uint32());
703
+ continue;
704
+ }
705
+ case 11: {
706
+ if (tag !== 88) {
707
+ break;
708
+ }
709
+ message.injectSummary = reader.bool();
710
+ continue;
711
+ }
712
+ case 12: {
713
+ if (tag !== 96) {
714
+ break;
715
+ }
716
+ message.injectAndRun = reader.bool();
717
+ continue;
718
+ }
719
+ }
720
+ if ((tag & 7) === 4 || tag === 0) {
721
+ break;
722
+ }
723
+ reader.skip(tag & 7);
724
+ }
725
+ return message;
726
+ },
727
+ fromJSON(object) {
728
+ return {
729
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
730
+ kind: isSet(object.kind) ? globalThis.String(object.kind) : "",
731
+ command: isSet(object.command) ? globalThis.String(object.command) : undefined,
732
+ args: globalThis.Array.isArray(object?.args) ? object.args.map((e) => globalThis.String(e)) : [],
733
+ endpoint: isSet(object.endpoint) ? globalThis.String(object.endpoint) : undefined,
734
+ auth: isSet(object.auth) ? ProvisionedMcpAuth.fromJSON(object.auth) : undefined,
735
+ requestTimeoutMs: isSet(object.requestTimeoutMs)
736
+ ? globalThis.String(object.requestTimeoutMs)
737
+ : isSet(object.request_timeout_ms)
738
+ ? globalThis.String(object.request_timeout_ms)
739
+ : undefined,
740
+ sseIdleTimeoutMs: isSet(object.sseIdleTimeoutMs)
741
+ ? globalThis.String(object.sseIdleTimeoutMs)
742
+ : isSet(object.sse_idle_timeout_ms)
743
+ ? globalThis.String(object.sse_idle_timeout_ms)
744
+ : undefined,
745
+ bodyCapBytes: isSet(object.bodyCapBytes)
746
+ ? globalThis.String(object.bodyCapBytes)
747
+ : isSet(object.body_cap_bytes)
748
+ ? globalThis.String(object.body_cap_bytes)
749
+ : undefined,
750
+ reconnect: isSet(object.reconnect) ? ProvisionedMcpReconnect.fromJSON(object.reconnect) : undefined,
751
+ injectSummary: isSet(object.injectSummary)
752
+ ? globalThis.Boolean(object.injectSummary)
753
+ : isSet(object.inject_summary)
754
+ ? globalThis.Boolean(object.inject_summary)
755
+ : false,
756
+ injectAndRun: isSet(object.injectAndRun)
757
+ ? globalThis.Boolean(object.injectAndRun)
758
+ : isSet(object.inject_and_run)
759
+ ? globalThis.Boolean(object.inject_and_run)
760
+ : false,
761
+ };
762
+ },
763
+ toJSON(message) {
764
+ const obj = {};
765
+ if (message.name !== "") {
766
+ obj.name = message.name;
767
+ }
768
+ if (message.kind !== "") {
769
+ obj.kind = message.kind;
770
+ }
771
+ if (message.command !== undefined) {
772
+ obj.command = message.command;
773
+ }
774
+ if (message.args?.length) {
775
+ obj.args = message.args;
776
+ }
777
+ if (message.endpoint !== undefined) {
778
+ obj.endpoint = message.endpoint;
779
+ }
780
+ if (message.auth !== undefined) {
781
+ obj.auth = ProvisionedMcpAuth.toJSON(message.auth);
782
+ }
783
+ if (message.requestTimeoutMs !== undefined) {
784
+ obj.requestTimeoutMs = message.requestTimeoutMs;
785
+ }
786
+ if (message.sseIdleTimeoutMs !== undefined) {
787
+ obj.sseIdleTimeoutMs = message.sseIdleTimeoutMs;
788
+ }
789
+ if (message.bodyCapBytes !== undefined) {
790
+ obj.bodyCapBytes = message.bodyCapBytes;
791
+ }
792
+ if (message.reconnect !== undefined) {
793
+ obj.reconnect = ProvisionedMcpReconnect.toJSON(message.reconnect);
794
+ }
795
+ if (message.injectSummary !== false) {
796
+ obj.injectSummary = message.injectSummary;
797
+ }
798
+ if (message.injectAndRun !== false) {
799
+ obj.injectAndRun = message.injectAndRun;
800
+ }
801
+ return obj;
802
+ },
803
+ create(base) {
804
+ return ProvisionedMcpServer.fromPartial(base ?? {});
805
+ },
806
+ fromPartial(object) {
807
+ const message = createBaseProvisionedMcpServer();
808
+ message.name = object.name ?? "";
809
+ message.kind = object.kind ?? "";
810
+ message.command = object.command ?? undefined;
811
+ message.args = object.args?.map((e) => e) || [];
812
+ message.endpoint = object.endpoint ?? undefined;
813
+ message.auth = (object.auth !== undefined && object.auth !== null)
814
+ ? ProvisionedMcpAuth.fromPartial(object.auth)
815
+ : undefined;
816
+ message.requestTimeoutMs = object.requestTimeoutMs ?? undefined;
817
+ message.sseIdleTimeoutMs = object.sseIdleTimeoutMs ?? undefined;
818
+ message.bodyCapBytes = object.bodyCapBytes ?? undefined;
819
+ message.reconnect = (object.reconnect !== undefined && object.reconnect !== null)
820
+ ? ProvisionedMcpReconnect.fromPartial(object.reconnect)
821
+ : undefined;
822
+ message.injectSummary = object.injectSummary ?? false;
823
+ message.injectAndRun = object.injectAndRun ?? false;
824
+ return message;
825
+ },
826
+ };
827
+ function createBaseProvisionedMcpAuth() {
828
+ return { kind: "", tokenKeychainRef: undefined };
829
+ }
830
+ export const ProvisionedMcpAuth = {
831
+ encode(message, writer = new BinaryWriter()) {
832
+ if (message.kind !== "") {
833
+ writer.uint32(10).string(message.kind);
834
+ }
835
+ if (message.tokenKeychainRef !== undefined) {
836
+ writer.uint32(18).string(message.tokenKeychainRef);
837
+ }
838
+ return writer;
839
+ },
840
+ decode(input, length) {
841
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
842
+ const end = length === undefined ? reader.len : reader.pos + length;
843
+ const message = createBaseProvisionedMcpAuth();
844
+ while (reader.pos < end) {
845
+ const tag = reader.uint32();
846
+ switch (tag >>> 3) {
847
+ case 1: {
848
+ if (tag !== 10) {
849
+ break;
850
+ }
851
+ message.kind = reader.string();
852
+ continue;
853
+ }
854
+ case 2: {
855
+ if (tag !== 18) {
856
+ break;
857
+ }
858
+ message.tokenKeychainRef = reader.string();
859
+ continue;
860
+ }
861
+ }
862
+ if ((tag & 7) === 4 || tag === 0) {
863
+ break;
864
+ }
865
+ reader.skip(tag & 7);
866
+ }
867
+ return message;
868
+ },
869
+ fromJSON(object) {
870
+ return {
871
+ kind: isSet(object.kind) ? globalThis.String(object.kind) : "",
872
+ tokenKeychainRef: isSet(object.tokenKeychainRef)
873
+ ? globalThis.String(object.tokenKeychainRef)
874
+ : isSet(object.token_keychain_ref)
875
+ ? globalThis.String(object.token_keychain_ref)
876
+ : undefined,
877
+ };
878
+ },
879
+ toJSON(message) {
880
+ const obj = {};
881
+ if (message.kind !== "") {
882
+ obj.kind = message.kind;
883
+ }
884
+ if (message.tokenKeychainRef !== undefined) {
885
+ obj.tokenKeychainRef = message.tokenKeychainRef;
886
+ }
887
+ return obj;
888
+ },
889
+ create(base) {
890
+ return ProvisionedMcpAuth.fromPartial(base ?? {});
891
+ },
892
+ fromPartial(object) {
893
+ const message = createBaseProvisionedMcpAuth();
894
+ message.kind = object.kind ?? "";
895
+ message.tokenKeychainRef = object.tokenKeychainRef ?? undefined;
896
+ return message;
897
+ },
898
+ };
899
+ function createBaseProvisionedMcpReconnect() {
900
+ return { initialMs: undefined, maxMs: undefined, maxAttempts: undefined };
901
+ }
902
+ export const ProvisionedMcpReconnect = {
903
+ encode(message, writer = new BinaryWriter()) {
904
+ if (message.initialMs !== undefined) {
905
+ writer.uint32(8).uint64(message.initialMs);
906
+ }
907
+ if (message.maxMs !== undefined) {
908
+ writer.uint32(16).uint64(message.maxMs);
909
+ }
910
+ if (message.maxAttempts !== undefined) {
911
+ writer.uint32(24).uint64(message.maxAttempts);
912
+ }
913
+ return writer;
914
+ },
915
+ decode(input, length) {
916
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
917
+ const end = length === undefined ? reader.len : reader.pos + length;
918
+ const message = createBaseProvisionedMcpReconnect();
919
+ while (reader.pos < end) {
920
+ const tag = reader.uint32();
921
+ switch (tag >>> 3) {
922
+ case 1: {
923
+ if (tag !== 8) {
924
+ break;
925
+ }
926
+ message.initialMs = reader.uint64().toString();
927
+ continue;
928
+ }
929
+ case 2: {
930
+ if (tag !== 16) {
931
+ break;
932
+ }
933
+ message.maxMs = reader.uint64().toString();
934
+ continue;
935
+ }
936
+ case 3: {
937
+ if (tag !== 24) {
938
+ break;
939
+ }
940
+ message.maxAttempts = reader.uint64().toString();
941
+ continue;
942
+ }
943
+ }
944
+ if ((tag & 7) === 4 || tag === 0) {
945
+ break;
946
+ }
947
+ reader.skip(tag & 7);
948
+ }
949
+ return message;
950
+ },
951
+ fromJSON(object) {
952
+ return {
953
+ initialMs: isSet(object.initialMs)
954
+ ? globalThis.String(object.initialMs)
955
+ : isSet(object.initial_ms)
956
+ ? globalThis.String(object.initial_ms)
957
+ : undefined,
958
+ maxMs: isSet(object.maxMs)
959
+ ? globalThis.String(object.maxMs)
960
+ : isSet(object.max_ms)
961
+ ? globalThis.String(object.max_ms)
962
+ : undefined,
963
+ maxAttempts: isSet(object.maxAttempts)
964
+ ? globalThis.String(object.maxAttempts)
965
+ : isSet(object.max_attempts)
966
+ ? globalThis.String(object.max_attempts)
967
+ : undefined,
968
+ };
969
+ },
970
+ toJSON(message) {
971
+ const obj = {};
972
+ if (message.initialMs !== undefined) {
973
+ obj.initialMs = message.initialMs;
974
+ }
975
+ if (message.maxMs !== undefined) {
976
+ obj.maxMs = message.maxMs;
977
+ }
978
+ if (message.maxAttempts !== undefined) {
979
+ obj.maxAttempts = message.maxAttempts;
980
+ }
981
+ return obj;
982
+ },
983
+ create(base) {
984
+ return ProvisionedMcpReconnect.fromPartial(base ?? {});
985
+ },
986
+ fromPartial(object) {
987
+ const message = createBaseProvisionedMcpReconnect();
988
+ message.initialMs = object.initialMs ?? undefined;
989
+ message.maxMs = object.maxMs ?? undefined;
990
+ message.maxAttempts = object.maxAttempts ?? undefined;
991
+ return message;
992
+ },
993
+ };
278
994
  export const SettingsServiceService = {
279
995
  /**
280
996
  * Current daemon configuration view: only values successfully applied by