@zgeoff/imp-client 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,12 +1,30 @@
1
1
  import { ORPCError, isDefinedError, safe } from "@orpc/client";
2
2
  import * as z from "zod";
3
3
  import { ContractRouterClient } from "@orpc/contract";
4
+ //#region ../api/src/api-call-schema.d.ts
5
+ declare const ApiCallSchema: z.ZodObject<{
6
+ at: z.ZodDate;
7
+ procedure: z.ZodString;
8
+ actor: z.ZodEnum<{
9
+ dashboard: "dashboard";
10
+ ssh: "ssh";
11
+ tailnet: "tailnet";
12
+ token: "token";
13
+ }>;
14
+ actorName: z.ZodOptional<z.ZodString>;
15
+ imp: z.ZodOptional<z.ZodString>;
16
+ outcome: z.ZodString;
17
+ durationMs: z.ZodInt;
18
+ }, z.core.$strip>;
19
+ type ApiCall = z.infer<typeof ApiCallSchema>;
20
+ //#endregion
4
21
  //#region ../api/src/checkpoint-schema.d.ts
5
22
  declare const CheckpointSchema: z.ZodObject<{
6
23
  id: z.ZodString;
7
24
  label: z.ZodOptional<z.ZodString>;
8
25
  createdAt: z.ZodDate;
9
26
  sizeBytes: z.ZodOptional<z.ZodInt>;
27
+ diskMib: z.ZodInt;
10
28
  }, z.core.$strip>;
11
29
  type Checkpoint = z.infer<typeof CheckpointSchema>;
12
30
  //#endregion
@@ -14,6 +32,208 @@ type Checkpoint = z.infer<typeof CheckpointSchema>;
14
32
  declare const DETACH_REASONS: readonly ['taken_over', 'slow', 'lost'];
15
33
  type DetachReason = (typeof DETACH_REASONS)[number];
16
34
  //#endregion
35
+ //#region ../api/src/event-schema.d.ts
36
+ declare const ImpEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
37
+ v: z.ZodLiteral<1>;
38
+ at: z.ZodDate;
39
+ ev: z.ZodLiteral<"ImpAdded">;
40
+ reason: z.ZodEnum<{
41
+ created: "created";
42
+ snapshot: "snapshot";
43
+ }>;
44
+ imp: z.ZodObject<{
45
+ id: z.ZodString;
46
+ name: z.ZodString;
47
+ image: z.ZodString;
48
+ state: z.ZodEnum<{
49
+ creating: "creating";
50
+ error: "error";
51
+ running: "running";
52
+ sleeping: "sleeping";
53
+ stopped: "stopped";
54
+ }>;
55
+ vcpus: z.ZodInt;
56
+ memoryMib: z.ZodInt;
57
+ diskMib: z.ZodInt;
58
+ diskUsage: z.ZodOptional<z.ZodObject<{
59
+ exclusiveBytes: z.ZodInt;
60
+ sharedBytes: z.ZodInt;
61
+ measuredAt: z.ZodDate;
62
+ isPartial: z.ZodBoolean;
63
+ isUpperBound: z.ZodBoolean;
64
+ }, z.core.$strip>>;
65
+ ip: z.ZodIPv4;
66
+ slot: z.ZodInt;
67
+ port: z.ZodInt;
68
+ httpPort: z.ZodInt;
69
+ url: z.ZodURL;
70
+ createdAt: z.ZodDate;
71
+ lastActiveAt: z.ZodDate;
72
+ ramMib: z.ZodOptional<z.ZodInt>;
73
+ rssMib: z.ZodOptional<z.ZodInt>;
74
+ sleptAt: z.ZodOptional<z.ZodDate>;
75
+ holdUntil: z.ZodOptional<z.ZodDate>;
76
+ error: z.ZodOptional<z.ZodString>;
77
+ sessions: z.ZodOptional<z.ZodInt>;
78
+ coldBootReason: z.ZodOptional<z.ZodString>;
79
+ outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
80
+ agent: "agent";
81
+ firecracker: "firecracker";
82
+ impd: "impd";
83
+ kernel: "kernel";
84
+ }>>>>;
85
+ }, z.core.$strip>;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ v: z.ZodLiteral<1>;
88
+ at: z.ZodDate;
89
+ ev: z.ZodLiteral<"ImpChanged">;
90
+ reason: z.ZodEnum<{
91
+ adopted: "adopted";
92
+ booted: "booted";
93
+ failed: "failed";
94
+ held: "held";
95
+ repaired: "repaired";
96
+ resized: "resized";
97
+ restored: "restored";
98
+ slept: "slept";
99
+ stopped: "stopped";
100
+ woke: "woke";
101
+ }>;
102
+ imp: z.ZodObject<{
103
+ id: z.ZodString;
104
+ name: z.ZodString;
105
+ image: z.ZodString;
106
+ state: z.ZodEnum<{
107
+ creating: "creating";
108
+ error: "error";
109
+ running: "running";
110
+ sleeping: "sleeping";
111
+ stopped: "stopped";
112
+ }>;
113
+ vcpus: z.ZodInt;
114
+ memoryMib: z.ZodInt;
115
+ diskMib: z.ZodInt;
116
+ diskUsage: z.ZodOptional<z.ZodObject<{
117
+ exclusiveBytes: z.ZodInt;
118
+ sharedBytes: z.ZodInt;
119
+ measuredAt: z.ZodDate;
120
+ isPartial: z.ZodBoolean;
121
+ isUpperBound: z.ZodBoolean;
122
+ }, z.core.$strip>>;
123
+ ip: z.ZodIPv4;
124
+ slot: z.ZodInt;
125
+ port: z.ZodInt;
126
+ httpPort: z.ZodInt;
127
+ url: z.ZodURL;
128
+ createdAt: z.ZodDate;
129
+ lastActiveAt: z.ZodDate;
130
+ ramMib: z.ZodOptional<z.ZodInt>;
131
+ rssMib: z.ZodOptional<z.ZodInt>;
132
+ sleptAt: z.ZodOptional<z.ZodDate>;
133
+ holdUntil: z.ZodOptional<z.ZodDate>;
134
+ error: z.ZodOptional<z.ZodString>;
135
+ sessions: z.ZodOptional<z.ZodInt>;
136
+ coldBootReason: z.ZodOptional<z.ZodString>;
137
+ outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
138
+ agent: "agent";
139
+ firecracker: "firecracker";
140
+ impd: "impd";
141
+ kernel: "kernel";
142
+ }>>>>;
143
+ }, z.core.$strip>;
144
+ detail: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
145
+ durationMs: z.ZodOptional<z.ZodInt>;
146
+ trigger: z.ZodOptional<z.ZodString>;
147
+ coldBootReason: z.ZodOptional<z.ZodString>;
148
+ steps: z.ZodOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodInt>>>;
149
+ }, z.core.$strip>>>;
150
+ }, z.core.$strip>, z.ZodObject<{
151
+ v: z.ZodLiteral<1>;
152
+ at: z.ZodDate;
153
+ ev: z.ZodLiteral<"ImpRemoved">;
154
+ imp: z.ZodObject<{
155
+ id: z.ZodString;
156
+ name: z.ZodString;
157
+ image: z.ZodString;
158
+ state: z.ZodEnum<{
159
+ creating: "creating";
160
+ error: "error";
161
+ running: "running";
162
+ sleeping: "sleeping";
163
+ stopped: "stopped";
164
+ }>;
165
+ vcpus: z.ZodInt;
166
+ memoryMib: z.ZodInt;
167
+ diskMib: z.ZodInt;
168
+ diskUsage: z.ZodOptional<z.ZodObject<{
169
+ exclusiveBytes: z.ZodInt;
170
+ sharedBytes: z.ZodInt;
171
+ measuredAt: z.ZodDate;
172
+ isPartial: z.ZodBoolean;
173
+ isUpperBound: z.ZodBoolean;
174
+ }, z.core.$strip>>;
175
+ ip: z.ZodIPv4;
176
+ slot: z.ZodInt;
177
+ port: z.ZodInt;
178
+ httpPort: z.ZodInt;
179
+ url: z.ZodURL;
180
+ createdAt: z.ZodDate;
181
+ lastActiveAt: z.ZodDate;
182
+ ramMib: z.ZodOptional<z.ZodInt>;
183
+ rssMib: z.ZodOptional<z.ZodInt>;
184
+ sleptAt: z.ZodOptional<z.ZodDate>;
185
+ holdUntil: z.ZodOptional<z.ZodDate>;
186
+ error: z.ZodOptional<z.ZodString>;
187
+ sessions: z.ZodOptional<z.ZodInt>;
188
+ coldBootReason: z.ZodOptional<z.ZodString>;
189
+ outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
190
+ agent: "agent";
191
+ firecracker: "firecracker";
192
+ impd: "impd";
193
+ kernel: "kernel";
194
+ }>>>>;
195
+ }, z.core.$strip>;
196
+ }, z.core.$strip>, z.ZodObject<{
197
+ v: z.ZodLiteral<1>;
198
+ at: z.ZodDate;
199
+ ev: z.ZodLiteral<"CheckpointAdded">;
200
+ name: z.ZodString;
201
+ checkpoint: z.ZodObject<{
202
+ id: z.ZodString;
203
+ label: z.ZodOptional<z.ZodString>;
204
+ createdAt: z.ZodDate;
205
+ sizeBytes: z.ZodOptional<z.ZodInt>;
206
+ diskMib: z.ZodInt;
207
+ }, z.core.$strip>;
208
+ }, z.core.$strip>, z.ZodObject<{
209
+ v: z.ZodLiteral<1>;
210
+ at: z.ZodDate;
211
+ ev: z.ZodLiteral<"CheckpointRemoved">;
212
+ name: z.ZodString;
213
+ checkpoint: z.ZodObject<{
214
+ id: z.ZodString;
215
+ label: z.ZodOptional<z.ZodString>;
216
+ createdAt: z.ZodDate;
217
+ sizeBytes: z.ZodOptional<z.ZodInt>;
218
+ diskMib: z.ZodInt;
219
+ }, z.core.$strip>;
220
+ }, z.core.$strip>, z.ZodObject<{
221
+ v: z.ZodLiteral<1>;
222
+ at: z.ZodDate;
223
+ ev: z.ZodLiteral<"GovernorDecision">;
224
+ decision: z.ZodEnum<{
225
+ admitted: "admitted";
226
+ refused: "refused";
227
+ slept: "slept";
228
+ }>;
229
+ name: z.ZodString;
230
+ trigger: z.ZodString;
231
+ usedMib: z.ZodInt;
232
+ budgetMib: z.ZodInt;
233
+ reserveMib: z.ZodOptional<z.ZodInt>;
234
+ }, z.core.$strip>], "ev">;
235
+ type ImpEvent = z.infer<typeof ImpEventSchema>;
236
+ //#endregion
17
237
  //#region ../api/src/image-schema.d.ts
18
238
  declare const ImageSchema: z.ZodObject<{
19
239
  id: z.ZodString;
@@ -33,6 +253,7 @@ declare const impContract: {
33
253
  image: z.ZodOptional<z.ZodString>;
34
254
  vcpus: z.ZodOptional<z.ZodInt>;
35
255
  memoryMib: z.ZodOptional<z.ZodInt>;
256
+ diskMib: z.ZodOptional<z.ZodInt>;
36
257
  httpPort: z.ZodOptional<z.ZodInt>;
37
258
  }, z.core.$strip>, z.ZodObject<{
38
259
  id: z.ZodString;
@@ -47,6 +268,14 @@ declare const impContract: {
47
268
  }>;
48
269
  vcpus: z.ZodInt;
49
270
  memoryMib: z.ZodInt;
271
+ diskMib: z.ZodInt;
272
+ diskUsage: z.ZodOptional<z.ZodObject<{
273
+ exclusiveBytes: z.ZodInt;
274
+ sharedBytes: z.ZodInt;
275
+ measuredAt: z.ZodDate;
276
+ isPartial: z.ZodBoolean;
277
+ isUpperBound: z.ZodBoolean;
278
+ }, z.core.$strip>>;
50
279
  ip: z.ZodIPv4;
51
280
  slot: z.ZodInt;
52
281
  port: z.ZodInt;
@@ -79,6 +308,7 @@ declare const impContract: {
79
308
  imp: "imp";
80
309
  secret: "secret";
81
310
  session: "session";
311
+ token: "token";
82
312
  }>;
83
313
  name: z.ZodString;
84
314
  }, z.core.$strip>;
@@ -94,6 +324,7 @@ declare const impContract: {
94
324
  imp: "imp";
95
325
  secret: "secret";
96
326
  session: "session";
327
+ token: "token";
97
328
  }>;
98
329
  name: z.ZodString;
99
330
  }, z.core.$strip>;
@@ -136,6 +367,15 @@ declare const impContract: {
136
367
  }>>;
137
368
  }, z.core.$strip>;
138
369
  };
370
+ DISK_FULL: {
371
+ readonly message: "Not enough free disk on the host";
372
+ readonly status: 507;
373
+ readonly data: z.ZodObject<{
374
+ availableBytes: z.ZodInt;
375
+ reserveBytes: z.ZodInt;
376
+ requestedBytes: z.ZodInt;
377
+ }, z.core.$strip>;
378
+ };
139
379
  AGENT_OUTDATED: {
140
380
  readonly message: "The imp's agent is too old for this";
141
381
  readonly status: 409;
@@ -154,6 +394,14 @@ declare const impContract: {
154
394
  }>;
155
395
  vcpus: z.ZodInt;
156
396
  memoryMib: z.ZodInt;
397
+ diskMib: z.ZodInt;
398
+ diskUsage: z.ZodOptional<z.ZodObject<{
399
+ exclusiveBytes: z.ZodInt;
400
+ sharedBytes: z.ZodInt;
401
+ measuredAt: z.ZodDate;
402
+ isPartial: z.ZodBoolean;
403
+ isUpperBound: z.ZodBoolean;
404
+ }, z.core.$strip>>;
157
405
  ip: z.ZodIPv4;
158
406
  slot: z.ZodInt;
159
407
  port: z.ZodInt;
@@ -186,6 +434,7 @@ declare const impContract: {
186
434
  imp: "imp";
187
435
  secret: "secret";
188
436
  session: "session";
437
+ token: "token";
189
438
  }>;
190
439
  name: z.ZodString;
191
440
  }, z.core.$strip>;
