mesh-llm-protocol 0.75.0

Mesh LLM wire protocol types, constants, and frame helpers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
// This file is @generated by prost-build.
/// Stream 0x01 — Gossip
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GossipFrame {
    #[prost(uint32, tag = "1")]
    pub r#gen: u32,
    #[prost(message, repeated, tag = "2")]
    pub peers: ::prost::alloc::vec::Vec<PeerAnnouncement>,
    /// must be exactly 32 bytes; must match QUIC peer identity
    #[prost(bytes = "vec", tag = "3")]
    pub sender_id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PeerAnnouncement {
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "1")]
    pub endpoint_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(enumeration = "NodeRole", tag = "2")]
    pub role: i32,
    #[prost(uint32, optional, tag = "3")]
    pub http_port: ::core::option::Option<u32>,
    #[prost(string, optional, tag = "4")]
    pub version: ::core::option::Option<::prost::alloc::string::String>,
    /// Deprecated in v0.60.0: prefer hardware.gpus\[\].name
    #[prost(string, optional, tag = "5")]
    pub gpu_name: ::core::option::Option<::prost::alloc::string::String>,
    /// Deprecated in v0.60.0: prefer hardware.hostname
    #[prost(string, optional, tag = "6")]
    pub hostname: ::core::option::Option<::prost::alloc::string::String>,
    /// Deprecated in v0.60.0: prefer hardware.is_soc; true for system-on-chip / unified-memory hosts such as Apple Silicon and Jetson
    #[prost(bool, optional, tag = "7")]
    pub is_soc: ::core::option::Option<bool>,
    /// Deprecated in v0.60.0: prefer hardware.gpus\[\].vram_bytes
    #[prost(string, optional, tag = "8")]
    pub gpu_vram: ::core::option::Option<::prost::alloc::string::String>,
    /// Deprecated in v0.55.0 for protobuf gossip; compatibility surface only
    #[prost(string, repeated, tag = "9")]
    pub available_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Deprecated in v0.55.0: prefer served_model_identities and served_model_runtime
    #[prost(string, repeated, tag = "10")]
    pub serving_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "11")]
    pub requested_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, repeated, tag = "12")]
    pub available_model_metadata: ::prost::alloc::vec::Vec<CompactModelMetadata>,
    #[prost(message, optional, tag = "13")]
    pub experts_summary: ::core::option::Option<ExpertsSummary>,
    #[prost(uint32, optional, tag = "14")]
    pub rtt_ms: ::core::option::Option<u32>,
    /// GGUF model names (mesh catalog contribution; was JSON `models`)
    #[prost(string, repeated, tag = "15")]
    pub catalog_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// GPU VRAM in bytes
    #[prost(uint64, tag = "16")]
    pub vram_bytes: u64,
    /// how to obtain this node's model
    #[prost(string, optional, tag = "17")]
    pub model_source: ::core::option::Option<::prost::alloc::string::String>,
    /// primary serving model (backward compat; was JSON `serving`)
    #[prost(string, optional, tag = "18")]
    pub primary_serving: ::core::option::Option<::prost::alloc::string::String>,
    /// stable mesh identity (self entry only)
    #[prost(string, optional, tag = "19")]
    pub mesh_id: ::core::option::Option<::prost::alloc::string::String>,
    /// demand map entries (self entry only)
    #[prost(message, repeated, tag = "20")]
    pub demand: ::prost::alloc::vec::Vec<ModelDemandEntry>,
    /// file sizes (bytes) per GGUF model name
    #[prost(map = "string, uint64", tag = "21")]
    pub available_model_sizes: ::std::collections::HashMap<::prost::alloc::string::String, u64>,
    /// JSON-serialized EndpointAddr (includes network addresses for peer discovery)
    #[prost(bytes = "vec", tag = "22")]
    pub serialized_addr: ::prost::alloc::vec::Vec<u8>,
    /// actually routable / healthy
    #[prost(string, repeated, tag = "23")]
    pub hosted_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// false/absent when relayed from legacy JSON peers
    #[prost(bool, optional, tag = "24")]
    pub hosted_models_known: ::core::option::Option<bool>,
    #[prost(message, repeated, tag = "25")]
    pub served_model_descriptors: ::prost::alloc::vec::Vec<ServedModelDescriptor>,
    #[prost(message, repeated, tag = "26")]
    pub served_model_identities: ::prost::alloc::vec::Vec<ServedModelIdentity>,
    #[prost(message, repeated, tag = "27")]
    pub served_model_runtime: ::prost::alloc::vec::Vec<ModelRuntimeDescriptor>,
    #[prost(message, optional, tag = "28")]
    pub owner_attestation: ::core::option::Option<SignedNodeOwnership>,
    /// Deprecated in v0.60.0: prefer hardware.gpus\[\].mem_bandwidth_gbps
    #[prost(string, optional, tag = "29")]
    pub gpu_mem_bandwidth_gbps: ::core::option::Option<::prost::alloc::string::String>,
    /// Deprecated in v0.60.0: prefer hardware.gpus\[\].compute_tflops_fp32
    #[prost(string, optional, tag = "30")]
    pub gpu_compute_tflops_fp32: ::core::option::Option<::prost::alloc::string::String>,
    /// Deprecated in v0.60.0: prefer hardware.gpus\[\].compute_tflops_fp16
    #[prost(string, optional, tag = "31")]
    pub gpu_compute_tflops_fp16: ::core::option::Option<::prost::alloc::string::String>,
    /// Deprecated in v0.60.0: prefer hardware.gpus\[\].reserved_bytes
    #[prost(string, optional, tag = "32")]
    pub gpu_reserved_bytes: ::core::option::Option<::prost::alloc::string::String>,
    /// Introduced in v0.60.0; preferred structured hardware inventory
    #[prost(message, optional, tag = "33")]
    pub hardware: ::core::option::Option<HardwareInfo>,
    #[prost(uint64, optional, tag = "34")]
    pub first_joined_mesh_ts: ::core::option::Option<u64>,
    /// Advisory canonical refs this node wants the mesh to consider
    #[prost(string, repeated, tag = "35")]
    pub explicit_model_interests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Additive feature discovery for admitted subsystem protocols
    #[prost(message, repeated, tag = "37")]
    pub subprotocols: ::prost::alloc::vec::Vec<MeshSubprotocol>,
    #[prost(uint32, optional, tag = "40")]
    pub latency_ms: ::core::option::Option<u32>,
    #[prost(enumeration = "LatencySource", tag = "41")]
    pub latency_source: i32,
    #[prost(uint32, optional, tag = "42")]
    pub latency_age_ms: ::core::option::Option<u32>,
    #[prost(bytes = "vec", optional, tag = "43")]
    pub latency_observer_id: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(message, repeated, tag = "44")]
    pub advertised_model_throughput: ::prost::alloc::vec::Vec<AdvertisedModelThroughput>,
    #[prost(string, optional, tag = "45")]
    pub mesh_policy_hash: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "46")]
    pub genesis_policy: ::core::option::Option<SignedMeshGenesisPolicy>,
    #[prost(message, optional, tag = "47")]
    pub release_attestation: ::core::option::Option<ReleaseBuildAttestation>,
    #[prost(message, optional, tag = "48")]
    pub direct_admission_proof: ::core::option::Option<DirectNodeAdmissionProof>,
    /// Inference admission state advertised by this peer (additive; older nodes ignore)
    #[prost(enumeration = "InferenceAdmissionState", optional, tag = "49")]
    pub inference_admission_state: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdvertisedModelThroughput {
    #[prost(string, tag = "1")]
    pub model_name: ::prost::alloc::string::String,
    #[prost(uint64, tag = "2")]
    pub avg_tokens_per_second_milli: u64,
    #[prost(uint64, tag = "3")]
    pub throughput_samples: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MeshSubprotocol {
    /// e.g. "skippy-stage"
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// subprotocol major version
    #[prost(uint32, tag = "2")]
    pub major: u32,
    /// e.g. "artifact-transfer"
    #[prost(string, repeated, tag = "3")]
    pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MeshSubprotocolOpen {
    #[prost(uint32, tag = "1")]
    pub r#gen: u32,
    /// e.g. "skippy-stage"
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// subprotocol major version
    #[prost(uint32, tag = "3")]
    pub major: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HardwareInfo {
    /// True for system-on-chip / unified-memory hosts such as Apple Silicon and Jetson
    #[prost(bool, optional, tag = "1")]
    pub is_soc: ::core::option::Option<bool>,
    #[prost(string, optional, tag = "2")]
    pub hostname: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, repeated, tag = "3")]
    pub gpus: ::prost::alloc::vec::Vec<GpuInfo>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GpuInfo {
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub vram_bytes: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub reserved_bytes: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "4")]
    pub mem_bandwidth_gbps: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "5")]
    pub compute_tflops_fp32: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "6")]
    pub compute_tflops_fp16: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SignedNodeOwnership {
    #[prost(uint32, tag = "1")]
    pub version: u32,
    #[prost(string, tag = "2")]
    pub cert_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub owner_id: ::prost::alloc::string::String,
    /// 32 bytes
    #[prost(bytes = "vec", tag = "4")]
    pub owner_sign_public_key: ::prost::alloc::vec::Vec<u8>,
    /// 32 bytes
    #[prost(bytes = "vec", tag = "5")]
    pub node_endpoint_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "6")]
    pub issued_at_unix_ms: u64,
    #[prost(uint64, tag = "7")]
    pub expires_at_unix_ms: u64,
    #[prost(string, optional, tag = "8")]
    pub node_label: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "9")]
    pub hostname_hint: ::core::option::Option<::prost::alloc::string::String>,
    /// Ed25519 signature over canonical claim bytes
    #[prost(bytes = "vec", tag = "10")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServedModelDescriptor {
    #[prost(message, optional, tag = "1")]
    pub identity: ::core::option::Option<ServedModelIdentity>,
    #[prost(message, optional, tag = "2")]
    pub capabilities: ::core::option::Option<ModelCapabilities>,
    #[prost(message, optional, tag = "3")]
    pub topology: ::core::option::Option<ModelTopology>,
    #[prost(bool, optional, tag = "4")]
    pub capabilities_known: ::core::option::Option<bool>,
    #[prost(message, optional, tag = "5")]
    pub metadata: ::core::option::Option<ServedModelMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServedModelMetadata {
    #[prost(string, optional, tag = "1")]
    pub architecture: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub parameter_size: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(double, optional, tag = "3")]
    pub parameter_count_b: ::core::option::Option<f64>,
    #[prost(string, optional, tag = "4")]
    pub quant: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint32, optional, tag = "5")]
    pub native_context_length: ::core::option::Option<u32>,
    #[prost(string, optional, tag = "6")]
    pub tokenizer: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint32, optional, tag = "7")]
    pub layer_count: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "8")]
    pub embedding_size: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "9")]
    pub head_count: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "10")]
    pub kv_head_count: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "11")]
    pub expert_count: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "12")]
    pub active_expert_count: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ServedModelIdentity {
    #[prost(string, tag = "1")]
    pub model_name: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub is_primary: bool,
    #[prost(enumeration = "ModelSourceKind", tag = "3")]
    pub source_kind: i32,
    #[prost(string, optional, tag = "4")]
    pub canonical_ref: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "5")]
    pub repository: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "6")]
    pub revision: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "7")]
    pub artifact: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "8")]
    pub local_file_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "9")]
    pub identity_hash: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelCapabilities {
    #[prost(enumeration = "CapabilityLevel", tag = "1")]
    pub vision: i32,
    #[prost(enumeration = "CapabilityLevel", tag = "2")]
    pub reasoning: i32,
    #[prost(enumeration = "CapabilityLevel", tag = "3")]
    pub tool_use: i32,
    #[prost(bool, tag = "4")]
    pub moe: bool,
    #[prost(bool, tag = "5")]
    pub multimodal: bool,
    #[prost(enumeration = "CapabilityLevel", tag = "6")]
    pub audio: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelTopology {
    #[prost(message, optional, tag = "1")]
    pub moe: ::core::option::Option<ModelMoeInfo>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelRuntimeDescriptor {
    #[prost(string, tag = "1")]
    pub model_name: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub identity_hash: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint32, optional, tag = "3")]
    pub context_length: ::core::option::Option<u32>,
    #[prost(bool, tag = "4")]
    pub ready: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelMoeInfo {
    #[prost(uint32, tag = "1")]
    pub expert_count: u32,
    #[prost(uint32, tag = "2")]
    pub used_expert_count: u32,
    #[prost(uint32, optional, tag = "3")]
    pub min_experts_per_node: ::core::option::Option<u32>,
    #[prost(string, optional, tag = "4")]
    pub source: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "5")]
    pub ranking_source: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint32, repeated, tag = "6")]
    pub ranking: ::prost::alloc::vec::Vec<u32>,
    #[prost(uint32, optional, tag = "7")]
    pub ranking_prompt_count: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "8")]
    pub ranking_tokens: ::core::option::Option<u32>,
    #[prost(string, optional, tag = "9")]
    pub ranking_layer_scope: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "10")]
    pub ranking_origin: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactModelMetadata {
    #[prost(string, tag = "1")]
    pub model_key: ::prost::alloc::string::String,
    #[prost(uint32, tag = "2")]
    pub context_length: u32,
    #[prost(uint32, tag = "3")]
    pub vocab_size: u32,
    #[prost(uint32, tag = "4")]
    pub embedding_size: u32,
    #[prost(uint32, tag = "5")]
    pub head_count: u32,
    #[prost(uint32, tag = "6")]
    pub layer_count: u32,
    #[prost(uint32, tag = "7")]
    pub feed_forward_length: u32,
    #[prost(uint32, tag = "8")]
    pub key_length: u32,
    #[prost(uint32, tag = "9")]
    pub value_length: u32,
    #[prost(string, tag = "10")]
    pub architecture: ::prost::alloc::string::String,
    #[prost(string, tag = "11")]
    pub tokenizer_model_name: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "12")]
    pub special_tokens: ::prost::alloc::vec::Vec<SpecialToken>,
    #[prost(float, tag = "13")]
    pub rope_scale: f32,
    #[prost(float, tag = "14")]
    pub rope_freq_base: f32,
    #[prost(bool, tag = "15")]
    pub is_moe: bool,
    #[prost(uint32, tag = "16")]
    pub expert_count: u32,
    #[prost(uint32, tag = "17")]
    pub used_expert_count: u32,
    /// GGUF quantization type string (e.g. "Q4_K_M")
    #[prost(string, tag = "18")]
    pub quantization_type: ::prost::alloc::string::String,
    #[prost(uint32, tag = "19")]
    pub kv_head_count: u32,
    /// GGUF general.size_label when present (e.g. "32B")
    #[prost(string, optional, tag = "20")]
    pub parameter_size: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SpecialToken {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(uint32, tag = "2")]
    pub token_id: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExpertsSummary {
    #[prost(uint32, tag = "1")]
    pub total_experts: u32,
    #[prost(uint32, tag = "2")]
    pub expert_count_used: u32,
    #[prost(uint32, repeated, tag = "3")]
    pub top_expert_ids: ::prost::alloc::vec::Vec<u32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelDemandEntry {
    #[prost(string, tag = "1")]
    pub model_name: ::prost::alloc::string::String,
    #[prost(uint64, tag = "2")]
    pub last_active: u64,
    #[prost(uint64, tag = "3")]
    pub request_count: u64,
}
/// Stream 0x03 — Tunnel Map
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TunnelMap {
    #[prost(bytes = "vec", tag = "1")]
    pub owner_peer_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, repeated, tag = "2")]
    pub entries: ::prost::alloc::vec::Vec<TunnelEntry>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TunnelEntry {
    #[prost(bytes = "vec", tag = "1")]
    pub target_peer_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", optional, tag = "2")]
    pub relay_peer_id: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(uint32, tag = "3")]
    pub tunnel_port: u32,
}
/// Stream 0x05 — Route Table
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RouteTableRequest {
    /// 0 or exactly 32 bytes (passive callers may omit)
    #[prost(bytes = "vec", tag = "1")]
    pub requester_id: ::prost::alloc::vec::Vec<u8>,
    /// must equal NODE_PROTOCOL_GENERATION; rejected otherwise
    #[prost(uint32, tag = "2")]
    pub r#gen: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteTable {
    #[prost(message, repeated, tag = "1")]
    pub entries: ::prost::alloc::vec::Vec<RouteEntry>,
    /// stable mesh identity — passive/client callers learn this here
    #[prost(string, optional, tag = "2")]
    pub mesh_id: ::core::option::Option<::prost::alloc::string::String>,
    /// must equal NODE_PROTOCOL_GENERATION; caller rejects mismatches
    #[prost(uint32, tag = "3")]
    pub r#gen: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RouteEntry {
    /// exactly 32 bytes (peer public key)
    #[prost(bytes = "vec", tag = "1")]
    pub endpoint_id: ::prost::alloc::vec::Vec<u8>,
    /// model being served (empty if node is not actively serving)
    #[prost(string, tag = "2")]
    pub model: ::prost::alloc::string::String,
}
/// Stream 0x06 — Peer Down
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PeerDown {
    /// exactly 32 bytes; the peer being reported as unreachable
    #[prost(bytes = "vec", tag = "1")]
    pub peer_id: ::prost::alloc::vec::Vec<u8>,
    /// must equal NODE_PROTOCOL_GENERATION; rejected otherwise
    #[prost(uint32, tag = "2")]
    pub r#gen: u32,
}
/// Stream 0x07 — Peer Leaving
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PeerLeaving {
    /// exactly 32 bytes; must match the QUIC sender identity
    #[prost(bytes = "vec", tag = "1")]
    pub peer_id: ::prost::alloc::vec::Vec<u8>,
    /// must equal NODE_PROTOCOL_GENERATION; rejected otherwise
    #[prost(uint32, tag = "2")]
    pub r#gen: u32,
}
/// Stream 0x0e — Direct Path Request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DirectPathRequest {
    /// exactly 32 bytes; must match the QUIC sender identity
    #[prost(bytes = "vec", tag = "1")]
    pub requester_id: ::prost::alloc::vec::Vec<u8>,
    /// must equal NODE_PROTOCOL_GENERATION; rejected otherwise
    #[prost(uint32, tag = "2")]
    pub r#gen: u32,
    /// JSON-serialized EndpointAddr the receiver should try to dial
    #[prost(bytes = "vec", tag = "3")]
    pub serialized_addr: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeConfigSnapshot {
    /// config schema version (currently 1)
    #[prost(uint32, tag = "1")]
    pub version: u32,
    #[prost(message, optional, tag = "2")]
    pub gpu: ::core::option::Option<NodeGpuConfig>,
    #[prost(message, repeated, tag = "3")]
    pub models: ::prost::alloc::vec::Vec<NodeModelEntry>,
    #[prost(message, repeated, tag = "4")]
    pub plugins: ::prost::alloc::vec::Vec<NodePluginEntry>,
    /// canonical persisted config payload for additive owner-control roundtrip
    #[prost(string, optional, tag = "5")]
    pub config_toml: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional, additive: mesh admission requirements snapshot.
    /// Older nodes ignore this field. Owner-control config get/apply must
    /// round-trip this so \[mesh_requirements\] is not silently dropped.
    #[prost(message, optional, tag = "6")]
    pub mesh_requirements: ::core::option::Option<MeshRequirements>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodeGpuConfig {
    #[prost(enumeration = "GpuAssignment", tag = "1")]
    pub assignment: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfiguredModelRef {
    #[prost(string, tag = "1")]
    pub declared_ref: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub source_kind: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub revision: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodeModelEntry {
    #[prost(string, tag = "1")]
    pub model: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub mmproj: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint32, optional, tag = "3")]
    pub ctx_size: ::core::option::Option<u32>,
    #[prost(string, optional, tag = "4")]
    pub gpu_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "5")]
    pub model_ref: ::core::option::Option<ConfiguredModelRef>,
    #[prost(message, optional, tag = "6")]
    pub mmproj_ref: ::core::option::Option<ConfiguredModelRef>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodePluginEntry {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, optional, tag = "2")]
    pub enabled: ::core::option::Option<bool>,
    #[prost(string, optional, tag = "3")]
    pub command: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "4")]
    pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlEnvelope {
    /// must equal NODE_PROTOCOL_GENERATION
    #[prost(uint32, tag = "1")]
    pub r#gen: u32,
    #[prost(message, optional, tag = "2")]
    pub handshake: ::core::option::Option<OwnerControlHandshake>,
    #[prost(message, optional, tag = "3")]
    pub request: ::core::option::Option<OwnerControlRequest>,
    #[prost(message, optional, tag = "4")]
    pub response: ::core::option::Option<OwnerControlResponse>,
    #[prost(message, optional, tag = "5")]
    pub error: ::core::option::Option<OwnerControlError>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlHandshake {
    #[prost(message, optional, tag = "1")]
    pub ownership: ::core::option::Option<SignedNodeOwnership>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlRequest {
    #[prost(uint64, tag = "1")]
    pub request_id: u64,
    #[prost(message, optional, tag = "2")]
    pub get_config: ::core::option::Option<OwnerControlGetConfigRequest>,
    #[prost(message, optional, tag = "3")]
    pub watch_config: ::core::option::Option<OwnerControlWatchConfigRequest>,
    #[prost(message, optional, tag = "4")]
    pub apply_config: ::core::option::Option<OwnerControlApplyConfigRequest>,
    #[prost(message, optional, tag = "5")]
    pub refresh_inventory: ::core::option::Option<OwnerControlRefreshInventoryRequest>,
    #[prost(message, optional, tag = "6")]
    pub load_model: ::core::option::Option<OwnerControlLoadModelRequest>,
    #[prost(message, optional, tag = "7")]
    pub unload_model: ::core::option::Option<OwnerControlUnloadModelRequest>,
    #[prost(message, optional, tag = "8")]
    pub ensure_model: ::core::option::Option<OwnerControlEnsureModelRequest>,
    #[prost(message, optional, tag = "9")]
    pub drain_model: ::core::option::Option<OwnerControlDrainModelRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlResponse {
    #[prost(uint64, tag = "1")]
    pub request_id: u64,
    #[prost(message, optional, tag = "2")]
    pub get_config: ::core::option::Option<OwnerControlGetConfigResponse>,
    #[prost(message, optional, tag = "3")]
    pub watch_config: ::core::option::Option<OwnerControlWatchConfigResponse>,
    #[prost(message, optional, tag = "4")]
    pub apply_config: ::core::option::Option<OwnerControlApplyConfigResponse>,
    #[prost(message, optional, tag = "5")]
    pub refresh_inventory: ::core::option::Option<OwnerControlRefreshInventoryResponse>,
    #[prost(message, optional, tag = "6")]
    pub load_model: ::core::option::Option<OwnerControlLoadModelResponse>,
    #[prost(message, optional, tag = "7")]
    pub unload_model: ::core::option::Option<OwnerControlUnloadModelResponse>,
    #[prost(message, optional, tag = "8")]
    pub ensure_model: ::core::option::Option<OwnerControlEnsureModelResponse>,
    #[prost(message, optional, tag = "9")]
    pub drain_model: ::core::option::Option<OwnerControlDrainModelResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlError {
    #[prost(enumeration = "OwnerControlErrorCode", tag = "1")]
    pub code: i32,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(uint64, optional, tag = "3")]
    pub request_id: ::core::option::Option<u64>,
    #[prost(uint64, optional, tag = "4")]
    pub current_revision: ::core::option::Option<u64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlGetConfigRequest {
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "1")]
    pub requester_node_id: ::prost::alloc::vec::Vec<u8>,
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "2")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlGetConfigResponse {
    #[prost(message, optional, tag = "1")]
    pub snapshot: ::core::option::Option<OwnerControlConfigSnapshot>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlWatchConfigRequest {
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "1")]
    pub requester_node_id: ::prost::alloc::vec::Vec<u8>,
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "2")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(bool, tag = "3")]
    pub include_snapshot: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlWatchConfigResponse {
    #[prost(message, optional, tag = "1")]
    pub accepted: ::core::option::Option<OwnerControlWatchAccepted>,
    #[prost(message, optional, tag = "2")]
    pub snapshot: ::core::option::Option<OwnerControlConfigSnapshot>,
    #[prost(message, optional, tag = "3")]
    pub update: ::core::option::Option<OwnerControlConfigUpdate>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlWatchAccepted {
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "1")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlApplyConfigRequest {
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "1")]
    pub requester_node_id: ::prost::alloc::vec::Vec<u8>,
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "2")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "3")]
    pub expected_revision: u64,
    #[prost(message, optional, tag = "4")]
    pub config: ::core::option::Option<NodeConfigSnapshot>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlApplyConfigResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(uint64, tag = "2")]
    pub current_revision: u64,
    #[prost(bytes = "vec", tag = "3")]
    pub config_hash: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, optional, tag = "4")]
    pub error: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(enumeration = "ConfigApplyMode", tag = "5")]
    pub apply_mode: i32,
    #[prost(message, repeated, tag = "6")]
    pub diagnostics: ::prost::alloc::vec::Vec<ConfigDiagnostic>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigDiagnostic {
    #[prost(enumeration = "ConfigDiagnosticCode", tag = "1")]
    pub code: i32,
    #[prost(enumeration = "ConfigDiagnosticSeverity", tag = "2")]
    pub severity: i32,
    #[prost(enumeration = "ConfigDiagnosticSource", tag = "3")]
    pub source: i32,
    #[prost(enumeration = "ConfigDiagnosticSchemaSource", optional, tag = "4")]
    pub schema_source: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "5")]
    pub path: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "6")]
    pub canonical_path: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag = "7")]
    pub message: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "8")]
    pub help: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlRefreshInventoryRequest {
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "1")]
    pub requester_node_id: ::prost::alloc::vec::Vec<u8>,
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "2")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlRefreshInventoryResponse {
    #[prost(message, optional, tag = "1")]
    pub snapshot: ::core::option::Option<OwnerControlConfigSnapshot>,
    #[prost(message, optional, tag = "2")]
    pub inventory: ::core::option::Option<OwnerControlRefreshInventory>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlModelRef {
    #[prost(string, tag = "1")]
    pub canonical_model_ref: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub instance_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlLoadModelRequest {
    #[prost(bytes = "vec", tag = "1")]
    pub requester_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "2")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub model: ::core::option::Option<OwnerControlModelRef>,
    #[prost(string, optional, tag = "4")]
    pub profile: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlUnloadModelRequest {
    #[prost(bytes = "vec", tag = "1")]
    pub requester_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "2")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub model: ::core::option::Option<OwnerControlModelRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlEnsureModelRequest {
    #[prost(bytes = "vec", tag = "1")]
    pub requester_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "2")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub model: ::core::option::Option<OwnerControlModelRef>,
    #[prost(string, optional, tag = "4")]
    pub profile: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlDrainModelRequest {
    #[prost(bytes = "vec", tag = "1")]
    pub requester_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "2")]
    pub target_node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub model: ::core::option::Option<OwnerControlModelRef>,
    #[prost(uint64, optional, tag = "4")]
    pub drain_timeout_secs: ::core::option::Option<u64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlLoadModelResponse {
    #[prost(string, tag = "1")]
    pub intent_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub accepted_state: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub target: ::core::option::Option<OwnerControlModelRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlUnloadModelResponse {
    #[prost(string, tag = "1")]
    pub intent_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub accepted_state: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub target: ::core::option::Option<OwnerControlModelRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlEnsureModelResponse {
    #[prost(string, tag = "1")]
    pub intent_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub accepted_state: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub target: ::core::option::Option<OwnerControlModelRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlDrainModelResponse {
    #[prost(string, tag = "1")]
    pub intent_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub accepted_state: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub target: ::core::option::Option<OwnerControlModelRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlRefreshInventory {
    #[prost(message, repeated, tag = "1")]
    pub entries: ::prost::alloc::vec::Vec<OwnerControlInventoryEntry>,
    #[prost(enumeration = "OwnerControlRefreshInventoryDisposition", tag = "2")]
    pub disposition: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlInventoryEntry {
    #[prost(string, tag = "1")]
    pub canonical_model_ref: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(uint64, tag = "3")]
    pub total_size_bytes: u64,
    #[prost(message, optional, tag = "4")]
    pub metadata: ::core::option::Option<CompactModelMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlConfigSnapshot {
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "1")]
    pub node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "2")]
    pub revision: u64,
    /// SHA-256 of canonical proto bytes (32 bytes)
    #[prost(bytes = "vec", tag = "3")]
    pub config_hash: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "4")]
    pub config: ::core::option::Option<NodeConfigSnapshot>,
    #[prost(string, optional, tag = "5")]
    pub hostname: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OwnerControlConfigUpdate {
    /// exactly 32 bytes
    #[prost(bytes = "vec", tag = "1")]
    pub node_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "2")]
    pub revision: u64,
    /// SHA-256 of canonical proto bytes (32 bytes)
    #[prost(bytes = "vec", tag = "3")]
    pub config_hash: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "4")]
    pub config: ::core::option::Option<NodeConfigSnapshot>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CapabilityLevel {
    Unspecified = 0,
    None = 1,
    Likely = 2,
    Supported = 3,
}
impl CapabilityLevel {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "CAPABILITY_LEVEL_UNSPECIFIED",
            Self::None => "CAPABILITY_LEVEL_NONE",
            Self::Likely => "CAPABILITY_LEVEL_LIKELY",
            Self::Supported => "CAPABILITY_LEVEL_SUPPORTED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CAPABILITY_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
            "CAPABILITY_LEVEL_NONE" => Some(Self::None),
            "CAPABILITY_LEVEL_LIKELY" => Some(Self::Likely),
            "CAPABILITY_LEVEL_SUPPORTED" => Some(Self::Supported),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ModelSourceKind {
    Unspecified = 0,
    Catalog = 1,
    HuggingFace = 2,
    LocalGguf = 3,
    DirectUrl = 4,
    Unknown = 5,
}
impl ModelSourceKind {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "MODEL_SOURCE_KIND_UNSPECIFIED",
            Self::Catalog => "MODEL_SOURCE_KIND_CATALOG",
            Self::HuggingFace => "MODEL_SOURCE_KIND_HUGGING_FACE",
            Self::LocalGguf => "MODEL_SOURCE_KIND_LOCAL_GGUF",
            Self::DirectUrl => "MODEL_SOURCE_KIND_DIRECT_URL",
            Self::Unknown => "MODEL_SOURCE_KIND_UNKNOWN",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MODEL_SOURCE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
            "MODEL_SOURCE_KIND_CATALOG" => Some(Self::Catalog),
            "MODEL_SOURCE_KIND_HUGGING_FACE" => Some(Self::HuggingFace),
            "MODEL_SOURCE_KIND_LOCAL_GGUF" => Some(Self::LocalGguf),
            "MODEL_SOURCE_KIND_DIRECT_URL" => Some(Self::DirectUrl),
            "MODEL_SOURCE_KIND_UNKNOWN" => Some(Self::Unknown),
            _ => None,
        }
    }
}
/// Shared enum
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NodeRole {
    Unspecified = 0,
    Worker = 1,
    Host = 2,
    Client = 3,
}
impl NodeRole {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "NODE_ROLE_UNSPECIFIED",
            Self::Worker => "WORKER",
            Self::Host => "HOST",
            Self::Client => "CLIENT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NODE_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
            "WORKER" => Some(Self::Worker),
            "HOST" => Some(Self::Host),
            "CLIENT" => Some(Self::Client),
            _ => None,
        }
    }
}
/// Latency source type for peer latency data
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LatencySource {
    Unspecified = 0,
    Direct = 1,
    Estimated = 2,
    Unknown = 3,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignedMeshGenesisPolicy {
    #[prost(uint32, tag = "1")]
    pub version: u32,
    #[prost(message, optional, tag = "2")]
    pub policy: ::core::option::Option<MeshGenesisPolicy>,
    #[prost(bytes = "vec", tag = "3")]
    pub origin_sign_public_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, tag = "4")]
    pub signature_algorithm: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "5")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MeshGenesisPolicy {
    #[prost(uint32, tag = "1")]
    pub version: u32,
    #[prost(string, tag = "2")]
    pub origin_owner_id: ::prost::alloc::string::String,
    #[prost(uint64, tag = "3")]
    pub created_at_unix_ms: u64,
    #[prost(message, optional, tag = "4")]
    pub requirements: ::core::option::Option<MeshRequirements>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MeshRequirements {
    #[prost(message, optional, tag = "1")]
    pub node_version: ::core::option::Option<NodeVersionBounds>,
    #[prost(message, optional, tag = "2")]
    pub protocol_generation: ::core::option::Option<ProtocolGenerationBounds>,
    #[prost(message, optional, tag = "3")]
    pub release_attestation: ::core::option::Option<ReleaseAttestationRequirement>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodeVersionBounds {
    #[prost(string, optional, tag = "1")]
    pub min: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub max: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtocolGenerationBounds {
    #[prost(uint32, optional, tag = "1")]
    pub min: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "2")]
    pub max: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseAttestationRequirement {
    #[prost(bool, optional, tag = "1")]
    pub required: ::core::option::Option<bool>,
    #[prost(string, repeated, tag = "2")]
    pub allowed_signer_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignedBootstrapToken {
    #[prost(uint32, tag = "1")]
    pub version: u32,
    #[prost(bytes = "vec", repeated, tag = "2")]
    pub serialized_addrs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
    #[prost(string, tag = "3")]
    pub mesh_id: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub policy_hash: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub genesis_policy: ::core::option::Option<MeshGenesisPolicy>,
    #[prost(uint64, optional, tag = "6")]
    pub expires_at_unix_ms: ::core::option::Option<u64>,
    #[prost(bytes = "vec", tag = "7")]
    pub origin_sign_public_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, tag = "8")]
    pub signature_algorithm: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "9")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseBuildAttestation {
    #[prost(uint32, tag = "1")]
    pub version: u32,
    #[prost(string, tag = "2")]
    pub node_version: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub build_id: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub commit: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub target_triple: ::prost::alloc::string::String,
    #[prost(uint32, optional, tag = "6")]
    pub supported_protocol_generation_min: ::core::option::Option<u32>,
    #[prost(uint32, optional, tag = "7")]
    pub supported_protocol_generation_max: ::core::option::Option<u32>,
    #[prost(string, optional, tag = "8")]
    pub artifact_digest: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag = "9")]
    pub signer_key_id: ::prost::alloc::string::String,
    #[prost(string, tag = "10")]
    pub signature_algorithm: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "11")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DirectNodeAdmissionProof {
    #[prost(uint32, tag = "1")]
    pub version: u32,
    #[prost(bytes = "vec", tag = "2")]
    pub sender_id: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, tag = "3")]
    pub mesh_id: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub policy_hash: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub attestation_hash: ::prost::alloc::string::String,
    #[prost(uint64, tag = "6")]
    pub timestamp_unix_ms: u64,
    #[prost(string, tag = "7")]
    pub signature_algorithm: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "8")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
