@ankorcs/protocol 0.0.0-stage → 0.6.1

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.
@@ -0,0 +1,857 @@
1
+ /**
2
+ * The agent's upload of stored events to the controller, at {@link DEFAULT_EVENTS_PATH} unless
3
+ * `agent.yml` sets `controller.events_path`.
4
+ */
5
+ import { z } from 'zod';
6
+ /** An event's position among its server's events, from 0. */
7
+ export declare const EventSeq: z.ZodNumber;
8
+ /**
9
+ * One frame of an event batch: an event and its position among the events of the server that the
10
+ * batch names. A node runs each allocation once and refuses to launch one it has run before, so the
11
+ * batch's `allocation_id` and the frame's `seq` identify the event. Parse each frame of a batch on
12
+ * its own with this schema.
13
+ */
14
+ export declare const EventBatchFrame: z.ZodObject<{
15
+ seq: z.ZodNumber;
16
+ event: z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
17
+ plugin_version: z.ZodString;
18
+ framework_version: z.ZodString;
19
+ server_version: z.ZodString;
20
+ map_name: z.ZodString;
21
+ timestamp: z.ZodNumber;
22
+ tick: z.ZodNumber;
23
+ type: z.ZodLiteral<"map_start">;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ player: z.ZodObject<{
26
+ steam_id: z.ZodString;
27
+ name: z.ZodString;
28
+ side: z.ZodEnum<{
29
+ t: "t";
30
+ ct: "ct";
31
+ spec: "spec";
32
+ }>;
33
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
34
+ }, z.core.$strip>;
35
+ rejected: z.ZodBoolean;
36
+ timestamp: z.ZodNumber;
37
+ tick: z.ZodNumber;
38
+ type: z.ZodLiteral<"player_connect">;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ player: z.ZodObject<{
41
+ steam_id: z.ZodString;
42
+ name: z.ZodString;
43
+ side: z.ZodEnum<{
44
+ t: "t";
45
+ ct: "ct";
46
+ spec: "spec";
47
+ }>;
48
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
49
+ }, z.core.$strip>;
50
+ reason: z.ZodString;
51
+ timestamp: z.ZodNumber;
52
+ tick: z.ZodNumber;
53
+ type: z.ZodLiteral<"player_disconnect">;
54
+ }, z.core.$strip>, z.ZodObject<{
55
+ timestamp: z.ZodNumber;
56
+ tick: z.ZodNumber;
57
+ type: z.ZodLiteral<"knife_start">;
58
+ }, z.core.$strip>, z.ZodObject<{
59
+ winner_team: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
60
+ winner_side: z.ZodEnum<{
61
+ t: "t";
62
+ ct: "ct";
63
+ }>;
64
+ team1_alive: z.ZodNumber;
65
+ team2_alive: z.ZodNumber;
66
+ team1_health: z.ZodNumber;
67
+ team2_health: z.ZodNumber;
68
+ timestamp: z.ZodNumber;
69
+ tick: z.ZodNumber;
70
+ type: z.ZodLiteral<"knife_end">;
71
+ }, z.core.$strip>, z.ZodObject<{
72
+ team: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
73
+ choice: z.ZodEnum<{
74
+ stay: "stay";
75
+ swap: "swap";
76
+ }>;
77
+ team1_side: z.ZodEnum<{
78
+ t: "t";
79
+ ct: "ct";
80
+ }>;
81
+ timestamp: z.ZodNumber;
82
+ tick: z.ZodNumber;
83
+ type: z.ZodLiteral<"side_choice">;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ max_rounds: z.ZodNumber;
86
+ overtime: z.ZodBoolean;
87
+ overtime_max_rounds: z.ZodNumber;
88
+ friendly_fire: z.ZodBoolean;
89
+ team1_side: z.ZodEnum<{
90
+ t: "t";
91
+ ct: "ct";
92
+ }>;
93
+ timestamp: z.ZodNumber;
94
+ tick: z.ZodNumber;
95
+ type: z.ZodLiteral<"going_live">;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ roster: z.ZodObject<{
98
+ team1: z.ZodObject<{
99
+ name: z.ZodString;
100
+ players: z.ZodArray<z.ZodString>;
101
+ }, z.core.$strip>;
102
+ team2: z.ZodObject<{
103
+ name: z.ZodString;
104
+ players: z.ZodArray<z.ZodString>;
105
+ }, z.core.$strip>;
106
+ spectators: z.ZodArray<z.ZodString>;
107
+ }, z.core.$strip>;
108
+ team1_side: z.ZodEnum<{
109
+ t: "t";
110
+ ct: "ct";
111
+ }>;
112
+ rules: z.ZodObject<{
113
+ max_rounds: z.ZodNumber;
114
+ overtime: z.ZodBoolean;
115
+ overtime_max_rounds: z.ZodNumber;
116
+ friendly_fire: z.ZodBoolean;
117
+ }, z.core.$strip>;
118
+ file: z.ZodString;
119
+ round: z.ZodNumber;
120
+ team1_score: z.ZodNumber;
121
+ team2_score: z.ZodNumber;
122
+ timestamp: z.ZodNumber;
123
+ tick: z.ZodNumber;
124
+ type: z.ZodLiteral<"round_backup">;
125
+ }, z.core.$strip>, z.ZodObject<{
126
+ round: z.ZodNumber;
127
+ team1_side: z.ZodEnum<{
128
+ t: "t";
129
+ ct: "ct";
130
+ }>;
131
+ team1_score: z.ZodNumber;
132
+ team2_score: z.ZodNumber;
133
+ timestamp: z.ZodNumber;
134
+ tick: z.ZodNumber;
135
+ type: z.ZodLiteral<"match_restored">;
136
+ }, z.core.$strip>, z.ZodObject<{
137
+ team1_side: z.ZodEnum<{
138
+ t: "t";
139
+ ct: "ct";
140
+ }>;
141
+ players: z.ZodArray<z.ZodObject<{
142
+ player: z.ZodObject<{
143
+ steam_id: z.ZodString;
144
+ name: z.ZodString;
145
+ side: z.ZodEnum<{
146
+ t: "t";
147
+ ct: "ct";
148
+ spec: "spec";
149
+ }>;
150
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
151
+ }, z.core.$strip>;
152
+ alive: z.ZodBoolean;
153
+ equipment_value: z.ZodNumber;
154
+ cash: z.ZodNumber;
155
+ start_cash: z.ZodNumber;
156
+ cash_spent: z.ZodNumber;
157
+ }, z.core.$strip>>;
158
+ carryover: z.ZodNullable<z.ZodObject<{
159
+ from_round: z.ZodNumber;
160
+ sampled_tick: z.ZodNumber;
161
+ players: z.ZodArray<z.ZodObject<{
162
+ player: z.ZodObject<{
163
+ steam_id: z.ZodString;
164
+ name: z.ZodString;
165
+ side: z.ZodEnum<{
166
+ t: "t";
167
+ ct: "ct";
168
+ spec: "spec";
169
+ }>;
170
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
171
+ }, z.core.$strip>;
172
+ alive: z.ZodBoolean;
173
+ equipment_value: z.ZodNumber;
174
+ cash: z.ZodNumber;
175
+ start_cash: z.ZodNumber;
176
+ cash_spent: z.ZodNumber;
177
+ inventory: z.ZodNullable<z.ZodObject<{
178
+ items: z.ZodArray<z.ZodObject<{
179
+ weapon: z.ZodNumber;
180
+ quantity: z.ZodNumber;
181
+ unit_value: z.ZodNumber;
182
+ }, z.core.$strip>>;
183
+ armor: z.ZodNumber;
184
+ helmet: z.ZodBoolean;
185
+ defuse_kit: z.ZodBoolean;
186
+ }, z.core.$strip>>;
187
+ }, z.core.$strip>>;
188
+ }, z.core.$strip>>;
189
+ round: z.ZodNumber;
190
+ round_time: z.ZodNumber;
191
+ timestamp: z.ZodNumber;
192
+ tick: z.ZodNumber;
193
+ type: z.ZodLiteral<"round_start">;
194
+ }, z.core.$strip>, z.ZodObject<{
195
+ team1_side: z.ZodEnum<{
196
+ t: "t";
197
+ ct: "ct";
198
+ }>;
199
+ players: z.ZodArray<z.ZodObject<{
200
+ player: z.ZodObject<{
201
+ steam_id: z.ZodString;
202
+ name: z.ZodString;
203
+ side: z.ZodEnum<{
204
+ t: "t";
205
+ ct: "ct";
206
+ spec: "spec";
207
+ }>;
208
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
209
+ }, z.core.$strip>;
210
+ alive: z.ZodBoolean;
211
+ equipment_value: z.ZodNumber;
212
+ cash: z.ZodNumber;
213
+ start_cash: z.ZodNumber;
214
+ cash_spent: z.ZodNumber;
215
+ }, z.core.$strip>>;
216
+ round: z.ZodNumber;
217
+ round_time: z.ZodNumber;
218
+ timestamp: z.ZodNumber;
219
+ tick: z.ZodNumber;
220
+ type: z.ZodLiteral<"round_freeze_end">;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ players: z.ZodArray<z.ZodObject<{
223
+ player: z.ZodObject<{
224
+ steam_id: z.ZodString;
225
+ name: z.ZodString;
226
+ side: z.ZodEnum<{
227
+ t: "t";
228
+ ct: "ct";
229
+ spec: "spec";
230
+ }>;
231
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
232
+ }, z.core.$strip>;
233
+ equipment_value: z.ZodNumber;
234
+ cash: z.ZodNumber;
235
+ start_cash: z.ZodNumber;
236
+ cash_spent: z.ZodNumber;
237
+ sampled_tick: z.ZodNumber;
238
+ }, z.core.$strip>>;
239
+ team1_equipment_value: z.ZodNumber;
240
+ team2_equipment_value: z.ZodNumber;
241
+ round: z.ZodNumber;
242
+ round_time: z.ZodNumber;
243
+ timestamp: z.ZodNumber;
244
+ tick: z.ZodNumber;
245
+ type: z.ZodLiteral<"round_buy_end">;
246
+ }, z.core.$strip>, z.ZodObject<{
247
+ winner_side: z.ZodEnum<{
248
+ t: "t";
249
+ ct: "ct";
250
+ }>;
251
+ winner_team: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
252
+ reason: z.ZodEnum<{
253
+ readonly unknown: "unknown";
254
+ readonly target_bombed: "target_bombed";
255
+ readonly terrorists_escaped: "terrorists_escaped";
256
+ readonly cts_prevent_escape: "cts_prevent_escape";
257
+ readonly escaping_terrorists_neutralized: "escaping_terrorists_neutralized";
258
+ readonly bomb_defused: "bomb_defused";
259
+ readonly cts_win: "cts_win";
260
+ readonly terrorists_win: "terrorists_win";
261
+ readonly round_draw: "round_draw";
262
+ readonly all_hostages_rescued: "all_hostages_rescued";
263
+ readonly target_saved: "target_saved";
264
+ readonly hostages_not_rescued: "hostages_not_rescued";
265
+ readonly terrorists_not_escaped: "terrorists_not_escaped";
266
+ readonly game_commencing: "game_commencing";
267
+ readonly terrorists_surrender: "terrorists_surrender";
268
+ readonly cts_surrender: "cts_surrender";
269
+ readonly terrorists_planted: "terrorists_planted";
270
+ readonly cts_reached_hostage: "cts_reached_hostage";
271
+ readonly survival_win: "survival_win";
272
+ readonly survival_draw: "survival_draw";
273
+ }>;
274
+ team1_score: z.ZodNumber;
275
+ team2_score: z.ZodNumber;
276
+ round_length: z.ZodNumber;
277
+ round: z.ZodNumber;
278
+ round_time: z.ZodNumber;
279
+ timestamp: z.ZodNumber;
280
+ tick: z.ZodNumber;
281
+ type: z.ZodLiteral<"round_end">;
282
+ }, z.core.$strip>, z.ZodObject<{
283
+ round: z.ZodNumber;
284
+ round_time: z.ZodNumber;
285
+ timestamp: z.ZodNumber;
286
+ tick: z.ZodNumber;
287
+ type: z.ZodLiteral<"round_complete">;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ victim: z.ZodObject<{
290
+ steam_id: z.ZodString;
291
+ name: z.ZodString;
292
+ side: z.ZodEnum<{
293
+ t: "t";
294
+ ct: "ct";
295
+ spec: "spec";
296
+ }>;
297
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
298
+ position: z.ZodObject<{
299
+ x: z.ZodNumber;
300
+ y: z.ZodNumber;
301
+ z: z.ZodNumber;
302
+ pitch: z.ZodNumber;
303
+ yaw: z.ZodNumber;
304
+ }, z.core.$strip>;
305
+ }, z.core.$strip>;
306
+ attacker: z.ZodNullable<z.ZodObject<{
307
+ steam_id: z.ZodString;
308
+ name: z.ZodString;
309
+ side: z.ZodEnum<{
310
+ t: "t";
311
+ ct: "ct";
312
+ spec: "spec";
313
+ }>;
314
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
315
+ position: z.ZodNullable<z.ZodObject<{
316
+ x: z.ZodNumber;
317
+ y: z.ZodNumber;
318
+ z: z.ZodNumber;
319
+ pitch: z.ZodNumber;
320
+ yaw: z.ZodNumber;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>>;
323
+ assister: z.ZodNullable<z.ZodObject<{
324
+ steam_id: z.ZodString;
325
+ name: z.ZodString;
326
+ side: z.ZodEnum<{
327
+ t: "t";
328
+ ct: "ct";
329
+ spec: "spec";
330
+ }>;
331
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
332
+ }, z.core.$strip>>;
333
+ weapon: z.ZodObject<{
334
+ id: z.ZodNullable<z.ZodNumber>;
335
+ fallback: z.ZodNullable<z.ZodString>;
336
+ }, z.core.$strip>;
337
+ cause: z.ZodEnum<{
338
+ player: "player";
339
+ bomb: "bomb";
340
+ fall: "fall";
341
+ self: "self";
342
+ disconnect: "disconnect";
343
+ other: "other";
344
+ }>;
345
+ headshot: z.ZodBoolean;
346
+ penetrated: z.ZodNumber;
347
+ thru_smoke: z.ZodBoolean;
348
+ no_scope: z.ZodBoolean;
349
+ attacker_blind: z.ZodBoolean;
350
+ attacker_in_air: z.ZodBoolean;
351
+ flash_assist: z.ZodBoolean;
352
+ friendly_fire: z.ZodBoolean;
353
+ victim_blind_by: z.ZodNullable<z.ZodObject<{
354
+ steam_id: z.ZodString;
355
+ name: z.ZodString;
356
+ side: z.ZodEnum<{
357
+ t: "t";
358
+ ct: "ct";
359
+ spec: "spec";
360
+ }>;
361
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
362
+ }, z.core.$strip>>;
363
+ victim_blind_remaining: z.ZodNumber;
364
+ victim_equipment_value: z.ZodNumber;
365
+ victim_grenades_held: z.ZodNullable<z.ZodArray<z.ZodObject<{
366
+ weapon: z.ZodNumber;
367
+ quantity: z.ZodNumber;
368
+ unit_value: z.ZodNumber;
369
+ }, z.core.$strip>>>;
370
+ round: z.ZodNumber;
371
+ round_time: z.ZodNumber;
372
+ timestamp: z.ZodNumber;
373
+ tick: z.ZodNumber;
374
+ type: z.ZodLiteral<"player_death">;
375
+ }, z.core.$strip>, z.ZodObject<{
376
+ victim: z.ZodObject<{
377
+ steam_id: z.ZodString;
378
+ name: z.ZodString;
379
+ side: z.ZodEnum<{
380
+ t: "t";
381
+ ct: "ct";
382
+ spec: "spec";
383
+ }>;
384
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
385
+ position: z.ZodObject<{
386
+ x: z.ZodNumber;
387
+ y: z.ZodNumber;
388
+ z: z.ZodNumber;
389
+ pitch: z.ZodNumber;
390
+ yaw: z.ZodNumber;
391
+ }, z.core.$strip>;
392
+ }, z.core.$strip>;
393
+ attacker: z.ZodNullable<z.ZodObject<{
394
+ steam_id: z.ZodString;
395
+ name: z.ZodString;
396
+ side: z.ZodEnum<{
397
+ t: "t";
398
+ ct: "ct";
399
+ spec: "spec";
400
+ }>;
401
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
402
+ position: z.ZodNullable<z.ZodObject<{
403
+ x: z.ZodNumber;
404
+ y: z.ZodNumber;
405
+ z: z.ZodNumber;
406
+ pitch: z.ZodNumber;
407
+ yaw: z.ZodNumber;
408
+ }, z.core.$strip>>;
409
+ }, z.core.$strip>>;
410
+ weapon: z.ZodObject<{
411
+ id: z.ZodNullable<z.ZodNumber>;
412
+ fallback: z.ZodNullable<z.ZodString>;
413
+ }, z.core.$strip>;
414
+ cause: z.ZodEnum<{
415
+ player: "player";
416
+ bomb: "bomb";
417
+ fall: "fall";
418
+ self: "self";
419
+ disconnect: "disconnect";
420
+ other: "other";
421
+ }>;
422
+ dmg_health: z.ZodNumber;
423
+ health_before: z.ZodNullable<z.ZodNumber>;
424
+ health_after: z.ZodNumber;
425
+ dmg_armor: z.ZodNumber;
426
+ hitgroup: z.ZodNumber;
427
+ friendly_fire: z.ZodBoolean;
428
+ projectile_impact: z.ZodBoolean;
429
+ grenade_id: z.ZodNullable<z.ZodNumber>;
430
+ round: z.ZodNumber;
431
+ round_time: z.ZodNumber;
432
+ timestamp: z.ZodNumber;
433
+ tick: z.ZodNumber;
434
+ type: z.ZodLiteral<"player_hurt">;
435
+ }, z.core.$strip>, z.ZodObject<{
436
+ victim: z.ZodObject<{
437
+ steam_id: z.ZodString;
438
+ name: z.ZodString;
439
+ side: z.ZodEnum<{
440
+ t: "t";
441
+ ct: "ct";
442
+ spec: "spec";
443
+ }>;
444
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
445
+ position: z.ZodObject<{
446
+ x: z.ZodNumber;
447
+ y: z.ZodNumber;
448
+ z: z.ZodNumber;
449
+ pitch: z.ZodNumber;
450
+ yaw: z.ZodNumber;
451
+ }, z.core.$strip>;
452
+ }, z.core.$strip>;
453
+ attacker: z.ZodObject<{
454
+ steam_id: z.ZodString;
455
+ name: z.ZodString;
456
+ side: z.ZodEnum<{
457
+ t: "t";
458
+ ct: "ct";
459
+ spec: "spec";
460
+ }>;
461
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
462
+ position: z.ZodNullable<z.ZodObject<{
463
+ x: z.ZodNumber;
464
+ y: z.ZodNumber;
465
+ z: z.ZodNumber;
466
+ pitch: z.ZodNumber;
467
+ yaw: z.ZodNumber;
468
+ }, z.core.$strip>>;
469
+ }, z.core.$strip>;
470
+ duration: z.ZodNumber;
471
+ friendly_fire: z.ZodBoolean;
472
+ grenade_id: z.ZodNullable<z.ZodNumber>;
473
+ round: z.ZodNumber;
474
+ round_time: z.ZodNumber;
475
+ timestamp: z.ZodNumber;
476
+ tick: z.ZodNumber;
477
+ type: z.ZodLiteral<"player_blind">;
478
+ }, z.core.$strip>, z.ZodObject<{
479
+ grenade_id: z.ZodNumber;
480
+ player: z.ZodObject<{
481
+ steam_id: z.ZodString;
482
+ name: z.ZodString;
483
+ side: z.ZodEnum<{
484
+ t: "t";
485
+ ct: "ct";
486
+ spec: "spec";
487
+ }>;
488
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
489
+ position: z.ZodObject<{
490
+ x: z.ZodNumber;
491
+ y: z.ZodNumber;
492
+ z: z.ZodNumber;
493
+ pitch: z.ZodNumber;
494
+ yaw: z.ZodNumber;
495
+ }, z.core.$strip>;
496
+ }, z.core.$strip>;
497
+ grenade: z.ZodEnum<{
498
+ flashbang: "flashbang";
499
+ hegrenade: "hegrenade";
500
+ smokegrenade: "smokegrenade";
501
+ molotov: "molotov";
502
+ incgrenade: "incgrenade";
503
+ decoy: "decoy";
504
+ }>;
505
+ round: z.ZodNumber;
506
+ round_time: z.ZodNumber;
507
+ timestamp: z.ZodNumber;
508
+ tick: z.ZodNumber;
509
+ type: z.ZodLiteral<"grenade_throw">;
510
+ }, z.core.$strip>, z.ZodObject<{
511
+ grenade_id: z.ZodNumber;
512
+ player: z.ZodObject<{
513
+ steam_id: z.ZodString;
514
+ name: z.ZodString;
515
+ side: z.ZodEnum<{
516
+ t: "t";
517
+ ct: "ct";
518
+ spec: "spec";
519
+ }>;
520
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
521
+ }, z.core.$strip>;
522
+ detonate_pos: z.ZodNullable<z.ZodObject<{
523
+ x: z.ZodNumber;
524
+ y: z.ZodNumber;
525
+ z: z.ZodNumber;
526
+ }, z.core.$strip>>;
527
+ round: z.ZodNumber;
528
+ round_time: z.ZodNumber;
529
+ timestamp: z.ZodNumber;
530
+ tick: z.ZodNumber;
531
+ type: z.ZodLiteral<"grenade_detonate">;
532
+ }, z.core.$strip>, z.ZodObject<{
533
+ round: z.ZodNumber;
534
+ grenade_id: z.ZodNumber;
535
+ player: z.ZodObject<{
536
+ steam_id: z.ZodString;
537
+ name: z.ZodString;
538
+ side: z.ZodEnum<{
539
+ t: "t";
540
+ ct: "ct";
541
+ spec: "spec";
542
+ }>;
543
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
544
+ }, z.core.$strip>;
545
+ end_round_time: z.ZodNumber;
546
+ fire_end: z.ZodNullable<z.ZodEnum<{
547
+ expired: "expired";
548
+ extinguished: "extinguished";
549
+ smothered: "smothered";
550
+ }>>;
551
+ extinguished_by: z.ZodNullable<z.ZodNumber>;
552
+ timestamp: z.ZodNumber;
553
+ tick: z.ZodNumber;
554
+ type: z.ZodLiteral<"grenade_end">;
555
+ }, z.core.$strip>, z.ZodObject<{
556
+ round: z.ZodNumber;
557
+ players: z.ZodArray<z.ZodObject<{
558
+ player: z.ZodObject<{
559
+ steam_id: z.ZodString;
560
+ name: z.ZodString;
561
+ side: z.ZodEnum<{
562
+ t: "t";
563
+ ct: "ct";
564
+ spec: "spec";
565
+ }>;
566
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
567
+ }, z.core.$strip>;
568
+ weapons: z.ZodArray<z.ZodObject<{
569
+ weapon: z.ZodObject<{
570
+ id: z.ZodNullable<z.ZodNumber>;
571
+ fallback: z.ZodNullable<z.ZodString>;
572
+ }, z.core.$strip>;
573
+ shots: z.ZodNumber;
574
+ ticks: z.ZodArray<z.ZodNumber>;
575
+ }, z.core.$strip>>;
576
+ }, z.core.$strip>>;
577
+ timestamp: z.ZodNumber;
578
+ tick: z.ZodNumber;
579
+ type: z.ZodLiteral<"round_shots">;
580
+ }, z.core.$strip>, z.ZodObject<{
581
+ player: z.ZodObject<{
582
+ steam_id: z.ZodString;
583
+ name: z.ZodString;
584
+ side: z.ZodEnum<{
585
+ t: "t";
586
+ ct: "ct";
587
+ spec: "spec";
588
+ }>;
589
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
590
+ position: z.ZodObject<{
591
+ x: z.ZodNumber;
592
+ y: z.ZodNumber;
593
+ z: z.ZodNumber;
594
+ pitch: z.ZodNumber;
595
+ yaw: z.ZodNumber;
596
+ }, z.core.$strip>;
597
+ }, z.core.$strip>;
598
+ site: z.ZodNullable<z.ZodEnum<{
599
+ a: "a";
600
+ b: "b";
601
+ }>>;
602
+ round: z.ZodNumber;
603
+ round_time: z.ZodNumber;
604
+ timestamp: z.ZodNumber;
605
+ tick: z.ZodNumber;
606
+ type: z.ZodLiteral<"bomb_begin_plant">;
607
+ }, z.core.$strip>, z.ZodObject<{
608
+ player: z.ZodObject<{
609
+ steam_id: z.ZodString;
610
+ name: z.ZodString;
611
+ side: z.ZodEnum<{
612
+ t: "t";
613
+ ct: "ct";
614
+ spec: "spec";
615
+ }>;
616
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
617
+ position: z.ZodObject<{
618
+ x: z.ZodNumber;
619
+ y: z.ZodNumber;
620
+ z: z.ZodNumber;
621
+ pitch: z.ZodNumber;
622
+ yaw: z.ZodNumber;
623
+ }, z.core.$strip>;
624
+ }, z.core.$strip>;
625
+ site: z.ZodNullable<z.ZodEnum<{
626
+ a: "a";
627
+ b: "b";
628
+ }>>;
629
+ round: z.ZodNumber;
630
+ round_time: z.ZodNumber;
631
+ timestamp: z.ZodNumber;
632
+ tick: z.ZodNumber;
633
+ type: z.ZodLiteral<"bomb_abort_plant">;
634
+ }, z.core.$strip>, z.ZodObject<{
635
+ player: z.ZodObject<{
636
+ steam_id: z.ZodString;
637
+ name: z.ZodString;
638
+ side: z.ZodEnum<{
639
+ t: "t";
640
+ ct: "ct";
641
+ spec: "spec";
642
+ }>;
643
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
644
+ position: z.ZodObject<{
645
+ x: z.ZodNumber;
646
+ y: z.ZodNumber;
647
+ z: z.ZodNumber;
648
+ pitch: z.ZodNumber;
649
+ yaw: z.ZodNumber;
650
+ }, z.core.$strip>;
651
+ }, z.core.$strip>;
652
+ site: z.ZodNullable<z.ZodEnum<{
653
+ a: "a";
654
+ b: "b";
655
+ }>>;
656
+ round: z.ZodNumber;
657
+ round_time: z.ZodNumber;
658
+ timestamp: z.ZodNumber;
659
+ tick: z.ZodNumber;
660
+ type: z.ZodLiteral<"bomb_planted">;
661
+ }, z.core.$strip>, z.ZodObject<{
662
+ player: z.ZodObject<{
663
+ steam_id: z.ZodString;
664
+ name: z.ZodString;
665
+ side: z.ZodEnum<{
666
+ t: "t";
667
+ ct: "ct";
668
+ spec: "spec";
669
+ }>;
670
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
671
+ position: z.ZodObject<{
672
+ x: z.ZodNumber;
673
+ y: z.ZodNumber;
674
+ z: z.ZodNumber;
675
+ pitch: z.ZodNumber;
676
+ yaw: z.ZodNumber;
677
+ }, z.core.$strip>;
678
+ }, z.core.$strip>;
679
+ has_kit: z.ZodBoolean;
680
+ round: z.ZodNumber;
681
+ round_time: z.ZodNumber;
682
+ timestamp: z.ZodNumber;
683
+ tick: z.ZodNumber;
684
+ type: z.ZodLiteral<"bomb_begin_defuse">;
685
+ }, z.core.$strip>, z.ZodObject<{
686
+ player: z.ZodObject<{
687
+ steam_id: z.ZodString;
688
+ name: z.ZodString;
689
+ side: z.ZodEnum<{
690
+ t: "t";
691
+ ct: "ct";
692
+ spec: "spec";
693
+ }>;
694
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
695
+ position: z.ZodObject<{
696
+ x: z.ZodNumber;
697
+ y: z.ZodNumber;
698
+ z: z.ZodNumber;
699
+ pitch: z.ZodNumber;
700
+ yaw: z.ZodNumber;
701
+ }, z.core.$strip>;
702
+ }, z.core.$strip>;
703
+ round: z.ZodNumber;
704
+ round_time: z.ZodNumber;
705
+ timestamp: z.ZodNumber;
706
+ tick: z.ZodNumber;
707
+ type: z.ZodLiteral<"bomb_abort_defuse">;
708
+ }, z.core.$strip>, z.ZodObject<{
709
+ player: z.ZodObject<{
710
+ steam_id: z.ZodString;
711
+ name: z.ZodString;
712
+ side: z.ZodEnum<{
713
+ t: "t";
714
+ ct: "ct";
715
+ spec: "spec";
716
+ }>;
717
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
718
+ position: z.ZodObject<{
719
+ x: z.ZodNumber;
720
+ y: z.ZodNumber;
721
+ z: z.ZodNumber;
722
+ pitch: z.ZodNumber;
723
+ yaw: z.ZodNumber;
724
+ }, z.core.$strip>;
725
+ }, z.core.$strip>;
726
+ time_remaining: z.ZodNumber;
727
+ has_kit: z.ZodBoolean;
728
+ round: z.ZodNumber;
729
+ round_time: z.ZodNumber;
730
+ timestamp: z.ZodNumber;
731
+ tick: z.ZodNumber;
732
+ type: z.ZodLiteral<"bomb_defused">;
733
+ }, z.core.$strip>, z.ZodObject<{
734
+ round: z.ZodNumber;
735
+ round_time: z.ZodNumber;
736
+ timestamp: z.ZodNumber;
737
+ tick: z.ZodNumber;
738
+ type: z.ZodLiteral<"bomb_exploded">;
739
+ }, z.core.$strip>, z.ZodObject<{
740
+ player: z.ZodObject<{
741
+ steam_id: z.ZodString;
742
+ name: z.ZodString;
743
+ side: z.ZodEnum<{
744
+ t: "t";
745
+ ct: "ct";
746
+ spec: "spec";
747
+ }>;
748
+ team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
749
+ }, z.core.$strip>;
750
+ reason: z.ZodNumber;
751
+ round: z.ZodNumber;
752
+ round_time: z.ZodNumber;
753
+ timestamp: z.ZodNumber;
754
+ tick: z.ZodNumber;
755
+ type: z.ZodLiteral<"round_mvp">;
756
+ }, z.core.$strip>, z.ZodObject<{
757
+ reason: z.ZodEnum<{
758
+ played: "played";
759
+ ready_timeout: "ready_timeout";
760
+ abandoned: "abandoned";
761
+ }>;
762
+ winner_team: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
763
+ team1_score: z.ZodNumber;
764
+ team2_score: z.ZodNumber;
765
+ teams: z.ZodNullable<z.ZodObject<{
766
+ team1: z.ZodObject<{
767
+ connected: z.ZodNumber;
768
+ ready: z.ZodBoolean;
769
+ }, z.core.$strip>;
770
+ team2: z.ZodObject<{
771
+ connected: z.ZodNumber;
772
+ ready: z.ZodBoolean;
773
+ }, z.core.$strip>;
774
+ spectators: z.ZodNullable<z.ZodObject<{
775
+ connected: z.ZodNumber;
776
+ ready: z.ZodBoolean;
777
+ }, z.core.$strip>>;
778
+ }, z.core.$strip>>;
779
+ timestamp: z.ZodNumber;
780
+ tick: z.ZodNumber;
781
+ type: z.ZodLiteral<"map_end">;
782
+ }, z.core.$strip>, z.ZodObject<{
783
+ level: z.ZodEnum<{
784
+ error: "error";
785
+ debug: "debug";
786
+ info: "info";
787
+ warn: "warn";
788
+ }>;
789
+ message: z.ZodString;
790
+ timestamp: z.ZodNumber;
791
+ tick: z.ZodNumber;
792
+ type: z.ZodLiteral<"log">;
793
+ }, z.core.$strip>], "type">, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
794
+ }, z.core.$strip>;
795
+ export type EventBatchFrame = z.infer<typeof EventBatchFrame>;
796
+ /**
797
+ * The most frames one event upload carries. The agent sends a server's events in batches of up to
798
+ * this many.
799
+ */
800
+ export declare const EVENT_BATCH_MAX_FRAMES = 128;
801
+ /**
802
+ * The most bytes the frames of one event upload come to together. A receiver accepts request bodies
803
+ * of this size plus the `frames` wrapper, because refusing a batch for its size stalls the upload
804
+ * of that server's events.
805
+ */
806
+ export declare const EVENT_BATCH_MAX_BYTES: number;
807
+ /**
808
+ * What the agent reads of a batch frame: its position. The controller validates the event itself.
809
+ */
810
+ export declare const EventFrame: z.ZodObject<{
811
+ seq: z.ZodNumber;
812
+ }, z.core.$loose>;
813
+ export type EventFrame = z.infer<typeof EventFrame>;
814
+ /**
815
+ * The body of an event upload: 1 to {@link EVENT_BATCH_MAX_FRAMES} frames of the server that
816
+ * `allocation_id` names, with consecutive `seq`. Store frames idempotently by `allocation_id` and
817
+ * `seq`, because a lost receipt means the same frames arrive again.
818
+ *
819
+ * This schema checks only each frame's position, so one bad event cannot fail the batch. Parse each
820
+ * frame on its own with {@link EventBatchFrame}, and quarantine a frame that fails by listing it in
821
+ * `rejected` of the {@link EventBatchReceipt}.
822
+ *
823
+ * A server plays the one match of its launch, so the match of a batch is the match that the controller
824
+ * launched `allocation_id` with. The frames come to at most {@link EVENT_BATCH_MAX_BYTES}
825
+ * together.
826
+ *
827
+ * Rejected unless each frame's `seq` is one above the `seq` of the frame before it.
828
+ */
829
+ export declare const EventBatch: z.ZodObject<{
830
+ allocation_id: z.ZodUUID;
831
+ frames: z.ZodArray<z.ZodObject<{
832
+ seq: z.ZodNumber;
833
+ }, z.core.$loose>>;
834
+ }, z.core.$strip>;
835
+ export type EventBatch = z.infer<typeof EventBatch>;
836
+ /**
837
+ * The controller's answer to a batch it holds. Every frame of the batch is either canonical
838
+ * history or quarantined under one of the `rejected` entries, and the agent may delete them all.
839
+ * Resending a quarantined frame would fail the same way.
840
+ */
841
+ export declare const EventBatchReceipt: z.ZodObject<{
842
+ rejected: z.ZodArray<z.ZodObject<{
843
+ seq: z.ZodNumber;
844
+ reason: z.ZodString;
845
+ }, z.core.$strip>>;
846
+ }, z.core.$strip>;
847
+ export type EventBatchReceipt = z.infer<typeof EventBatchReceipt>;
848
+ /**
849
+ * The body of a `409` answer to an event upload. The controller could not read the identities of
850
+ * the batch, so it refuses the whole batch. The agent retries that server with a backoff of its
851
+ * own, and the node's other servers upload meanwhile.
852
+ */
853
+ export declare const EventBatchRejection: z.ZodObject<{
854
+ code: z.ZodLiteral<"event_integrity_error">;
855
+ detail: z.ZodString;
856
+ }, z.core.$strip>;
857
+ export type EventBatchRejection = z.infer<typeof EventBatchRejection>;