@@ -201,6 +450,7 @@ declare const impContract: {
201
450
  imp: "imp";
202
451
  secret: "secret";
203
452
  session: "session";
453
+ token: "token";
204
454
  }>;
205
455
  name: z.ZodString;
206
456
  }, z.core.$strip>;
@@ -243,6 +493,15 @@ declare const impContract: {
243
493
  }>>;
244
494
  }, z.core.$strip>;
245
495
  };
496
+ DISK_FULL: {
497
+ readonly message: "Not enough free disk on the host";
498
+ readonly status: 507;
499
+ readonly data: z.ZodObject<{
500
+ availableBytes: z.ZodInt;
501
+ reserveBytes: z.ZodInt;
502
+ requestedBytes: z.ZodInt;
503
+ }, z.core.$strip>;
504
+ };
246
505
  AGENT_OUTDATED: {
247
506
  readonly message: "The imp's agent is too old for this";
248
507
  readonly status: 409;
@@ -263,6 +522,14 @@ declare const impContract: {
263
522
  }>;
264
523
  vcpus: z.ZodInt;
265
524
  memoryMib: z.ZodInt;
525
+ diskMib: z.ZodInt;
526
+ diskUsage: z.ZodOptional<z.ZodObject<{
527
+ exclusiveBytes: z.ZodInt;
528
+ sharedBytes: z.ZodInt;
529
+ measuredAt: z.ZodDate;
530
+ isPartial: z.ZodBoolean;
531
+ isUpperBound: z.ZodBoolean;
532
+ }, z.core.$strip>>;
266
533
  ip: z.ZodIPv4;
267
534
  slot: z.ZodInt;
268
535
  port: z.ZodInt;
@@ -295,6 +562,7 @@ declare const impContract: {
295
562
  imp: "imp";
296
563
  secret: "secret";
297
564
  session: "session";
565
+ token: "token";
298
566
  }>;
299
567
  name: z.ZodString;
300
568
  }, z.core.$strip>;
@@ -310,6 +578,7 @@ declare const impContract: {
310
578
  imp: "imp";
311
579
  secret: "secret";
312
580
  session: "session";
581
+ token: "token";
313
582
  }>;
314
583
  name: z.ZodString;
315
584
  }, z.core.$strip>;
@@ -352,6 +621,15 @@ declare const impContract: {
352
621
  }>>;
353
622
  }, z.core.$strip>;
354
623
  };
624
+ DISK_FULL: {
625
+ readonly message: "Not enough free disk on the host";
626
+ readonly status: 507;
627
+ readonly data: z.ZodObject<{
628
+ availableBytes: z.ZodInt;
629
+ reserveBytes: z.ZodInt;
630
+ requestedBytes: z.ZodInt;
631
+ }, z.core.$strip>;
632
+ };
355
633
  AGENT_OUTDATED: {
356
634
  readonly message: "The imp's agent is too old for this";
357
635
  readonly status: 409;
@@ -371,6 +649,7 @@ declare const impContract: {
371
649
  imp: "imp";
372
650
  secret: "secret";
373
651
  session: "session";
652
+ token: "token";
374
653
  }>;
375
654
  name: z.ZodString;
376
655
  }, z.core.$strip>;
@@ -386,6 +665,7 @@ declare const impContract: {
386
665
  imp: "imp";
387
666
  secret: "secret";
388
667
  session: "session";
668
+ token: "token";
389
669
  }>;
390
670
  name: z.ZodString;
391
671
  }, z.core.$strip>;
@@ -428,6 +708,15 @@ declare const impContract: {
428
708
  }>>;
429
709
  }, z.core.$strip>;
430
710
  };
711
+ DISK_FULL: {
712
+ readonly message: "Not enough free disk on the host";
713
+ readonly status: 507;
714
+ readonly data: z.ZodObject<{
715
+ availableBytes: z.ZodInt;
716
+ reserveBytes: z.ZodInt;
717
+ requestedBytes: z.ZodInt;
718
+ }, z.core.$strip>;
719
+ };
431
720
  AGENT_OUTDATED: {
432
721
  readonly message: "The imp's agent is too old for this";
433
722
  readonly status: 409;
@@ -448,6 +737,14 @@ declare const impContract: {
448
737
  }>;
449
738
  vcpus: z.ZodInt;
450
739
  memoryMib: z.ZodInt;
740
+ diskMib: z.ZodInt;
741
+ diskUsage: z.ZodOptional<z.ZodObject<{
742
+ exclusiveBytes: z.ZodInt;
743
+ sharedBytes: z.ZodInt;
744
+ measuredAt: z.ZodDate;
745
+ isPartial: z.ZodBoolean;
746
+ isUpperBound: z.ZodBoolean;
747
+ }, z.core.$strip>>;
451
748
  ip: z.ZodIPv4;
452
749
  slot: z.ZodInt;
453
750
  port: z.ZodInt;
@@ -480,6 +777,7 @@ declare const impContract: {
480
777
  imp: "imp";
481
778
  secret: "secret";
482
779
  session: "session";
780
+ token: "token";
483
781
  }>;
484
782
  name: z.ZodString;
485
783
  }, z.core.$strip>;
@@ -495,6 +793,7 @@ declare const impContract: {
495
793
  imp: "imp";
496
794
  secret: "secret";
497
795
  session: "session";
796
+ token: "token";
498
797
  }>;
499
798
  name: z.ZodString;
500
799
  }, z.core.$strip>;
@@ -537,6 +836,15 @@ declare const impContract: {
537
836
  }>>;
538
837
  }, z.core.$strip>;
539
838
  };
839
+ DISK_FULL: {
840
+ readonly message: "Not enough free disk on the host";
841
+ readonly status: 507;
842
+ readonly data: z.ZodObject<{
843
+ availableBytes: z.ZodInt;
844
+ reserveBytes: z.ZodInt;
845
+ requestedBytes: z.ZodInt;
846
+ }, z.core.$strip>;
847
+ };
540
848
  AGENT_OUTDATED: {
541
849
  readonly message: "The imp's agent is too old for this";
542
850
  readonly status: 409;
@@ -557,6 +865,14 @@ declare const impContract: {
557
865
  }>;
558
866
  vcpus: z.ZodInt;
559
867
  memoryMib: z.ZodInt;
868
+ diskMib: z.ZodInt;
869
+ diskUsage: z.ZodOptional<z.ZodObject<{
870
+ exclusiveBytes: z.ZodInt;
871
+ sharedBytes: z.ZodInt;
872
+ measuredAt: z.ZodDate;
873
+ isPartial: z.ZodBoolean;
874
+ isUpperBound: z.ZodBoolean;
875
+ }, z.core.$strip>>;
560
876
  ip: z.ZodIPv4;
561
877
  slot: z.ZodInt;
562
878
  port: z.ZodInt;
@@ -589,6 +905,7 @@ declare const impContract: {
589
905
  imp: "imp";
590
906
  secret: "secret";
591
907
  session: "session";
908
+ token: "token";
592
909
  }>;
593
910
  name: z.ZodString;
594
911
  }, z.core.$strip>;
@@ -604,6 +921,7 @@ declare const impContract: {
604
921
  imp: "imp";
605
922
  secret: "secret";
606
923
  session: "session";
924
+ token: "token";
607
925
  }>;
608
926
  name: z.ZodString;
609
927
  }, z.core.$strip>;
@@ -646,6 +964,15 @@ declare const impContract: {
646
964
  }>>;
647
965
  }, z.core.$strip>;
648
966
  };
967
+ DISK_FULL: {
968
+ readonly message: "Not enough free disk on the host";
969
+ readonly status: 507;
970
+ readonly data: z.ZodObject<{
971
+ availableBytes: z.ZodInt;
972
+ reserveBytes: z.ZodInt;
973
+ requestedBytes: z.ZodInt;
974
+ }, z.core.$strip>;
975
+ };
649
976
  AGENT_OUTDATED: {
650
977
  readonly message: "The imp's agent is too old for this";
651
978
  readonly status: 409;
@@ -666,6 +993,14 @@ declare const impContract: {
666
993
  }>;
667
994
  vcpus: z.ZodInt;
668
995
  memoryMib: z.ZodInt;
996
+ diskMib: z.ZodInt;
997
+ diskUsage: z.ZodOptional<z.ZodObject<{
998
+ exclusiveBytes: z.ZodInt;
999
+ sharedBytes: z.ZodInt;
1000
+ measuredAt: z.ZodDate;
1001
+ isPartial: z.ZodBoolean;
1002
+ isUpperBound: z.ZodBoolean;
1003
+ }, z.core.$strip>>;
669
1004
  ip: z.ZodIPv4;
670
1005
  slot: z.ZodInt;
671
1006
  port: z.ZodInt;
@@ -698,6 +1033,7 @@ declare const impContract: {
698
1033
  imp: "imp";
699
1034
  secret: "secret";
700
1035
  session: "session";
1036
+ token: "token";
701
1037
  }>;
702
1038
  name: z.ZodString;
703
1039
  }, z.core.$strip>;
@@ -713,6 +1049,7 @@ declare const impContract: {
713
1049
  imp: "imp";
714
1050
  secret: "secret";
715
1051
  session: "session";
1052
+ token: "token";
716
1053
  }>;
717
1054
  name: z.ZodString;
718
1055
  }, z.core.$strip>;
@@ -755,6 +1092,15 @@ declare const impContract: {
755
1092
  }>>;
756
1093
  }, z.core.$strip>;
757
1094
  };
1095
+ DISK_FULL: {
1096
+ readonly message: "Not enough free disk on the host";
1097
+ readonly status: 507;
1098
+ readonly data: z.ZodObject<{
1099
+ availableBytes: z.ZodInt;
1100
+ reserveBytes: z.ZodInt;
1101
+ requestedBytes: z.ZodInt;
1102
+ }, z.core.$strip>;
1103
+ };
758
1104
  AGENT_OUTDATED: {
759
1105
  readonly message: "The imp's agent is too old for this";
760
1106
  readonly status: 409;
@@ -776,6 +1122,14 @@ declare const impContract: {
776
1122
  }>;
777
1123
  vcpus: z.ZodInt;
778
1124
  memoryMib: z.ZodInt;
1125
+ diskMib: z.ZodInt;
1126
+ diskUsage: z.ZodOptional<z.ZodObject<{
1127
+ exclusiveBytes: z.ZodInt;
1128
+ sharedBytes: z.ZodInt;
1129
+ measuredAt: z.ZodDate;
1130
+ isPartial: z.ZodBoolean;
1131
+ isUpperBound: z.ZodBoolean;
1132
+ }, z.core.$strip>>;
779
1133
  ip: z.ZodIPv4;
780
1134
  slot: z.ZodInt;
781
1135
  port: z.ZodInt;
@@ -808,6 +1162,7 @@ declare const impContract: {
808
1162
  imp: "imp";
809
1163
  secret: "secret";
810
1164
  session: "session";
1165
+ token: "token";
811
1166
  }>;
812
1167
  name: z.ZodString;
813
1168
  }, z.core.$strip>;
@@ -823,6 +1178,7 @@ declare const impContract: {
823
1178
  imp: "imp";
824
1179
  secret: "secret";
825
1180
  session: "session";
1181
+ token: "token";
826
1182
  }>;
827
1183
  name: z.ZodString;
828
1184
  }, z.core.$strip>;
@@ -865,6 +1221,15 @@ declare const impContract: {
865
1221
  }>>;
866
1222
  }, z.core.$strip>;
867
1223
  };
