@qvac/core 0.1.6 → 0.1.8

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.
Files changed (34) hide show
  1. package/README.md +10 -5
  2. package/dist-lib/lib/api/chat-groups.d.ts +1 -1
  3. package/dist-lib/lib/api/chat-groups.js +6 -3
  4. package/dist-lib/lib/core/chat-group.d.ts +5 -0
  5. package/dist-lib/lib/core/chat-group.js +63 -1
  6. package/dist-lib/lib/core/chat.d.ts +10 -0
  7. package/dist-lib/lib/core/chat.js +75 -9
  8. package/dist-lib/lib/core/mesh.js +2 -1
  9. package/dist-lib/lib/core/rank.d.ts +14 -0
  10. package/dist-lib/lib/core/rank.js +23 -0
  11. package/dist-lib/schema/content.js +5 -1
  12. package/dist-lib/schema/engine.js +30 -0
  13. package/dist-lib/schema/field-order.js +3 -1
  14. package/dist-lib/schema/qvac.js +5 -2
  15. package/dist-lib/spec/bind.js +9 -0
  16. package/dist-lib/spec/calls.js +31 -28
  17. package/dist-lib/spec/capabilities.d.ts +6 -0
  18. package/dist-lib/spec/hrpc/hrpc.json +39 -0
  19. package/dist-lib/spec/hrpc/index.js +39 -3
  20. package/dist-lib/spec/hrpc/messages.js +85 -46
  21. package/dist-lib/spec/hyperschema/index.js +85 -46
  22. package/dist-lib/spec/hyperschema/schema.json +56 -1
  23. package/dist-lib/spec/hyperschema/types.d.ts +14 -1
  24. package/dist-lib/spec/local/hyperdb/messages.js +48 -96
  25. package/dist-lib/spec/local/hyperschema/index.js +24 -48
  26. package/dist-lib/spec/local/hyperschema/schema.json +12 -0
  27. package/dist-lib/spec/mesh/hyperdb/messages.js +177 -296
  28. package/dist-lib/spec/mesh/hyperdispatch/messages.js +126 -222
  29. package/dist-lib/spec/mesh/hyperschema/index.js +126 -222
  30. package/dist-lib/spec/mesh/hyperschema/schema.json +71 -1
  31. package/dist-lib/spec/mesh/hyperschema/types.d.ts +4 -1
  32. package/package.json +12 -11
  33. package/tui/app.mjs +95 -23
  34. package/tui/lib/sidebar.mjs +3 -2
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 5
2
+ // Schema Version: 6
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 5
9
+ const VERSION = 6
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -326,12 +326,11 @@ const encoding6 = {
326
326
  if (m.progress) encoding6_5.encode(state, m.progress)
327
327
  },