impl LatencySource {
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "LATENCY_SOURCE_UNSPECIFIED",
            Self::Direct => "DIRECT",
            Self::Estimated => "ESTIMATED",
            Self::Unknown => "UNKNOWN",
        }
    }
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LATENCY_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
            "DIRECT" => Some(Self::Direct),
            "ESTIMATED" => Some(Self::Estimated),
            "UNKNOWN" => Some(Self::Unknown),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GpuAssignment {
    Unspecified = 0,
    Auto = 1,
    Pinned = 2,
}
impl GpuAssignment {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "GPU_ASSIGNMENT_UNSPECIFIED",
            Self::Auto => "GPU_ASSIGNMENT_AUTO",
            Self::Pinned => "GPU_ASSIGNMENT_PINNED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GPU_ASSIGNMENT_UNSPECIFIED" => Some(Self::Unspecified),
            "GPU_ASSIGNMENT_AUTO" => Some(Self::Auto),
            "GPU_ASSIGNMENT_PINNED" => Some(Self::Pinned),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigApplyMode {
    Unspecified = 0,
    Staged = 1,
    Live = 2,
    Noop = 3,
}
impl ConfigApplyMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "CONFIG_APPLY_MODE_UNSPECIFIED",
            Self::Staged => "CONFIG_APPLY_MODE_STAGED",
            Self::Live => "CONFIG_APPLY_MODE_LIVE",
            Self::Noop => "CONFIG_APPLY_MODE_NOOP",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONFIG_APPLY_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "CONFIG_APPLY_MODE_STAGED" => Some(Self::Staged),
            "CONFIG_APPLY_MODE_LIVE" => Some(Self::Live),
            "CONFIG_APPLY_MODE_NOOP" => Some(Self::Noop),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigDiagnosticSeverity {
    Unspecified = 0,
    Error = 1,
    Warning = 2,
    Info = 3,
}
impl ConfigDiagnosticSeverity {
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "CONFIG_DIAGNOSTIC_SEVERITY_UNSPECIFIED",
            Self::Error => "CONFIG_DIAGNOSTIC_SEVERITY_ERROR",
            Self::Warning => "CONFIG_DIAGNOSTIC_SEVERITY_WARNING",
            Self::Info => "CONFIG_DIAGNOSTIC_SEVERITY_INFO",
        }
    }
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONFIG_DIAGNOSTIC_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
            "CONFIG_DIAGNOSTIC_SEVERITY_ERROR" => Some(Self::Error),
            "CONFIG_DIAGNOSTIC_SEVERITY_WARNING" => Some(Self::Warning),
            "CONFIG_DIAGNOSTIC_SEVERITY_INFO" => Some(Self::Info),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigDiagnosticSource {
    Unspecified = 0,
    Validation = 1,
    Schema = 2,
    Plugin = 3,
    Compatibility = 4,
}
impl ConfigDiagnosticSource {
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "CONFIG_DIAGNOSTIC_SOURCE_UNSPECIFIED",
            Self::Validation => "CONFIG_DIAGNOSTIC_SOURCE_VALIDATION",
            Self::Schema => "CONFIG_DIAGNOSTIC_SOURCE_SCHEMA",
            Self::Plugin => "CONFIG_DIAGNOSTIC_SOURCE_PLUGIN",
            Self::Compatibility => "CONFIG_DIAGNOSTIC_SOURCE_COMPATIBILITY",
        }
    }
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONFIG_DIAGNOSTIC_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
            "CONFIG_DIAGNOSTIC_SOURCE_VALIDATION" => Some(Self::Validation),
            "CONFIG_DIAGNOSTIC_SOURCE_SCHEMA" => Some(Self::Schema),
            "CONFIG_DIAGNOSTIC_SOURCE_PLUGIN" => Some(Self::Plugin),
            "CONFIG_DIAGNOSTIC_SOURCE_COMPATIBILITY" => Some(Self::Compatibility),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigDiagnosticSchemaSource {
    Unspecified = 0,
    BuiltIn = 1,
    Engine = 2,
    Plugin = 3,
}
impl ConfigDiagnosticSchemaSource {
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "CONFIG_DIAGNOSTIC_SCHEMA_SOURCE_UNSPECIFIED",
            Self::BuiltIn => "CONFIG_DIAGNOSTIC_SCHEMA_SOURCE_BUILT_IN",
            Self::Engine => "CONFIG_DIAGNOSTIC_SCHEMA_SOURCE_ENGINE",
            Self::Plugin => "CONFIG_DIAGNOSTIC_SCHEMA_SOURCE_PLUGIN",
        }
    }
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONFIG_DIAGNOSTIC_SCHEMA_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
            "CONFIG_DIAGNOSTIC_SCHEMA_SOURCE_BUILT_IN" => Some(Self::BuiltIn),
            "CONFIG_DIAGNOSTIC_SCHEMA_SOURCE_ENGINE" => Some(Self::Engine),
            "CONFIG_DIAGNOSTIC_SCHEMA_SOURCE_PLUGIN" => Some(Self::Plugin),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigDiagnosticCode {
    Unspecified = 0,
    InvalidValue = 1,
    MissingRequiredValue = 2,
    UnsupportedField = 3,
    RejectedField = 4,
    AliasApplied = 5,
    MisplacedField = 6,
    UnknownField = 7,
    SchemaUnavailable = 8,
    LegacyUnvalidatedConfig = 9,
    UnsupportedSchemaVersion = 10,
}
impl ConfigDiagnosticCode {
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "CONFIG_DIAGNOSTIC_CODE_UNSPECIFIED",
            Self::InvalidValue => "CONFIG_DIAGNOSTIC_CODE_INVALID_VALUE",
            Self::MissingRequiredValue => "CONFIG_DIAGNOSTIC_CODE_MISSING_REQUIRED_VALUE",
            Self::UnsupportedField => "CONFIG_DIAGNOSTIC_CODE_UNSUPPORTED_FIELD",
            Self::RejectedField => "CONFIG_DIAGNOSTIC_CODE_REJECTED_FIELD",
            Self::AliasApplied => "CONFIG_DIAGNOSTIC_CODE_ALIAS_APPLIED",
            Self::MisplacedField => "CONFIG_DIAGNOSTIC_CODE_MISPLACED_FIELD",
            Self::UnknownField => "CONFIG_DIAGNOSTIC_CODE_UNKNOWN_FIELD",
            Self::SchemaUnavailable => "CONFIG_DIAGNOSTIC_CODE_SCHEMA_UNAVAILABLE",
            Self::LegacyUnvalidatedConfig => "CONFIG_DIAGNOSTIC_CODE_LEGACY_UNVALIDATED_CONFIG",
            Self::UnsupportedSchemaVersion => "CONFIG_DIAGNOSTIC_CODE_UNSUPPORTED_SCHEMA_VERSION",
        }
    }
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONFIG_DIAGNOSTIC_CODE_UNSPECIFIED" => Some(Self::Unspecified),
            "CONFIG_DIAGNOSTIC_CODE_INVALID_VALUE" => Some(Self::InvalidValue),
            "CONFIG_DIAGNOSTIC_CODE_MISSING_REQUIRED_VALUE" => Some(Self::MissingRequiredValue),
            "CONFIG_DIAGNOSTIC_CODE_UNSUPPORTED_FIELD" => Some(Self::UnsupportedField),
            "CONFIG_DIAGNOSTIC_CODE_REJECTED_FIELD" => Some(Self::RejectedField),
            "CONFIG_DIAGNOSTIC_CODE_ALIAS_APPLIED" => Some(Self::AliasApplied),
            "CONFIG_DIAGNOSTIC_CODE_MISPLACED_FIELD" => Some(Self::MisplacedField),
            "CONFIG_DIAGNOSTIC_CODE_UNKNOWN_FIELD" => Some(Self::UnknownField),
            "CONFIG_DIAGNOSTIC_CODE_SCHEMA_UNAVAILABLE" => Some(Self::SchemaUnavailable),
            "CONFIG_DIAGNOSTIC_CODE_LEGACY_UNVALIDATED_CONFIG" => {
                Some(Self::LegacyUnvalidatedConfig)
            }
            "CONFIG_DIAGNOSTIC_CODE_UNSUPPORTED_SCHEMA_VERSION" => {
                Some(Self::UnsupportedSchemaVersion)
            }
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OwnerControlErrorCode {
    Unspecified = 0,
    BadRequest = 1,
    Unauthorized = 2,
    RevisionConflict = 3,
    ControlUnsupported = 4,
    ControlEndpointRequired = 5,
    ControlUnavailable = 6,
    UnknownCommand = 7,
    LegacyJsonUnsupported = 8,
    InvalidHandshake = 9,
    TargetNodeMismatch = 10,
}
impl OwnerControlErrorCode {
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OWNER_CONTROL_ERROR_CODE_UNSPECIFIED",
            Self::BadRequest => "OWNER_CONTROL_ERROR_CODE_BAD_REQUEST",
            Self::Unauthorized => "OWNER_CONTROL_ERROR_CODE_UNAUTHORIZED",
            Self::RevisionConflict => "OWNER_CONTROL_ERROR_CODE_REVISION_CONFLICT",
            Self::ControlUnsupported => "OWNER_CONTROL_ERROR_CODE_CONTROL_UNSUPPORTED",
            Self::ControlEndpointRequired => "OWNER_CONTROL_ERROR_CODE_CONTROL_ENDPOINT_REQUIRED",
            Self::ControlUnavailable => "OWNER_CONTROL_ERROR_CODE_CONTROL_UNAVAILABLE",
            Self::UnknownCommand => "OWNER_CONTROL_ERROR_CODE_UNKNOWN_COMMAND",
            Self::LegacyJsonUnsupported => "OWNER_CONTROL_ERROR_CODE_LEGACY_JSON_UNSUPPORTED",
            Self::InvalidHandshake => "OWNER_CONTROL_ERROR_CODE_INVALID_HANDSHAKE",
            Self::TargetNodeMismatch => "OWNER_CONTROL_ERROR_CODE_TARGET_NODE_MISMATCH",
        }
    }
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OWNER_CONTROL_ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
            "OWNER_CONTROL_ERROR_CODE_BAD_REQUEST" => Some(Self::BadRequest),
            "OWNER_CONTROL_ERROR_CODE_UNAUTHORIZED" => Some(Self::Unauthorized),
            "OWNER_CONTROL_ERROR_CODE_REVISION_CONFLICT" => Some(Self::RevisionConflict),
            "OWNER_CONTROL_ERROR_CODE_CONTROL_UNSUPPORTED" => Some(Self::ControlUnsupported),
            "OWNER_CONTROL_ERROR_CODE_CONTROL_ENDPOINT_REQUIRED" => {
                Some(Self::ControlEndpointRequired)
            }
            "OWNER_CONTROL_ERROR_CODE_CONTROL_UNAVAILABLE" => Some(Self::ControlUnavailable),
            "OWNER_CONTROL_ERROR_CODE_UNKNOWN_COMMAND" => Some(Self::UnknownCommand),
            "OWNER_CONTROL_ERROR_CODE_LEGACY_JSON_UNSUPPORTED" => Some(Self::LegacyJsonUnsupported),
            "OWNER_CONTROL_ERROR_CODE_INVALID_HANDSHAKE" => Some(Self::InvalidHandshake),
            "OWNER_CONTROL_ERROR_CODE_TARGET_NODE_MISMATCH" => Some(Self::TargetNodeMismatch),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OwnerControlRefreshInventoryDisposition {
    Unspecified = 0,
    Executed = 1,
    Coalesced = 2,
}
impl OwnerControlRefreshInventoryDisposition {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "OWNER_CONTROL_REFRESH_INVENTORY_DISPOSITION_UNSPECIFIED",
            Self::Executed => "OWNER_CONTROL_REFRESH_INVENTORY_DISPOSITION_EXECUTED",
            Self::Coalesced => "OWNER_CONTROL_REFRESH_INVENTORY_DISPOSITION_COALESCED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OWNER_CONTROL_REFRESH_INVENTORY_DISPOSITION_UNSPECIFIED" => Some(Self::Unspecified),
            "OWNER_CONTROL_REFRESH_INVENTORY_DISPOSITION_EXECUTED" => Some(Self::Executed),
            "OWNER_CONTROL_REFRESH_INVENTORY_DISPOSITION_COALESCED" => Some(Self::Coalesced),
            _ => None,
        }
    }
}
/// Inference admission state for a peer (additive; older nodes ignore).
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InferenceAdmissionState {
    Unspecified = 0,
    Accepting = 1,
    AcceptingDeprioritized = 2,
    RemotePaused = 3,
    AllPaused = 4,
}
impl InferenceAdmissionState {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "INFERENCE_ADMISSION_STATE_UNSPECIFIED",
            Self::Accepting => "INFERENCE_ADMISSION_STATE_ACCEPTING",
            Self::AcceptingDeprioritized => "INFERENCE_ADMISSION_STATE_ACCEPTING_DEPRIORITIZED",
            Self::RemotePaused => "INFERENCE_ADMISSION_STATE_REMOTE_PAUSED",
            Self::AllPaused => "INFERENCE_ADMISSION_STATE_ALL_PAUSED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "INFERENCE_ADMISSION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "INFERENCE_ADMISSION_STATE_ACCEPTING" => Some(Self::Accepting),
            "INFERENCE_ADMISSION_STATE_ACCEPTING_DEPRIORITIZED" => {
                Some(Self::AcceptingDeprioritized)
            }
            "INFERENCE_ADMISSION_STATE_REMOTE_PAUSED" => Some(Self::RemotePaused),
            "INFERENCE_ADMISSION_STATE_ALL_PAUSED" => Some(Self::AllPaused),
            _ => None,
        }
    }
}