1224
+ DISK_FULL: {
1225
+ readonly message: "Not enough free disk on the host";
1226
+ readonly status: 507;
1227
+ readonly data: z.ZodObject<{
1228
+ availableBytes: z.ZodInt;
1229
+ reserveBytes: z.ZodInt;
1230
+ requestedBytes: z.ZodInt;
1231
+ }, z.core.$strip>;
1232
+ };
868
1233
  AGENT_OUTDATED: {
869
1234
  readonly message: "The imp's agent is too old for this";
870
1235
  readonly status: 409;
@@ -886,6 +1251,143 @@ declare const impContract: {
886
1251
  }>;
887
1252
  vcpus: z.ZodInt;
888
1253
  memoryMib: z.ZodInt;
1254
+ diskMib: z.ZodInt;
1255
+ diskUsage: z.ZodOptional<z.ZodObject<{
1256
+ exclusiveBytes: z.ZodInt;
1257
+ sharedBytes: z.ZodInt;
1258
+ measuredAt: z.ZodDate;
1259
+ isPartial: z.ZodBoolean;
1260
+ isUpperBound: z.ZodBoolean;
1261
+ }, z.core.$strip>>;
1262
+ ip: z.ZodIPv4;
1263
+ slot: z.ZodInt;
1264
+ port: z.ZodInt;
1265
+ httpPort: z.ZodInt;
1266
+ url: z.ZodURL;
1267
+ createdAt: z.ZodDate;
1268
+ lastActiveAt: z.ZodDate;
1269
+ ramMib: z.ZodOptional<z.ZodInt>;
1270
+ rssMib: z.ZodOptional<z.ZodInt>;
1271
+ sleptAt: z.ZodOptional<z.ZodDate>;
1272
+ holdUntil: z.ZodOptional<z.ZodDate>;
1273
+ error: z.ZodOptional<z.ZodString>;
1274
+ sessions: z.ZodOptional<z.ZodInt>;
1275
+ coldBootReason: z.ZodOptional<z.ZodString>;
1276
+ outdated: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
1277
+ agent: "agent";
1278
+ firecracker: "firecracker";
1279
+ impd: "impd";
1280
+ kernel: "kernel";
1281
+ }>>>>;
1282
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1283
+ NOT_FOUND: {
1284
+ readonly message: "Not found";
1285
+ readonly data: z.ZodObject<{
1286
+ kind: z.ZodEnum<{
1287
+ backup: "backup";
1288
+ checkpoint: "checkpoint";
1289
+ grant: "grant";
1290
+ image: "image";
1291
+ imp: "imp";
1292
+ secret: "secret";
1293
+ session: "session";
1294
+ token: "token";
1295
+ }>;
1296
+ name: z.ZodString;
1297
+ }, z.core.$strip>;
1298
+ };
1299
+ CONFLICT: {
1300
+ readonly message: "Already exists";
1301
+ readonly data: z.ZodObject<{
1302
+ kind: z.ZodEnum<{
1303
+ backup: "backup";
1304
+ checkpoint: "checkpoint";
1305
+ grant: "grant";
1306
+ image: "image";
1307
+ imp: "imp";
1308
+ secret: "secret";
1309
+ session: "session";
1310
+ token: "token";
1311
+ }>;
1312
+ name: z.ZodString;
1313
+ }, z.core.$strip>;
1314
+ };
1315
+ FORBIDDEN: {
1316
+ readonly message: "Not allowed";
1317
+ };
1318
+ PRECONDITION_FAILED: {
1319
+ readonly message: "Not possible on this host";
1320
+ };
1321
+ RAM_BUDGET_EXCEEDED: {
1322
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
1323
+ readonly status: 503;
1324
+ readonly data: z.ZodObject<{
1325
+ budgetMib: z.ZodInt;
1326
+ usedMib: z.ZodInt;
1327
+ requestedMib: z.ZodInt;
1328
+ }, z.core.$strip>;
1329
+ };
1330
+ SERVICE_UNAVAILABLE: {
1331
+ readonly message: "impd is stopping";
1332
+ };
1333
+ INVALID_STATE: {
1334
+ readonly message: "The imp is not in a state that allows this";
1335
+ readonly status: 409;
1336
+ readonly data: z.ZodObject<{
1337
+ state: z.ZodEnum<{
1338
+ creating: "creating";
1339
+ error: "error";
1340
+ running: "running";
1341
+ sleeping: "sleeping";
1342
+ stopped: "stopped";
1343
+ }>;
1344
+ allowed: z.ZodArray<z.ZodEnum<{
1345
+ creating: "creating";
1346
+ error: "error";
1347
+ running: "running";
1348
+ sleeping: "sleeping";
1349
+ stopped: "stopped";
1350
+ }>>;
1351
+ }, z.core.$strip>;
1352
+ };
1353
+ DISK_FULL: {
1354
+ readonly message: "Not enough free disk on the host";
1355
+ readonly status: 507;
1356
+ readonly data: z.ZodObject<{
1357
+ availableBytes: z.ZodInt;
1358
+ reserveBytes: z.ZodInt;
1359
+ requestedBytes: z.ZodInt;
1360
+ }, z.core.$strip>;
1361
+ };
1362
+ AGENT_OUTDATED: {
1363
+ readonly message: "The imp's agent is too old for this";
1364
+ readonly status: 409;
1365
+ };
1366
+ }>, Record<never, never>>;
1367
+ resizeDisk: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1368
+ name: z.ZodString;
1369
+ diskMib: z.ZodInt;
1370
+ }, z.core.$strip>, z.ZodObject<{
1371
+ id: z.ZodString;
1372
+ name: z.ZodString;
1373
+ image: z.ZodString;
1374
+ state: z.ZodEnum<{
1375
+ creating: "creating";
1376
+ error: "error";
1377
+ running: "running";
1378
+ sleeping: "sleeping";
1379
+ stopped: "stopped";
1380
+ }>;
1381
+ vcpus: z.ZodInt;
1382
+ memoryMib: z.ZodInt;
1383
+ diskMib: z.ZodInt;
1384
+ diskUsage: z.ZodOptional<z.ZodObject<{
1385
+ exclusiveBytes: z.ZodInt;
1386
+ sharedBytes: z.ZodInt;
1387
+ measuredAt: z.ZodDate;
1388
+ isPartial: z.ZodBoolean;
1389
+ isUpperBound: z.ZodBoolean;
1390
+ }, z.core.$strip>>;
889
1391
  ip: z.ZodIPv4;
890
1392
  slot: z.ZodInt;
891
1393
  port: z.ZodInt;
@@ -918,6 +1420,7 @@ declare const impContract: {
918
1420
  imp: "imp";
919
1421
  secret: "secret";
920
1422
  session: "session";
1423
+ token: "token";
921
1424
  }>;
922
1425
  name: z.ZodString;
923
1426
  }, z.core.$strip>;
@@ -933,6 +1436,7 @@ declare const impContract: {
933
1436
  imp: "imp";
934
1437
  secret: "secret";
935
1438
  session: "session";
1439
+ token: "token";
936
1440
  }>;
937
1441
  name: z.ZodString;
938
1442
  }, z.core.$strip>;
@@ -975,6 +1479,15 @@ declare const impContract: {
975
1479
  }>>;
976
1480
  }, z.core.$strip>;
977
1481
  };
1482
+ DISK_FULL: {
1483
+ readonly message: "Not enough free disk on the host";
1484
+ readonly status: 507;
1485
+ readonly data: z.ZodObject<{
1486
+ availableBytes: z.ZodInt;
1487
+ reserveBytes: z.ZodInt;
1488
+ requestedBytes: z.ZodInt;
1489
+ }, z.core.$strip>;
1490
+ };
978
1491
  AGENT_OUTDATED: {
979
1492
  readonly message: "The imp's agent is too old for this";
980
1493
  readonly status: 409;
@@ -998,6 +1511,7 @@ declare const impContract: {
998
1511
  imp: "imp";
999
1512
  secret: "secret";
1000
1513
  session: "session";
1514
+ token: "token";
1001
1515
  }>;
1002
1516
  name: z.ZodString;
1003
1517
  }, z.core.$strip>;
@@ -1013,6 +1527,7 @@ declare const impContract: {
1013
1527
  imp: "imp";
1014
1528
  secret: "secret";
1015
1529
  session: "session";
1530
+ token: "token";
1016
1531
  }>;
1017
1532
  name: z.ZodString;
1018
1533
  }, z.core.$strip>;
@@ -1055,6 +1570,15 @@ declare const impContract: {
1055
1570
  }>>;
1056
1571
  }, z.core.$strip>;
1057
1572
  };
1573
+ DISK_FULL: {
1574
+ readonly message: "Not enough free disk on the host";
1575
+ readonly status: 507;
1576
+ readonly data: z.ZodObject<{
1577
+ availableBytes: z.ZodInt;
1578
+ reserveBytes: z.ZodInt;
1579
+ requestedBytes: z.ZodInt;
1580
+ }, z.core.$strip>;
1581
+ };
1058
1582
  AGENT_OUTDATED: {
1059
1583
  readonly message: "The imp's agent is too old for this";
1060
1584
  readonly status: 409;
@@ -1077,6 +1601,14 @@ declare const impContract: {
1077
1601
  }>;
1078
1602
  vcpus: z.ZodInt;
1079
1603
  memoryMib: z.ZodInt;
1604
+ diskMib: z.ZodInt;
1605
+ diskUsage: z.ZodOptional<z.ZodObject<{
1606
+ exclusiveBytes: z.ZodInt;
1607
+ sharedBytes: z.ZodInt;
1608
+ measuredAt: z.ZodDate;
1609
+ isPartial: z.ZodBoolean;
1610
+ isUpperBound: z.ZodBoolean;
1611
+ }, z.core.$strip>>;
1080
1612
  ip: z.ZodIPv4;
1081
1613
  slot: z.ZodInt;
1082
1614
  port: z.ZodInt;
@@ -1109,6 +1641,7 @@ declare const impContract: {
1109
1641
  imp: "imp";
1110
1642
  secret: "secret";
1111
1643
  session: "session";
1644
+ token: "token";
1112
1645
  }>;
1113
1646
  name: z.ZodString;
1114
1647
  }, z.core.$strip>;
@@ -1124,6 +1657,7 @@ declare const impContract: {
1124
1657
  imp: "imp";
1125
1658
  secret: "secret";
1126
1659
  session: "session";
1660
+ token: "token";
1127
1661
  }>;
1128
1662
  name: z.ZodString;
1129
1663
  }, z.core.$strip>;
@@ -1166,6 +1700,15 @@ declare const impContract: {
1166
1700
  }>>;
1167
1701
  }, z.core.$strip>;
1168
1702
  };
1703
+ DISK_FULL: {
1704
+ readonly message: "Not enough free disk on the host";
1705
+ readonly status: 507;
1706
+ readonly data: z.ZodObject<{
1707
+ availableBytes: z.ZodInt;
1708
+ reserveBytes: z.ZodInt;
1709
+ requestedBytes: z.ZodInt;
1710
+ }, z.core.$strip>;
1711
+ };
1169
1712
  AGENT_OUTDATED: {
1170
1713
  readonly message: "The imp's agent is too old for this";
1171
1714
  readonly status: 409;
@@ -1181,6 +1724,7 @@ declare const impContract: {
1181
1724
  label: z.ZodOptional<z.ZodString>;
1182
1725
  createdAt: z.ZodDate;
1183
1726
  sizeBytes: z.ZodOptional<z.ZodInt>;
1727
+ diskMib: z.ZodInt;
1184
1728
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1185
1729
  NOT_FOUND: {
1186
1730
  readonly message: "Not found";
@@ -1193,6 +1737,7 @@ declare const impContract: {
1193
1737
  imp: "imp";
1194
1738
  secret: "secret";
1195
1739
  session: "session";
1740
+ token: "token";
1196
1741
  }>;
1197
1742
  name: z.ZodString;
1198
1743
  }, z.core.$strip>;
@@ -1208,6 +1753,7 @@ declare const impContract: {
1208
1753
  imp: "imp";
1209
1754
  secret: "secret";
1210
1755
  session: "session";
1756
+ token: "token";
1211
1757
  }>;
1212
1758
  name: z.ZodString;
1213
1759
  }, z.core.$strip>;
@@ -1250,6 +1796,15 @@ declare const impContract: {
1250
1796
  }>>;
1251
1797
  }, z.core.$strip>;
1252
1798
  };
1799
+ DISK_FULL: {
1800
+ readonly message: "Not enough free disk on the host";
1801
+ readonly status: 507;
1802
+ readonly data: z.ZodObject<{
1803
+ availableBytes: z.ZodInt;
1804
+ reserveBytes: z.ZodInt;
1805
+ requestedBytes: z.ZodInt;
1806
+ }, z.core.$strip>;
1807
+ };
1253
1808
  AGENT_OUTDATED: {
1254
1809
  readonly message: "The imp's agent is too old for this";
1255
1810
  readonly status: 409;
@@ -1262,6 +1817,7 @@ declare const impContract: {
1262
1817
  label: z.ZodOptional<z.ZodString>;
1263
1818
  createdAt: z.ZodDate;
1264
1819
  sizeBytes: z.ZodOptional<z.ZodInt>;
1820
+ diskMib: z.ZodInt;
1265
1821
  }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1266
1822
  NOT_FOUND: {
1267
1823
  readonly message: "Not found";
@@ -1274,6 +1830,7 @@ declare const impContract: {
1274
1830
  imp: "imp";
1275
1831
  secret: "secret";
1276
1832
  session: "session";
1833
+ token: "token";
1277
1834
  }>;
1278
1835
  name: z.ZodString;
1279
1836
  }, z.core.$strip>;
@@ -1289,6 +1846,7 @@ declare const impContract: {
1289
1846
  imp: "imp";
1290
1847
  secret: "secret";
1291
1848
  session: "session";
1849
+ token: "token";
1292
1850
  }>;
1293
1851
  name: z.ZodString;
1294
1852
  }, z.core.$strip>;
@@ -1331,6 +1889,15 @@ declare const impContract: {
1331
1889
  }>>;
1332
1890
  }, z.core.$strip>;
1333
1891
  };
1892
+ DISK_FULL: {
1893
+ readonly message: "Not enough free disk on the host";
1894
+ readonly status: 507;
1895
+ readonly data: z.ZodObject<{
1896
+ availableBytes: z.ZodInt;
1897
+ reserveBytes: z.ZodInt;
1898
+ requestedBytes: z.ZodInt;
1899
+ }, z.core.$strip>;
1900
+ };
1334
1901
  AGENT_OUTDATED: {
1335
1902
  readonly message: "The imp's agent is too old for this";
1336
1903
  readonly status: 409;
@@ -1352,6 +1919,14 @@ declare const impContract: {
1352
1919
  }>;
1353
1920
  vcpus: z.ZodInt;
1354
1921
  memoryMib: z.ZodInt;
1922
+ diskMib: z.ZodInt;
1923
+ diskUsage: z.ZodOptional<z.ZodObject<{
1924
+ exclusiveBytes: z.ZodInt;
1925
+ sharedBytes: z.ZodInt;
1926
+ measuredAt: z.ZodDate;
1927
+ isPartial: z.ZodBoolean;
1928
+ isUpperBound: z.ZodBoolean;
1929
+ }, z.core.$strip>>;
1355
1930
  ip: z.ZodIPv4;
1356
1931
  slot: z.ZodInt;
1357
1932
  port: z.ZodInt;
@@ -1384,6 +1959,7 @@ declare const impContract: {
1384
1959
  imp: "imp";
1385
1960
  secret: "secret";
1386
1961
  session: "session";
1962
+ token: "token";
1387
1963
  }>;
1388
1964
  name: z.ZodString;
1389
1965
  }, z.core.$strip>;
@@ -1399,6 +1975,7 @@ declare const impContract: {
1399
1975
  imp: "imp";
1400
1976
  secret: "secret";
1401
1977
  session: "session";
1978
+ token: "token";
1402
1979
  }>;
1403
1980
  name: z.ZodString;
1404
1981
  }, z.core.$strip>;
@@ -1441,6 +2018,15 @@ declare const impContract: {
1441
2018
  }>>;
1442
2019
  }, z.core.$strip>;
1443
2020
  };
2021
+ DISK_FULL: {
2022
+ readonly message: "Not enough free disk on the host";
2023
+ readonly status: 507;
2024
+ readonly data: z.ZodObject<{
2025
+ availableBytes: z.ZodInt;
2026
+ reserveBytes: z.ZodInt;
2027
+ requestedBytes: z.ZodInt;
2028
+ }, z.core.$strip>;
2029
+ };
1444
2030
  AGENT_OUTDATED: {
1445
2031
  readonly message: "The imp's agent is too old for this";
1446
2032
  readonly status: 409;
@@ -1461,6 +2047,7 @@ declare const impContract: {
1461
2047
  imp: "imp";
1462
2048
  secret: "secret";
1463
2049
  session: "session";
2050
+ token: "token";
1464
2051
  }>;
1465
2052
  name: z.ZodString;
1466
2053
  }, z.core.$strip>;