328
328
  decode(state) {
329
- const v = c.uint.decode(state)
330
329
  const r0 = encoding1.decode(state)
331
330
  const flags = c.uint.decode(state)
332
331
 
333
332
  return {
334
- version: v,
333
+ version: 0,
335
334
  state: r0,
336
335
  model: (flags & 1) !== 0 ? c.string.decode(state) : null,
337
336
  percentage: (flags & 2) !== 0 ? c.uint.decode(state) : 0,
@@ -369,13 +368,12 @@ const encoding7 = {
369
368
  }
370
369
  },
371
370
  decode(state) {
372
- const start = state.start
373
371
  const v = c.uint.decode(state)
374
- state.start = start
375
372
  switch (v) {
376
373
  case 0:
377
374
  case 1: {
378
375
  const decoded = encoding6.decode(state)
376
+ decoded.version = v
379
377
  return decoded
380
378
  }
381
379
  default:
@@ -410,14 +408,13 @@ const encoding8 = {
410
408
  if (m.agentId) c.string.encode(state, m.agentId)
411
409
  },
412
410
  decode(state) {
413
- const v = c.uint.decode(state)
414
411
  const r0 = encoding2.decode(state)
415
412
  const r1 = c.string.decode(state)
416
413
  const r2 = c.json.decode(state)
417
414
  const flags = c.uint.decode(state)
418
415
 
419
416
  return {
420
- version: v,
417
+ version: 0,
421
418
  status: r0,
422
419
  name: r1,
423
420
  arguments: r2,
@@ -454,13 +451,12 @@ const encoding9 = {
454
451
  }
455
452
  },
456
453
  decode(state) {
457
- const start = state.start
458
454
  const v = c.uint.decode(state)
459
- state.start = start
460
455
  switch (v) {
461
456
  case 0:
462
457
  case 1: {
463
458
  const decoded = encoding8.decode(state)
459
+ decoded.version = v
464
460
  return decoded
465
461
  }
466
462
  default:
@@ -478,11 +474,10 @@ const encoding10 = {
478
474
  c.string.encode(state, m.text)
479
475
  },
480
476
  decode(state) {
481
- const v = c.uint.decode(state)
482
477
  const r0 = c.string.decode(state)
483
478
 
484
479
  return {
485
- version: v,
480
+ version: 0,
486
481
  text: r0
487
482
  }
488
483
  }
@@ -515,13 +510,12 @@ const encoding11 = {
515
510
  }
516
511
  },
517
512
  decode(state) {
518
- const start = state.start
519
513
  const v = c.uint.decode(state)
520
- state.start = start
521
514
  switch (v) {
522
515
  case 0:
523
516
  case 1: {
524
517
  const decoded = encoding10.decode(state)
518
+ decoded.version = v
525
519
  return decoded
526
520
  }
527
521
  default:
@@ -560,13 +554,12 @@ const encoding13 = {
560
554
  }
561
555
  },
562
556
  decode(state) {
563
- const start = state.start
564
557
  const v = c.uint.decode(state)
565
- state.start = start
566
558
  switch (v) {
567
559
  case 0:
568
560
  case 1: {
569
561
  const decoded = encoding12.decode(state)
562
+ decoded.version = v
570
563
  return decoded
571
564
  }
572
565
  default:
@@ -605,13 +598,12 @@ const encoding15 = {
605
598
  }
606
599
  },
607
600
  decode(state) {
608
- const start = state.start
609
601
  const v = c.uint.decode(state)
610
- state.start = start
611
602
  switch (v) {
612
603
  case 0:
613
604
  case 1: {
614
605
  const decoded = encoding14.decode(state)
606
+ decoded.version = v
615
607
  return decoded
616
608
  }
617
609
  default:
@@ -637,12 +629,11 @@ const encoding16 = {
637
629
  if (m.arguments) c.json.encode(state, m.arguments)
638
630
  },
639
631
  decode(state) {
640
- const v = c.uint.decode(state)
641
632
  const r0 = c.string.decode(state)
642
633
  const flags = c.uint.decode(state)
643
634
 
644
635
  return {
645
- version: v,
636
+ version: 0,
646
637
  name: r0,
647
638
  arguments: (flags & 1) !== 0 ? c.json.decode(state) : null
648
639
  }
@@ -676,13 +667,12 @@ const encoding17 = {
676
667
  }
677
668
  },
678
669
  decode(state) {
679
- const start = state.start
680
670
  const v = c.uint.decode(state)
681
- state.start = start
682
671
  switch (v) {
683
672
  case 0:
684
673
  case 1: {
685
674
  const decoded = encoding16.decode(state)
675
+ decoded.version = v
686
676
  return decoded
687
677
  }
688
678
  default:
@@ -708,12 +698,11 @@ const encoding18 = {
708
698
  if (m.result) c.json.encode(state, m.result)
709
699
  },
710
700
  decode(state) {
711
- const v = c.uint.decode(state)
712
701
  const r0 = c.string.decode(state)
713
702
  const flags = c.uint.decode(state)
714
703
 
715
704
  return {
716
- version: v,
705
+ version: 0,
717
706
  name: r0,
718
707
  result: (flags & 1) !== 0 ? c.json.decode(state) : null
719
708
  }
@@ -747,13 +736,12 @@ const encoding19 = {
747
736
  }
748
737
  },
749
738
  decode(state) {
750
- const start = state.start
751
739
  const v = c.uint.decode(state)
752
- state.start = start
753
740
  switch (v) {
754
741
  case 0:
755
742
  case 1: {
756
743
  const decoded = encoding18.decode(state)
744
+ decoded.version = v
757
745
  return decoded
758
746
  }
759
747
  default:
@@ -789,7 +777,6 @@ const encoding20 = {
789
777
  if (m.deletedAt) c.uint.encode(state, m.deletedAt)
790
778
  },
791
779
  decode(state) {
792
- const v = c.uint.decode(state)
793
780
  const r0 = c.string.decode(state)
794
781
  const r1 = c.string.decode(state)
795
782
  const r2 = c.string.decode(state)
@@ -799,7 +786,7 @@ const encoding20 = {
799
786
  const flags = c.uint.decode(state)
800
787
 
801
788
  return {
802
- version: v,
789
+ version: 0,
803
790
  id: r0,
804
791
  fileName: r1,
805
792
  mimeType: r2,
@@ -838,13 +825,12 @@ const encoding21 = {
838
825
  }
839
826
  },
840
827
  decode(state) {
841
- const start = state.start
842
828
  const v = c.uint.decode(state)
843
- state.start = start
844
829
  switch (v) {
845
830
  case 0:
846
831
  case 1: {
847
832
  const decoded = encoding20.decode(state)
833
+ decoded.version = v
848
834
  return decoded
849
835
  }
850
836
  default:
@@ -862,11 +848,10 @@ const encoding22 = {
862
848
  c.string.encode(state, m.agentId)
863
849
  },
864
850
  decode(state) {
865
- const v = c.uint.decode(state)
866
851
  const r0 = c.string.decode(state)
867
852
 
868
853
  return {
869
- version: v,
854
+ version: 0,
870
855
  agentId: r0
871
856
  }
872
857
  }
@@ -899,13 +884,12 @@ const encoding23 = {
899
884
  }
900
885
  },
901
886
  decode(state) {
902
- const start = state.start
903
887
  const v = c.uint.decode(state)
904
- state.start = start
905
888
  switch (v) {
906
889
  case 0:
907
890
  case 1: {
908
891
  const decoded = encoding22.decode(state)
892
+ decoded.version = v
909
893
  return decoded
910
894
  }
911
895
  default:
@@ -979,12 +963,11 @@ const encoding25 = {
979
963
  if (m.notice) c.string.encode(state, m.notice)
980
964
  },
981
965
  decode(state) {
982
- const v = c.uint.decode(state)
983
966
  const r0 = encoding25_0.decode(state)
984
967
  const flags = c.uint.decode(state)
985
968
 
986
969
  return {
987
- version: v,
970
+ version: 0,
988
971
  sources: r0,
989
972
  notice: (flags & 1) !== 0 ? c.string.decode(state) : null
990
973
  }
@@ -1018,13 +1001,12 @@ const encoding26 = {
1018
1001
  }
1019
1002
  },
1020
1003
  decode(state) {
1021
- const start = state.start
1022
1004
  const v = c.uint.decode(state)
1023
- state.start = start
1024
1005
  switch (v) {
1025
1006
  case 0:
1026
1007
  case 1: {
1027
1008
  const decoded = encoding25.decode(state)
1009
+ decoded.version = v
1028
1010
  return decoded
1029
1011
  }
1030
1012
  default:
@@ -1132,13 +1114,12 @@ const encoding27 = {
1132
1114
  if (version >= 5 && m.compaction) encoding126.encode(state, m.compaction)
1133
1115
  },
1134
1116
  decode(state) {
1135
- const v = c.uint.decode(state)
1136
1117
  const r0 = c.string.decode(state)
1137
1118
  const r1 = c.string.decode(state)
1138
1119
  const flags = c.uint.decode(state)
1139
1120
 
1140
1121
  return {
1141
- version: v,
1122
+ version: 0,
1142
1123
  id: r0,
1143
1124
  chatId: r1,
1144
1125
  runId: (flags & 1) !== 0 ? c.string.decode(state) : null,
@@ -1194,13 +1175,12 @@ const encoding28 = {
1194
1175
  }
1195
1176
  },
1196
1177
  decode(state) {
1197
- const start = state.start
1198
1178
  const v = c.uint.decode(state)
1199
- state.start = start
1200
1179
  switch (v) {
1201
1180
  case 0:
1202
1181
  case 1: {
1203
1182
  const decoded = encoding27.decode(state)
1183
+ decoded.version = v
1204
1184
  return decoded
1205
1185
  }
1206
1186
  default:
@@ -1228,13 +1208,12 @@ const encoding29 = {
1228
1208
  if (version >= 5 && m.lastActivityAt) c.uint.encode(state, m.lastActivityAt)
1229
1209
  },
1230
1210
  decode(state) {
1231
- const v = c.uint.decode(state)
1232
1211
  const r0 = c.string.decode(state)
1233
1212
  const r1 = c.uint.decode(state)
1234
1213
  const flags = state.start < state.end ? c.uint.decode(state) : 0
1235
1214
 
1236
1215
  return {
1237
- version: v,
1216
+ version: 0,
1238
1217
  chatId: r0,
1239
1218
  count: r1,
1240
1219
  lastActivityAt: (version >= 5 && (flags & 1) !== 0) ? c.uint.decode(state) : 0
@@ -1269,13 +1248,12 @@ const encoding30 = {
1269
1248
  }
1270
1249
  },
1271
1250
  decode(state) {
1272
- const start = state.start
1273
1251
  const v = c.uint.decode(state)
1274
- state.start = start
1275
1252
  switch (v) {
1276
1253
  case 0:
1277
1254
  case 1: {
1278
1255
  const decoded = encoding29.decode(state)
1256
+ decoded.version = v
1279
1257
  return decoded
1280
1258
  }
1281
1259
  default:
@@ -1377,13 +1355,12 @@ const encoding31 = {
1377
1355
  if (version >= 5 && m.compaction) encoding126.encode(state, m.compaction)
1378
1356
  },
1379
1357
  decode(state) {
1380
- const v = c.uint.decode(state)
1381
1358
  const r0 = c.string.decode(state)
1382
1359
  const r1 = c.string.decode(state)
1383
1360
  const flags = c.uint.decode(state)
1384
1361
 
1385
1362
  return {
1386
- version: v,
1363
+ version: 0,
1387
1364
  id: r0,
1388
1365
  chatId: r1,
1389
1366
  runId: (flags & 1) !== 0 ? c.string.decode(state) : null,
@@ -1437,13 +1414,12 @@ const encoding32 = {
1437
1414
  }
1438
1415
  },
1439
1416
  decode(state) {
1440
- const start = state.start
1441
1417
  const v = c.uint.decode(state)
1442
- state.start = start
1443
1418
  switch (v) {
1444
1419
  case 0:
1445
1420
  case 1: {
1446
1421
  const decoded = encoding31.decode(state)
1422
+ decoded.version = v
1447
1423
  return decoded
1448
1424
  }
1449
1425
  default:
@@ -1473,13 +1449,12 @@ const encoding33 = {
1473
1449
  if (m.attachment) encoding21.encode(state, m.attachment)
1474
1450
  },
1475
1451
  decode(state) {
1476
- const v = c.uint.decode(state)
1477
1452
  const r0 = c.string.decode(state)
1478
1453
  const r1 = c.uint.decode(state)
1479
1454
  const flags = c.uint.decode(state)
1480
1455
 
1481
1456
  return {
1482
- version: v,
1457
+ version: 0,
1483
1458
  id: r0,
1484
1459
  updatedAt: r1,
1485
1460
  runStatus: (flags & 1) !== 0 ? encoding7.decode(state) : null,
@@ -1515,13 +1490,12 @@ const encoding34 = {
1515
1490
  }
1516
1491
  },
1517
1492
  decode(state) {
1518
- const start = state.start
1519
1493
  const v = c.uint.decode(state)
1520
- state.start = start
1521
1494
  switch (v) {
1522
1495
  case 0:
1523
1496
  case 1: {
1524
1497
  const decoded = encoding33.decode(state)
1498
+ decoded.version = v
1525
1499
  return decoded
1526
1500
  }
1527
1501
  default:
@@ -1545,12 +1519,11 @@ const encoding35 = {
1545
1519
  c.uint.encode(state, m.resolvedAt)
1546
1520
  },
1547
1521
  decode(state) {
1548
- const v = c.uint.decode(state)
1549
1522
  const r0 = c.string.decode(state)
1550
1523
  const flags = c.uint.decode(state)
1551
1524
 
1552
1525
  return {
1553
- version: v,
1526
+ version: 0,
1554
1527
  id: r0,
1555
1528
  approved: (flags & 1) !== 0,
1556
1529
  resolvedAt: c.uint.decode(state)
@@ -1585,13 +1558,12 @@ const encoding36 = {
1585
1558
  }
1586
1559
  },
1587
1560
  decode(state) {
1588
- const start = state.start
1589
1561
  const v = c.uint.decode(state)
1590
- state.start = start
1591
1562
  switch (v) {
1592
1563
  case 0:
1593
1564
  case 1: {
1594
1565
  const decoded = encoding35.decode(state)
1566
+ decoded.version = v
1595
1567
  return decoded
1596
1568
  }
1597
1569
  default:
@@ -1988,7 +1960,6 @@ const encoding43 = {
1988
1960
  if (version >= 3 && m.disabledToolsets) encoding43_24.encode(state, m.disabledToolsets)
1989
1961
  },
1990
1962
  decode(state) {
1991
- const v = c.uint.decode(state)
1992
1963
  const r0 = c.string.decode(state)
1993
1964
  const r1 = c.string.decode(state)
1994
1965
  const r2 = c.string.decode(state)
@@ -1998,7 +1969,7 @@ const encoding43 = {
1998
1969
  const flags = c.uint.decode(state)
1999
1970
 
2000
1971
  return {
2001
- version: v,
1972
+ version: 0,
2002
1973
  id: r0,
2003
1974
  name: r1,
2004
1975
  bio: r2,
@@ -2055,13 +2026,12 @@ const encoding44 = {
2055
2026
  }
2056
2027
  },
2057
2028
  decode(state) {
2058
- const start = state.start
2059
2029
  const v = c.uint.decode(state)
2060
- state.start = start
2061
2030
  switch (v) {
2062
2031
  case 0:
2063
2032
  case 1: {
2064
2033
  const decoded = encoding43.decode(state)
2034
+ decoded.version = v
2065
2035
  return decoded
2066
2036
  }
2067
2037
  default:
@@ -2077,11 +2047,13 @@ const encoding45 = {
2077
2047
  c.string.preencode(state, m.agentId)
2078
2048
  c.string.preencode(state, m.title)
2079
2049
  c.uint.preencode(state, m.createdAt)
2080
- state.end++ // max flag is 16 so always one byte
2050
+ state.end++ // max flag is 64 so always one byte
2081
2051
 
2082
2052
  if (m.deletedAt) c.uint.preencode(state, m.deletedAt)
2083
2053
  if (m.updatedAt) c.uint.preencode(state, m.updatedAt)
2084
2054
  if (version >= 5 && m.groupId) c.string.preencode(state, m.groupId)
2055
+ if (version >= 6 && m.rank) c.float64.preencode(state, m.rank)
2056
+ if (version >= 6 && m.rankedAt) c.uint.preencode(state, m.rankedAt)
2085
2057
  },
2086
2058
  encode(state, m) {
2087
2059
  const flags =
@@ -2089,7 +2061,9 @@ const encoding45 = {
2089
2061
  (m.ragEnabled ? 2 : 0) |
2090
2062
  (m.webSearchEnabled ? 4 : 0) |
2091
2063
  (m.updatedAt ? 8 : 0) |
2092
- ((version >= 5 && m.groupId) ? 16 : 0)
2064
+ ((version >= 5 && m.groupId) ? 16 : 0) |
2065
+ ((version >= 6 && m.rank) ? 32 : 0) |
2066
+ ((version >= 6 && m.rankedAt) ? 64 : 0)
2093
2067
 
2094
2068
  c.string.encode(state, m.id)
2095
2069
  c.string.encode(state, m.agentId)
@@ -2100,9 +2074,10 @@ const encoding45 = {
2100
2074
  if (m.deletedAt) c.uint.encode(state, m.deletedAt)
2101
2075
  if (m.updatedAt) c.uint.encode(state, m.updatedAt)
2102
2076
  if (version >= 5 && m.groupId) c.string.encode(state, m.groupId)
2077
+ if (version >= 6 && m.rank) c.float64.encode(state, m.rank)
2078
+ if (version >= 6 && m.rankedAt) c.uint.encode(state, m.rankedAt)
2103
2079
  },
2104
2080
  decode(state) {
2105
- const v = c.uint.decode(state)
2106
2081
  const r0 = c.string.decode(state)
2107
2082
  const r1 = c.string.decode(state)
2108
2083
  const r2 = c.string.decode(state)
@@ -2110,7 +2085,7 @@ const encoding45 = {
2110
2085
  const flags = c.uint.decode(state)
2111
2086
 
2112
2087
  return {
2113
- version: v,
2088
+ version: 0,
2114
2089
  id: r0,
2115
2090
  agentId: r1,
2116
2091
  title: r2,
@@ -2119,7 +2094,9 @@ const encoding45 = {
2119
2094
  ragEnabled: (flags & 2) !== 0,
2120
2095
  webSearchEnabled: (flags & 4) !== 0,
2121
2096
  updatedAt: (flags & 8) !== 0 ? c.uint.decode(state) : 0,
2122
- groupId: (version >= 5 && (flags & 16) !== 0) ? c.string.decode(state) : null
2097
+ groupId: (version >= 5 && (flags & 16) !== 0) ? c.string.decode(state) : null,
2098
+ rank: (version >= 6 && (flags & 32) !== 0) ? c.float64.decode(state) : 0,
2099
+ rankedAt: (version >= 6 && (flags & 64) !== 0) ? c.uint.decode(state) : 0
2123
2100
  }
2124
2101
  }
2125
2102
  }
@@ -2151,13 +2128,12 @@ const encoding46 = {
2151
2128
  }
2152
2129
  },
2153
2130
  decode(state) {
2154
- const start = state.start
2155
2131
  const v = c.uint.decode(state)
2156
- state.start = start
2157
2132
  switch (v) {
2158
2133
  case 0:
2159
2134
  case 1: {
2160
2135
  const decoded = encoding45.decode(state)
2136
+ decoded.version = v
2161
2137
  return decoded
2162
2138
  }
2163
2139
  default:
@@ -2268,7 +2244,6 @@ const encoding47 = {
2268
2244
  if (version >= 4 && m.attestedAt) c.uint.encode(state, m.attestedAt)
2269
2245
  },
2270
2246
  decode(state) {
2271
- const v = c.uint.decode(state)
2272
2247
  const r0 = c.fixed32.decode(state)
2273
2248
  const r1 = c.string.decode(state)
2274
2249
  const r2 = c.uint.decode(state)
@@ -2277,7 +2252,7 @@ const encoding47 = {
2277
2252
  const flags = c.uint.decode(state)
2278
2253
 
2279
2254
  return {
2280
- version: v,
2255
+ version: 0,
2281
2256
  id: r0,
2282
2257
  name: r1,
2283
2258
  joinedAt: r2,
@@ -2331,13 +2306,12 @@ const encoding48 = {
2331
2306
  }
2332
2307
  },
2333
2308
  decode(state) {
2334
- const start = state.start
2335
2309
  const v = c.uint.decode(state)
2336
- state.start = start
2337
2310
  switch (v) {
2338
2311
  case 0:
2339
2312
  case 1: {
2340
2313
  const decoded = encoding47.decode(state)
2314
+ decoded.version = v
2341
2315
  return decoded
2342
2316
  }
2343
2317
  default:
@@ -2363,12 +2337,11 @@ const encoding49 = {
2363
2337
  if (m.device) encoding48.encode(state, m.device)
2364
2338
  },
2365
2339
  decode(state) {
2366
- const v = c.uint.decode(state)
2367
2340
  const r0 = c.buffer.decode(state)
2368
2341
  const flags = c.uint.decode(state)
2369
2342
 
2370
2343
  return {
2371
- version: v,
2344
+ version: 0,
2372
2345
  writerKey: r0,
2373
2346
  device: (flags & 1) !== 0 ? encoding48.decode(state) : null
2374
2347
  }
@@ -2402,13 +2375,12 @@ const encoding50 = {
2402
2375
  }
2403
2376
  },
2404
2377
  decode(state) {
2405
- const start = state.start
2406
2378
  const v = c.uint.decode(state)
2407
- state.start = start
2408
2379
  switch (v) {
2409
2380
  case 0:
2410
2381
  case 1: {
2411
2382
  const decoded = encoding49.decode(state)
2383
+ decoded.version = v
2412
2384
  return decoded
2413
2385
  }
2414
2386
  default:
@@ -2436,12 +2408,11 @@ const encoding51 = {
2436
2408
  if (m.revokedAt) c.uint.encode(state, m.revokedAt)
2437
2409
  },
2438
2410
  decode(state) {
2439
- const v = c.uint.decode(state)
2440
2411
  const r0 = c.buffer.decode(state)
2441
2412
  const flags = c.uint.decode(state)
2442
2413
 
2443
2414
  return {
2444
- version: v,
2415
+ version: 0,
2445
2416
  writerKey: r0,
2446
2417
  deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null,
2447
2418
  revokedAt: (flags & 2) !== 0 ? c.uint.decode(state) : 0
@@ -2476,13 +2447,12 @@ const encoding52 = {
2476
2447
  }
2477
2448
  },
2478
2449
  decode(state) {
2479
- const start = state.start
2480
2450
  const v = c.uint.decode(state)
2481
- state.start = start
2482
2451
  switch (v) {
2483
2452
  case 0:
2484
2453
  case 1: {
2485
2454
  const decoded = encoding51.decode(state)
2455
+ decoded.version = v
2486
2456
  return decoded
2487
2457
  }
2488
2458
  default:
@@ -2510,12 +2480,11 @@ const encoding53 = {
2510
2480
  if (m.deviceId) c.fixed32.encode(state, m.deviceId)
2511
2481
  },
2512
2482
  decode(state) {
2513
- const v = c.uint.decode(state)
2514
2483
  const r0 = c.buffer.decode(state)
2515
2484
  const flags = c.uint.decode(state)
2516
2485
 
2517
2486
  return {
2518
- version: v,
2487
+ version: 0,
2519
2488
  signature: r0,
2520
2489
  device: (flags & 1) !== 0 ? encoding48.decode(state) : null,
2521
2490
  deviceId: (flags & 2) !== 0 ? c.fixed32.decode(state) : null
@@ -2550,13 +2519,12 @@ const encoding54 = {
2550
2519
  }
2551
2520
  },
2552
2521
  decode(state) {
2553
- const start = state.start
2554
2522
  const v = c.uint.decode(state)
2555
- state.start = start
2556
2523
  switch (v) {
2557
2524
  case 0:
2558
2525
  case 1: {
2559
2526
  const decoded = encoding53.decode(state)
2527
+ decoded.version = v
2560
2528
  return decoded
2561
2529
  }
2562
2530
  default:
@@ -2574,11 +2542,10 @@ const encoding55 = {
2574
2542
  encoding48.encode(state, m.device)
2575
2543
  },
2576
2544
  decode(state) {
2577
- const v = c.uint.decode(state)
2578
2545
  const r0 = encoding48.decode(state)
2579
2546
 
2580
2547
  return {
2581
- version: v,
2548
+ version: 0,
2582
2549
  device: r0
2583
2550
  }
2584
2551
  }
@@ -2611,13 +2578,12 @@ const encoding56 = {
2611
2578
  }
2612
2579
  },
2613
2580
  decode(state) {
2614
- const start = state.start
2615
2581
  const v = c.uint.decode(state)
2616
- state.start = start
2617
2582
  switch (v) {
2618
2583
  case 0:
2619
2584
  case 1: {
2620
2585
  const decoded = encoding55.decode(state)
2586
+ decoded.version = v
2621
2587
  return decoded
2622
2588
  }
2623
2589
  default:
@@ -2656,13 +2622,12 @@ const encoding58 = {
2656
2622
  }
2657
2623
  },
2658
2624
  decode(state) {
2659
- const start = state.start
2660
2625
  const v = c.uint.decode(state)
2661
- state.start = start
2662
2626
  switch (v) {
2663
2627
  case 0:
2664
2628
  case 1: {
2665
2629
  const decoded = encoding57.decode(state)
2630
+ decoded.version = v
2666
2631
  return decoded
2667
2632
  }
2668
2633
  default:
@@ -2715,12 +2680,11 @@ const encoding59 = {
2715
2680
  if (version >= 4 && m.toolCatalog) encoding59_6.encode(state, m.toolCatalog)
2716
2681
  },
2717
2682
  decode(state) {
2718
- const v = c.uint.decode(state)
2719
2683
  const r0 = c.fixed32.decode(state)
2720
2684
  const flags = c.uint.decode(state)
2721
2685
 
2722
2686
  return {
2723
- version: v,
2687
+ version: 0,
2724
2688
  deviceId: r0,
2725
2689
  installedToolNames: (flags & 1) !== 0 ? encoding59_1.decode(state) : null,
2726
2690
  installedSkillNames: (flags & 2) !== 0 ? encoding59_2.decode(state) : null,
@@ -2759,13 +2723,12 @@ const encoding60 = {
2759
2723
  }
2760
2724
  },
2761
2725
  decode(state) {
2762
- const start = state.start
2763
2726
  const v = c.uint.decode(state)
2764
- state.start = start
2765
2727
  switch (v) {
2766
2728
  case 0:
2767
2729
  case 1: {
2768
2730
  const decoded = encoding59.decode(state)
2731
+ decoded.version = v
2769
2732
  return decoded
2770
2733
  }
2771
2734
  default:
@@ -2783,11 +2746,10 @@ const encoding61 = {
2783
2746
  encoding44.encode(state, m.agent)
2784
2747
  },
2785
2748
  decode(state) {
2786
- const v = c.uint.decode(state)
2787
2749
  const r0 = encoding44.decode(state)
2788
2750
 
2789
2751
  return {
2790
- version: v,
2752
+ version: 0,
2791
2753
  agent: r0
2792
2754
  }
2793
2755
  }
@@ -2820,13 +2782,12 @@ const encoding62 = {
2820
2782
  }
2821
2783
  },
2822
2784
  decode(state) {
2823
- const start = state.start
2824
2785
  const v = c.uint.decode(state)
2825
- state.start = start
2826
2786
  switch (v) {
2827
2787
  case 0:
2828
2788
  case 1: {
2829
2789
  const decoded = encoding61.decode(state)
2790
+ decoded.version = v
2830
2791
  return decoded
2831
2792
  }
2832
2793
  default:
@@ -2844,11 +2805,10 @@ const encoding63 = {
2844
2805
  encoding46.encode(state, m.chat)
2845
2806
  },
2846
2807
  decode(state) {
2847
- const v = c.uint.decode(state)
2848
2808
  const r0 = encoding46.decode(state)
2849
2809
 
2850
2810
  return {
2851
- version: v,
2811
+ version: 0,
2852
2812
  chat: r0
2853
2813
  }
2854
2814
  }
@@ -2881,13 +2841,12 @@ const encoding64 = {
2881
2841
  }
2882
2842
  },
2883
2843
  decode(state) {
2884
- const start = state.start
2885
2844
  const v = c.uint.decode(state)
2886
- state.start = start
2887
2845
  switch (v) {
2888
2846
  case 0:
2889
2847
  case 1: {
2890
2848
  const decoded = encoding63.decode(state)
2849
+ decoded.version = v
2891
2850
  return decoded
2892
2851
  }
2893
2852
  default:
@@ -2968,12 +2927,11 @@ const encoding66 = {
2968
2927
  if (version >= 3 && m.effect) c.string.encode(state, m.effect)
2969
2928
  },
2970
2929
  decode(state) {
2971
- const v = c.uint.decode(state)
2972
2930
  const r0 = c.string.decode(state)
2973
2931
  const flags = c.uint.decode(state)
2974
2932
 
2975
2933
  return {
2976
- version: v,
2934
+ version: 0,
2977
2935
  id: r0,
2978
2936
  toolName: (flags & 1) !== 0 ? c.string.decode(state) : null,
2979
2937
  resourceKind: (flags & 2) !== 0 ? c.string.decode(state) : null,
@@ -3015,13 +2973,12 @@ const encoding67 = {
3015
2973
  }
3016
2974
  },
3017
2975
  decode(state) {
3018
- const start = state.start
3019
2976
  const v = c.uint.decode(state)
3020
- state.start = start
3021
2977
  switch (v) {
3022
2978
  case 0:
3023
2979
  case 1: {
3024
2980
  const decoded = encoding66.decode(state)
2981
+ decoded.version = v
3025
2982
  return decoded
3026
2983
  }
3027
2984
  default:
@@ -3039,11 +2996,10 @@ const encoding68 = {
3039
2996
  encoding67.encode(state, m.rule)
3040
2997
  },
3041
2998
  decode(state) {
3042
- const v = c.uint.decode(state)
3043
2999
  const r0 = encoding67.decode(state)
3044
3000
 
3045
3001
  return {
3046
- version: v,
3002
+ version: 0,
3047
3003
  rule: r0
3048
3004
  }
3049
3005
  }
@@ -3076,13 +3032,12 @@ const encoding69 = {
3076
3032
  }
3077
3033
  },
3078
3034
  decode(state) {
3079
- const start = state.start
3080
3035
  const v = c.uint.decode(state)
3081
- state.start = start
3082
3036
  switch (v) {
3083
3037
  case 0:
3084
3038
  case 1: {
3085
3039
  const decoded = encoding68.decode(state)
3040
+ decoded.version = v
3086
3041
  return decoded
3087
3042
  }
3088
3043
  default:
@@ -3100,11 +3055,10 @@ const encoding70 = {
3100
3055
  c.buffer.encode(state, m.key)
3101
3056
  },
3102
3057
  decode(state) {
3103
- const v = c.uint.decode(state)
3104
3058
  const r0 = c.buffer.decode(state)
3105
3059
 
3106
3060
  return {
3107
- version: v,
3061
+ version: 0,
3108
3062
  key: r0
3109
3063
  }
3110
3064
  }
@@ -3137,13 +3091,12 @@ const encoding71 = {
3137
3091
  }
3138
3092
  },
3139
3093
  decode(state) {
3140
- const start = state.start
3141
3094
  const v = c.uint.decode(state)
3142
- state.start = start
3143
3095
  switch (v) {
3144
3096
  case 0:
3145
3097
  case 1: {
3146
3098
  const decoded = encoding70.decode(state)
3099
+ decoded.version = v
3147
3100
  return decoded
3148
3101
  }
3149
3102
  default:
@@ -3203,13 +3156,12 @@ const encoding73 = {
3203
3156
  if (m.blindPeers) encoding73_4.encode(state, m.blindPeers)
3204
3157
  },
3205
3158
  decode(state) {
3206
- const v = c.uint.decode(state)
3207
3159
  const r0 = c.fixed32.decode(state)
3208
3160
  const r1 = c.fixed32.decode(state)
3209
3161
  const flags = c.uint.decode(state)
3210
3162
 
3211
3163
  return {
3212
- version: v,
3164
+ version: 0,
3213
3165
  meshKey: r0,
3214
3166
  seed: r1,
3215
3167
  fastForward: (flags & 1) !== 0 ? encoding73_2.decode(state) : null,
@@ -3246,13 +3198,12 @@ const encoding74 = {
3246
3198
  }
3247
3199
  },
3248
3200
  decode(state) {
3249
- const start = state.start
3250
3201
  const v = c.uint.decode(state)
3251
- state.start = start
3252
3202
  switch (v) {
3253
3203
  case 0:
3254
3204
  case 1: {
3255
3205
  const decoded = encoding73.decode(state)
3206
+ decoded.version = v
3256
3207
  return decoded
3257
3208
  }
3258
3209
  default:
@@ -3283,13 +3234,12 @@ const encoding75 = {
3283
3234
  if (m.blindPeers) encoding75_2.encode(state, m.blindPeers)
3284
3235
  },
3285
3236
  decode(state) {
3286
- const v = c.uint.decode(state)
3287
3237
  const r0 = encoding44.decode(state)
3288
3238
  const r1 = encoding46.decode(state)
3289
3239
  const flags = c.uint.decode(state)
3290
3240
 
3291
3241
  return {
3292
- version: v,
3242
+ version: 0,
3293
3243
  agent: r0,
3294
3244
  chat: r1,
3295
3245
  blindPeers: (flags & 1) !== 0 ? encoding75_2.decode(state) : null
@@ -3324,13 +3274,12 @@ const encoding76 = {
3324
3274
  }
3325
3275
  },
3326
3276
  decode(state) {
3327
- const start = state.start
3328
3277
  const v = c.uint.decode(state)
3329
- state.start = start
3330
3278
  switch (v) {
3331
3279
  case 0:
3332
3280
  case 1: {
3333
3281
  const decoded = encoding75.decode(state)
3282
+ decoded.version = v
3334
3283
  return decoded
3335
3284
  }
3336
3285
  default:
@@ -3370,7 +3319,6 @@ const encoding77 = {
3370
3319
  if (m.deletedAt) c.uint.encode(state, m.deletedAt)
3371
3320
  },
3372
3321
  decode(state) {
3373
- const v = c.uint.decode(state)
3374
3322
  const r0 = c.string.decode(state)
3375
3323
  const r1 = c.string.decode(state)
3376
3324
  const r2 = c.string.decode(state)
@@ -3382,7 +3330,7 @@ const encoding77 = {
3382
3330
  const flags = c.uint.decode(state)
3383
3331
 
3384
3332
  return {
3385
- version: v,
3333
+ version: 0,
3386
3334
  id: r0,
3387
3335
  chatId: r1,
3388
3336
  fileName: r2,
@@ -3423,13 +3371,12 @@ const encoding78 = {
3423
3371
  }
3424
3372
  },
3425
3373
  decode(state) {
3426
- const start = state.start
3427
3374
  const v = c.uint.decode(state)
3428
- state.start = start
3429
3375
  switch (v) {
3430
3376
  case 0:
3431
3377
  case 1: {
3432
3378
  const decoded = encoding77.decode(state)
3379
+ decoded.version = v
3433
3380
  return decoded
3434
3381
  }
3435
3382
  default:
@@ -3447,11 +3394,10 @@ const encoding79 = {
3447
3394
  encoding78.encode(state, m.knowledge)
3448
3395
  },
3449
3396
  decode(state) {
3450
- const v = c.uint.decode(state)
3451
3397
  const r0 = encoding78.decode(state)
3452
3398
 
3453
3399
  return {
3454
- version: v,
3400
+ version: 0,
3455
3401
  knowledge: r0
3456
3402
  }
3457
3403
  }
@@ -3484,13 +3430,12 @@ const encoding80 = {
3484
3430
  }
3485
3431
  },
3486
3432
  decode(state) {
3487
- const start = state.start
3488
3433
  const v = c.uint.decode(state)
3489
- state.start = start
3490
3434
  switch (v) {
3491
3435
  case 0:
3492
3436
  case 1: {
3493
3437
  const decoded = encoding79.decode(state)
3438
+ decoded.version = v
3494
3439
  return decoded
3495
3440
  }
3496
3441
  default:
@@ -3510,12 +3455,11 @@ const encoding81 = {
3510
3455
  c.uint.encode(state, m.at)
3511
3456
  },
3512
3457
  decode(state) {
3513
- const v = c.uint.decode(state)
3514
3458
  const r0 = c.string.decode(state)
3515
3459
  const r1 = c.uint.decode(state)
3516
3460
 
3517
3461
  return {
3518
- version: v,
3462
+ version: 0,
3519
3463
  knowledgeId: r0,
3520
3464
  at: r1
3521
3465
  }
@@ -3549,13 +3493,12 @@ const encoding82 = {
3549
3493
  }
3550
3494
  },
3551
3495
  decode(state) {
3552
- const start = state.start
3553
3496
  const v = c.uint.decode(state)
3554
- state.start = start
3555
3497
  switch (v) {
3556
3498
  case 0:
3557
3499
  case 1: {
3558
3500
  const decoded = encoding81.decode(state)
3501
+ decoded.version = v
3559
3502
  return decoded
3560
3503
  }
3561
3504
  default:
@@ -3585,7 +3528,6 @@ const encoding83 = {
3585
3528
  c.uint.encode(state, m.createdAt)
3586
3529
  },
3587
3530
  decode(state) {
3588
- const v = c.uint.decode(state)
3589
3531
  const r0 = c.string.decode(state)
3590
3532
  const r1 = c.string.decode(state)
3591
3533
  const r2 = c.string.decode(state)
@@ -3595,7 +3537,7 @@ const encoding83 = {
3595
3537
  const r6 = c.uint.decode(state)
3596
3538
 
3597
3539
  return {
3598
- version: v,
3540
+ version: 0,
3599
3541
  id: r0,
3600
3542
  knowledgeId: r1,
3601
3543
  sourceHash: r2,
@@ -3634,13 +3576,12 @@ const encoding84 = {
3634
3576
  }
3635
3577
  },
3636
3578
  decode(state) {
3637
- const start = state.start
3638
3579
  const v = c.uint.decode(state)
3639
- state.start = start
3640
3580
  switch (v) {
3641
3581
  case 0:
3642
3582
  case 1: {
3643
3583
  const decoded = encoding83.decode(state)
3584
+ decoded.version = v
3644
3585
  return decoded
3645
3586
  }
3646
3587
  default:
@@ -3658,11 +3599,10 @@ const encoding85 = {
3658
3599
  encoding84.encode(state, m.artifact)
3659
3600
  },
3660
3601
  decode(state) {
3661
- const v = c.uint.decode(state)
3662
3602
  const r0 = encoding84.decode(state)
3663
3603
 
3664
3604
  return {
3665
- version: v,
3605
+ version: 0,
3666
3606
  artifact: r0
3667
3607
  }
3668
3608
  }
@@ -3695,13 +3635,12 @@ const encoding86 = {
3695
3635
  }
3696
3636
  },
3697
3637
  decode(state) {
3698
- const start = state.start
3699
3638
  const v = c.uint.decode(state)
3700
- state.start = start
3701
3639
  switch (v) {
3702
3640
  case 0:
3703
3641
  case 1: {
3704
3642
  const decoded = encoding85.decode(state)
3643
+ decoded.version = v
3705
3644
  return decoded
3706
3645
  }
3707
3646
  default:
@@ -3813,7 +3752,6 @@ const encoding89 = {
3813
3752
  if (m.error) c.string.encode(state, m.error)
3814
3753
  },
3815
3754
  decode(state) {
3816
- const v = c.uint.decode(state)
3817
3755
  const r0 = c.string.decode(state)
3818
3756
  const r1 = c.string.decode(state)
3819
3757
  const r2 = c.string.decode(state)
@@ -3825,7 +3763,7 @@ const encoding89 = {
3825
3763
  const flags = c.uint.decode(state)
3826
3764
 
3827
3765
  return {
3828
- version: v,
3766
+ version: 0,
3829
3767
  id: r0,
3830
3768
  knowledgeId: r1,
3831
3769
  chatId: r2,
@@ -3866,13 +3804,12 @@ const encoding90 = {
3866
3804
  }
3867
3805
  },
3868
3806
  decode(state) {
3869
- const start = state.start
3870
3807
  const v = c.uint.decode(state)
3871
- state.start = start
3872
3808
  switch (v) {
3873
3809
  case 0:
3874
3810
  case 1: {
3875
3811
  const decoded = encoding89.decode(state)
3812
+ decoded.version = v
3876
3813
  return decoded
3877
3814
  }
3878
3815
  default:
@@ -3896,14 +3833,13 @@ const encoding91 = {
3896
3833
  c.uint.encode(state, m.at)
3897
3834
  },
3898
3835
  decode(state) {
3899
- const v = c.uint.decode(state)
3900
3836
  const r0 = c.string.decode(state)
3901
3837
  const r1 = c.string.decode(state)
3902
3838
  const r2 = c.string.decode(state)
3903
3839
  const r3 = c.uint.decode(state)
3904
3840
 
3905
3841
  return {
3906
- version: v,
3842
+ version: 0,
3907
3843
  id: r0,
3908
3844
  knowledgeId: r1,
3909
3845
  claimId: r2,
@@ -3939,13 +3875,12 @@ const encoding92 = {
3939
3875
  }
3940
3876
  },
3941
3877
  decode(state) {
3942
- const start = state.start
3943
3878
  const v = c.uint.decode(state)
3944
- state.start = start
3945
3879
  switch (v) {
3946
3880
  case 0:
3947
3881
  case 1: {
3948
3882
  const decoded = encoding91.decode(state)
3883
+ decoded.version = v
3949
3884
  return decoded
3950
3885
  }
3951
3886
  default:
@@ -3975,14 +3910,13 @@ const encoding93 = {
3975
3910
  if (m.error) c.string.encode(state, m.error)
3976
3911
  },
3977
3912
  decode(state) {
3978
- const v = c.uint.decode(state)
3979
3913
  const r0 = c.string.decode(state)
3980
3914
  const r1 = c.string.decode(state)
3981
3915
  const r2 = encoding88.decode(state)
3982
3916
  const flags = c.uint.decode(state)
3983
3917
 
3984
3918
  return {
3985
- version: v,
3919
+ version: 0,
3986
3920
  id: r0,
3987
3921
  claimId: r1,
3988
3922
  status: r2,
@@ -4018,13 +3952,12 @@ const encoding94 = {
4018
3952
  }
4019
3953
  },
4020
3954
  decode(state) {
4021
- const start = state.start
4022
3955
  const v = c.uint.decode(state)
4023
- state.start = start
4024
3956
  switch (v) {
4025
3957
  case 0:
4026
3958
  case 1: {
4027
3959
  const decoded = encoding93.decode(state)
3960
+ decoded.version = v
4028
3961
  return decoded
4029
3962
  }
4030
3963
  default:
@@ -4054,14 +3987,13 @@ const encoding95 = {
4054
3987
  if (version >= 3 && m.platform) c.string.encode(state, m.platform)
4055
3988
  },
4056
3989
  decode(state) {
4057
- const v = c.uint.decode(state)
4058
3990
  const r0 = c.fixed32.decode(state)
4059
3991
  const r1 = encoding38.decode(state)
4060
3992
  const r2 = c.string.decode(state)
4061
3993
  const flags = state.start < state.end ? c.uint.decode(state) : 0
4062
3994
 
4063
3995
  return {
4064
- version: v,
3996
+ version: 0,
4065
3997
  deviceId: r0,
4066
3998
  capabilityProfile: r1,
4067
3999
  recommendedModelName: r2,
@@ -4097,13 +4029,12 @@ const encoding96 = {
4097
4029
  }
4098
4030
  },
4099
4031
  decode(state) {
4100
- const start = state.start
4101
4032
  const v = c.uint.decode(state)
4102
- state.start = start
4103
4033
  switch (v) {
4104
4034
  case 0:
4105
4035
  case 1: {
4106
4036
  const decoded = encoding95.decode(state)
4037
+ decoded.version = v
4107
4038
  return decoded
4108
4039
  }
4109
4040
  default:
@@ -4205,13 +4136,12 @@ const encoding99 = {
4205
4136
  encoding97.encode(state, m.appChannel)
4206
4137
  },
4207
4138
  decode(state) {
4208
- const v = c.uint.decode(state)
4209
4139
  const r0 = c.fixed32.decode(state)
4210
4140
  const r1 = c.string.decode(state)
4211
4141
  const flags = c.uint.decode(state)
4212
4142
 
4213
4143
  return {
4214
- version: v,
4144
+ version: 0,
4215
4145
  deviceId: r0,
4216
4146
  appVersion: r1,
4217
4147
  appBuild: (version >= 3 && (flags & 1) !== 0) ? c.string.decode(state) : null,
@@ -4247,13 +4177,12 @@ const encoding100 = {
4247
4177
  }
4248
4178
  },
4249
4179
  decode(state) {
4250
- const start = state.start
4251
4180
  const v = c.uint.decode(state)
4252
- state.start = start
4253
4181
  switch (v) {
4254
4182
  case 0:
4255
4183
  case 1: {
4256
4184
  const decoded = encoding99.decode(state)
4185
+ decoded.version = v
4257
4186
  return decoded
4258
4187
  }
4259
4188
  default:
@@ -4287,7 +4216,6 @@ const encoding101 = {
4287
4216
  if (version >= 3 && m.deletedAt) c.uint.encode(state, m.deletedAt)
4288
4217
  },
4289
4218
  decode(state) {
4290
- const v = c.uint.decode(state)
4291
4219
  const r0 = c.string.decode(state)
4292
4220
  const r1 = c.string.decode(state)
4293
4221
  const r2 = c.json.decode(state)
@@ -4296,7 +4224,7 @@ const encoding101 = {
4296
4224
  const flags = c.uint.decode(state)
4297
4225
 
4298
4226
  return {
4299
- version: v,
4227
+ version: 0,
4300
4228
  agentId: r0,
4301
4229
  toolName: r1,
4302
4230
  settings: r2,
@@ -4334,13 +4262,12 @@ const encoding102 = {
4334
4262
  }
4335
4263
  },
4336
4264
  decode(state) {
4337
- const start = state.start
4338
4265
  const v = c.uint.decode(state)
4339
- state.start = start
4340
4266
  switch (v) {
4341
4267
  case 0:
4342
4268
  case 1: {
4343
4269
  const decoded = encoding101.decode(state)
4270
+ decoded.version = v
4344
4271
  return decoded
4345
4272
  }
4346
4273
  default:
@@ -4358,11 +4285,10 @@ const encoding103 = {
4358
4285
  encoding102.encode(state, m.settings)
4359
4286
  },
4360
4287
  decode(state) {
4361
- const v = c.uint.decode(state)
4362
4288
  const r0 = encoding102.decode(state)
4363
4289
 
4364
4290
  return {
4365
- version: v,
4291
+ version: 0,
4366
4292
  settings: r0
4367
4293
  }
4368
4294
  }
@@ -4395,13 +4321,12 @@ const encoding104 = {
4395
4321
  }
4396
4322
  },
4397
4323
  decode(state) {
4398
- const start = state.start
4399
4324
  const v = c.uint.decode(state)
4400
- state.start = start
4401
4325
  switch (v) {
4402
4326
  case 0:
4403
4327
  case 1: {
4404
4328
  const decoded = encoding103.decode(state)
4329
+ decoded.version = v
4405
4330
  return decoded
4406
4331
  }
4407
4332
  default:
@@ -4506,14 +4431,13 @@ const encoding106 = {
4506
4431
  c.uint.encode(state, m.seq)
4507
4432
  },
4508
4433
  decode(state) {
4509
- const v = c.uint.decode(state)
4510
4434
  const r0 = c.string.decode(state)
4511
4435
  const r1 = c.string.decode(state)
4512
4436
  const r2 = c.fixed32.decode(state)
4513
4437
  const flags = c.uint.decode(state)
4514
4438
 
4515
4439
  return {
4516
- version: v,
4440
+ version: 0,
4517
4441
  id: r0,
4518
4442
  agentId: r1,
4519
4443
  originDeviceId: r2,
@@ -4557,13 +4481,12 @@ const encoding107 = {
4557
4481
  }
4558
4482
  },
4559
4483
  decode(state) {
4560
- const start = state.start
4561
4484
  const v = c.uint.decode(state)
4562
- state.start = start
4563
4485
  switch (v) {
4564
4486
  case 0:
4565
4487
  case 1: {
4566
4488
  const decoded = encoding106.decode(state)
4489
+ decoded.version = v
4567
4490
  return decoded
4568
4491
  }
4569
4492
  default:
@@ -4581,11 +4504,10 @@ const encoding108 = {
4581
4504
  encoding107.encode(state, m.activity)
4582
4505
  },
4583
4506
  decode(state) {
4584
- const v = c.uint.decode(state)
4585
4507
  const r0 = encoding107.decode(state)
4586
4508
 
4587
4509
  return {
4588
- version: v,
4510
+ version: 0,
4589
4511
  activity: r0
4590
4512
  }
4591
4513
  }
@@ -4618,13 +4540,12 @@ const encoding109 = {
4618
4540
  }
4619
4541
  },
4620
4542
  decode(state) {
4621
- const start = state.start
4622
4543
  const v = c.uint.decode(state)
4623
- state.start = start
4624
4544
  switch (v) {
4625
4545
  case 0:
4626
4546
  case 1: {
4627
4547
  const decoded = encoding108.decode(state)
4548
+ decoded.version = v
4628
4549
  return decoded
4629
4550
  }
4630
4551
  default:
@@ -4644,12 +4565,11 @@ const encoding110 = {
4644
4565
  c.uint.encode(state, m.count)
4645
4566
  },
4646
4567
  decode(state) {
4647
- const v = c.uint.decode(state)
4648
4568
  const r0 = c.string.decode(state)
4649
4569
  const r1 = c.uint.decode(state)
4650
4570
 
4651
4571
  return {
4652
- version: v,
4572
+ version: 0,
4653
4573
  agentId: r0,
4654
4574
  count: r1
4655
4575
  }
@@ -4683,13 +4603,12 @@ const encoding111 = {
4683
4603
  }
4684
4604
  },
4685
4605
  decode(state) {
4686
- const start = state.start
4687
4606
  const v = c.uint.decode(state)
4688
- state.start = start
4689
4607
  switch (v) {
4690
4608
  case 0:
4691
4609
  case 1: {
4692
4610
  const decoded = encoding110.decode(state)
4611
+ decoded.version = v
4693
4612
  return decoded
4694
4613
  }
4695
4614
  default:
@@ -4757,7 +4676,6 @@ const encoding113 = {
4757
4676
  c.uint.encode(state, flags)
4758
4677
  },
4759
4678
  decode(state) {
4760
- const v = c.uint.decode(state)
4761
4679
  const r0 = c.fixed32.decode(state)
4762
4680
  const r1 = c.uint.decode(state)
4763
4681
  const r2 = c.uint.decode(state)
@@ -4765,7 +4683,7 @@ const encoding113 = {
4765
4683
  const flags = state.start < state.end ? c.uint.decode(state) : 0
4766
4684
 
4767
4685
  return {
4768
- version: v,
4686
+ version: 0,
4769
4687
  writerKey: r0,
4770
4688
  length: r1,
4771
4689
  clock: r2,
@@ -4802,13 +4720,12 @@ const encoding114 = {
4802
4720
  }
4803
4721
  },
4804
4722
  decode(state) {
4805
- const start = state.start
4806
4723
  const v = c.uint.decode(state)
4807
- state.start = start
4808
4724
  switch (v) {
4809
4725
  case 0:
4810
4726
  case 1: {
4811
4727
  const decoded = encoding113.decode(state)
4728
+ decoded.version = v
4812
4729
  return decoded
4813
4730
  }
4814
4731
  default:
@@ -4828,12 +4745,11 @@ const encoding115 = {
4828
4745
  c.buffer.encode(state, m.signature)
4829
4746
  },
4830
4747
  decode(state) {
4831
- const v = c.uint.decode(state)
4832
4748
  const r0 = c.fixed32.decode(state)
4833
4749
  const r1 = c.buffer.decode(state)
4834
4750
 
4835
4751
  return {
4836
- version: v,
4752
+ version: 0,
4837
4753
  deviceId: r0,
4838
4754
  signature: r1
4839
4755
  }
@@ -4867,13 +4783,12 @@ const encoding116 = {
4867
4783
  }
4868
4784
  },
4869
4785
  decode(state) {
4870
- const start = state.start
4871
4786
  const v = c.uint.decode(state)
4872
- state.start = start
4873
4787
  switch (v) {
4874
4788
  case 0:
4875
4789
  case 1: {
4876
4790
  const decoded = encoding115.decode(state)
4791
+ decoded.version = v
4877
4792
  return decoded
4878
4793
  }
4879
4794
  default:
@@ -4897,14 +4812,13 @@ const encoding117 = {
4897
4812
  c.uint.encode(state, m.updatedAt)
4898
4813
  },
4899
4814
  decode(state) {
4900
- const v = c.uint.decode(state)
4901
4815
  const r0 = c.fixed32.decode(state)
4902
4816
  const r1 = c.string.decode(state)
4903
4817
  const r2 = c.uint.decode(state)
4904
4818
  const r3 = c.uint.decode(state)
4905
4819
 
4906
4820
  return {
4907
- version: v,
4821
+ version: 0,
4908
4822
  id: r0,
4909
4823
  name: r1,
4910
4824
  joinedAt: r2,
@@ -4940,13 +4854,12 @@ const encoding118 = {
4940
4854
  }
4941
4855
  },
4942
4856
  decode(state) {
4943
- const start = state.start
4944
4857
  const v = c.uint.decode(state)
4945
- state.start = start
4946
4858
  switch (v) {
4947
4859
  case 0:
4948
4860
  case 1: {
4949
4861
  const decoded = encoding117.decode(state)
4862
+ decoded.version = v
4950
4863
  return decoded
4951
4864
  }
4952
4865
  default:
@@ -4966,12 +4879,11 @@ const encoding119 = {
4966
4879
  c.buffer.encode(state, m.proof)
4967
4880
  },
4968
4881
  decode(state) {
4969
- const v = c.uint.decode(state)
4970
4882
  const r0 = encoding118.decode(state)
4971
4883
  const r1 = c.buffer.decode(state)
4972
4884
 
4973
4885
  return {
4974
- version: v,
4886
+ version: 0,
4975
4887
  member: r0,
4976
4888
  proof: r1
4977
4889
  }
@@ -5005,13 +4917,12 @@ const encoding120 = {
5005
4917
  }
5006
4918
  },
5007
4919
  decode(state) {
5008
- const start = state.start
5009
4920
  const v = c.uint.decode(state)
5010
- state.start = start
5011
4921
  switch (v) {
5012
4922
  case 0:
5013
4923
  case 1: {
5014
4924
  const decoded = encoding119.decode(state)
4925
+ decoded.version = v
5015
4926
  return decoded
5016
4927
  }
5017
4928
  default:
@@ -5029,11 +4940,10 @@ const encoding121 = {
5029
4940
  encoding118.encode(state, m.member)
5030
4941
  },
5031
4942
  decode(state) {
5032
- const v = c.uint.decode(state)
5033
4943
  const r0 = encoding118.decode(state)
5034
4944
 
5035
4945
  return {
5036
- version: v,
4946
+ version: 0,
5037
4947
  member: r0
5038
4948
  }
5039
4949
  }
@@ -5066,13 +4976,12 @@ const encoding122 = {
5066
4976
  }
5067
4977
  },
5068
4978
  decode(state) {
5069
- const start = state.start
5070
4979
  const v = c.uint.decode(state)
5071
- state.start = start
5072
4980
  switch (v) {
5073
4981
  case 0:
5074
4982
  case 1: {
5075
4983
  const decoded = encoding121.decode(state)
4984
+ decoded.version = v
5076
4985
  return decoded
5077
4986
  }
5078
4987
  default:
@@ -5096,14 +5005,13 @@ const encoding123 = {
5096
5005
  c.uint.encode(state, m.attestedAt)
5097
5006
  },
5098
5007
  decode(state) {
5099
- const v = c.uint.decode(state)
5100
5008
  const r0 = c.fixed32.decode(state)
5101
5009
  const r1 = c.fixed32.decode(state)
5102
5010
  const r2 = c.buffer.decode(state)
5103
5011
  const r3 = c.uint.decode(state)
5104
5012
 
5105
5013
  return {
5106
- version: v,
5014
+ version: 0,
5107
5015
  deviceId: r0,
5108
5016
  memberId: r1,
5109
5017
  proof: r2,
@@ -5139,13 +5047,12 @@ const encoding124 = {
5139
5047
  }
5140
5048
  },
5141
5049
  decode(state) {
5142
- const start = state.start
5143
5050
  const v = c.uint.decode(state)
5144
- state.start = start
5145
5051
  switch (v) {
5146
5052
  case 0:
5147
5053
  case 1: {
5148
5054
  const decoded = encoding123.decode(state)
5055
+ decoded.version = v
5149
5056
  return decoded
5150
5057
  }
5151
5058
  default:
@@ -5165,12 +5072,11 @@ const encoding125 = {
5165
5072
  c.string.encode(state, m.throughId)
5166
5073
  },
5167
5074
  decode(state) {
5168
- const v = c.uint.decode(state)
5169
5075
  const r0 = c.string.decode(state)
5170
5076
  const r1 = c.string.decode(state)
5171
5077
 
5172
5078
  return {
5173
- version: v,
5079
+ version: 0,
5174
5080
  summary: r0,
5175
5081
  throughId: r1
5176
5082
  }
@@ -5204,13 +5110,12 @@ const encoding126 = {
5204
5110
  }
5205
5111
  },
5206
5112
  decode(state) {
5207
- const start = state.start
5208
5113
  const v = c.uint.decode(state)
5209
- state.start = start
5210
5114
  switch (v) {
5211
5115
  case 0:
5212
5116
  case 1: {
5213
5117
  const decoded = encoding125.decode(state)
5118
+ decoded.version = v
5214
5119
  return decoded
5215
5120
  }
5216
5121
  default:
@@ -5226,12 +5131,13 @@ const encoding127 = {
5226
5131
  c.string.preencode(state, m.name)
5227
5132
  c.uint.preencode(state, m.createdAt)
5228
5133
  c.uint.preencode(state, m.updatedAt)
5229
- state.end++ // max flag is 1 so always one byte
5134
+ state.end++ // max flag is 2 so always one byte
5230
5135
 
5231
5136
  if (version >= 5 && m.deletedAt) c.uint.preencode(state, m.deletedAt)
5137
+ if (version >= 6 && m.rank) c.float64.preencode(state, m.rank)
5232
5138
  },
5233
5139
  encode(state, m) {
5234
- const flags = (version >= 5 && m.deletedAt) ? 1 : 0
5140
+ const flags = ((version >= 5 && m.deletedAt) ? 1 : 0) | ((version >= 6 && m.rank) ? 2 : 0)
5235
5141
 
5236
5142
  c.string.encode(state, m.id)
5237
5143
  c.string.encode(state, m.name)
@@ -5240,9 +5146,9 @@ const encoding127 = {
5240
5146
  c.uint.encode(state, flags)
5241
5147
 
5242
5148
  if (version >= 5 && m.deletedAt) c.uint.encode(state, m.deletedAt)
5149
+ if (version >= 6 && m.rank) c.float64.encode(state, m.rank)
5243
5150
  },
5244
5151
  decode(state) {
5245
- const v = c.uint.decode(state)
5246
5152
  const r0 = c.string.decode(state)
5247
5153
  const r1 = c.string.decode(state)
5248
5154
  const r2 = c.uint.decode(state)
@@ -5250,12 +5156,13 @@ const encoding127 = {
5250
5156
  const flags = c.uint.decode(state)
5251
5157
 
5252
5158
  return {
5253
- version: v,
5159
+ version: 0,
5254
5160
  id: r0,
5255
5161
  name: r1,
5256
5162
  createdAt: r2,
5257
5163
  updatedAt: r3,
5258
- deletedAt: (version >= 5 && (flags & 1) !== 0) ? c.uint.decode(state) : 0
5164
+ deletedAt: (version >= 5 && (flags & 1) !== 0) ? c.uint.decode(state) : 0,
5165
+ rank: (version >= 6 && (flags & 2) !== 0) ? c.float64.decode(state) : 0
5259
5166
  }
5260
5167
  }
5261
5168
  }
@@ -5287,13 +5194,12 @@ const encoding128 = {
5287
5194
  }
5288
5195
  },
5289
5196
  decode(state) {
5290
- const start = state.start
5291
5197
  const v = c.uint.decode(state)
5292
- state.start = start
5293
5198
  switch (v) {
5294
5199
  case 0:
5295
5200
  case 1: {
5296
5201
  const decoded = encoding127.decode(state)
5202
+ decoded.version = v
5297
5203
  return decoded
5298
5204
  }
5299
5205
  default:
@@ -5311,11 +5217,10 @@ const encoding129 = {
5311
5217
  encoding128.encode(state, m.group)
5312
5218
  },
5313
5219
  decode(state) {
5314
- const v = c.uint.decode(state)
5315
5220
  const r0 = encoding128.decode(state)
5316
5221
 
5317
5222
  return {
5318
- version: v,
5223
+ version: 0,
5319
5224
  group: r0
5320
5225
  }
5321
5226
  }
@@ -5348,13 +5253,12 @@ const encoding130 = {
5348
5253
  }
5349
5254
  },
5350
5255
  decode(state) {
5351
- const start = state.start
5352
5256
  const v = c.uint.decode(state)
5353
- state.start = start
5354
5257
  switch (v) {
5355
5258
  case 0:
5356
5259
  case 1: {
5357
5260
  const decoded = encoding129.decode(state)
5261
+ decoded.version = v
5358
5262
  return decoded
5359
5263
  }
5360
5264
  default: