arcbox-protocol 0.6.3

Protocol definitions for ArcBox (ttrpc/protobuf)
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
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
// This file is @generated by prost-build.
/// Network configuration for a sandbox.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NetworkSpec {
    /// Network mode (UNSPECIFIED = daemon default).
    #[prost(enumeration = "NetworkMode", tag = "1")]
    pub mode: i32,
}
/// A single bind mount into the sandbox.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Mount {
    /// Source path on the host.
    #[prost(string, tag = "1")]
    pub source: ::prost::alloc::string::String,
    /// Target path inside the sandbox.
    #[prost(string, tag = "2")]
    pub target: ::prost::alloc::string::String,
    /// Mount read-only.
    #[prost(bool, tag = "3")]
    pub readonly: bool,
}
/// CPU and memory resource limits.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResourceLimits {
    /// Number of vCPUs (0 = daemon default).
    #[prost(uint32, tag = "1")]
    pub vcpus: u32,
    /// Memory in MiB (0 = daemon default).
    #[prost(uint64, tag = "2")]
    pub memory_mib: u64,
}
/// How a process terminated: a normal exit code or death by signal.
/// Exactly one is set once the execution has exited.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExitStatus {
    #[prost(oneof = "exit_status::Status", tags = "1, 2")]
    pub status: ::core::option::Option<exit_status::Status>,
}
/// Nested message and enum types in `ExitStatus`.
pub mod exit_status {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Status {
        /// The process exited normally with this code.
        #[prost(int32, tag = "1")]
        Code(i32),
        /// The process was killed by this POSIX signal.
        #[prost(int32, tag = "2")]
        Signal(i32),
    }
}
/// An empty frame keeping an otherwise idle stream alive through proxies and
/// load balancers.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KeepAlive {}
/// Request to create a sandbox.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSandboxRequest {
    /// Caller-supplied unique ID for durable retry idempotency.
    /// If empty the daemon generates a fresh UUID for every attempt.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Arbitrary key-value metadata (used for filtering in List / Events).
    #[prost(map = "string, string", tag = "2")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// --- Resources ---
    /// Unset = the template's default limits, if any, else daemon
    /// defaults. Set = replaces the template default wholesale: a zero
    /// subfield (vcpus, memory_mib) inside a set message means the DAEMON
    /// default for that resource — the template's value does not shine
    /// through per-field. Precision costs message presence, which the
    /// subfields (plain proto3 scalars) do not have.
    #[prost(message, optional, tag = "6")]
    pub limits: ::core::option::Option<ResourceLimits>,
    /// --- Initial workload (optional) ---
    /// Initial command launched automatically after boot.
    /// Empty = inherit the template's default cmd, if any; otherwise the
    /// sandbox enters READY without running anything. Non-empty =
    /// replaces the template default.
    /// When this process exits the sandbox transitions back to READY
    /// (NOT destroyed) and continues accepting executions.
    #[prost(string, repeated, tag = "8")]
    pub cmd: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Suppress the template's default cmd: enter READY without running
    /// anything even when the template defines one. proto3 repeated
    /// fields cannot express "explicitly empty", so this flag carries the
    /// presence `cmd` cannot. Rejected with INVALID_ARGUMENT alongside a
    /// non-empty `cmd`.
    #[prost(bool, tag = "20")]
    pub no_default_cmd: bool,
    /// Environment variables for the initial command, merged over the
    /// template's default env (per key, this request wins).
    #[prost(map = "string, string", tag = "9")]
    pub env:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Start the initial command from exactly `env`, discarding the
    /// template's default env instead of merging over it (the map
    /// counterpart of `no_default_cmd`; to unset a single default key,
    /// set this and supply the full desired map).
    #[prost(bool, tag = "21")]
    pub no_default_env: bool,
    /// Working directory for the initial command.
    #[prost(string, tag = "10")]
    pub working_dir: ::prost::alloc::string::String,
    /// User to run the initial command as.
    #[prost(string, tag = "11")]
    pub user: ::prost::alloc::string::String,
    /// --- Filesystem ---
    /// NOT supported in Sandbox V1: a non-empty list is rejected with
    /// FAILED_PRECONDITION. Copy files in with WriteFile / `sandbox cp`.
    #[prost(message, repeated, tag = "12")]
    pub mounts: ::prost::alloc::vec::Vec<Mount>,
    /// --- Network ---
    #[prost(message, optional, tag = "13")]
    pub network: ::core::option::Option<NetworkSpec>,
    /// --- Lifecycle ---
    /// Two independent lifecycle knobs exist; never conflate them:
    /// `ttl_seconds` is the hard maximum lifetime, `idle_timeout_seconds`
    /// reacts to inactivity.
    ///
    /// Hard maximum lifetime in seconds (0 = no limit). On expiry the
    /// sandbox is always destroyed — pausing does not apply. The deadline
    /// starts at creation and is not reset by workload activity;
    /// SetLifecycle replaces it with a fresh deadline from now (CORE-60).
    #[prost(uint32, tag = "14")]
    pub ttl_seconds: u32,
    /// --- Provisioning ---
    /// NOT supported in Sandbox V1: a set value is rejected with
    /// FAILED_PRECONDITION. Use executions for interactive access.
    #[prost(string, optional, tag = "15")]
    pub ssh_public_key: ::core::option::Option<::prost::alloc::string::String>,
    /// Reference to what boots inside the sandbox:
    ///    ""               — the built-in minimal template (busybox + init)
    ///    "docker:<ref>"   — a local Docker image reference, resolved and
    ///                       converted inside the VM
    ///    "name\[:version\]" — a template from the catalog (`template.proto`,
    ///                       CORE-21); a bare name resolves to the newest
    ///                       published version. Template defaults apply
    ///                       per the override rules on the fields above.
    /// Cloud mode resolves names against the tenant's template registry.
    /// Anything else is rejected with INVALID_ARGUMENT.
    #[prost(string, tag = "17")]
    pub template: ::prost::alloc::string::String,
    /// Apply `on_idle` after this many seconds without a running
    /// execution (0 = no idle detection). Re-armed every time the
    /// workload goes idle; distinct from `ttl_seconds`, which caps total
    /// lifetime regardless of activity (CORE-21).
    #[prost(uint32, tag = "18")]
    pub idle_timeout_seconds: u32,
    /// What to do when the idle timeout expires (UNSPECIFIED = the
    /// daemon default, currently KILL).
    #[prost(enumeration = "IdleAction", tag = "19")]
    pub on_idle: i32,
}
/// Response to CreateSandbox.
/// Returned immediately; the sandbox may still be booting (state STARTING).
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateSandboxResponse {
    /// Assigned or caller-supplied sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// IP address pre-allocated for the sandbox (empty when network mode is
    /// NONE). Available even while state is STARTING.
    #[prost(string, tag = "2")]
    pub ip_address: ::prost::alloc::string::String,
    /// State at time of response: always STARTING.
    #[prost(enumeration = "SandboxState", tag = "3")]
    pub state: i32,
}
/// Request to stop a sandbox gracefully.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StopSandboxRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Seconds to wait for any active execution to exit before force-killing
    /// the VM (0 = daemon default of 30 s).
    #[prost(uint32, tag = "2")]
    pub timeout_seconds: u32,
}
/// Request to forcibly remove a sandbox.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoveSandboxRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Force removal even if the sandbox is in RUNNING state.
    #[prost(bool, tag = "2")]
    pub force: bool,
}
/// Request to pause a sandbox.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PauseSandboxRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
}
/// Request to resume a paused sandbox.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResumeSandboxRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
}
/// Request to replace a sandbox's lifecycle deadlines. Absent fields are
/// left unchanged, so each knob can be adjusted independently.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetLifecycleRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Replace the hard maximum lifetime: expire this many seconds from
    /// now (0 = remove the limit).
    #[prost(uint32, optional, tag = "2")]
    pub ttl_seconds: ::core::option::Option<u32>,
    /// Replace the idle timeout (0 = disable idle detection).
    #[prost(uint32, optional, tag = "3")]
    pub idle_timeout_seconds: ::core::option::Option<u32>,
    /// Replace the idle policy (absent = leave unchanged; UNSPECIFIED =
    /// restore the daemon default).
    #[prost(enumeration = "IdleAction", optional, tag = "4")]
    pub on_idle: ::core::option::Option<i32>,
}
/// Request for the daemon's sandbox capabilities.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetCapabilitiesRequest {}
/// What this daemon can do. SDKs fetch it lazily once per process and
/// fail fast with an actionable error instead of probing per call.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetCapabilitiesResponse {
    /// Daemon version string (informational).
    #[prost(string, tag = "1")]
    pub daemon_version: ::prost::alloc::string::String,
    /// Sandbox API protocol level. SDKs compare it against their floor
    /// and raise a mismatch error with an upgrade suggestion
    /// (PROTOCOL_MISMATCH in `errors.proto`) instead of sprinkling
    /// version checks at call sites.
    #[prost(uint32, tag = "2")]
    pub protocol: u32,
    /// Named feature flags for capabilities that postdate `protocol`.
    #[prost(string, repeated, tag = "3")]
    pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Whether this host can run sandboxes at all (CORE-13).
    #[prost(message, optional, tag = "4")]
    pub nested_virt: ::core::option::Option<NestedVirtCapability>,
}
/// Nested-virtualization support on this host.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NestedVirtCapability {
    /// True when sandboxes can run (M3+ hardware, VZ backend).
    #[prost(bool, tag = "1")]
    pub supported: bool,
    /// Why not, when unsupported — the daemon's authoritative reason
    /// (chip generation vs backend), surfaced verbatim in
    /// NESTED_VIRT_UNSUPPORTED errors.
    #[prost(string, tag = "2")]
    pub reason: ::prost::alloc::string::String,
}
/// Request to inspect a sandbox.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InspectSandboxRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
}
/// Full sandbox state. See SandboxState for the state machine.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SandboxInfo {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Lifecycle state.
    #[prost(enumeration = "SandboxState", tag = "2")]
    pub state: i32,
    /// User-supplied labels.
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Effective resource limits.
    #[prost(message, optional, tag = "4")]
    pub limits: ::core::option::Option<ResourceLimits>,
    /// Network information.
    #[prost(message, optional, tag = "5")]
    pub network: ::core::option::Option<SandboxNetwork>,
    /// Creation time.
    #[prost(message, optional, tag = "6")]
    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// When the sandbox first became READY (unset if not yet).
    #[prost(message, optional, tag = "7")]
    pub ready_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// When the last execution exited (unset if none has run).
    #[prost(message, optional, tag = "8")]
    pub last_exited_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// How the last execution terminated (unset if none has run, or when the
    /// last execution ended without an observed exit).
    #[prost(message, optional, tag = "9")]
    pub last_exit_status: ::core::option::Option<ExitStatus>,
    /// Human-readable error message (only set when state == FAILED).
    #[prost(string, tag = "10")]
    pub error: ::prost::alloc::string::String,
    /// Template reference the sandbox was created from (as passed to
    /// Create; empty = the built-in minimal template).
    #[prost(string, tag = "11")]
    pub template: ::prost::alloc::string::String,
    /// When the hard maximum lifetime fires (unset = no limit). Replaced
    /// by SetLifecycle.
    #[prost(message, optional, tag = "12")]
    pub ttl_deadline: ::core::option::Option<::pbjson_types::Timestamp>,
    /// Idle timeout in seconds (0 = no idle detection).
    #[prost(uint32, tag = "13")]
    pub idle_timeout_seconds: u32,
    /// Action applied when the idle timeout expires.
    #[prost(enumeration = "IdleAction", tag = "14")]
    pub on_idle: i32,
    /// When the sandbox reached PAUSED (unset unless paused).
    #[prost(message, optional, tag = "15")]
    pub paused_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// When the sandbox reached FAILED (unset otherwise; `error` carries
    /// the reason).
    #[prost(message, optional, tag = "16")]
    pub failed_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// On-disk footprint of the sandbox's retained state (checkpoint +
    /// disk overlay). Paused sandboxes keep paying this until removed.
    #[prost(uint64, tag = "17")]
    pub storage_bytes: u64,
}
/// Network details of a sandbox.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SandboxNetwork {
    /// Assigned IP address.
    #[prost(string, tag = "1")]
    pub ip_address: ::prost::alloc::string::String,
    /// Gateway address.
    #[prost(string, tag = "2")]
    pub gateway: ::prost::alloc::string::String,
}
/// Request to list sandboxes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSandboxesRequest {
    /// Filter by state (UNSPECIFIED = all states).
    #[prost(enumeration = "SandboxState", tag = "1")]
    pub state: i32,
    /// Filter by labels (all key-value pairs must match).
    #[prost(map = "string, string", tag = "2")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Maximum entries per page (0 = server default of 100; capped at 1000).
    #[prost(uint32, tag = "3")]
    pub page_size: u32,
    /// Continuation token from a previous response (empty = first page).
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response to ListSandboxes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSandboxesResponse {
    #[prost(message, repeated, tag = "1")]
    pub sandboxes: ::prost::alloc::vec::Vec<SandboxSummary>,
    /// Token for the next page; empty when this is the last page.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Lightweight sandbox summary for List.
///
/// Carries the state timestamps and retention cost so a listing shows
/// lifecycle truth without an Inspect per row.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SandboxSummary {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Lifecycle state.
    #[prost(enumeration = "SandboxState", tag = "2")]
    pub state: i32,
    /// Labels.
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// IP address.
    #[prost(string, tag = "4")]
    pub ip_address: ::prost::alloc::string::String,
    /// Creation time.
    #[prost(message, optional, tag = "5")]
    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// When the sandbox first became READY (unset if not yet).
    #[prost(message, optional, tag = "6")]
    pub ready_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// When the sandbox reached PAUSED (unset unless paused).
    #[prost(message, optional, tag = "7")]
    pub paused_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// When the sandbox reached FAILED (unset otherwise).
    #[prost(message, optional, tag = "8")]
    pub failed_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// On-disk footprint of retained state; nonzero for paused sandboxes.
    #[prost(uint64, tag = "9")]
    pub storage_bytes: u64,
}
/// Request to subscribe to sandbox lifecycle events.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SandboxEventsRequest {
    /// Filter by sandbox ID (empty = all sandboxes).
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Filter by event kind (UNSPECIFIED = all kinds).
    #[prost(enumeration = "SandboxEventKind", tag = "2")]
    pub kind: i32,
}
/// One frame of an Events stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchEventsResponse {
    #[prost(oneof = "watch_events_response::Payload", tags = "1, 2")]
    pub payload: ::core::option::Option<watch_events_response::Payload>,
}
/// Nested message and enum types in `WatchEventsResponse`.
pub mod watch_events_response {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Payload {
        /// A lifecycle event.
        #[prost(message, tag = "1")]
        Event(super::SandboxEvent),
        /// Idle-stream keepalive; carries no data.
        #[prost(message, tag = "2")]
        KeepAlive(super::KeepAlive),
    }
}
/// A sandbox lifecycle event.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SandboxEvent {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// What happened; see SandboxEventKind for per-kind attributes.
    #[prost(enumeration = "SandboxEventKind", tag = "2")]
    pub kind: i32,
    /// When it happened.
    #[prost(message, optional, tag = "3")]
    pub time: ::core::option::Option<::pbjson_types::Timestamp>,
    /// Additional context (e.g. "exit_code" / "signal" on IDLE,
    /// "error" on FAILED).
    #[prost(map = "string, string", tag = "4")]
    pub attributes:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Request to expose a sandbox port on the host.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExposePortRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Port the workload listens on inside the sandbox.
    #[prost(uint32, tag = "2")]
    pub sandbox_port: u32,
    /// Host port to bind (0 = reuse the allocated guest relay port).
    #[prost(uint32, tag = "3")]
    pub host_port: u32,
    /// Transport protocol (UNSPECIFIED = TCP).
    #[prost(enumeration = "PortProtocol", tag = "4")]
    pub protocol: i32,
}
/// Response to ExposePort.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExposePortResponse {
    /// Host port the service is reachable on (via loopback).
    #[prost(uint32, tag = "1")]
    pub host_port: u32,
    /// Reserved-range guest port carrying the DNAT relay.
    #[prost(uint32, tag = "2")]
    pub guest_port: u32,
}
/// Request to remove an exposed port mapping.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnexposePortRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// The sandbox port previously passed to ExposePort.
    #[prost(uint32, tag = "2")]
    pub sandbox_port: u32,
    /// Transport protocol (UNSPECIFIED = TCP).
    #[prost(enumeration = "PortProtocol", tag = "3")]
    pub protocol: i32,
}
/// Lifecycle state of a sandbox.
///
/// State machine:
///
///    STARTING ──► READY ──► RUNNING ──► READY  (execution exited, sandbox alive)
///                   │          │
///                   ├──────────┴──► STOPPING ──► STOPPED
///                   │          │
///                   ├──────────┴──► PAUSING ──► PAUSED ──(Resume)──► STARTING  (same ID)
///                   │          │
///                   └──────────┴──► FAILED  (error reason set)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SandboxState {
    Unspecified = 0,
    /// Firecracker process spawned; VM still booting.
    Starting = 1,
    /// VM booted and accepting executions (or the last execution exited).
    Ready = 2,
    /// An execution is currently running inside the VM.
    Running = 3,
    /// Stop called; draining the workload and shutting down the VM.
    Stopping = 4,
    /// VM has shut down cleanly.
    Stopped = 5,
    /// Unrecoverable error occurred.
    Failed = 6,
    /// Pause in progress: checkpointing state, then releasing the VM.
    Pausing = 7,
    /// Checkpointed to disk; runtime resources released. The record and
    /// snapshot survive under the same ID until Resume or Remove.
    Paused = 8,
}
impl SandboxState {
    /// 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 => "SANDBOX_STATE_UNSPECIFIED",
            Self::Starting => "SANDBOX_STATE_STARTING",
            Self::Ready => "SANDBOX_STATE_READY",
            Self::Running => "SANDBOX_STATE_RUNNING",
            Self::Stopping => "SANDBOX_STATE_STOPPING",
            Self::Stopped => "SANDBOX_STATE_STOPPED",
            Self::Failed => "SANDBOX_STATE_FAILED",
            Self::Pausing => "SANDBOX_STATE_PAUSING",
            Self::Paused => "SANDBOX_STATE_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 {
            "SANDBOX_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "SANDBOX_STATE_STARTING" => Some(Self::Starting),
            "SANDBOX_STATE_READY" => Some(Self::Ready),
            "SANDBOX_STATE_RUNNING" => Some(Self::Running),
            "SANDBOX_STATE_STOPPING" => Some(Self::Stopping),
            "SANDBOX_STATE_STOPPED" => Some(Self::Stopped),
            "SANDBOX_STATE_FAILED" => Some(Self::Failed),
            "SANDBOX_STATE_PAUSING" => Some(Self::Pausing),
            "SANDBOX_STATE_PAUSED" => Some(Self::Paused),
            _ => None,
        }
    }
}
/// Kind of a sandbox lifecycle event.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SandboxEventKind {
    Unspecified = 0,
    /// Sandbox record created, VM booting.
    Created = 1,
    /// VM booted, sandbox accepting executions.
    Ready = 2,
    /// An execution started.
    Running = 3,
    /// The active execution exited; sandbox back to READY. Attributes carry
    /// "exit_code" (shell convention) and "signal" when killed by one, or
    /// "error" when the session broke before an exit was observed.
    Idle = 4,
    /// Stop called, draining the workload.
    Stopping = 5,
    /// VM shut down.
    Stopped = 6,
    /// Unrecoverable error; attributes carry "error".
    Failed = 7,
    /// Sandbox deleted.
    Removed = 8,
    /// Pause started — whether client-driven (Pause) or automated (idle
    /// timeout with a PAUSE policy); automation must be visible, so the
    /// idle detector emits the same events. Attributes carry "reason"
    /// ("pause" or "idle_timeout").
    Pausing = 9,
    /// Checkpoint complete; runtime resources released.
    Paused = 10,
    /// Resume completed — explicit or transparent (a data-plane call to a
    /// paused sandbox); sandbox READY again under the same ID. Attributes
    /// carry "reason" ("resume" or "auto_resume").
    Resumed = 11,
}
impl SandboxEventKind {
    /// 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 => "SANDBOX_EVENT_KIND_UNSPECIFIED",
            Self::Created => "SANDBOX_EVENT_KIND_CREATED",
            Self::Ready => "SANDBOX_EVENT_KIND_READY",
            Self::Running => "SANDBOX_EVENT_KIND_RUNNING",
            Self::Idle => "SANDBOX_EVENT_KIND_IDLE",
            Self::Stopping => "SANDBOX_EVENT_KIND_STOPPING",
            Self::Stopped => "SANDBOX_EVENT_KIND_STOPPED",
            Self::Failed => "SANDBOX_EVENT_KIND_FAILED",
            Self::Removed => "SANDBOX_EVENT_KIND_REMOVED",
            Self::Pausing => "SANDBOX_EVENT_KIND_PAUSING",
            Self::Paused => "SANDBOX_EVENT_KIND_PAUSED",
            Self::Resumed => "SANDBOX_EVENT_KIND_RESUMED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SANDBOX_EVENT_KIND_UNSPECIFIED" => Some(Self::Unspecified),
            "SANDBOX_EVENT_KIND_CREATED" => Some(Self::Created),
            "SANDBOX_EVENT_KIND_READY" => Some(Self::Ready),
            "SANDBOX_EVENT_KIND_RUNNING" => Some(Self::Running),
            "SANDBOX_EVENT_KIND_IDLE" => Some(Self::Idle),
            "SANDBOX_EVENT_KIND_STOPPING" => Some(Self::Stopping),
            "SANDBOX_EVENT_KIND_STOPPED" => Some(Self::Stopped),
            "SANDBOX_EVENT_KIND_FAILED" => Some(Self::Failed),
            "SANDBOX_EVENT_KIND_REMOVED" => Some(Self::Removed),
            "SANDBOX_EVENT_KIND_PAUSING" => Some(Self::Pausing),
            "SANDBOX_EVENT_KIND_PAUSED" => Some(Self::Paused),
            "SANDBOX_EVENT_KIND_RESUMED" => Some(Self::Resumed),
            _ => None,
        }
    }
}
/// What the daemon does when a sandbox's idle timeout expires.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IdleAction {
    /// Daemon default (currently KILL; auto-pause is opt-in).
    Unspecified = 0,
    /// Destroy the sandbox and release all resources (Remove semantics).
    Kill = 1,
    /// Pause: checkpoint to disk under the same ID and release the VM.
    /// Trades RAM for disk — the sandbox reports `storage_bytes` until
    /// resumed or removed.
    Pause = 2,
}
impl IdleAction {
    /// 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 => "IDLE_ACTION_UNSPECIFIED",
            Self::Kill => "IDLE_ACTION_KILL",
            Self::Pause => "IDLE_ACTION_PAUSE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "IDLE_ACTION_UNSPECIFIED" => Some(Self::Unspecified),
            "IDLE_ACTION_KILL" => Some(Self::Kill),
            "IDLE_ACTION_PAUSE" => Some(Self::Pause),
            _ => None,
        }
    }
}
/// Sandbox network mode.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NetworkMode {
    /// Daemon default (currently ENABLED).
    Unspecified = 0,
    /// Networked sandbox with an IP from the sandbox pool.
    Enabled = 1,
    /// No network device.
    None = 2,
}
impl NetworkMode {
    /// 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 => "NETWORK_MODE_UNSPECIFIED",
            Self::Enabled => "NETWORK_MODE_ENABLED",
            Self::None => "NETWORK_MODE_NONE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NETWORK_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "NETWORK_MODE_ENABLED" => Some(Self::Enabled),
            "NETWORK_MODE_NONE" => Some(Self::None),
            _ => None,
        }
    }
}
/// Transport protocol of an exposed port.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PortProtocol {
    /// Defaults to TCP.
    Unspecified = 0,
    Tcp = 1,
    Udp = 2,
}
impl PortProtocol {
    /// 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 => "PORT_PROTOCOL_UNSPECIFIED",
            Self::Tcp => "PORT_PROTOCOL_TCP",
            Self::Udp => "PORT_PROTOCOL_UDP",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PORT_PROTOCOL_UNSPECIFIED" => Some(Self::Unspecified),
            "PORT_PROTOCOL_TCP" => Some(Self::Tcp),
            "PORT_PROTOCOL_UDP" => Some(Self::Udp),
            _ => None,
        }
    }
}
/// Terminal size for TTY executions.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TerminalSize {
    /// Terminal width in columns.
    #[prost(uint32, tag = "1")]
    pub width: u32,
    /// Terminal height in rows.
    #[prost(uint32, tag = "2")]
    pub height: u32,
}
/// The state of an execution — the resource all execution RPCs address.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Execution {
    /// Execution ID, unique within its sandbox.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Owning sandbox.
    #[prost(string, tag = "2")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Current state.
    #[prost(enumeration = "ExecutionState", tag = "3")]
    pub state: i32,
    /// Whether the process runs on a pseudo-TTY.
    #[prost(bool, tag = "4")]
    pub tty: bool,
    /// When the process was dispatched.
    #[prost(message, optional, tag = "5")]
    pub started_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// When the process terminated (unset while running).
    #[prost(message, optional, tag = "6")]
    pub exited_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// How the process terminated. Unset while running, and also when the
    /// execution ended without an observed exit (see `error`).
    #[prost(message, optional, tag = "7")]
    pub exit_status: ::core::option::Option<ExitStatus>,
    /// Set when the execution ended without an observed exit (e.g. the
    /// sandbox stopped or the in-guest session broke).
    #[prost(string, tag = "8")]
    pub error: ::prost::alloc::string::String,
    /// Total bytes produced on stdout/PTY so far (monotonic; the high-water
    /// offset for AttachExecution resume).
    #[prost(uint64, tag = "9")]
    pub stdout_len: u64,
    /// Total bytes produced on stderr so far.
    #[prost(uint64, tag = "10")]
    pub stderr_len: u64,
    /// Stdin acceptance state.
    #[prost(message, optional, tag = "11")]
    pub stdin: ::core::option::Option<StdinStatus>,
}
/// Request to start an execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartExecutionRequest {
    /// Target sandbox. Must be READY.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Caller-supplied execution ID (unique within the sandbox) making the
    /// start idempotent across retries. Empty = server generates a UUID.
    #[prost(string, tag = "2")]
    pub execution_id: ::prost::alloc::string::String,
    /// Command and arguments.
    #[prost(string, repeated, tag = "3")]
    pub cmd: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Environment variable overrides.
    #[prost(map = "string, string", tag = "4")]
    pub env:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Working directory (empty = rootfs default).
    #[prost(string, tag = "5")]
    pub working_dir: ::prost::alloc::string::String,
    /// User to run as (empty = rootfs default).
    #[prost(string, tag = "6")]
    pub user: ::prost::alloc::string::String,
    /// Allocate a pseudo-TTY. Output then arrives on the PTY channel and
    /// stdin cannot be closed via `eof` (send Ctrl-D instead).
    #[prost(bool, tag = "7")]
    pub tty: bool,
    /// Initial terminal size (only meaningful when tty == true).
    #[prost(message, optional, tag = "8")]
    pub tty_size: ::core::option::Option<TerminalSize>,
    /// Kill the process after this many seconds (0 = no timeout).
    #[prost(uint32, tag = "9")]
    pub timeout_seconds: u32,
    /// Keep stdin open for WriteStdin. When false the process starts with
    /// stdin already at EOF (run semantics).
    #[prost(bool, tag = "10")]
    pub stdin: bool,
}
/// Request to attach to an execution's output.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AttachExecutionRequest {
    /// Owning sandbox.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Execution to attach to.
    #[prost(string, tag = "2")]
    pub execution_id: ::prost::alloc::string::String,
    /// Resume offset for the stdout/PTY channel (0 = from the beginning of
    /// the retained buffer).
    #[prost(uint64, tag = "3")]
    pub stdout_offset: u64,
    /// Resume offset for the stderr channel.
    #[prost(uint64, tag = "4")]
    pub stderr_offset: u64,
}
/// One frame of an AttachExecution stream.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionEvent {
    #[prost(oneof = "execution_event::Event", tags = "1, 2, 3, 4")]
    pub event: ::core::option::Option<execution_event::Event>,
}
/// Nested message and enum types in `ExecutionEvent`.
pub mod execution_event {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Event {
        /// First frame of every attach: the execution's current state.
        #[prost(message, tag = "1")]
        Started(super::ExecutionStarted),
        /// A chunk of process output.
        #[prost(message, tag = "2")]
        Output(super::ExecutionOutput),
        /// Final frame: the execution terminated.
        #[prost(message, tag = "3")]
        Exited(super::ExecutionExited),
        /// Idle-stream keepalive; carries no data.
        #[prost(message, tag = "4")]
        KeepAlive(super::KeepAlive),
    }
}
/// Attach preamble carrying the execution's state at attach time.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionStarted {
    #[prost(message, optional, tag = "1")]
    pub execution: ::core::option::Option<Execution>,
}
/// An offset-addressed chunk of execution output.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionOutput {
    /// Source channel (PTY for tty executions, STDOUT/STDERR otherwise).
    #[prost(enumeration = "StdioChannel", tag = "1")]
    pub channel: i32,
    /// Absolute offset of data\[0\] within the channel's byte stream. May be
    /// greater than the requested resume offset when retention already
    /// dropped older bytes — the jump is the client's signal of a gap.
    #[prost(uint64, tag = "2")]
    pub offset: u64,
    /// Raw output bytes.
    #[prost(bytes = "vec", tag = "3")]
    pub data: ::prost::alloc::vec::Vec<u8>,
}
/// Final frame of an attach stream: the execution's terminal state,
/// including exit_status / error and the final channel lengths.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionExited {
    #[prost(message, optional, tag = "1")]
    pub execution: ::core::option::Option<Execution>,
}
/// Request to write stdin bytes at an absolute offset.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WriteStdinRequest {
    /// Owning sandbox.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Target execution.
    #[prost(string, tag = "2")]
    pub execution_id: ::prost::alloc::string::String,
    /// Absolute offset of data\[0\] within the stdin byte stream. Bytes below
    /// the server's accepted count are deduplicated (idempotent retry); an
    /// offset above it fails with OUT_OF_RANGE.
    #[prost(uint64, tag = "3")]
    pub offset: u64,
    /// Bytes to feed to the process's stdin.
    #[prost(bytes = "vec", tag = "4")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Close stdin after this write. Rejected for TTY executions — send
    /// Ctrl-D (0x04) as data instead.
    #[prost(bool, tag = "5")]
    pub eof: bool,
}
/// Stdin acceptance state.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StdinStatus {
    /// Bytes accepted and forwarded so far — the offset the next
    /// WriteStdin must start at.
    #[prost(uint64, tag = "1")]
    pub bytes_written: u64,
    /// Whether stdin has been closed.
    #[prost(bool, tag = "2")]
    pub closed: bool,
}
/// Request for the current stdin acceptance state.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetStdinStatusRequest {
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub execution_id: ::prost::alloc::string::String,
}
/// Request to signal a running execution.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SignalExecutionRequest {
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub execution_id: ::prost::alloc::string::String,
    /// Signal to deliver to the process group.
    #[prost(enumeration = "Signal", tag = "3")]
    pub signal: i32,
}
/// Request to resize a TTY execution's terminal.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResizeExecutionTtyRequest {
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub execution_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub size: ::core::option::Option<TerminalSize>,
}
/// Request to wait for an execution to exit.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WaitExecutionRequest {
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub execution_id: ::prost::alloc::string::String,
    /// Give up after this many seconds and return the current state
    /// (0 = return immediately — a poll).
    #[prost(uint32, tag = "3")]
    pub timeout_seconds: u32,
}
/// Request to list a sandbox's executions.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListExecutionsRequest {
    /// Sandbox whose executions to list.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
}
/// Response to ListExecutions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutionsResponse {
    /// Every retained execution, running and exited.
    #[prost(message, repeated, tag = "1")]
    pub executions: ::prost::alloc::vec::Vec<Execution>,
}
/// Request to wait for a listening TCP port inside a sandbox.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WaitForPortRequest {
    /// Sandbox to watch.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// TCP port a workload is expected to listen on.
    #[prost(uint32, tag = "2")]
    pub port: u32,
    /// Give up after this many seconds with DEADLINE_EXCEEDED
    /// (0 = daemon default of 30 s).
    #[prost(uint32, tag = "3")]
    pub timeout_seconds: u32,
}
/// Lifecycle state of an execution.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecutionState {
    Unspecified = 0,
    Running = 1,
    Exited = 2,
}
impl ExecutionState {
    /// 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 => "EXECUTION_STATE_UNSPECIFIED",
            Self::Running => "EXECUTION_STATE_RUNNING",
            Self::Exited => "EXECUTION_STATE_EXITED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXECUTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "EXECUTION_STATE_RUNNING" => Some(Self::Running),
            "EXECUTION_STATE_EXITED" => Some(Self::Exited),
            _ => None,
        }
    }
}
/// Stdio channel of an execution output chunk. Offsets are tracked per
/// channel. A TTY execution produces one merged stream on PTY (stdout and
/// stderr are indistinguishable once a terminal is allocated); non-TTY
/// executions produce STDOUT and STDERR.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StdioChannel {
    Unspecified = 0,
    Stdout = 1,
    Stderr = 2,
    Pty = 3,
}
impl StdioChannel {
    /// 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 => "STDIO_CHANNEL_UNSPECIFIED",
            Self::Stdout => "STDIO_CHANNEL_STDOUT",
            Self::Stderr => "STDIO_CHANNEL_STDERR",
            Self::Pty => "STDIO_CHANNEL_PTY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STDIO_CHANNEL_UNSPECIFIED" => Some(Self::Unspecified),
            "STDIO_CHANNEL_STDOUT" => Some(Self::Stdout),
            "STDIO_CHANNEL_STDERR" => Some(Self::Stderr),
            "STDIO_CHANNEL_PTY" => Some(Self::Pty),
            _ => None,
        }
    }
}
/// Deliverable POSIX signals. Values match the POSIX signal numbers.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Signal {
    Unspecified = 0,
    Sighup = 1,
    Sigint = 2,
    Sigquit = 3,
    Sigkill = 9,
    Sigusr1 = 10,
    Sigusr2 = 12,
    Sigterm = 15,
}
impl Signal {
    /// 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 => "SIGNAL_UNSPECIFIED",
            Self::Sighup => "SIGNAL_SIGHUP",
            Self::Sigint => "SIGNAL_SIGINT",
            Self::Sigquit => "SIGNAL_SIGQUIT",
            Self::Sigkill => "SIGNAL_SIGKILL",
            Self::Sigusr1 => "SIGNAL_SIGUSR1",
            Self::Sigusr2 => "SIGNAL_SIGUSR2",
            Self::Sigterm => "SIGNAL_SIGTERM",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SIGNAL_UNSPECIFIED" => Some(Self::Unspecified),
            "SIGNAL_SIGHUP" => Some(Self::Sighup),
            "SIGNAL_SIGINT" => Some(Self::Sigint),
            "SIGNAL_SIGQUIT" => Some(Self::Sigquit),
            "SIGNAL_SIGKILL" => Some(Self::Sigkill),
            "SIGNAL_SIGUSR1" => Some(Self::Sigusr1),
            "SIGNAL_SIGUSR2" => Some(Self::Sigusr2),
            "SIGNAL_SIGTERM" => Some(Self::Sigterm),
            _ => None,
        }
    }
}
/// Request to read a file from a sandbox.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadFileRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Absolute path inside the sandbox rootfs.
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
/// One chunk of file data in a ReadFile / WriteFile stream.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FileChunk {
    /// Raw bytes (may be empty on the final chunk, or on a keepalive).
    #[prost(bytes = "vec", tag = "1")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// True on the last chunk of the stream.
    #[prost(bool, tag = "2")]
    pub done: bool,
}
/// Opens a WriteFile stream. Must be the first WriteFileRequest message.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WriteFileOpen {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Absolute destination path inside the sandbox rootfs.
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
    /// Unix permission bits for the created file (0 = 0644).
    #[prost(uint32, tag = "3")]
    pub mode: u32,
}
/// A single client message in a WriteFile stream.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WriteFileRequest {
    #[prost(oneof = "write_file_request::Payload", tags = "1, 2")]
    pub payload: ::core::option::Option<write_file_request::Payload>,
}
/// Nested message and enum types in `WriteFileRequest`.
pub mod write_file_request {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Payload {
        /// Stream header — sandbox, path, and mode.
        #[prost(message, tag = "1")]
        Open(super::WriteFileOpen),
        /// File content chunk; the last one has done == true.
        #[prost(message, tag = "2")]
        Chunk(super::FileChunk),
    }
}
/// Metadata of one filesystem entry.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FileStat {
    /// Base name of the entry (the final path component).
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Kind of entry (symlinks are reported as SYMLINK, not followed).
    #[prost(enumeration = "FileKind", tag = "2")]
    pub kind: i32,
    /// Size in bytes (regular files; 0 otherwise).
    #[prost(uint64, tag = "3")]
    pub size: u64,
    /// Unix permission bits (the low 12 bits of st_mode).
    #[prost(uint32, tag = "4")]
    pub mode: u32,
    /// Last modification time.
    #[prost(message, optional, tag = "5")]
    pub modified_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// Owning user ID.
    #[prost(uint32, tag = "6")]
    pub uid: u32,
    /// Owning group ID.
    #[prost(uint32, tag = "7")]
    pub gid: u32,
    /// Symlink target (set only when kind == SYMLINK).
    #[prost(string, tag = "8")]
    pub symlink_target: ::prost::alloc::string::String,
}
/// Request to stat a path.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StatFileRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Absolute path inside the sandbox rootfs.
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
/// Request to list a directory.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListDirRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Absolute directory path inside the sandbox rootfs.
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
/// Response to ListDir.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDirResponse {
    /// Directory entries, each with full metadata.
    #[prost(message, repeated, tag = "1")]
    pub entries: ::prost::alloc::vec::Vec<FileStat>,
}
/// Request to create a directory.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MakeDirRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Absolute directory path to create (missing parents are created).
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
    /// Unix permission bits for created directories (0 = 0755).
    #[prost(uint32, tag = "3")]
    pub mode: u32,
}
/// Request to remove a filesystem entry.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoveEntryRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Absolute path to remove.
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
    /// Remove directories and their contents recursively. Without it a
    /// non-empty directory fails with FAILED_PRECONDITION.
    #[prost(bool, tag = "3")]
    pub recursive: bool,
}
/// Request to rename / move a filesystem entry.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MoveEntryRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Absolute source path.
    #[prost(string, tag = "2")]
    pub from_path: ::prost::alloc::string::String,
    /// Absolute destination path.
    #[prost(string, tag = "3")]
    pub to_path: ::prost::alloc::string::String,
}
/// Request to watch a path for filesystem events.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WatchDirRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Absolute path to watch (a directory).
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
    /// Also watch subdirectories.
    #[prost(bool, tag = "3")]
    pub recursive: bool,
}
/// One filesystem event.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FsEvent {
    /// What happened.
    #[prost(enumeration = "FsEventKind", tag = "1")]
    pub kind: i32,
    /// Absolute path of the affected entry (the old path for RENAMED).
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
    /// New absolute path (set only for RENAMED).
    #[prost(string, tag = "3")]
    pub renamed_to: ::prost::alloc::string::String,
}
/// One frame of a WatchDir stream.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WatchDirResponse {
    #[prost(oneof = "watch_dir_response::Payload", tags = "1, 2")]
    pub payload: ::core::option::Option<watch_dir_response::Payload>,
}
/// Nested message and enum types in `WatchDirResponse`.
pub mod watch_dir_response {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Payload {
        /// A filesystem event.
        #[prost(message, tag = "1")]
        Event(super::FsEvent),
        /// Idle-stream keepalive; carries no data.
        #[prost(message, tag = "2")]
        KeepAlive(super::KeepAlive),
    }
}
/// What kind of filesystem object a path is.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FileKind {
    Unspecified = 0,
    /// Regular file.
    File = 1,
    Directory = 2,
    Symlink = 3,
    /// Device node, FIFO, or socket.
    Other = 4,
}
impl FileKind {
    /// 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 => "FILE_KIND_UNSPECIFIED",
            Self::File => "FILE_KIND_FILE",
            Self::Directory => "FILE_KIND_DIRECTORY",
            Self::Symlink => "FILE_KIND_SYMLINK",
            Self::Other => "FILE_KIND_OTHER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FILE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
            "FILE_KIND_FILE" => Some(Self::File),
            "FILE_KIND_DIRECTORY" => Some(Self::Directory),
            "FILE_KIND_SYMLINK" => Some(Self::Symlink),
            "FILE_KIND_OTHER" => Some(Self::Other),
            _ => None,
        }
    }
}
/// Kind of a filesystem event.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FsEventKind {
    Unspecified = 0,
    /// An entry was created.
    Created = 1,
    /// An entry's content or metadata changed.
    Modified = 2,
    /// An entry was removed.
    Removed = 3,
    /// An entry was renamed within the watched tree.
    Renamed = 4,
}
impl FsEventKind {
    /// 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 => "FS_EVENT_KIND_UNSPECIFIED",
            Self::Created => "FS_EVENT_KIND_CREATED",
            Self::Modified => "FS_EVENT_KIND_MODIFIED",
            Self::Removed => "FS_EVENT_KIND_REMOVED",
            Self::Renamed => "FS_EVENT_KIND_RENAMED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FS_EVENT_KIND_UNSPECIFIED" => Some(Self::Unspecified),
            "FS_EVENT_KIND_CREATED" => Some(Self::Created),
            "FS_EVENT_KIND_MODIFIED" => Some(Self::Modified),
            "FS_EVENT_KIND_REMOVED" => Some(Self::Removed),
            "FS_EVENT_KIND_RENAMED" => Some(Self::Renamed),
            _ => None,
        }
    }
}
/// Request to checkpoint a sandbox.
/// The sandbox must be in READY state (no active execution).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckpointRequest {
    /// Sandbox ID to checkpoint.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Human-readable label for the snapshot.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// Labels attached to the snapshot, filterable in ListSnapshots.
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Response to Checkpoint.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CheckpointResponse {
    /// Snapshot ID.
    #[prost(string, tag = "1")]
    pub snapshot_id: ::prost::alloc::string::String,
    /// Creation time.
    #[prost(message, optional, tag = "3")]
    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
/// Request to restore a sandbox from a snapshot.
///
/// Restore requires jailer mode. Direct-mode vmstate records origin sandbox
/// paths and cannot be safely relocated to a new sandbox ID.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreRequest {
    /// Caller-supplied ID for durable retry idempotency. Empty asks the daemon
    /// to generate a fresh UUID for every attempt.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Source snapshot ID.
    #[prost(string, tag = "2")]
    pub snapshot_id: ::prost::alloc::string::String,
    /// Labels to assign to the restored sandbox.
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Assign a fresh TAP interface and IP. Required when running multiple
    /// sandboxes restored from the same snapshot concurrently.
    #[prost(bool, tag = "4")]
    pub network_override: bool,
    /// TTL for the restored sandbox in seconds (0 = no limit).
    #[prost(uint32, tag = "5")]
    pub ttl_seconds: u32,
}
/// Response to Restore.
/// The restored sandbox starts in READY state immediately.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RestoreResponse {
    /// ID of the newly created sandbox.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Allocated IP address.
    #[prost(string, tag = "2")]
    pub ip_address: ::prost::alloc::string::String,
}
/// Request to list snapshots.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSnapshotsRequest {
    /// Filter by the origin sandbox ID (empty = all).
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Filter by labels (all key-value pairs must match).
    #[prost(map = "string, string", tag = "2")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Maximum entries per page (0 = server default of 100; capped at 1000).
    #[prost(uint32, tag = "3")]
    pub page_size: u32,
    /// Continuation token from a previous response (empty = first page).
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response to ListSnapshots.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSnapshotsResponse {
    #[prost(message, repeated, tag = "1")]
    pub snapshots: ::prost::alloc::vec::Vec<SnapshotSummary>,
    /// Token for the next page; empty when this is the last page.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Lightweight snapshot summary.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotSummary {
    /// Snapshot ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// ID of the sandbox that was checkpointed.
    #[prost(string, tag = "2")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Human-readable label.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// Labels recorded at checkpoint time.
    #[prost(map = "string, string", tag = "4")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Creation time.
    #[prost(message, optional, tag = "6")]
    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
}
/// Request to delete a snapshot.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteSnapshotRequest {
    /// Snapshot ID.
    #[prost(string, tag = "1")]
    pub snapshot_id: ::prost::alloc::string::String,
}
/// A template: named, versioned, reproducible sandbox base.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Template {
    /// Template name, unique in the catalog.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Published version this record describes (empty = unpublished draft).
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
    /// Content digest pinning this version's artifacts.
    #[prost(string, tag = "3")]
    pub digest: ::prost::alloc::string::String,
    /// Reference to the built rootfs image in the rootfs cache.
    #[prost(string, tag = "4")]
    pub rootfs_ref: ::prost::alloc::string::String,
    /// Pre-warmed boot-to-ready snapshot (empty = cold boot from
    /// `rootfs_ref`). Not a oneof with `rootfs_ref`: a built rootfs and
    /// its pre-warmed snapshot compose — creating from this template
    /// restores the snapshot for sub-second READY (CORE-16).
    #[prost(string, tag = "5")]
    pub warm_snapshot_id: ::prost::alloc::string::String,
    /// Defaults applied to sandboxes created from this template.
    #[prost(message, optional, tag = "6")]
    pub defaults: ::core::option::Option<TemplateDefaults>,
    /// Creation time of this version.
    #[prost(message, optional, tag = "7")]
    pub created_at: ::core::option::Option<::pbjson_types::Timestamp>,
    /// Arbitrary key-value metadata (filterable in List).
    #[prost(map = "string, string", tag = "8")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// On-disk footprint of this version's artifacts (rootfs + warm
    /// snapshot).
    #[prost(uint64, tag = "9")]
    pub size_bytes: u64,
}
/// Default configuration a template applies to sandboxes created from it.
/// `limits`, `cmd`, and `env` can be overridden per sandbox — the
/// override/merge rules, including the `no_default_cmd`/`no_default_env`
/// explicit-empty flags, live on the CreateSandboxRequest fields.
/// `exposed_ports` and `ready_probe` have no per-create counterpart and
/// apply as-is.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TemplateDefaults {
    /// Default resource limits.
    #[prost(message, optional, tag = "1")]
    pub limits: ::core::option::Option<ResourceLimits>,
    /// Default initial command (see CreateSandboxRequest.cmd).
    #[prost(string, repeated, tag = "2")]
    pub cmd: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Default environment for the initial command.
    #[prost(map = "string, string", tag = "3")]
    pub env:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Ports the workload is expected to listen on; clients may expose
    /// them without knowing the workload.
    #[prost(uint32, repeated, tag = "4")]
    pub exposed_ports: ::prost::alloc::vec::Vec<u32>,
    /// How to decide the sandbox is ready for use (unset = READY as soon
    /// as the VM accepts executions).
    #[prost(message, optional, tag = "5")]
    pub ready_probe: ::core::option::Option<ReadyProbe>,
}
/// Readiness probe run inside a sandbox after boot.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadyProbe {
    /// Give up after this many seconds and mark the sandbox FAILED
    /// (0 = daemon default).
    #[prost(uint32, tag = "3")]
    pub timeout_seconds: u32,
    #[prost(oneof = "ready_probe::Probe", tags = "1, 2")]
    pub probe: ::core::option::Option<ready_probe::Probe>,
}
/// Nested message and enum types in `ReadyProbe`.
pub mod ready_probe {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Probe {
        /// Ready when something inside the sandbox listens on this TCP
        /// port.
        #[prost(uint32, tag = "1")]
        Port(u32),
        /// Ready when this command exits 0.
        #[prost(message, tag = "2")]
        Command(super::CommandProbe),
    }
}
/// Command form of a ReadyProbe.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommandProbe {
    /// Command and arguments to run inside the sandbox.
    #[prost(string, repeated, tag = "1")]
    pub cmd: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request to build a template.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildTemplateRequest {
    /// Template name to register the result under.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Defaults for sandboxes created from this template.
    #[prost(message, optional, tag = "5")]
    pub defaults: ::core::option::Option<TemplateDefaults>,
    /// Labels for the template.
    #[prost(map = "string, string", tag = "6")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Also boot the built rootfs once and checkpoint it at READY, so the
    /// template carries a warm snapshot (requires CORE-16; ignored for
    /// `snapshot_id` sources, which are warm by construction).
    #[prost(bool, tag = "7")]
    pub prewarm: bool,
    /// What to build the rootfs from.
    #[prost(oneof = "build_template_request::Source", tags = "2, 3, 4")]
    pub source: ::core::option::Option<build_template_request::Source>,
}
/// Nested message and enum types in `BuildTemplateRequest`.
pub mod build_template_request {
    /// What to build the rootfs from.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Source {
        /// A local Docker image reference, converted to a rootfs via the
        /// in-guest OCI pipeline (CORE-5).
        #[prost(string, tag = "2")]
        DockerRef(::prost::alloc::string::String),
        /// Inline Dockerfile content, built in-guest then converted
        /// (CORE-5).
        #[prost(string, tag = "3")]
        Dockerfile(::prost::alloc::string::String),
        /// Promote an existing checkpoint (snapshot.proto) into a
        /// template: no build runs, and the checkpoint becomes the
        /// template's warm snapshot.
        #[prost(string, tag = "4")]
        SnapshotId(::prost::alloc::string::String),
    }
}
/// Request to publish a template version.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PublishTemplateRequest {
    /// Template name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Version to freeze the current draft content as (e.g. "1.2.0").
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
}
/// Request to resolve a template reference.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetTemplateRequest {
    /// `name` or `name:version`. A bare name resolves to the newest
    /// published version, or the draft when nothing is published.
    #[prost(string, tag = "1")]
    pub reference: ::prost::alloc::string::String,
}
/// Request to list templates.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTemplatesRequest {
    /// Filter by labels (all key-value pairs must match).
    #[prost(map = "string, string", tag = "1")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Maximum entries per page (0 = server default of 100; capped at
    /// 1000).
    #[prost(uint32, tag = "2")]
    pub page_size: u32,
    /// Continuation token from a previous response (empty = first page).
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response to ListTemplates.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTemplatesResponse {
    /// One entry per template version (drafts included).
    #[prost(message, repeated, tag = "1")]
    pub templates: ::prost::alloc::vec::Vec<Template>,
    /// Token for the next page; empty when this is the last page.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request to delete a template.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteTemplateRequest {
    /// `name` (delete the template and all its versions) or
    /// `name:version` (delete one version).
    #[prost(string, tag = "1")]
    pub reference: ::prost::alloc::string::String,
}
/// Structured detail attached to sandbox API errors.
///
/// Carried as a Connect error detail; the transport status code stays the
/// coarse routing signal while this message carries the precise cause.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorInfo {
    /// Machine-readable cause.
    #[prost(enumeration = "ErrorCode", tag = "1")]
    pub code: i32,
    /// Actionable fix, phrased for direct display ("run `abctl daemon
    /// start`"). Agent frameworks surface this to the LLM verbatim.
    #[prost(string, tag = "2")]
    pub suggestion: ::prost::alloc::string::String,
    /// Structured facts about the failure: which timeout knob fired, the
    /// limit that was exceeded, the state that was observed, and so on.
    #[prost(map = "string, string", tag = "3")]
    pub context:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Machine-readable cause of a sandbox API error.