@@ -1476,6 +2063,7 @@ declare const impContract: {
1476
2063
  imp: "imp";
1477
2064
  secret: "secret";
1478
2065
  session: "session";
2066
+ token: "token";
1479
2067
  }>;
1480
2068
  name: z.ZodString;
1481
2069
  }, z.core.$strip>;
@@ -1518,6 +2106,15 @@ declare const impContract: {
1518
2106
  }>>;
1519
2107
  }, z.core.$strip>;
1520
2108
  };
2109
+ DISK_FULL: {
2110
+ readonly message: "Not enough free disk on the host";
2111
+ readonly status: 507;
2112
+ readonly data: z.ZodObject<{
2113
+ availableBytes: z.ZodInt;
2114
+ reserveBytes: z.ZodInt;
2115
+ requestedBytes: z.ZodInt;
2116
+ }, z.core.$strip>;
2117
+ };
1521
2118
  AGENT_OUTDATED: {
1522
2119
  readonly message: "The imp's agent is too old for this";
1523
2120
  readonly status: 409;
@@ -1546,6 +2143,7 @@ declare const impContract: {
1546
2143
  imp: "imp";
1547
2144
  secret: "secret";
1548
2145
  session: "session";
2146
+ token: "token";
1549
2147
  }>;
1550
2148
  name: z.ZodString;
1551
2149
  }, z.core.$strip>;
@@ -1561,6 +2159,7 @@ declare const impContract: {
1561
2159
  imp: "imp";
1562
2160
  secret: "secret";
1563
2161
  session: "session";
2162
+ token: "token";
1564
2163
  }>;
1565
2164
  name: z.ZodString;
1566
2165
  }, z.core.$strip>;
@@ -1603,6 +2202,15 @@ declare const impContract: {
1603
2202
  }>>;
1604
2203
  }, z.core.$strip>;
1605
2204
  };
2205
+ DISK_FULL: {
2206
+ readonly message: "Not enough free disk on the host";
2207
+ readonly status: 507;
2208
+ readonly data: z.ZodObject<{
2209
+ availableBytes: z.ZodInt;
2210
+ reserveBytes: z.ZodInt;
2211
+ requestedBytes: z.ZodInt;
2212
+ }, z.core.$strip>;
2213
+ };
1606
2214
  AGENT_OUTDATED: {
1607
2215
  readonly message: "The imp's agent is too old for this";
1608
2216
  readonly status: 409;
@@ -1632,6 +2240,7 @@ declare const impContract: {
1632
2240
  imp: "imp";
1633
2241
  secret: "secret";
1634
2242
  session: "session";
2243
+ token: "token";
1635
2244
  }>;
1636
2245
  name: z.ZodString;
1637
2246
  }, z.core.$strip>;
@@ -1647,6 +2256,7 @@ declare const impContract: {
1647
2256
  imp: "imp";
1648
2257
  secret: "secret";
1649
2258
  session: "session";
2259
+ token: "token";
1650
2260
  }>;
1651
2261
  name: z.ZodString;
1652
2262
  }, z.core.$strip>;
@@ -1689,6 +2299,15 @@ declare const impContract: {
1689
2299
  }>>;
1690
2300
  }, z.core.$strip>;
1691
2301
  };
2302
+ DISK_FULL: {
2303
+ readonly message: "Not enough free disk on the host";
2304
+ readonly status: 507;
2305
+ readonly data: z.ZodObject<{
2306
+ availableBytes: z.ZodInt;
2307
+ reserveBytes: z.ZodInt;
2308
+ requestedBytes: z.ZodInt;
2309
+ }, z.core.$strip>;
2310
+ };
1692
2311
  AGENT_OUTDATED: {
1693
2312
  readonly message: "The imp's agent is too old for this";
1694
2313
  readonly status: 409;
@@ -1714,6 +2333,14 @@ declare const impContract: {
1714
2333
  }>;
1715
2334
  vcpus: z.ZodInt;
1716
2335
  memoryMib: z.ZodInt;
2336
+ diskMib: z.ZodInt;
2337
+ diskUsage: z.ZodOptional<z.ZodObject<{
2338
+ exclusiveBytes: z.ZodInt;
2339
+ sharedBytes: z.ZodInt;
2340
+ measuredAt: z.ZodDate;
2341
+ isPartial: z.ZodBoolean;
2342
+ isUpperBound: z.ZodBoolean;
2343
+ }, z.core.$strip>>;
1717
2344
  ip: z.ZodIPv4;
1718
2345
  slot: z.ZodInt;
1719
2346
  port: z.ZodInt;
@@ -1752,6 +2379,7 @@ declare const impContract: {
1752
2379
  imp: "imp";
1753
2380
  secret: "secret";
1754
2381
  session: "session";
2382
+ token: "token";
1755
2383
  }>;
1756
2384
  name: z.ZodString;
1757
2385
  }, z.core.$strip>;
@@ -1767,6 +2395,7 @@ declare const impContract: {
1767
2395
  imp: "imp";
1768
2396
  secret: "secret";
1769
2397
  session: "session";
2398
+ token: "token";
1770
2399
  }>;
1771
2400
  name: z.ZodString;
1772
2401
  }, z.core.$strip>;
@@ -1809,6 +2438,15 @@ declare const impContract: {
1809
2438
  }>>;
1810
2439
  }, z.core.$strip>;
1811
2440
  };
2441
+ DISK_FULL: {
2442
+ readonly message: "Not enough free disk on the host";
2443
+ readonly status: 507;
2444
+ readonly data: z.ZodObject<{
2445
+ availableBytes: z.ZodInt;
2446
+ reserveBytes: z.ZodInt;
2447
+ requestedBytes: z.ZodInt;
2448
+ }, z.core.$strip>;
2449
+ };
1812
2450
  AGENT_OUTDATED: {
1813
2451
  readonly message: "The imp's agent is too old for this";
1814
2452
  readonly status: 409;
@@ -1828,6 +2466,7 @@ declare const impContract: {
1828
2466
  imp: "imp";
1829
2467
  secret: "secret";
1830
2468
  session: "session";
2469
+ token: "token";
1831
2470
  }>;
1832
2471
  name: z.ZodString;
1833
2472
  }, z.core.$strip>;
@@ -1843,6 +2482,7 @@ declare const impContract: {
1843
2482
  imp: "imp";
1844
2483
  secret: "secret";
1845
2484
  session: "session";
2485
+ token: "token";
1846
2486
  }>;
1847
2487
  name: z.ZodString;
1848
2488
  }, z.core.$strip>;
@@ -1885,6 +2525,15 @@ declare const impContract: {
1885
2525
  }>>;
1886
2526
  }, z.core.$strip>;
1887
2527
  };
2528
+ DISK_FULL: {
2529
+ readonly message: "Not enough free disk on the host";
2530
+ readonly status: 507;
2531
+ readonly data: z.ZodObject<{
2532
+ availableBytes: z.ZodInt;
2533
+ reserveBytes: z.ZodInt;
2534
+ requestedBytes: z.ZodInt;
2535
+ }, z.core.$strip>;
2536
+ };
1888
2537
  AGENT_OUTDATED: {
1889
2538
  readonly message: "The imp's agent is too old for this";
1890
2539
  readonly status: 409;
@@ -1911,6 +2560,7 @@ declare const impContract: {
1911
2560
  imp: "imp";
1912
2561
  secret: "secret";
1913
2562
  session: "session";
2563
+ token: "token";
1914
2564
  }>;
1915
2565
  name: z.ZodString;
1916
2566
  }, z.core.$strip>;
@@ -1926,6 +2576,7 @@ declare const impContract: {
1926
2576
  imp: "imp";
1927
2577
  secret: "secret";
1928
2578
  session: "session";
2579
+ token: "token";
1929
2580
  }>;
1930
2581
  name: z.ZodString;
1931
2582
  }, z.core.$strip>;
@@ -1968,6 +2619,15 @@ declare const impContract: {
1968
2619
  }>>;
1969
2620
  }, z.core.$strip>;
1970
2621
  };
2622
+ DISK_FULL: {
2623
+ readonly message: "Not enough free disk on the host";
2624
+ readonly status: 507;
2625
+ readonly data: z.ZodObject<{
2626
+ availableBytes: z.ZodInt;
2627
+ reserveBytes: z.ZodInt;
2628
+ requestedBytes: z.ZodInt;
2629
+ }, z.core.$strip>;
2630
+ };
1971
2631
  AGENT_OUTDATED: {
1972
2632
  readonly message: "The imp's agent is too old for this";
1973
2633
  readonly status: 409;
@@ -1995,6 +2655,7 @@ declare const impContract: {
1995
2655
  imp: "imp";
1996
2656
  secret: "secret";
1997
2657
  session: "session";
2658
+ token: "token";
1998
2659
  }>;
1999
2660
  name: z.ZodString;
2000
2661
  }, z.core.$strip>;
@@ -2010,6 +2671,7 @@ declare const impContract: {
2010
2671
  imp: "imp";
2011
2672
  secret: "secret";
2012
2673
  session: "session";
2674
+ token: "token";
2013
2675
  }>;
2014
2676
  name: z.ZodString;
2015
2677
  }, z.core.$strip>;
@@ -2052,6 +2714,15 @@ declare const impContract: {
2052
2714
  }>>;
2053
2715
  }, z.core.$strip>;
2054
2716
  };
2717
+ DISK_FULL: {
2718
+ readonly message: "Not enough free disk on the host";
2719
+ readonly status: 507;
2720
+ readonly data: z.ZodObject<{
2721
+ availableBytes: z.ZodInt;
2722
+ reserveBytes: z.ZodInt;
2723
+ requestedBytes: z.ZodInt;
2724
+ }, z.core.$strip>;
2725
+ };
2055
2726
  AGENT_OUTDATED: {
2056
2727
  readonly message: "The imp's agent is too old for this";
2057
2728
  readonly status: 409;
@@ -2080,6 +2751,7 @@ declare const impContract: {
2080
2751
  imp: "imp";
2081
2752
  secret: "secret";
2082
2753
  session: "session";
2754
+ token: "token";
2083
2755
  }>;
2084
2756
  name: z.ZodString;
2085
2757
  }, z.core.$strip>;
@@ -2095,6 +2767,7 @@ declare const impContract: {
2095
2767
  imp: "imp";
2096
2768
  secret: "secret";
2097
2769
  session: "session";
2770
+ token: "token";
2098
2771
  }>;
2099
2772
  name: z.ZodString;
2100
2773
  }, z.core.$strip>;
@@ -2137,6 +2810,15 @@ declare const impContract: {
2137
2810
  }>>;
2138
2811
  }, z.core.$strip>;
2139
2812
  };
2813
+ DISK_FULL: {
2814
+ readonly message: "Not enough free disk on the host";
2815
+ readonly status: 507;
2816
+ readonly data: z.ZodObject<{
2817
+ availableBytes: z.ZodInt;
2818
+ reserveBytes: z.ZodInt;
2819
+ requestedBytes: z.ZodInt;
2820
+ }, z.core.$strip>;
2821
+ };
2140
2822
  AGENT_OUTDATED: {
2141
2823
  readonly message: "The imp's agent is too old for this";
2142
2824
  readonly status: 409;
@@ -2156,6 +2838,7 @@ declare const impContract: {
2156
2838
  imp: "imp";
2157
2839
  secret: "secret";
2158
2840
  session: "session";
2841
+ token: "token";
2159
2842
  }>;
2160
2843
  name: z.ZodString;
2161
2844
  }, z.core.$strip>;
@@ -2171,6 +2854,7 @@ declare const impContract: {
2171
2854
  imp: "imp";
2172
2855
  secret: "secret";
2173
2856
  session: "session";
2857
+ token: "token";
2174
2858
  }>;
2175
2859
  name: z.ZodString;
2176
2860
  }, z.core.$strip>;
@@ -2213,6 +2897,15 @@ declare const impContract: {
2213
2897
  }>>;
2214
2898
  }, z.core.$strip>;
2215
2899
  };
2900
+ DISK_FULL: {
2901
+ readonly message: "Not enough free disk on the host";
2902
+ readonly status: 507;
2903
+ readonly data: z.ZodObject<{
2904
+ availableBytes: z.ZodInt;
2905
+ reserveBytes: z.ZodInt;
2906
+ requestedBytes: z.ZodInt;
2907
+ }, z.core.$strip>;
2908
+ };
2216
2909
  AGENT_OUTDATED: {
2217
2910
  readonly message: "The imp's agent is too old for this";
2218
2911
  readonly status: 409;
@@ -2237,6 +2930,7 @@ declare const impContract: {
2237
2930
  imp: "imp";
2238
2931
  secret: "secret";
2239
2932
  session: "session";
2933
+ token: "token";
2240
2934
  }>;
2241
2935
  name: z.ZodString;
2242
2936
  }, z.core.$strip>;
@@ -2252,6 +2946,7 @@ declare const impContract: {
2252
2946
  imp: "imp";
2253
2947
  secret: "secret";
2254
2948
  session: "session";
2949
+ token: "token";
2255
2950
  }>;
2256
2951
  name: z.ZodString;
2257
2952
  }, z.core.$strip>;
@@ -2294,6 +2989,15 @@ declare const impContract: {
2294
2989
  }>>;
2295
2990
  }, z.core.$strip>;
2296
2991
  };
2992
+ DISK_FULL: {
2993
+ readonly message: "Not enough free disk on the host";
2994
+ readonly status: 507;
2995
+ readonly data: z.ZodObject<{
2996
+ availableBytes: z.ZodInt;
2997
+ reserveBytes: z.ZodInt;
2998
+ requestedBytes: z.ZodInt;
2999
+ }, z.core.$strip>;
3000
+ };
2297
3001
  AGENT_OUTDATED: {
2298
3002
  readonly message: "The imp's agent is too old for this";
2299
3003
  readonly status: 409;
@@ -2331,6 +3035,7 @@ declare const impContract: {
2331
3035
  imp: "imp";
2332
3036
  secret: "secret";
2333
3037
  session: "session";
3038
+ token: "token";
2334
3039
  }>;
2335
3040
  name: z.ZodString;
2336
3041
  }, z.core.$strip>;
@@ -2346,6 +3051,7 @@ declare const impContract: {
2346
3051
  imp: "imp";
2347
3052
  secret: "secret";
2348
3053
  session: "session";
3054
+ token: "token";
2349
3055
  }>;
2350
3056
  name: z.ZodString;
2351
3057
  }, z.core.$strip>;
@@ -2388,6 +3094,15 @@ declare const impContract: {
2388
3094
  }>>;
2389
3095
  }, z.core.$strip>;
2390
3096
  };
3097
+ DISK_FULL: {
3098
+ readonly message: "Not enough free disk on the host";
3099
+ readonly status: 507;
3100
+ readonly data: z.ZodObject<{
3101
+ availableBytes: z.ZodInt;
3102
+ reserveBytes: z.ZodInt;
3103
+ requestedBytes: z.ZodInt;
3104
+ }, z.core.$strip>;
3105
+ };
2391
3106
  AGENT_OUTDATED: {
2392
3107
  readonly message: "The imp's agent is too old for this";
2393
3108
  readonly status: 409;
@@ -2408,6 +3123,7 @@ declare const impContract: {
2408
3123
  imp: "imp";
2409
3124
  secret: "secret";
2410
3125
  session: "session";
3126
+ token: "token";
2411
3127
  }>;
2412
3128
  name: z.ZodString;
2413
3129
  }, z.core.$strip>;
@@ -2423,6 +3139,7 @@ declare const impContract: {
2423
3139
  imp: "imp";
2424
3140
  secret: "secret";
2425
3141
  session: "session";
3142
+ token: "token";
2426
3143
  }>;
2427
3144
  name: z.ZodString;
2428
3145
  }, z.core.$strip>;
@@ -2465,6 +3182,15 @@ declare const impContract: {
2465
3182
  }>>;
2466
3183
  }, z.core.$strip>;
2467
3184
  };
3185
+ DISK_FULL: {
3186
+ readonly message: "Not enough free disk on the host";
3187
+ readonly status: 507;
3188
+ readonly data: z.ZodObject<{
3189
+ availableBytes: z.ZodInt;
3190
+ reserveBytes: z.ZodInt;
3191
+ requestedBytes: z.ZodInt;
3192
+ }, z.core.$strip>;
3193
+ };
2468
3194
  AGENT_OUTDATED: {
2469
3195
  readonly message: "The imp's agent is too old for this";
2470
3196
  readonly status: 409;
@@ -2524,6 +3250,7 @@ declare const impContract: {
2524
3250
  imp: "imp";
2525
3251
  secret: "secret";
2526
3252
  session: "session";
3253
+ token: "token";
2527
3254
  }>;
2528
3255
  name: z.ZodString;
2529
3256
  }, z.core.$strip>;
@@ -2539,6 +3266,7 @@ declare const impContract: {
2539
3266
  imp: "imp";
2540
3267
  secret: "secret";
2541
3268
  session: "session";
3269
+ token: "token";
2542
3270
  }>;
2543
3271
  name: z.ZodString;
2544
3272
  }, z.core.$strip>;
@@ -2581,6 +3309,15 @@ declare const impContract: {
2581
3309
  }>>;
2582
3310
  }, z.core.$strip>;
2583
3311
  };
3312
+ DISK_FULL: {
3313
+ readonly message: "Not enough free disk on the host";
3314
+ readonly status: 507;
3315
+ readonly data: z.ZodObject<{
3316
+ availableBytes: z.ZodInt;
3317
+ reserveBytes: z.ZodInt;
3318
+ requestedBytes: z.ZodInt;
3319
+ }, z.core.$strip>;
3320
+ };
2584
3321
  AGENT_OUTDATED: {
2585
3322
  readonly message: "The imp's agent is too old for this";
2586
3323
  readonly status: 409;
@@ -2618,6 +3355,7 @@ declare const impContract: {
2618
3355
  imp: "imp";
2619
3356
  secret: "secret";
2620
3357
  session: "session";
3358
+ token: "token";
2621
3359
  }>;
2622
3360
  name: z.ZodString;
2623
3361
  }, z.core.$strip>;
@@ -2633,6 +3371,7 @@ declare const impContract: {
2633
3371
  imp: "imp";
2634
3372
  secret: "secret";
2635
3373
  session: "session";
3374
+ token: "token";
2636
3375
  }>;
2637
3376
  name: z.ZodString;
2638
3377
  }, z.core.$strip>;
@@ -2675,6 +3414,15 @@ declare const impContract: {
2675
3414
  }>>;
2676
3415
  }, z.core.$strip>;
2677
3416
  };
3417
+ DISK_FULL: {
3418
+ readonly message: "Not enough free disk on the host";
3419
+ readonly status: 507;
3420
+ readonly data: z.ZodObject<{
3421
+ availableBytes: z.ZodInt;
3422
+ reserveBytes: z.ZodInt;
3423
+ requestedBytes: z.ZodInt;
3424
+ }, z.core.$strip>;
3425
+ };
2678
3426
  AGENT_OUTDATED: {
2679
3427
  readonly message: "The imp's agent is too old for this";
2680
3428
  readonly status: 409;
@@ -2694,6 +3442,7 @@ declare const impContract: {
2694
3442
  imp: "imp";
2695
3443
  secret: "secret";
2696
3444
  session: "session";
3445
+ token: "token";
2697
3446
  }>;
2698
3447
  name: z.ZodString;
2699
3448
  }, z.core.$strip>;
@@ -2709,6 +3458,7 @@ declare const impContract: {
2709
3458
  imp: "imp";
2710
3459
  secret: "secret";
2711
3460
  session: "session";
3461
+ token: "token";
2712
3462
  }>;
2713
3463
  name: z.ZodString;
2714
3464
  }, z.core.$strip>;
@@ -2751,6 +3501,15 @@ declare const impContract: {
2751
3501
  }>>;
2752
3502
  }, z.core.$strip>;
2753
3503
  };
3504
+ DISK_FULL: {
3505
+ readonly message: "Not enough free disk on the host";
3506
+ readonly status: 507;
3507
+ readonly data: z.ZodObject<{
3508
+ availableBytes: z.ZodInt;
3509
+ reserveBytes: z.ZodInt;
3510
+ requestedBytes: z.ZodInt;
3511
+ }, z.core.$strip>;
3512
+ };
2754
3513
  AGENT_OUTDATED: {
2755
3514
  readonly message: "The imp's agent is too old for this";
2756
3515
  readonly status: 409;
@@ -2773,6 +3532,7 @@ declare const impContract: {
2773
3532
  imp: "imp";
2774
3533
  secret: "secret";
2775
3534
  session: "session";
3535
+ token: "token";
2776
3536
  }>;
2777
3537
  name: z.ZodString;
2778
3538
  }, z.core.$strip>;
@@ -2788,6 +3548,7 @@ declare const impContract: {
2788
3548
  imp: "imp";
2789
3549
  secret: "secret";
2790
3550
  session: "session";
3551
+ token: "token";
2791
3552
  }>;
2792
3553
  name: z.ZodString;
2793
3554
  }, z.core.$strip>;
@@ -2830,6 +3591,15 @@ declare const impContract: {
2830
3591
  }>>;
2831
3592
  }, z.core.$strip>;
2832
3593
  };
3594
+ DISK_FULL: {
3595
+ readonly message: "Not enough free disk on the host";
3596
+ readonly status: 507;
3597
+ readonly data: z.ZodObject<{
3598
+ availableBytes: z.ZodInt;
3599
+ reserveBytes: z.ZodInt;
3600
+ requestedBytes: z.ZodInt;
3601
+ }, z.core.$strip>;
3602
+ };
2833
3603
  AGENT_OUTDATED: {
2834
3604
  readonly message: "The imp's agent is too old for this";
2835
3605
  readonly status: 409;
@@ -2850,6 +3620,7 @@ declare const impContract: {
2850
3620
  imp: "imp";
2851
3621
  secret: "secret";
2852
3622
  session: "session";
3623
+ token: "token";
2853
3624
  }>;
2854
3625
  name: z.ZodString;
2855
3626
  }, z.core.$strip>;
@@ -2865,6 +3636,7 @@ declare const impContract: {
2865
3636
  imp: "imp";
2866
3637
  secret: "secret";
2867
3638
  session: "session";
3639
+ token: "token";
2868
3640
  }>;
2869
3641
  name: z.ZodString;
2870
3642
  }, z.core.$strip>;
@@ -2907,6 +3679,15 @@ declare const impContract: {
2907
3679
  }>>;
2908
3680
  }, z.core.$strip>;
2909
3681
  };
3682
+ DISK_FULL: {
3683
+ readonly message: "Not enough free disk on the host";
3684
+ readonly status: 507;
3685
+ readonly data: z.ZodObject<{
3686
+ availableBytes: z.ZodInt;
3687
+ reserveBytes: z.ZodInt;
3688
+ requestedBytes: z.ZodInt;
3689
+ }, z.core.$strip>;
3690
+ };
2910
3691
  AGENT_OUTDATED: {
2911
3692
  readonly message: "The imp's agent is too old for this";
2912
3693
  readonly status: 409;
@@ -2926,6 +3707,7 @@ declare const impContract: {
2926
3707
  imp: "imp";
2927
3708
  secret: "secret";
2928
3709
  session: "session";
3710
+ token: "token";
2929
3711
  }>;
2930
3712
  name: z.ZodString;
2931
3713
  }, z.core.$strip>;
@@ -2941,6 +3723,7 @@ declare const impContract: {
2941
3723
  imp: "imp";
2942
3724
  secret: "secret";
2943
3725
  session: "session";
3726
+ token: "token";
2944
3727
  }>;
2945
3728
  name: z.ZodString;
2946
3729
  }, z.core.$strip>;
@@ -2983,6 +3766,15 @@ declare const impContract: {
2983
3766
  }>>;
2984
3767
  }, z.core.$strip>;
2985
3768
  };
3769
+ DISK_FULL: {
3770
+ readonly message: "Not enough free disk on the host";
3771
+ readonly status: 507;
3772
+ readonly data: z.ZodObject<{
3773
+ availableBytes: z.ZodInt;
3774
+ reserveBytes: z.ZodInt;
3775
+ requestedBytes: z.ZodInt;
3776
+ }, z.core.$strip>;
3777
+ };
2986
3778
  AGENT_OUTDATED: {
2987
3779
  readonly message: "The imp's agent is too old for this";
2988
3780
  readonly status: 409;
@@ -3016,6 +3808,7 @@ declare const impContract: {
3016
3808
  imp: "imp";
3017
3809
  secret: "secret";
3018
3810
  session: "session";
3811
+ token: "token";
3019
3812
  }>;
3020
3813
  name: z.ZodString;
3021
3814
  }, z.core.$strip>;
@@ -3031,6 +3824,7 @@ declare const impContract: {
3031
3824
  imp: "imp";
3032
3825
  secret: "secret";
3033
3826
  session: "session";
3827
+ token: "token";
3034
3828
  }>;
3035
3829
  name: z.ZodString;
3036
3830
  }, z.core.$strip>;
@@ -3073,52 +3867,1033 @@ declare const impContract: {
3073
3867
  }>>;
3074
3868
  }, z.core.$strip>;
3075
3869
  };
3870
+ DISK_FULL: {
3871
+ readonly message: "Not enough free disk on the host";
3872
+ readonly status: 507;
3873
+ readonly data: z.ZodObject<{
3874
+ availableBytes: z.ZodInt;
3875
+ reserveBytes: z.ZodInt;
3876
+ requestedBytes: z.ZodInt;
3877
+ }, z.core.$strip>;
3878
+ };
3076
3879
  AGENT_OUTDATED: {
3077
3880
  readonly message: "The imp's agent is too old for this";
3078
3881
  readonly status: 409;
3079
3882
  };
3080
3883
  }>, Record<never, never>>;