///
/// Values are append-only: SDKs map unknown codes to their base error
/// class, so retiring or renumbering a value silently reclassifies errors
/// for older clients.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ErrorCode {
    Unspecified = 0,
    /// The addressed sandbox does not exist.
    SandboxNotFound = 1,
    /// The addressed template does not exist.
    TemplateNotFound = 2,
    /// The addressed execution does not exist.
    ExecutionNotFound = 3,
    /// The addressed path does not exist inside the sandbox.
    FileNotFound = 4,
    /// The sandbox is PAUSED and this call did not resume it. Data-plane
    /// calls resume a paused sandbox transparently (CORE-21), so this
    /// surfaces only where resume does not apply: on control-plane calls,
    /// or when the caller opted out of transparent resume (the reserved
    /// `x-arcbox-no-auto-resume` header — see sandbox.proto `Resume`).
    SandboxPaused = 5,
    /// The sandbox exists but is not READY for this operation
    /// (e.g. still STARTING).
    SandboxNotReady = 6,
    /// The sandbox is in FAILED state; context carries the failure reason.
    SandboxFailed = 7,
    /// The sandbox's hard maximum lifetime (`ttl_seconds`) expired and the
    /// daemon destroyed it.
    TtlExpired = 8,
    /// A per-command timeout fired and the process group was killed.
    CommandTimeout = 9,
    /// This host cannot run sandboxes (no nested virtualization).
    /// See SandboxService.GetCapabilities (CORE-13 fail-fast).
    NestedVirtUnsupported = 10,
    /// The template reference could not be resolved or is malformed.
    TemplateInvalid = 11,
    /// A file transfer exceeded the per-file size cap; context carries
    /// the limit.
    FileTooLarge = 12,
    /// Stdin was already closed for this execution.
    StdinClosed = 13,
    /// The operation requires a TTY execution (e.g. terminal resize).
    TtyRequired = 14,
    /// The requested host port is already bound.
    PortInUse = 15,
    /// Authentication is required. Reserved for the remote tier (CORE-63).
    AuthRequired = 16,
    /// The client and daemon protocol levels are incompatible; the
    /// suggestion names which side to upgrade.
    ProtocolMismatch = 17,
    /// The host is out of a resource (memory, disk, sandbox slots).
    ResourceExhaustedHost = 18,
}
impl ErrorCode {
    /// 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 => "ERROR_CODE_UNSPECIFIED",
            Self::SandboxNotFound => "ERROR_CODE_SANDBOX_NOT_FOUND",
            Self::TemplateNotFound => "ERROR_CODE_TEMPLATE_NOT_FOUND",
            Self::ExecutionNotFound => "ERROR_CODE_EXECUTION_NOT_FOUND",
            Self::FileNotFound => "ERROR_CODE_FILE_NOT_FOUND",
            Self::SandboxPaused => "ERROR_CODE_SANDBOX_PAUSED",
            Self::SandboxNotReady => "ERROR_CODE_SANDBOX_NOT_READY",
            Self::SandboxFailed => "ERROR_CODE_SANDBOX_FAILED",
            Self::TtlExpired => "ERROR_CODE_TTL_EXPIRED",
            Self::CommandTimeout => "ERROR_CODE_COMMAND_TIMEOUT",
            Self::NestedVirtUnsupported => "ERROR_CODE_NESTED_VIRT_UNSUPPORTED",
            Self::TemplateInvalid => "ERROR_CODE_TEMPLATE_INVALID",
            Self::FileTooLarge => "ERROR_CODE_FILE_TOO_LARGE",
            Self::StdinClosed => "ERROR_CODE_STDIN_CLOSED",
            Self::TtyRequired => "ERROR_CODE_TTY_REQUIRED",
            Self::PortInUse => "ERROR_CODE_PORT_IN_USE",
            Self::AuthRequired => "ERROR_CODE_AUTH_REQUIRED",
            Self::ProtocolMismatch => "ERROR_CODE_PROTOCOL_MISMATCH",
            Self::ResourceExhaustedHost => "ERROR_CODE_RESOURCE_EXHAUSTED_HOST",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
            "ERROR_CODE_SANDBOX_NOT_FOUND" => Some(Self::SandboxNotFound),
            "ERROR_CODE_TEMPLATE_NOT_FOUND" => Some(Self::TemplateNotFound),
            "ERROR_CODE_EXECUTION_NOT_FOUND" => Some(Self::ExecutionNotFound),
            "ERROR_CODE_FILE_NOT_FOUND" => Some(Self::FileNotFound),
            "ERROR_CODE_SANDBOX_PAUSED" => Some(Self::SandboxPaused),
            "ERROR_CODE_SANDBOX_NOT_READY" => Some(Self::SandboxNotReady),
            "ERROR_CODE_SANDBOX_FAILED" => Some(Self::SandboxFailed),
            "ERROR_CODE_TTL_EXPIRED" => Some(Self::TtlExpired),
            "ERROR_CODE_COMMAND_TIMEOUT" => Some(Self::CommandTimeout),
            "ERROR_CODE_NESTED_VIRT_UNSUPPORTED" => Some(Self::NestedVirtUnsupported),
            "ERROR_CODE_TEMPLATE_INVALID" => Some(Self::TemplateInvalid),
            "ERROR_CODE_FILE_TOO_LARGE" => Some(Self::FileTooLarge),
            "ERROR_CODE_STDIN_CLOSED" => Some(Self::StdinClosed),
            "ERROR_CODE_TTY_REQUIRED" => Some(Self::TtyRequired),
            "ERROR_CODE_PORT_IN_USE" => Some(Self::PortInUse),
            "ERROR_CODE_AUTH_REQUIRED" => Some(Self::AuthRequired),
            "ERROR_CODE_PROTOCOL_MISMATCH" => Some(Self::ProtocolMismatch),
            "ERROR_CODE_RESOURCE_EXHAUSTED_HOST" => Some(Self::ResourceExhaustedHost),
            _ => None,
        }
    }
}