3081
- };
3082
- system: {
3083
- info: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
3084
- version: z.ZodString;
3085
- ramBudgetMib: z.ZodInt;
3086
- ramUsedMib: z.ZodInt;
3087
- ramReservedMib: z.ZodInt;
3088
- ramCommittedMib: z.ZodInt;
3089
- awakeCount: z.ZodInt;
3090
- impCount: z.ZodInt;
3091
- sessionCount: z.ZodInt;
3092
- bootStatus: z.ZodObject<{
3093
- coldBoots: z.ZodInt;
3094
- outdated: z.ZodObject<{
3095
- firecracker: z.ZodInt;
3884
+ calls: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3885
+ name: z.ZodOptional<z.ZodString>;
3886
+ limit: z.ZodOptional<z.ZodInt>;
3887
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
3888
+ at: z.ZodDate;
3889
+ procedure: z.ZodString;
3890
+ actor: z.ZodEnum<{
3891
+ dashboard: "dashboard";
3892
+ ssh: "ssh";
3893
+ tailnet: "tailnet";
3894
+ token: "token";
3895
+ }>;
3896
+ actorName: z.ZodOptional<z.ZodString>;
3897
+ imp: z.ZodOptional<z.ZodString>;
3898
+ outcome: z.ZodString;
3899
+ durationMs: z.ZodInt;
3900
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
3901
+ NOT_FOUND: {
3902
+ readonly message: "Not found";
3903
+ readonly data: z.ZodObject<{
3904
+ kind: z.ZodEnum<{
3905
+ backup: "backup";
3906
+ checkpoint: "checkpoint";
3907
+ grant: "grant";
3908
+ image: "image";
3909
+ imp: "imp";
3910
+ secret: "secret";
3911
+ session: "session";
3912
+ token: "token";
3913
+ }>;
3914
+ name: z.ZodString;
3915
+ }, z.core.$strip>;
3916
+ };
3917
+ CONFLICT: {
3918
+ readonly message: "Already exists";
3919
+ readonly data: z.ZodObject<{
3920
+ kind: z.ZodEnum<{
3921
+ backup: "backup";
3922
+ checkpoint: "checkpoint";
3923
+ grant: "grant";
3924
+ image: "image";
3925
+ imp: "imp";
3926
+ secret: "secret";
3927
+ session: "session";
3928
+ token: "token";
3929
+ }>;
3930
+ name: z.ZodString;
3931
+ }, z.core.$strip>;
3932
+ };
3933
+ FORBIDDEN: {
3934
+ readonly message: "Not allowed";
3935
+ };
3936
+ PRECONDITION_FAILED: {
3937
+ readonly message: "Not possible on this host";
3938
+ };
3939
+ RAM_BUDGET_EXCEEDED: {
3940
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
3941
+ readonly status: 503;
3942
+ readonly data: z.ZodObject<{
3943
+ budgetMib: z.ZodInt;
3944
+ usedMib: z.ZodInt;
3945
+ requestedMib: z.ZodInt;
3946
+ }, z.core.$strip>;
3947
+ };
3948
+ SERVICE_UNAVAILABLE: {
3949
+ readonly message: "impd is stopping";
3950
+ };
3951
+ INVALID_STATE: {
3952
+ readonly message: "The imp is not in a state that allows this";
3953
+ readonly status: 409;
3954
+ readonly data: z.ZodObject<{
3955
+ state: z.ZodEnum<{
3956
+ creating: "creating";
3957
+ error: "error";
3958
+ running: "running";
3959
+ sleeping: "sleeping";
3960
+ stopped: "stopped";
3961
+ }>;
3962
+ allowed: z.ZodArray<z.ZodEnum<{
3963
+ creating: "creating";
3964
+ error: "error";
3965
+ running: "running";
3966
+ sleeping: "sleeping";
3967
+ stopped: "stopped";
3968
+ }>>;
3969
+ }, z.core.$strip>;
3970
+ };
3971
+ DISK_FULL: {
3972
+ readonly message: "Not enough free disk on the host";
3973
+ readonly status: 507;
3974
+ readonly data: z.ZodObject<{
3975
+ availableBytes: z.ZodInt;
3976
+ reserveBytes: z.ZodInt;
3977
+ requestedBytes: z.ZodInt;
3978
+ }, z.core.$strip>;
3979
+ };
3980
+ AGENT_OUTDATED: {
3981
+ readonly message: "The imp's agent is too old for this";
3982
+ readonly status: 409;
3983
+ };
3984
+ }>, Record<never, never>>;
3985
+ };
3986
+ events: {
3987
+ stream: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("@orpc/contract").Schema<AsyncIteratorObject<{
3988
+ v: 1;
3989
+ at: Date;
3990
+ ev: "ImpAdded";
3991
+ reason: "created" | "snapshot";
3992
+ imp: {
3993
+ id: string;
3994
+ name: string;
3995
+ image: string;
3996
+ state: "creating" | "error" | "running" | "sleeping" | "stopped";
3997
+ vcpus: number;
3998
+ memoryMib: number;
3999
+ diskMib: number;
4000
+ diskUsage?: {
4001
+ exclusiveBytes: number;
4002
+ sharedBytes: number;
4003
+ measuredAt: Date;
4004
+ isPartial: boolean;
4005
+ isUpperBound: boolean;
4006
+ } | undefined;
4007
+ ip: string;
4008
+ slot: number;
4009
+ port: number;
4010
+ httpPort: number;
4011
+ url: string;
4012
+ createdAt: Date;
4013
+ lastActiveAt: Date;
4014
+ ramMib?: number | undefined;
4015
+ rssMib?: number | undefined;
4016
+ sleptAt?: Date | undefined;
4017
+ holdUntil?: Date | undefined;
4018
+ error?: string | undefined;
4019
+ sessions?: number | undefined;
4020
+ coldBootReason?: string | undefined;
4021
+ outdated?: readonly ("agent" | "firecracker" | "impd" | "kernel")[] | undefined;
4022
+ };
4023
+ } | {
4024
+ v: 1;
4025
+ at: Date;
4026
+ ev: "ImpChanged";
4027
+ reason: "adopted" | "booted" | "failed" | "held" | "repaired" | "resized" | "restored" | "slept" | "stopped" | "woke";
4028
+ imp: {
4029
+ id: string;
4030
+ name: string;
4031
+ image: string;
4032
+ state: "creating" | "error" | "running" | "sleeping" | "stopped";
4033
+ vcpus: number;
4034
+ memoryMib: number;
4035
+ diskMib: number;
4036
+ diskUsage?: {
4037
+ exclusiveBytes: number;
4038
+ sharedBytes: number;
4039
+ measuredAt: Date;
4040
+ isPartial: boolean;
4041
+ isUpperBound: boolean;
4042
+ } | undefined;
4043
+ ip: string;
4044
+ slot: number;
4045
+ port: number;
4046
+ httpPort: number;
4047
+ url: string;
4048
+ createdAt: Date;
4049
+ lastActiveAt: Date;
4050
+ ramMib?: number | undefined;
4051
+ rssMib?: number | undefined;
4052
+ sleptAt?: Date | undefined;
4053
+ holdUntil?: Date | undefined;
4054
+ error?: string | undefined;
4055
+ sessions?: number | undefined;
4056
+ coldBootReason?: string | undefined;
4057
+ outdated?: readonly ("agent" | "firecracker" | "impd" | "kernel")[] | undefined;
4058
+ };
4059
+ detail?: Readonly<{
4060
+ durationMs?: number | undefined;
4061
+ trigger?: string | undefined;
4062
+ coldBootReason?: string | undefined;
4063
+ steps?: Readonly<Record<string, number>> | undefined;
4064
+ }> | undefined;
4065
+ } | {
4066
+ v: 1;
4067
+ at: Date;
4068
+ ev: "ImpRemoved";
4069
+ imp: {
4070
+ id: string;
4071
+ name: string;
4072
+ image: string;
4073
+ state: "creating" | "error" | "running" | "sleeping" | "stopped";
4074
+ vcpus: number;
4075
+ memoryMib: number;
4076
+ diskMib: number;
4077
+ diskUsage?: {
4078
+ exclusiveBytes: number;
4079
+ sharedBytes: number;
4080
+ measuredAt: Date;
4081
+ isPartial: boolean;
4082
+ isUpperBound: boolean;
4083
+ } | undefined;
4084
+ ip: string;
4085
+ slot: number;
4086
+ port: number;
4087
+ httpPort: number;
4088
+ url: string;
4089
+ createdAt: Date;
4090
+ lastActiveAt: Date;
4091
+ ramMib?: number | undefined;
4092
+ rssMib?: number | undefined;
4093
+ sleptAt?: Date | undefined;
4094
+ holdUntil?: Date | undefined;
4095
+ error?: string | undefined;
4096
+ sessions?: number | undefined;
4097
+ coldBootReason?: string | undefined;
4098
+ outdated?: readonly ("agent" | "firecracker" | "impd" | "kernel")[] | undefined;
4099
+ };
4100
+ } | {
4101
+ v: 1;
4102
+ at: Date;
4103
+ ev: "CheckpointAdded";
4104
+ name: string;
4105
+ checkpoint: {
4106
+ id: string;
4107
+ label?: string | undefined;
4108
+ createdAt: Date;
4109
+ sizeBytes?: number | undefined;
4110
+ diskMib: number;
4111
+ };
4112
+ } | {
4113
+ v: 1;
4114
+ at: Date;
4115
+ ev: "CheckpointRemoved";
4116
+ name: string;
4117
+ checkpoint: {
4118
+ id: string;
4119
+ label?: string | undefined;
4120
+ createdAt: Date;
4121
+ sizeBytes?: number | undefined;
4122
+ diskMib: number;
4123
+ };
4124
+ } | {
4125
+ v: 1;
4126
+ at: Date;
4127
+ ev: "GovernorDecision";
4128
+ decision: "admitted" | "refused" | "slept";
4129
+ name: string;
4130
+ trigger: string;
4131
+ usedMib: number;
4132
+ budgetMib: number;
4133
+ reserveMib?: number | undefined;
4134
+ }, unknown, void>, import("@orpc/client").AsyncIteratorClass<{
4135
+ v: 1;
4136
+ at: Date;
4137
+ ev: "ImpAdded";
4138
+ reason: "created" | "snapshot";
4139
+ imp: {
4140
+ id: string;
4141
+ name: string;
4142
+ image: string;
4143
+ state: "creating" | "error" | "running" | "sleeping" | "stopped";
4144
+ vcpus: number;
4145
+ memoryMib: number;
4146
+ diskMib: number;
4147
+ diskUsage?: {
4148
+ exclusiveBytes: number;
4149
+ sharedBytes: number;
4150
+ measuredAt: Date;
4151
+ isPartial: boolean;
4152
+ isUpperBound: boolean;
4153
+ } | undefined;
4154
+ ip: string;
4155
+ slot: number;
4156
+ port: number;
4157
+ httpPort: number;
4158
+ url: string;
4159
+ createdAt: Date;
4160
+ lastActiveAt: Date;
4161
+ ramMib?: number | undefined;
4162
+ rssMib?: number | undefined;
4163
+ sleptAt?: Date | undefined;
4164
+ holdUntil?: Date | undefined;
4165
+ error?: string | undefined;
4166
+ sessions?: number | undefined;
4167
+ coldBootReason?: string | undefined;
4168
+ outdated?: readonly ("agent" | "firecracker" | "impd" | "kernel")[] | undefined;
4169
+ };
4170
+ } | {
4171
+ v: 1;
4172
+ at: Date;
4173
+ ev: "ImpChanged";
4174
+ reason: "adopted" | "booted" | "failed" | "held" | "repaired" | "resized" | "restored" | "slept" | "stopped" | "woke";
4175
+ imp: {
4176
+ id: string;
4177
+ name: string;
4178
+ image: string;
4179
+ state: "creating" | "error" | "running" | "sleeping" | "stopped";
4180
+ vcpus: number;
4181
+ memoryMib: number;
4182
+ diskMib: number;
4183
+ diskUsage?: {
4184
+ exclusiveBytes: number;
4185
+ sharedBytes: number;
4186
+ measuredAt: Date;
4187
+ isPartial: boolean;
4188
+ isUpperBound: boolean;
4189
+ } | undefined;
4190
+ ip: string;
4191
+ slot: number;
4192
+ port: number;
4193
+ httpPort: number;
4194
+ url: string;
4195
+ createdAt: Date;
4196
+ lastActiveAt: Date;
4197
+ ramMib?: number | undefined;
4198
+ rssMib?: number | undefined;
4199
+ sleptAt?: Date | undefined;
4200
+ holdUntil?: Date | undefined;
4201
+ error?: string | undefined;
4202
+ sessions?: number | undefined;
4203
+ coldBootReason?: string | undefined;
4204
+ outdated?: readonly ("agent" | "firecracker" | "impd" | "kernel")[] | undefined;
4205
+ };
4206
+ detail?: Readonly<{
4207
+ durationMs?: number | undefined;
4208
+ trigger?: string | undefined;
4209
+ coldBootReason?: string | undefined;
4210
+ steps?: Readonly<Record<string, number>> | undefined;
4211
+ }> | undefined;
4212
+ } | {
4213
+ v: 1;
4214
+ at: Date;
4215
+ ev: "ImpRemoved";
4216
+ imp: {
4217
+ id: string;
4218
+ name: string;
4219
+ image: string;
4220
+ state: "creating" | "error" | "running" | "sleeping" | "stopped";
4221
+ vcpus: number;
4222
+ memoryMib: number;
4223
+ diskMib: number;
4224
+ diskUsage?: {
4225
+ exclusiveBytes: number;
4226
+ sharedBytes: number;
4227
+ measuredAt: Date;
4228
+ isPartial: boolean;
4229
+ isUpperBound: boolean;
4230
+ } | undefined;
4231
+ ip: string;
4232
+ slot: number;
4233
+ port: number;
4234
+ httpPort: number;
4235
+ url: string;
4236
+ createdAt: Date;
4237
+ lastActiveAt: Date;
4238
+ ramMib?: number | undefined;
4239
+ rssMib?: number | undefined;
4240
+ sleptAt?: Date | undefined;
4241
+ holdUntil?: Date | undefined;
4242
+ error?: string | undefined;
4243
+ sessions?: number | undefined;
4244
+ coldBootReason?: string | undefined;
4245
+ outdated?: readonly ("agent" | "firecracker" | "impd" | "kernel")[] | undefined;
4246
+ };
4247
+ } | {
4248
+ v: 1;
4249
+ at: Date;
4250
+ ev: "CheckpointAdded";
4251
+ name: string;
4252
+ checkpoint: {
4253
+ id: string;
4254
+ label?: string | undefined;
4255
+ createdAt: Date;
4256
+ sizeBytes?: number | undefined;
4257
+ diskMib: number;
4258
+ };
4259
+ } | {
4260
+ v: 1;
4261
+ at: Date;
4262
+ ev: "CheckpointRemoved";
4263
+ name: string;
4264
+ checkpoint: {
4265
+ id: string;
4266
+ label?: string | undefined;
4267
+ createdAt: Date;
4268
+ sizeBytes?: number | undefined;
4269
+ diskMib: number;
4270
+ };
4271
+ } | {
4272
+ v: 1;
4273
+ at: Date;
4274
+ ev: "GovernorDecision";
4275
+ decision: "admitted" | "refused" | "slept";
4276
+ name: string;
4277
+ trigger: string;
4278
+ usedMib: number;
4279
+ budgetMib: number;
4280
+ reserveMib?: number | undefined;
4281
+ }, unknown, void>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4282
+ NOT_FOUND: {
4283
+ readonly message: "Not found";
4284
+ readonly data: z.ZodObject<{
4285
+ kind: z.ZodEnum<{
4286
+ backup: "backup";
4287
+ checkpoint: "checkpoint";
4288
+ grant: "grant";
4289
+ image: "image";
4290
+ imp: "imp";
4291
+ secret: "secret";
4292
+ session: "session";
4293
+ token: "token";
4294
+ }>;
4295
+ name: z.ZodString;
4296
+ }, z.core.$strip>;
4297
+ };
4298
+ CONFLICT: {
4299
+ readonly message: "Already exists";
4300
+ readonly data: z.ZodObject<{
4301
+ kind: z.ZodEnum<{
4302
+ backup: "backup";
4303
+ checkpoint: "checkpoint";
4304
+ grant: "grant";
4305
+ image: "image";
4306
+ imp: "imp";
4307
+ secret: "secret";
4308
+ session: "session";
4309
+ token: "token";
4310
+ }>;
4311
+ name: z.ZodString;
4312
+ }, z.core.$strip>;
4313
+ };
4314
+ FORBIDDEN: {
4315
+ readonly message: "Not allowed";
4316
+ };
4317
+ PRECONDITION_FAILED: {
4318
+ readonly message: "Not possible on this host";
4319
+ };
4320
+ RAM_BUDGET_EXCEEDED: {
4321
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
4322
+ readonly status: 503;
4323
+ readonly data: z.ZodObject<{
4324
+ budgetMib: z.ZodInt;
4325
+ usedMib: z.ZodInt;
4326
+ requestedMib: z.ZodInt;
4327
+ }, z.core.$strip>;
4328
+ };
4329
+ SERVICE_UNAVAILABLE: {
4330
+ readonly message: "impd is stopping";
4331
+ };
4332
+ INVALID_STATE: {
4333
+ readonly message: "The imp is not in a state that allows this";
4334
+ readonly status: 409;
4335
+ readonly data: z.ZodObject<{
4336
+ state: z.ZodEnum<{
4337
+ creating: "creating";
4338
+ error: "error";
4339
+ running: "running";
4340
+ sleeping: "sleeping";
4341
+ stopped: "stopped";
4342
+ }>;
4343
+ allowed: z.ZodArray<z.ZodEnum<{
4344
+ creating: "creating";
4345
+ error: "error";
4346
+ running: "running";
4347
+ sleeping: "sleeping";
4348
+ stopped: "stopped";
4349
+ }>>;
4350
+ }, z.core.$strip>;
4351
+ };
4352
+ DISK_FULL: {
4353
+ readonly message: "Not enough free disk on the host";
4354
+ readonly status: 507;
4355
+ readonly data: z.ZodObject<{
4356
+ availableBytes: z.ZodInt;
4357
+ reserveBytes: z.ZodInt;
4358
+ requestedBytes: z.ZodInt;
4359
+ }, z.core.$strip>;
4360
+ };
4361
+ AGENT_OUTDATED: {
4362
+ readonly message: "The imp's agent is too old for this";
4363
+ readonly status: 409;
4364
+ };
4365
+ }>, Record<never, never>>;
4366
+ };
4367
+ system: {
4368
+ info: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
4369
+ version: z.ZodString;
4370
+ ramBudgetMib: z.ZodInt;
4371
+ ramUsedMib: z.ZodInt;
4372
+ ramReservedMib: z.ZodInt;
4373
+ ramCommittedMib: z.ZodInt;
4374
+ awakeCount: z.ZodInt;
4375
+ impCount: z.ZodInt;
4376
+ sessionCount: z.ZodInt;
4377
+ bootStatus: z.ZodObject<{
4378
+ coldBoots: z.ZodInt;
4379
+ outdated: z.ZodObject<{
4380
+ firecracker: z.ZodInt;
3096
4381
  kernel: z.ZodInt;
3097
4382
  agent: z.ZodInt;
3098
4383
  }, z.core.$strip>;
3099
- }, z.core.$strip>;
3100
- firecrackerVersion: z.ZodNullable<z.ZodString>;
3101
- guestKernel: z.ZodObject<{
3102
- version: z.ZodNullable<z.ZodString>;
3103
- sha256: z.ZodString;
3104
- }, z.core.$strip>;
3105
- systemDrive: z.ZodObject<{
3106
- sha256: z.ZodString;
3107
- }, z.core.$strip>;
3108
- storage: z.ZodObject<{
3109
- backend: z.ZodEnum<{
3110
- xfs: "xfs";
3111
- zfs: "zfs";
4384
+ }, z.core.$strip>;
4385
+ firecrackerVersion: z.ZodNullable<z.ZodString>;
4386
+ guestKernel: z.ZodObject<{
4387
+ version: z.ZodNullable<z.ZodString>;
4388
+ sha256: z.ZodString;
4389
+ }, z.core.$strip>;
4390
+ systemDrive: z.ZodObject<{
4391
+ sha256: z.ZodString;
4392
+ }, z.core.$strip>;
4393
+ storage: z.ZodObject<{
4394
+ backend: z.ZodEnum<{
4395
+ xfs: "xfs";
4396
+ zfs: "zfs";
4397
+ }>;
4398
+ usedBytes: z.ZodInt;
4399
+ availableBytes: z.ZodInt;
4400
+ reserveBytes: z.ZodInt;
4401
+ pendingBytes: z.ZodInt;
4402
+ isLow: z.ZodBoolean;
4403
+ impDiskBytes: z.ZodInt;
4404
+ }, z.core.$strip>;
4405
+ tailscale: z.ZodObject<{
4406
+ enabled: z.ZodBoolean;
4407
+ state: z.ZodNullable<z.ZodString>;
4408
+ hostname: z.ZodNullable<z.ZodString>;
4409
+ ip: z.ZodNullable<z.ZodString>;
4410
+ }, z.core.$strip>;
4411
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4412
+ NOT_FOUND: {
4413
+ readonly message: "Not found";
4414
+ readonly data: z.ZodObject<{
4415
+ kind: z.ZodEnum<{
4416
+ backup: "backup";
4417
+ checkpoint: "checkpoint";
4418
+ grant: "grant";
4419
+ image: "image";
4420
+ imp: "imp";
4421
+ secret: "secret";
4422
+ session: "session";
4423
+ token: "token";
4424
+ }>;
4425
+ name: z.ZodString;
4426
+ }, z.core.$strip>;
4427
+ };
4428
+ CONFLICT: {
4429
+ readonly message: "Already exists";
4430
+ readonly data: z.ZodObject<{
4431
+ kind: z.ZodEnum<{
4432
+ backup: "backup";
4433
+ checkpoint: "checkpoint";
4434
+ grant: "grant";
4435
+ image: "image";
4436
+ imp: "imp";
4437
+ secret: "secret";
4438
+ session: "session";
4439
+ token: "token";
4440
+ }>;
4441
+ name: z.ZodString;
4442
+ }, z.core.$strip>;
4443
+ };
4444
+ FORBIDDEN: {
4445
+ readonly message: "Not allowed";
4446
+ };
4447
+ PRECONDITION_FAILED: {
4448
+ readonly message: "Not possible on this host";
4449
+ };
4450
+ RAM_BUDGET_EXCEEDED: {
4451
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
4452
+ readonly status: 503;
4453
+ readonly data: z.ZodObject<{
4454
+ budgetMib: z.ZodInt;
4455
+ usedMib: z.ZodInt;
4456
+ requestedMib: z.ZodInt;
4457
+ }, z.core.$strip>;
4458
+ };
4459
+ SERVICE_UNAVAILABLE: {
4460
+ readonly message: "impd is stopping";
4461
+ };
4462
+ INVALID_STATE: {
4463
+ readonly message: "The imp is not in a state that allows this";
4464
+ readonly status: 409;
4465
+ readonly data: z.ZodObject<{
4466
+ state: z.ZodEnum<{
4467
+ creating: "creating";
4468
+ error: "error";
4469
+ running: "running";
4470
+ sleeping: "sleeping";
4471
+ stopped: "stopped";
4472
+ }>;
4473
+ allowed: z.ZodArray<z.ZodEnum<{
4474
+ creating: "creating";
4475
+ error: "error";
4476
+ running: "running";
4477
+ sleeping: "sleeping";
4478
+ stopped: "stopped";
4479
+ }>>;
4480
+ }, z.core.$strip>;
4481
+ };
4482
+ DISK_FULL: {
4483
+ readonly message: "Not enough free disk on the host";
4484
+ readonly status: 507;
4485
+ readonly data: z.ZodObject<{
4486
+ availableBytes: z.ZodInt;
4487
+ reserveBytes: z.ZodInt;
4488
+ requestedBytes: z.ZodInt;
4489
+ }, z.core.$strip>;
4490
+ };
4491
+ AGENT_OUTDATED: {
4492
+ readonly message: "The imp's agent is too old for this";
4493
+ readonly status: 409;
4494
+ };
4495
+ }>, Record<never, never>>;
4496
+ gc: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4497
+ dryRun: z.ZodOptional<z.ZodBoolean>;
4498
+ }, z.core.$strip>, z.ZodReadonly<z.ZodObject<{
4499
+ dryRun: z.ZodBoolean;
4500
+ dropped: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
4501
+ kind: z.ZodEnum<{
4502
+ checkpoint: "checkpoint";
4503
+ image: "image";
4504
+ imp: "imp";
4505
+ memory: "memory";
4506
+ snapshot: "snapshot";
4507
+ }>;
4508
+ id: z.ZodString;
4509
+ }, z.core.$strip>>>>;
4510
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4511
+ NOT_FOUND: {
4512
+ readonly message: "Not found";
4513
+ readonly data: z.ZodObject<{
4514
+ kind: z.ZodEnum<{
4515
+ backup: "backup";
4516
+ checkpoint: "checkpoint";
4517
+ grant: "grant";
4518
+ image: "image";
4519
+ imp: "imp";
4520
+ secret: "secret";
4521
+ session: "session";
4522
+ token: "token";
4523
+ }>;
4524
+ name: z.ZodString;
4525
+ }, z.core.$strip>;
4526
+ };
4527
+ CONFLICT: {
4528
+ readonly message: "Already exists";
4529
+ readonly data: z.ZodObject<{
4530
+ kind: z.ZodEnum<{
4531
+ backup: "backup";
4532
+ checkpoint: "checkpoint";
4533
+ grant: "grant";
4534
+ image: "image";
4535
+ imp: "imp";
4536
+ secret: "secret";
4537
+ session: "session";
4538
+ token: "token";
4539
+ }>;
4540
+ name: z.ZodString;
4541
+ }, z.core.$strip>;
4542
+ };
4543
+ FORBIDDEN: {
4544
+ readonly message: "Not allowed";
4545
+ };
4546
+ PRECONDITION_FAILED: {
4547
+ readonly message: "Not possible on this host";
4548
+ };
4549
+ RAM_BUDGET_EXCEEDED: {
4550
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
4551
+ readonly status: 503;
4552
+ readonly data: z.ZodObject<{
4553
+ budgetMib: z.ZodInt;
4554
+ usedMib: z.ZodInt;
4555
+ requestedMib: z.ZodInt;
4556
+ }, z.core.$strip>;
4557
+ };
4558
+ SERVICE_UNAVAILABLE: {
4559
+ readonly message: "impd is stopping";
4560
+ };
4561
+ INVALID_STATE: {
4562
+ readonly message: "The imp is not in a state that allows this";
4563
+ readonly status: 409;
4564
+ readonly data: z.ZodObject<{
4565
+ state: z.ZodEnum<{
4566
+ creating: "creating";
4567
+ error: "error";
4568
+ running: "running";
4569
+ sleeping: "sleeping";
4570
+ stopped: "stopped";
4571
+ }>;
4572
+ allowed: z.ZodArray<z.ZodEnum<{
4573
+ creating: "creating";
4574
+ error: "error";
4575
+ running: "running";
4576
+ sleeping: "sleeping";
4577
+ stopped: "stopped";
4578
+ }>>;
4579
+ }, z.core.$strip>;
4580
+ };
4581
+ DISK_FULL: {
4582
+ readonly message: "Not enough free disk on the host";
4583
+ readonly status: 507;
4584
+ readonly data: z.ZodObject<{
4585
+ availableBytes: z.ZodInt;
4586
+ reserveBytes: z.ZodInt;
4587
+ requestedBytes: z.ZodInt;
4588
+ }, z.core.$strip>;
4589
+ };
4590
+ AGENT_OUTDATED: {
4591
+ readonly message: "The imp's agent is too old for this";
4592
+ readonly status: 409;
4593
+ };
4594
+ }>, Record<never, never>>;
4595
+ };
4596
+ tokens: {
4597
+ list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
4598
+ name: z.ZodString;
4599
+ scope: z.ZodEnum<{
4600
+ exec: "exec";
4601
+ manage: "manage";
4602
+ read: "read";
4603
+ }>;
4604
+ imps: z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4605
+ createdAt: z.ZodDate;
4606
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4607
+ NOT_FOUND: {
4608
+ readonly message: "Not found";
4609
+ readonly data: z.ZodObject<{
4610
+ kind: z.ZodEnum<{
4611
+ backup: "backup";
4612
+ checkpoint: "checkpoint";
4613
+ grant: "grant";
4614
+ image: "image";
4615
+ imp: "imp";
4616
+ secret: "secret";
4617
+ session: "session";
4618
+ token: "token";
4619
+ }>;
4620
+ name: z.ZodString;
4621
+ }, z.core.$strip>;
4622
+ };
4623
+ CONFLICT: {
4624
+ readonly message: "Already exists";
4625
+ readonly data: z.ZodObject<{
4626
+ kind: z.ZodEnum<{
4627
+ backup: "backup";
4628
+ checkpoint: "checkpoint";
4629
+ grant: "grant";
4630
+ image: "image";
4631
+ imp: "imp";
4632
+ secret: "secret";
4633
+ session: "session";
4634
+ token: "token";
4635
+ }>;
4636
+ name: z.ZodString;
4637
+ }, z.core.$strip>;
4638
+ };
4639
+ FORBIDDEN: {
4640
+ readonly message: "Not allowed";
4641
+ };
4642
+ PRECONDITION_FAILED: {
4643
+ readonly message: "Not possible on this host";
4644
+ };
4645
+ RAM_BUDGET_EXCEEDED: {
4646
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
4647
+ readonly status: 503;
4648
+ readonly data: z.ZodObject<{
4649
+ budgetMib: z.ZodInt;
4650
+ usedMib: z.ZodInt;
4651
+ requestedMib: z.ZodInt;
4652
+ }, z.core.$strip>;
4653
+ };
4654
+ SERVICE_UNAVAILABLE: {
4655
+ readonly message: "impd is stopping";
4656
+ };
4657
+ INVALID_STATE: {
4658
+ readonly message: "The imp is not in a state that allows this";
4659
+ readonly status: 409;
4660
+ readonly data: z.ZodObject<{
4661
+ state: z.ZodEnum<{
4662
+ creating: "creating";
4663
+ error: "error";
4664
+ running: "running";
4665
+ sleeping: "sleeping";
4666
+ stopped: "stopped";
4667
+ }>;
4668
+ allowed: z.ZodArray<z.ZodEnum<{
4669
+ creating: "creating";
4670
+ error: "error";
4671
+ running: "running";
4672
+ sleeping: "sleeping";
4673
+ stopped: "stopped";
4674
+ }>>;
4675
+ }, z.core.$strip>;
4676
+ };
4677
+ DISK_FULL: {
4678
+ readonly message: "Not enough free disk on the host";
4679
+ readonly status: 507;
4680
+ readonly data: z.ZodObject<{
4681
+ availableBytes: z.ZodInt;
4682
+ reserveBytes: z.ZodInt;
4683
+ requestedBytes: z.ZodInt;
4684
+ }, z.core.$strip>;
4685
+ };
4686
+ AGENT_OUTDATED: {
4687
+ readonly message: "The imp's agent is too old for this";
4688
+ readonly status: 409;
4689
+ };
4690
+ }>, Record<never, never>>;
4691
+ create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4692
+ name: z.ZodString;
4693
+ scope: z.ZodEnum<{
4694
+ exec: "exec";
4695
+ manage: "manage";
4696
+ read: "read";
4697
+ }>;
4698
+ imps: z.ZodOptional<z.ZodArray<z.ZodString>>;
4699
+ }, z.core.$strip>, z.ZodObject<{
4700
+ token: z.ZodObject<{
4701
+ name: z.ZodString;
4702
+ scope: z.ZodEnum<{
4703
+ exec: "exec";
4704
+ manage: "manage";
4705
+ read: "read";
3112
4706
  }>;
3113
- usedBytes: z.ZodInt;
3114
- availableBytes: z.ZodInt;
3115
- }, z.core.$strip>;
3116
- tailscale: z.ZodObject<{
3117
- enabled: z.ZodBoolean;
3118
- state: z.ZodNullable<z.ZodString>;
3119
- hostname: z.ZodNullable<z.ZodString>;
3120
- ip: z.ZodNullable<z.ZodString>;
4707
+ imps: z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
4708
+ createdAt: z.ZodDate;
3121
4709
  }, z.core.$strip>;
4710
+ secret: z.ZodString;
4711
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4712
+ NOT_FOUND: {
4713
+ readonly message: "Not found";
4714
+ readonly data: z.ZodObject<{
4715
+ kind: z.ZodEnum<{
4716
+ backup: "backup";
4717
+ checkpoint: "checkpoint";
4718
+ grant: "grant";
4719
+ image: "image";
4720
+ imp: "imp";
4721
+ secret: "secret";
4722
+ session: "session";
4723
+ token: "token";
4724
+ }>;
4725
+ name: z.ZodString;
4726
+ }, z.core.$strip>;
4727
+ };
4728
+ CONFLICT: {
4729
+ readonly message: "Already exists";
4730
+ readonly data: z.ZodObject<{
4731
+ kind: z.ZodEnum<{
4732
+ backup: "backup";
4733
+ checkpoint: "checkpoint";
4734
+ grant: "grant";
4735
+ image: "image";
4736
+ imp: "imp";
4737
+ secret: "secret";
4738
+ session: "session";
4739
+ token: "token";
4740
+ }>;
4741
+ name: z.ZodString;
4742
+ }, z.core.$strip>;
4743
+ };
4744
+ FORBIDDEN: {
4745
+ readonly message: "Not allowed";
4746
+ };
4747
+ PRECONDITION_FAILED: {
4748
+ readonly message: "Not possible on this host";
4749
+ };
4750
+ RAM_BUDGET_EXCEEDED: {
4751
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
4752
+ readonly status: 503;
4753
+ readonly data: z.ZodObject<{
4754
+ budgetMib: z.ZodInt;
4755
+ usedMib: z.ZodInt;
4756
+ requestedMib: z.ZodInt;
4757
+ }, z.core.$strip>;
4758
+ };
4759
+ SERVICE_UNAVAILABLE: {
4760
+ readonly message: "impd is stopping";
4761
+ };
4762
+ INVALID_STATE: {
4763
+ readonly message: "The imp is not in a state that allows this";
4764
+ readonly status: 409;
4765
+ readonly data: z.ZodObject<{
4766
+ state: z.ZodEnum<{
4767
+ creating: "creating";
4768
+ error: "error";
4769
+ running: "running";
4770
+ sleeping: "sleeping";
4771
+ stopped: "stopped";
4772
+ }>;
4773
+ allowed: z.ZodArray<z.ZodEnum<{
4774
+ creating: "creating";
4775
+ error: "error";
4776
+ running: "running";
4777
+ sleeping: "sleeping";
4778
+ stopped: "stopped";
4779
+ }>>;
4780
+ }, z.core.$strip>;
4781
+ };
4782
+ DISK_FULL: {
4783
+ readonly message: "Not enough free disk on the host";
4784
+ readonly status: 507;
4785
+ readonly data: z.ZodObject<{
4786
+ availableBytes: z.ZodInt;
4787
+ reserveBytes: z.ZodInt;
4788
+ requestedBytes: z.ZodInt;
4789
+ }, z.core.$strip>;
4790
+ };
4791
+ AGENT_OUTDATED: {
4792
+ readonly message: "The imp's agent is too old for this";
4793
+ readonly status: 409;
4794
+ };
4795
+ }>, Record<never, never>>;
4796
+ delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4797
+ name: z.ZodString;
4798
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4799
+ NOT_FOUND: {
4800
+ readonly message: "Not found";
4801
+ readonly data: z.ZodObject<{
4802
+ kind: z.ZodEnum<{
4803
+ backup: "backup";
4804
+ checkpoint: "checkpoint";
4805
+ grant: "grant";
4806
+ image: "image";
4807
+ imp: "imp";
4808
+ secret: "secret";
4809
+ session: "session";
4810
+ token: "token";
4811
+ }>;
4812
+ name: z.ZodString;
4813
+ }, z.core.$strip>;
4814
+ };
4815
+ CONFLICT: {
4816
+ readonly message: "Already exists";
4817
+ readonly data: z.ZodObject<{
4818
+ kind: z.ZodEnum<{
4819
+ backup: "backup";
4820
+ checkpoint: "checkpoint";
4821
+ grant: "grant";
4822
+ image: "image";
4823
+ imp: "imp";
4824
+ secret: "secret";
4825
+ session: "session";
4826
+ token: "token";
4827
+ }>;
4828
+ name: z.ZodString;
4829
+ }, z.core.$strip>;
4830
+ };
4831
+ FORBIDDEN: {
4832
+ readonly message: "Not allowed";
4833
+ };
4834
+ PRECONDITION_FAILED: {
4835
+ readonly message: "Not possible on this host";
4836
+ };
4837
+ RAM_BUDGET_EXCEEDED: {
4838
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
4839
+ readonly status: 503;
4840
+ readonly data: z.ZodObject<{
4841
+ budgetMib: z.ZodInt;
4842
+ usedMib: z.ZodInt;
4843
+ requestedMib: z.ZodInt;
4844
+ }, z.core.$strip>;
4845
+ };
4846
+ SERVICE_UNAVAILABLE: {
4847
+ readonly message: "impd is stopping";
4848
+ };
4849
+ INVALID_STATE: {
4850
+ readonly message: "The imp is not in a state that allows this";
4851
+ readonly status: 409;
4852
+ readonly data: z.ZodObject<{
4853
+ state: z.ZodEnum<{
4854
+ creating: "creating";
4855
+ error: "error";
4856
+ running: "running";
4857
+ sleeping: "sleeping";
4858
+ stopped: "stopped";
4859
+ }>;
4860
+ allowed: z.ZodArray<z.ZodEnum<{
4861
+ creating: "creating";
4862
+ error: "error";
4863
+ running: "running";
4864
+ sleeping: "sleeping";
4865
+ stopped: "stopped";
4866
+ }>>;
4867
+ }, z.core.$strip>;
4868
+ };
4869
+ DISK_FULL: {
4870
+ readonly message: "Not enough free disk on the host";
4871
+ readonly status: 507;
4872
+ readonly data: z.ZodObject<{
4873
+ availableBytes: z.ZodInt;
4874
+ reserveBytes: z.ZodInt;
4875
+ requestedBytes: z.ZodInt;
4876
+ }, z.core.$strip>;
4877
+ };
4878
+ AGENT_OUTDATED: {
4879
+ readonly message: "The imp's agent is too old for this";
4880
+ readonly status: 409;
4881
+ };
4882
+ }>, Record<never, never>>;
4883
+ whoami: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
4884
+ kind: z.ZodEnum<{
4885
+ dashboard: "dashboard";
4886
+ ssh: "ssh";
4887
+ tailnet: "tailnet";
4888
+ token: "token";
4889
+ }>;
4890
+ name: z.ZodString;
4891
+ scope: z.ZodEnum<{
4892
+ exec: "exec";
4893
+ manage: "manage";
4894
+ read: "read";
4895
+ }>;
4896
+ imps: z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
3122
4897
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
3123
4898
  NOT_FOUND: {
3124
4899
  readonly message: "Not found";
@@ -3131,6 +4906,7 @@ declare const impContract: {
3131
4906
  imp: "imp";
3132
4907
  secret: "secret";
3133
4908
  session: "session";
4909
+ token: "token";
3134
4910
  }>;
3135
4911
  name: z.ZodString;
3136
4912
  }, z.core.$strip>;
@@ -3146,6 +4922,7 @@ declare const impContract: {
3146
4922
  imp: "imp";
3147
4923
  secret: "secret";
3148
4924
  session: "session";
4925
+ token: "token";
3149
4926
  }>;
3150
4927
  name: z.ZodString;
3151
4928
  }, z.core.$strip>;
@@ -3188,6 +4965,15 @@ declare const impContract: {
3188
4965
  }>>;
3189
4966
  }, z.core.$strip>;
3190
4967
  };
4968
+ DISK_FULL: {
4969
+ readonly message: "Not enough free disk on the host";
4970
+ readonly status: 507;
4971
+ readonly data: z.ZodObject<{
4972
+ availableBytes: z.ZodInt;
4973
+ reserveBytes: z.ZodInt;
4974
+ requestedBytes: z.ZodInt;
4975
+ }, z.core.$strip>;
4976
+ };
3191
4977
  AGENT_OUTDATED: {
3192
4978
  readonly message: "The imp's agent is too old for this";
3193
4979
  readonly status: 409;
@@ -3219,6 +5005,14 @@ declare const ImpSchema: z.ZodObject<{
3219
5005
  }>;
3220
5006
  vcpus: z.ZodInt;
3221
5007
  memoryMib: z.ZodInt;
5008
+ diskMib: z.ZodInt;
5009
+ diskUsage: z.ZodOptional<z.ZodObject<{
5010
+ exclusiveBytes: z.ZodInt;
5011
+ sharedBytes: z.ZodInt;
5012
+ measuredAt: z.ZodDate;
5013
+ isPartial: z.ZodBoolean;
5014
+ isUpperBound: z.ZodBoolean;
5015
+ }, z.core.$strip>>;
3222
5016
  ip: z.ZodIPv4;
3223
5017
  slot: z.ZodInt;
3224
5018
  port: z.ZodInt;
@@ -3298,6 +5092,10 @@ declare const SystemInfoSchema: z.ZodObject<{
3298
5092
  }>;
3299
5093
  usedBytes: z.ZodInt;
3300
5094
  availableBytes: z.ZodInt;
5095
+ reserveBytes: z.ZodInt;
5096
+ pendingBytes: z.ZodInt;
5097
+ isLow: z.ZodBoolean;
5098
+ impDiskBytes: z.ZodInt;
3301
5099
  }, z.core.$strip>;
3302
5100
  tailscale: z.ZodObject<{
3303
5101
  enabled: z.ZodBoolean;
@@ -3308,6 +5106,41 @@ declare const SystemInfoSchema: z.ZodObject<{
3308
5106
  }, z.core.$strip>;
3309
5107
  type SystemInfo = z.infer<typeof SystemInfoSchema>;
3310
5108
  //#endregion
5109
+ //#region ../api/src/token-schema.d.ts
5110
+ declare const ScopeSchema: z.ZodEnum<{
5111
+ exec: "exec";
5112
+ manage: "manage";
5113
+ read: "read";
5114
+ }>;
5115
+ type Scope = z.infer<typeof ScopeSchema>;
5116
+ declare const TokenSchema: z.ZodObject<{
5117
+ name: z.ZodString;
5118
+ scope: z.ZodEnum<{
5119
+ exec: "exec";
5120
+ manage: "manage";
5121
+ read: "read";
5122
+ }>;
5123
+ imps: z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
5124
+ createdAt: z.ZodDate;
5125
+ }, z.core.$strip>;
5126
+ type Token = z.infer<typeof TokenSchema>;
5127
+ declare const IdentitySchema: z.ZodObject<{
5128
+ kind: z.ZodEnum<{
5129
+ dashboard: "dashboard";
5130
+ ssh: "ssh";
5131
+ tailnet: "tailnet";
5132
+ token: "token";
5133
+ }>;
5134
+ name: z.ZodString;
5135
+ scope: z.ZodEnum<{
5136
+ exec: "exec";
5137
+ manage: "manage";
5138
+ read: "read";
5139
+ }>;
5140
+ imps: z.ZodNullable<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
5141
+ }, z.core.$strip>;
5142
+ type Identity = z.infer<typeof IdentitySchema>;
5143
+ //#endregion
3311
5144
  //#region src/check-server.d.ts
3312
5145
  export declare const CLIENT_VERSION: string;
3313
5146
  interface ServerCheck {
@@ -3463,4 +5296,4 @@ export declare class ExecError extends Error {
3463
5296
  }>);
3464
5297
  }
3465
5298
  //#endregion
3466
- export { type AttachOptions, type Checkpoint, type ConsoleOptions, type DetachReason, type ExecClientErrorCode, type ExecExit, type ExecHandle, type ExecOptions, type ExecOutcome, type ExecSession, type ExecSessionOptions, type ExecStarted, type Image, type Imp, type ImpClient, type ImpClientOptions, type ImpState, ORPCError, type RequireAwakeOptions, type RunOptions, type RunResult, type ServerCheck, type Session, type SystemInfo, isDefinedError, safe };
5299
+ export { type ApiCall, type AttachOptions, type Checkpoint, type ConsoleOptions, type DetachReason, type ExecClientErrorCode, type ExecExit, type ExecHandle, type ExecOptions, type ExecOutcome, type ExecSession, type ExecSessionOptions, type ExecStarted, type Identity, type Image, type Imp, type ImpClient, type ImpClientOptions, type ImpEvent, type ImpState, ORPCError, type RequireAwakeOptions, type RunOptions, type RunResult, type Scope, type ServerCheck, type Session, type SystemInfo, type Token, isDefinedError, safe };