@fleettools/events 0.1.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.
Files changed (48) hide show
  1. package/dist/helpers.d.ts +72 -0
  2. package/dist/index.d.ts +10 -0
  3. package/dist/index.js +4816 -0
  4. package/dist/projections/index.d.ts +16 -0
  5. package/dist/projections/pilots.d.ts +19 -0
  6. package/dist/replay.d.ts +19 -0
  7. package/dist/src/helpers.d.ts +73 -0
  8. package/dist/src/helpers.d.ts.map +1 -0
  9. package/dist/src/index.d.ts +11 -0
  10. package/dist/src/index.d.ts.map +1 -0
  11. package/dist/src/projections/index.d.ts +17 -0
  12. package/dist/src/projections/index.d.ts.map +1 -0
  13. package/dist/src/projections/pilots.d.ts +20 -0
  14. package/dist/src/projections/pilots.d.ts.map +1 -0
  15. package/dist/src/replay.d.ts +20 -0
  16. package/dist/src/replay.d.ts.map +1 -0
  17. package/dist/src/store.d.ts +61 -0
  18. package/dist/src/store.d.ts.map +1 -0
  19. package/dist/src/types/base.d.ts +33 -0
  20. package/dist/src/types/base.d.ts.map +1 -0
  21. package/dist/src/types/checkpoints.d.ts +255 -0
  22. package/dist/src/types/checkpoints.d.ts.map +1 -0
  23. package/dist/src/types/coordination.d.ts +364 -0
  24. package/dist/src/types/coordination.d.ts.map +1 -0
  25. package/dist/src/types/index.d.ts +1692 -0
  26. package/dist/src/types/index.d.ts.map +1 -0
  27. package/dist/src/types/messages.d.ts +295 -0
  28. package/dist/src/types/messages.d.ts.map +1 -0
  29. package/dist/src/types/missions.d.ts +258 -0
  30. package/dist/src/types/missions.d.ts.map +1 -0
  31. package/dist/src/types/pilots.d.ts +153 -0
  32. package/dist/src/types/pilots.d.ts.map +1 -0
  33. package/dist/src/types/reservations.d.ts +173 -0
  34. package/dist/src/types/reservations.d.ts.map +1 -0
  35. package/dist/src/types/sorties.d.ts +372 -0
  36. package/dist/src/types/sorties.d.ts.map +1 -0
  37. package/dist/store.d.ts +56 -0
  38. package/dist/tsconfig.tsbuildinfo +1 -0
  39. package/dist/types/base.d.ts +32 -0
  40. package/dist/types/checkpoints.d.ts +254 -0
  41. package/dist/types/coordination.d.ts +363 -0
  42. package/dist/types/index.d.ts +1691 -0
  43. package/dist/types/messages.d.ts +294 -0
  44. package/dist/types/missions.d.ts +257 -0
  45. package/dist/types/pilots.d.ts +152 -0
  46. package/dist/types/reservations.d.ts +172 -0
  47. package/dist/types/sorties.d.ts +371 -0
  48. package/package.json +37 -0
@@ -0,0 +1,1692 @@
1
+ /**
2
+ * FleetTools Event Types Index
3
+ *
4
+ * Main event type exports and discriminated union for all FleetTools events.
5
+ */
6
+ import { z } from 'zod';
7
+ import { PilotRegisteredSchema, PilotActiveSchema, PilotDeregisteredSchema } from './pilots.js';
8
+ import { MessageSentSchema, MessageReadSchema, MessageAcknowledgedSchema, MessageUpdatedSchema, MessageDeletedSchema } from './messages.js';
9
+ import { FileReservedSchema, FileReleasedSchema, FileConflictSchema } from './reservations.js';
10
+ import { SortieCreatedSchema, SortieStartedSchema, SortieCompletedSchema, SortieBlockedSchema, SortieResumedSchema, SortieUpdatedSchema } from './sorties.js';
11
+ import { MissionCreatedSchema, MissionStartedSchema, MissionCompletedSchema, MissionUpdatedSchema } from './missions.js';
12
+ import { CheckpointCreatedSchema, ContextCompactedSchema, CheckpointRestoredSchema, CheckpointDeletedSchema } from './checkpoints.js';
13
+ import { CoordinatorDecisionSchema, PilotSpawnedSchema, PilotTerminatedSchema, LockAcquiredSchema, LockReleasedSchema, CursorMovedSchema } from './coordination.js';
14
+ export { PilotRegisteredSchema, PilotActiveSchema, PilotDeregisteredSchema, MessageSentSchema, MessageReadSchema, MessageAcknowledgedSchema, MessageUpdatedSchema, MessageDeletedSchema, FileReservedSchema, FileReleasedSchema, FileConflictSchema, SortieCreatedSchema, SortieStartedSchema, SortieCompletedSchema, SortieBlockedSchema, SortieResumedSchema, SortieUpdatedSchema, MissionCreatedSchema, MissionStartedSchema, MissionCompletedSchema, MissionUpdatedSchema, CheckpointCreatedSchema, ContextCompactedSchema, CheckpointRestoredSchema, CheckpointDeletedSchema, CoordinatorDecisionSchema, PilotSpawnedSchema, PilotTerminatedSchema, LockAcquiredSchema, LockReleasedSchema, CursorMovedSchema, };
15
+ export declare const FleetEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
16
+ id: z.ZodString;
17
+ project_key: z.ZodString;
18
+ timestamp: z.ZodString;
19
+ sequence: z.ZodNumber;
20
+ } & {
21
+ type: z.ZodLiteral<"pilot_registered">;
22
+ data: z.ZodObject<{
23
+ callsign: z.ZodString;
24
+ program: z.ZodEnum<["opencode", "claude-code", "custom"]>;
25
+ model: z.ZodString;
26
+ task_description: z.ZodOptional<z.ZodString>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ callsign: string;
29
+ program: "custom" | "opencode" | "claude-code";
30
+ model: string;
31
+ task_description?: string | undefined;
32
+ }, {
33
+ callsign: string;
34
+ program: "custom" | "opencode" | "claude-code";
35
+ model: string;
36
+ task_description?: string | undefined;
37
+ }>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ id: string;
40
+ type: "pilot_registered";
41
+ project_key: string;
42
+ timestamp: string;
43
+ sequence: number;
44
+ data: {
45
+ callsign: string;
46
+ program: "custom" | "opencode" | "claude-code";
47
+ model: string;
48
+ task_description?: string | undefined;
49
+ };
50
+ }, {
51
+ id: string;
52
+ type: "pilot_registered";
53
+ project_key: string;
54
+ timestamp: string;
55
+ sequence: number;
56
+ data: {
57
+ callsign: string;
58
+ program: "custom" | "opencode" | "claude-code";
59
+ model: string;
60
+ task_description?: string | undefined;
61
+ };
62
+ }>, z.ZodObject<{
63
+ id: z.ZodString;
64
+ project_key: z.ZodString;
65
+ timestamp: z.ZodString;
66
+ sequence: z.ZodNumber;
67
+ } & {
68
+ type: z.ZodLiteral<"pilot_active">;
69
+ data: z.ZodObject<{
70
+ callsign: z.ZodString;
71
+ status: z.ZodEnum<["active", "idle", "busy"]>;
72
+ current_task: z.ZodOptional<z.ZodString>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ status: "active" | "idle" | "busy";
75
+ callsign: string;
76
+ current_task?: string | undefined;
77
+ }, {
78
+ status: "active" | "idle" | "busy";
79
+ callsign: string;
80
+ current_task?: string | undefined;
81
+ }>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ id: string;
84
+ type: "pilot_active";
85
+ project_key: string;
86
+ timestamp: string;
87
+ sequence: number;
88
+ data: {
89
+ status: "active" | "idle" | "busy";
90
+ callsign: string;
91
+ current_task?: string | undefined;
92
+ };
93
+ }, {
94
+ id: string;
95
+ type: "pilot_active";
96
+ project_key: string;
97
+ timestamp: string;
98
+ sequence: number;
99
+ data: {
100
+ status: "active" | "idle" | "busy";
101
+ callsign: string;
102
+ current_task?: string | undefined;
103
+ };
104
+ }>, z.ZodObject<{
105
+ id: z.ZodString;
106
+ project_key: z.ZodString;
107
+ timestamp: z.ZodString;
108
+ sequence: z.ZodNumber;
109
+ } & {
110
+ type: z.ZodLiteral<"pilot_deregistered">;
111
+ data: z.ZodObject<{
112
+ callsign: z.ZodString;
113
+ reason: z.ZodEnum<["completed", "error", "timeout", "manual"]>;
114
+ final_status: z.ZodOptional<z.ZodString>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ callsign: string;
117
+ reason: "completed" | "error" | "timeout" | "manual";
118
+ final_status?: string | undefined;
119
+ }, {
120
+ callsign: string;
121
+ reason: "completed" | "error" | "timeout" | "manual";
122
+ final_status?: string | undefined;
123
+ }>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ id: string;
126
+ type: "pilot_deregistered";
127
+ project_key: string;
128
+ timestamp: string;
129
+ sequence: number;
130
+ data: {
131
+ callsign: string;
132
+ reason: "completed" | "error" | "timeout" | "manual";
133
+ final_status?: string | undefined;
134
+ };
135
+ }, {
136
+ id: string;
137
+ type: "pilot_deregistered";
138
+ project_key: string;
139
+ timestamp: string;
140
+ sequence: number;
141
+ data: {
142
+ callsign: string;
143
+ reason: "completed" | "error" | "timeout" | "manual";
144
+ final_status?: string | undefined;
145
+ };
146
+ }>, z.ZodObject<{
147
+ id: z.ZodString;
148
+ project_key: z.ZodString;
149
+ timestamp: z.ZodString;
150
+ sequence: z.ZodNumber;
151
+ } & {
152
+ type: z.ZodLiteral<"message_sent">;
153
+ data: z.ZodObject<{
154
+ from_callsign: z.ZodString;
155
+ to_callsigns: z.ZodArray<z.ZodString, "many">;
156
+ subject: z.ZodString;
157
+ body: z.ZodString;
158
+ thread_id: z.ZodOptional<z.ZodString>;
159
+ importance: z.ZodDefault<z.ZodEnum<["low", "normal", "high", "critical"]>>;
160
+ ack_required: z.ZodDefault<z.ZodBoolean>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ from_callsign: string;
163
+ to_callsigns: string[];
164
+ subject: string;
165
+ body: string;
166
+ importance: "low" | "normal" | "high" | "critical";
167
+ ack_required: boolean;
168
+ thread_id?: string | undefined;
169
+ }, {
170
+ from_callsign: string;
171
+ to_callsigns: string[];
172
+ subject: string;
173
+ body: string;
174
+ thread_id?: string | undefined;
175
+ importance?: "low" | "normal" | "high" | "critical" | undefined;
176
+ ack_required?: boolean | undefined;
177
+ }>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ id: string;
180
+ type: "message_sent";
181
+ project_key: string;
182
+ timestamp: string;
183
+ sequence: number;
184
+ data: {
185
+ from_callsign: string;
186
+ to_callsigns: string[];
187
+ subject: string;
188
+ body: string;
189
+ importance: "low" | "normal" | "high" | "critical";
190
+ ack_required: boolean;
191
+ thread_id?: string | undefined;
192
+ };
193
+ }, {
194
+ id: string;
195
+ type: "message_sent";
196
+ project_key: string;
197
+ timestamp: string;
198
+ sequence: number;
199
+ data: {
200
+ from_callsign: string;
201
+ to_callsigns: string[];
202
+ subject: string;
203
+ body: string;
204
+ thread_id?: string | undefined;
205
+ importance?: "low" | "normal" | "high" | "critical" | undefined;
206
+ ack_required?: boolean | undefined;
207
+ };
208
+ }>, z.ZodObject<{
209
+ id: z.ZodString;
210
+ project_key: z.ZodString;
211
+ timestamp: z.ZodString;
212
+ sequence: z.ZodNumber;
213
+ } & {
214
+ type: z.ZodLiteral<"message_read">;
215
+ data: z.ZodObject<{
216
+ message_id: z.ZodString;
217
+ callsign: z.ZodString;
218
+ read_at: z.ZodString;
219
+ }, "strip", z.ZodTypeAny, {
220
+ callsign: string;
221
+ message_id: string;
222
+ read_at: string;
223
+ }, {
224
+ callsign: string;
225
+ message_id: string;
226
+ read_at: string;
227
+ }>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ id: string;
230
+ type: "message_read";
231
+ project_key: string;
232
+ timestamp: string;
233
+ sequence: number;
234
+ data: {
235
+ callsign: string;
236
+ message_id: string;
237
+ read_at: string;
238
+ };
239
+ }, {
240
+ id: string;
241
+ type: "message_read";
242
+ project_key: string;
243
+ timestamp: string;
244
+ sequence: number;
245
+ data: {
246
+ callsign: string;
247
+ message_id: string;
248
+ read_at: string;
249
+ };
250
+ }>, z.ZodObject<{
251
+ id: z.ZodString;
252
+ project_key: z.ZodString;
253
+ timestamp: z.ZodString;
254
+ sequence: z.ZodNumber;
255
+ } & {
256
+ type: z.ZodLiteral<"message_acknowledged">;
257
+ data: z.ZodObject<{
258
+ message_id: z.ZodString;
259
+ callsign: z.ZodString;
260
+ acknowledged_at: z.ZodString;
261
+ notes: z.ZodOptional<z.ZodString>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ callsign: string;
264
+ message_id: string;
265
+ acknowledged_at: string;
266
+ notes?: string | undefined;
267
+ }, {
268
+ callsign: string;
269
+ message_id: string;
270
+ acknowledged_at: string;
271
+ notes?: string | undefined;
272
+ }>;
273
+ }, "strip", z.ZodTypeAny, {
274
+ id: string;
275
+ type: "message_acknowledged";
276
+ project_key: string;
277
+ timestamp: string;
278
+ sequence: number;
279
+ data: {
280
+ callsign: string;
281
+ message_id: string;
282
+ acknowledged_at: string;
283
+ notes?: string | undefined;
284
+ };
285
+ }, {
286
+ id: string;
287
+ type: "message_acknowledged";
288
+ project_key: string;
289
+ timestamp: string;
290
+ sequence: number;
291
+ data: {
292
+ callsign: string;
293
+ message_id: string;
294
+ acknowledged_at: string;
295
+ notes?: string | undefined;
296
+ };
297
+ }>, z.ZodObject<{
298
+ id: z.ZodString;
299
+ project_key: z.ZodString;
300
+ timestamp: z.ZodString;
301
+ sequence: z.ZodNumber;
302
+ } & {
303
+ type: z.ZodLiteral<"message_updated">;
304
+ data: z.ZodObject<{
305
+ message_id: z.ZodString;
306
+ updated_by: z.ZodString;
307
+ changes: z.ZodArray<z.ZodObject<{
308
+ field: z.ZodString;
309
+ old_value: z.ZodUnknown;
310
+ new_value: z.ZodUnknown;
311
+ }, "strip", z.ZodTypeAny, {
312
+ field: string;
313
+ old_value?: unknown;
314
+ new_value?: unknown;
315
+ }, {
316
+ field: string;
317
+ old_value?: unknown;
318
+ new_value?: unknown;
319
+ }>, "many">;
320
+ }, "strip", z.ZodTypeAny, {
321
+ message_id: string;
322
+ updated_by: string;
323
+ changes: {
324
+ field: string;
325
+ old_value?: unknown;
326
+ new_value?: unknown;
327
+ }[];
328
+ }, {
329
+ message_id: string;
330
+ updated_by: string;
331
+ changes: {
332
+ field: string;
333
+ old_value?: unknown;
334
+ new_value?: unknown;
335
+ }[];
336
+ }>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ id: string;
339
+ type: "message_updated";
340
+ project_key: string;
341
+ timestamp: string;
342
+ sequence: number;
343
+ data: {
344
+ message_id: string;
345
+ updated_by: string;
346
+ changes: {
347
+ field: string;
348
+ old_value?: unknown;
349
+ new_value?: unknown;
350
+ }[];
351
+ };
352
+ }, {
353
+ id: string;
354
+ type: "message_updated";
355
+ project_key: string;
356
+ timestamp: string;
357
+ sequence: number;
358
+ data: {
359
+ message_id: string;
360
+ updated_by: string;
361
+ changes: {
362
+ field: string;
363
+ old_value?: unknown;
364
+ new_value?: unknown;
365
+ }[];
366
+ };
367
+ }>, z.ZodObject<{
368
+ id: z.ZodString;
369
+ project_key: z.ZodString;
370
+ timestamp: z.ZodString;
371
+ sequence: z.ZodNumber;
372
+ } & {
373
+ type: z.ZodLiteral<"message_deleted">;
374
+ data: z.ZodObject<{
375
+ message_id: z.ZodString;
376
+ deleted_by: z.ZodString;
377
+ reason: z.ZodOptional<z.ZodString>;
378
+ }, "strip", z.ZodTypeAny, {
379
+ message_id: string;
380
+ deleted_by: string;
381
+ reason?: string | undefined;
382
+ }, {
383
+ message_id: string;
384
+ deleted_by: string;
385
+ reason?: string | undefined;
386
+ }>;
387
+ }, "strip", z.ZodTypeAny, {
388
+ id: string;
389
+ type: "message_deleted";
390
+ project_key: string;
391
+ timestamp: string;
392
+ sequence: number;
393
+ data: {
394
+ message_id: string;
395
+ deleted_by: string;
396
+ reason?: string | undefined;
397
+ };
398
+ }, {
399
+ id: string;
400
+ type: "message_deleted";
401
+ project_key: string;
402
+ timestamp: string;
403
+ sequence: number;
404
+ data: {
405
+ message_id: string;
406
+ deleted_by: string;
407
+ reason?: string | undefined;
408
+ };
409
+ }>, z.ZodObject<{
410
+ id: z.ZodString;
411
+ project_key: z.ZodString;
412
+ timestamp: z.ZodString;
413
+ sequence: z.ZodNumber;
414
+ } & {
415
+ type: z.ZodLiteral<"file_reserved">;
416
+ data: z.ZodObject<{
417
+ callsign: z.ZodString;
418
+ path_pattern: z.ZodString;
419
+ exclusive: z.ZodDefault<z.ZodBoolean>;
420
+ reason: z.ZodOptional<z.ZodString>;
421
+ ttl_seconds: z.ZodOptional<z.ZodNumber>;
422
+ }, "strip", z.ZodTypeAny, {
423
+ callsign: string;
424
+ exclusive: boolean;
425
+ path_pattern: string;
426
+ reason?: string | undefined;
427
+ ttl_seconds?: number | undefined;
428
+ }, {
429
+ callsign: string;
430
+ path_pattern: string;
431
+ reason?: string | undefined;
432
+ exclusive?: boolean | undefined;
433
+ ttl_seconds?: number | undefined;
434
+ }>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ id: string;
437
+ type: "file_reserved";
438
+ project_key: string;
439
+ timestamp: string;
440
+ sequence: number;
441
+ data: {
442
+ callsign: string;
443
+ exclusive: boolean;
444
+ path_pattern: string;
445
+ reason?: string | undefined;
446
+ ttl_seconds?: number | undefined;
447
+ };
448
+ }, {
449
+ id: string;
450
+ type: "file_reserved";
451
+ project_key: string;
452
+ timestamp: string;
453
+ sequence: number;
454
+ data: {
455
+ callsign: string;
456
+ path_pattern: string;
457
+ reason?: string | undefined;
458
+ exclusive?: boolean | undefined;
459
+ ttl_seconds?: number | undefined;
460
+ };
461
+ }>, z.ZodObject<{
462
+ id: z.ZodString;
463
+ project_key: z.ZodString;
464
+ timestamp: z.ZodString;
465
+ sequence: z.ZodNumber;
466
+ } & {
467
+ type: z.ZodLiteral<"file_released">;
468
+ data: z.ZodObject<{
469
+ callsign: z.ZodString;
470
+ path_pattern: z.ZodString;
471
+ reason: z.ZodOptional<z.ZodString>;
472
+ released_by: z.ZodOptional<z.ZodString>;
473
+ }, "strip", z.ZodTypeAny, {
474
+ callsign: string;
475
+ path_pattern: string;
476
+ reason?: string | undefined;
477
+ released_by?: string | undefined;
478
+ }, {
479
+ callsign: string;
480
+ path_pattern: string;
481
+ reason?: string | undefined;
482
+ released_by?: string | undefined;
483
+ }>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ id: string;
486
+ type: "file_released";
487
+ project_key: string;
488
+ timestamp: string;
489
+ sequence: number;
490
+ data: {
491
+ callsign: string;
492
+ path_pattern: string;
493
+ reason?: string | undefined;
494
+ released_by?: string | undefined;
495
+ };
496
+ }, {
497
+ id: string;
498
+ type: "file_released";
499
+ project_key: string;
500
+ timestamp: string;
501
+ sequence: number;
502
+ data: {
503
+ callsign: string;
504
+ path_pattern: string;
505
+ reason?: string | undefined;
506
+ released_by?: string | undefined;
507
+ };
508
+ }>, z.ZodObject<{
509
+ id: z.ZodString;
510
+ project_key: z.ZodString;
511
+ timestamp: z.ZodString;
512
+ sequence: z.ZodNumber;
513
+ } & {
514
+ type: z.ZodLiteral<"file_conflict">;
515
+ data: z.ZodObject<{
516
+ callsign: z.ZodString;
517
+ path_pattern: z.ZodString;
518
+ conflicting_callsign: z.ZodString;
519
+ conflict_type: z.ZodEnum<["exclusive_violation", "pattern_overlap", "timeout"]>;
520
+ resolved: z.ZodDefault<z.ZodBoolean>;
521
+ }, "strip", z.ZodTypeAny, {
522
+ callsign: string;
523
+ path_pattern: string;
524
+ conflicting_callsign: string;
525
+ conflict_type: "timeout" | "exclusive_violation" | "pattern_overlap";
526
+ resolved: boolean;
527
+ }, {
528
+ callsign: string;
529
+ path_pattern: string;
530
+ conflicting_callsign: string;
531
+ conflict_type: "timeout" | "exclusive_violation" | "pattern_overlap";
532
+ resolved?: boolean | undefined;
533
+ }>;
534
+ }, "strip", z.ZodTypeAny, {
535
+ id: string;
536
+ type: "file_conflict";
537
+ project_key: string;
538
+ timestamp: string;
539
+ sequence: number;
540
+ data: {
541
+ callsign: string;
542
+ path_pattern: string;
543
+ conflicting_callsign: string;
544
+ conflict_type: "timeout" | "exclusive_violation" | "pattern_overlap";
545
+ resolved: boolean;
546
+ };
547
+ }, {
548
+ id: string;
549
+ type: "file_conflict";
550
+ project_key: string;
551
+ timestamp: string;
552
+ sequence: number;
553
+ data: {
554
+ callsign: string;
555
+ path_pattern: string;
556
+ conflicting_callsign: string;
557
+ conflict_type: "timeout" | "exclusive_violation" | "pattern_overlap";
558
+ resolved?: boolean | undefined;
559
+ };
560
+ }>, z.ZodObject<{
561
+ id: z.ZodString;
562
+ project_key: z.ZodString;
563
+ timestamp: z.ZodString;
564
+ sequence: z.ZodNumber;
565
+ } & {
566
+ type: z.ZodLiteral<"sortie_created">;
567
+ data: z.ZodObject<{
568
+ sortie_id: z.ZodString;
569
+ mission_id: z.ZodOptional<z.ZodString>;
570
+ title: z.ZodString;
571
+ description: z.ZodOptional<z.ZodString>;
572
+ priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
573
+ assigned_to: z.ZodOptional<z.ZodString>;
574
+ files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
575
+ estimated_hours: z.ZodOptional<z.ZodNumber>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ sortie_id: string;
578
+ title: string;
579
+ priority: "low" | "high" | "critical" | "medium";
580
+ files: string[];
581
+ mission_id?: string | undefined;
582
+ description?: string | undefined;
583
+ assigned_to?: string | undefined;
584
+ estimated_hours?: number | undefined;
585
+ }, {
586
+ sortie_id: string;
587
+ title: string;
588
+ mission_id?: string | undefined;
589
+ description?: string | undefined;
590
+ priority?: "low" | "high" | "critical" | "medium" | undefined;
591
+ assigned_to?: string | undefined;
592
+ files?: string[] | undefined;
593
+ estimated_hours?: number | undefined;
594
+ }>;
595
+ }, "strip", z.ZodTypeAny, {
596
+ id: string;
597
+ type: "sortie_created";
598
+ project_key: string;
599
+ timestamp: string;
600
+ sequence: number;
601
+ data: {
602
+ sortie_id: string;
603
+ title: string;
604
+ priority: "low" | "high" | "critical" | "medium";
605
+ files: string[];
606
+ mission_id?: string | undefined;
607
+ description?: string | undefined;
608
+ assigned_to?: string | undefined;
609
+ estimated_hours?: number | undefined;
610
+ };
611
+ }, {
612
+ id: string;
613
+ type: "sortie_created";
614
+ project_key: string;
615
+ timestamp: string;
616
+ sequence: number;
617
+ data: {
618
+ sortie_id: string;
619
+ title: string;
620
+ mission_id?: string | undefined;
621
+ description?: string | undefined;
622
+ priority?: "low" | "high" | "critical" | "medium" | undefined;
623
+ assigned_to?: string | undefined;
624
+ files?: string[] | undefined;
625
+ estimated_hours?: number | undefined;
626
+ };
627
+ }>, z.ZodObject<{
628
+ id: z.ZodString;
629
+ project_key: z.ZodString;
630
+ timestamp: z.ZodString;
631
+ sequence: z.ZodNumber;
632
+ } & {
633
+ type: z.ZodLiteral<"sortie_started">;
634
+ data: z.ZodObject<{
635
+ sortie_id: z.ZodString;
636
+ started_by: z.ZodString;
637
+ started_at: z.ZodString;
638
+ }, "strip", z.ZodTypeAny, {
639
+ sortie_id: string;
640
+ started_by: string;
641
+ started_at: string;
642
+ }, {
643
+ sortie_id: string;
644
+ started_by: string;
645
+ started_at: string;
646
+ }>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ id: string;
649
+ type: "sortie_started";
650
+ project_key: string;
651
+ timestamp: string;
652
+ sequence: number;
653
+ data: {
654
+ sortie_id: string;
655
+ started_by: string;
656
+ started_at: string;
657
+ };
658
+ }, {
659
+ id: string;
660
+ type: "sortie_started";
661
+ project_key: string;
662
+ timestamp: string;
663
+ sequence: number;
664
+ data: {
665
+ sortie_id: string;
666
+ started_by: string;
667
+ started_at: string;
668
+ };
669
+ }>, z.ZodObject<{
670
+ id: z.ZodString;
671
+ project_key: z.ZodString;
672
+ timestamp: z.ZodString;
673
+ sequence: z.ZodNumber;
674
+ } & {
675
+ type: z.ZodLiteral<"sortie_completed">;
676
+ data: z.ZodObject<{
677
+ sortie_id: z.ZodString;
678
+ completed_by: z.ZodString;
679
+ completed_at: z.ZodString;
680
+ result: z.ZodEnum<["success", "partial", "failed"]>;
681
+ notes: z.ZodOptional<z.ZodString>;
682
+ }, "strip", z.ZodTypeAny, {
683
+ sortie_id: string;
684
+ completed_by: string;
685
+ completed_at: string;
686
+ result: "success" | "partial" | "failed";
687
+ notes?: string | undefined;
688
+ }, {
689
+ sortie_id: string;
690
+ completed_by: string;
691
+ completed_at: string;
692
+ result: "success" | "partial" | "failed";
693
+ notes?: string | undefined;
694
+ }>;
695
+ }, "strip", z.ZodTypeAny, {
696
+ id: string;
697
+ type: "sortie_completed";
698
+ project_key: string;
699
+ timestamp: string;
700
+ sequence: number;
701
+ data: {
702
+ sortie_id: string;
703
+ completed_by: string;
704
+ completed_at: string;
705
+ result: "success" | "partial" | "failed";
706
+ notes?: string | undefined;
707
+ };
708
+ }, {
709
+ id: string;
710
+ type: "sortie_completed";
711
+ project_key: string;
712
+ timestamp: string;
713
+ sequence: number;
714
+ data: {
715
+ sortie_id: string;
716
+ completed_by: string;
717
+ completed_at: string;
718
+ result: "success" | "partial" | "failed";
719
+ notes?: string | undefined;
720
+ };
721
+ }>, z.ZodObject<{
722
+ id: z.ZodString;
723
+ project_key: z.ZodString;
724
+ timestamp: z.ZodString;
725
+ sequence: z.ZodNumber;
726
+ } & {
727
+ type: z.ZodLiteral<"sortie_blocked">;
728
+ data: z.ZodObject<{
729
+ sortie_id: z.ZodString;
730
+ blocked_by: z.ZodString;
731
+ blocked_reason: z.ZodString;
732
+ blocked_at: z.ZodString;
733
+ blocked_by_callsign: z.ZodOptional<z.ZodString>;
734
+ }, "strip", z.ZodTypeAny, {
735
+ sortie_id: string;
736
+ blocked_by: string;
737
+ blocked_reason: string;
738
+ blocked_at: string;
739
+ blocked_by_callsign?: string | undefined;
740
+ }, {
741
+ sortie_id: string;
742
+ blocked_by: string;
743
+ blocked_reason: string;
744
+ blocked_at: string;
745
+ blocked_by_callsign?: string | undefined;
746
+ }>;
747
+ }, "strip", z.ZodTypeAny, {
748
+ id: string;
749
+ type: "sortie_blocked";
750
+ project_key: string;
751
+ timestamp: string;
752
+ sequence: number;
753
+ data: {
754
+ sortie_id: string;
755
+ blocked_by: string;
756
+ blocked_reason: string;
757
+ blocked_at: string;
758
+ blocked_by_callsign?: string | undefined;
759
+ };
760
+ }, {
761
+ id: string;
762
+ type: "sortie_blocked";
763
+ project_key: string;
764
+ timestamp: string;
765
+ sequence: number;
766
+ data: {
767
+ sortie_id: string;
768
+ blocked_by: string;
769
+ blocked_reason: string;
770
+ blocked_at: string;
771
+ blocked_by_callsign?: string | undefined;
772
+ };
773
+ }>, z.ZodObject<{
774
+ id: z.ZodString;
775
+ project_key: z.ZodString;
776
+ timestamp: z.ZodString;
777
+ sequence: z.ZodNumber;
778
+ } & {
779
+ type: z.ZodLiteral<"sortie_resumed">;
780
+ data: z.ZodObject<{
781
+ sortie_id: z.ZodString;
782
+ resumed_by: z.ZodString;
783
+ resumed_at: z.ZodString;
784
+ previous_state: z.ZodString;
785
+ }, "strip", z.ZodTypeAny, {
786
+ sortie_id: string;
787
+ resumed_by: string;
788
+ resumed_at: string;
789
+ previous_state: string;
790
+ }, {
791
+ sortie_id: string;
792
+ resumed_by: string;
793
+ resumed_at: string;
794
+ previous_state: string;
795
+ }>;
796
+ }, "strip", z.ZodTypeAny, {
797
+ id: string;
798
+ type: "sortie_resumed";
799
+ project_key: string;
800
+ timestamp: string;
801
+ sequence: number;
802
+ data: {
803
+ sortie_id: string;
804
+ resumed_by: string;
805
+ resumed_at: string;
806
+ previous_state: string;
807
+ };
808
+ }, {
809
+ id: string;
810
+ type: "sortie_resumed";
811
+ project_key: string;
812
+ timestamp: string;
813
+ sequence: number;
814
+ data: {
815
+ sortie_id: string;
816
+ resumed_by: string;
817
+ resumed_at: string;
818
+ previous_state: string;
819
+ };
820
+ }>, z.ZodObject<{
821
+ id: z.ZodString;
822
+ project_key: z.ZodString;
823
+ timestamp: z.ZodString;
824
+ sequence: z.ZodNumber;
825
+ } & {
826
+ type: z.ZodLiteral<"sortie_updated">;
827
+ data: z.ZodObject<{
828
+ sortie_id: z.ZodString;
829
+ updated_by: z.ZodString;
830
+ updated_at: z.ZodString;
831
+ changes: z.ZodArray<z.ZodObject<{
832
+ field: z.ZodString;
833
+ old_value: z.ZodUnknown;
834
+ new_value: z.ZodUnknown;
835
+ }, "strip", z.ZodTypeAny, {
836
+ field: string;
837
+ old_value?: unknown;
838
+ new_value?: unknown;
839
+ }, {
840
+ field: string;
841
+ old_value?: unknown;
842
+ new_value?: unknown;
843
+ }>, "many">;
844
+ }, "strip", z.ZodTypeAny, {
845
+ updated_by: string;
846
+ changes: {
847
+ field: string;
848
+ old_value?: unknown;
849
+ new_value?: unknown;
850
+ }[];
851
+ sortie_id: string;
852
+ updated_at: string;
853
+ }, {
854
+ updated_by: string;
855
+ changes: {
856
+ field: string;
857
+ old_value?: unknown;
858
+ new_value?: unknown;
859
+ }[];
860
+ sortie_id: string;
861
+ updated_at: string;
862
+ }>;
863
+ }, "strip", z.ZodTypeAny, {
864
+ id: string;
865
+ type: "sortie_updated";
866
+ project_key: string;
867
+ timestamp: string;
868
+ sequence: number;
869
+ data: {
870
+ updated_by: string;
871
+ changes: {
872
+ field: string;
873
+ old_value?: unknown;
874
+ new_value?: unknown;
875
+ }[];
876
+ sortie_id: string;
877
+ updated_at: string;
878
+ };
879
+ }, {
880
+ id: string;
881
+ type: "sortie_updated";
882
+ project_key: string;
883
+ timestamp: string;
884
+ sequence: number;
885
+ data: {
886
+ updated_by: string;
887
+ changes: {
888
+ field: string;
889
+ old_value?: unknown;
890
+ new_value?: unknown;
891
+ }[];
892
+ sortie_id: string;
893
+ updated_at: string;
894
+ };
895
+ }>, z.ZodObject<{
896
+ id: z.ZodString;
897
+ project_key: z.ZodString;
898
+ timestamp: z.ZodString;
899
+ sequence: z.ZodNumber;
900
+ } & {
901
+ type: z.ZodLiteral<"mission_created">;
902
+ data: z.ZodObject<{
903
+ mission_id: z.ZodString;
904
+ title: z.ZodString;
905
+ description: z.ZodOptional<z.ZodString>;
906
+ priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
907
+ estimated_duration_hours: z.ZodOptional<z.ZodNumber>;
908
+ created_by: z.ZodString;
909
+ }, "strip", z.ZodTypeAny, {
910
+ mission_id: string;
911
+ title: string;
912
+ priority: "low" | "high" | "critical" | "medium";
913
+ created_by: string;
914
+ description?: string | undefined;
915
+ estimated_duration_hours?: number | undefined;
916
+ }, {
917
+ mission_id: string;
918
+ title: string;
919
+ created_by: string;
920
+ description?: string | undefined;
921
+ priority?: "low" | "high" | "critical" | "medium" | undefined;
922
+ estimated_duration_hours?: number | undefined;
923
+ }>;
924
+ }, "strip", z.ZodTypeAny, {
925
+ id: string;
926
+ type: "mission_created";
927
+ project_key: string;
928
+ timestamp: string;
929
+ sequence: number;
930
+ data: {
931
+ mission_id: string;
932
+ title: string;
933
+ priority: "low" | "high" | "critical" | "medium";
934
+ created_by: string;
935
+ description?: string | undefined;
936
+ estimated_duration_hours?: number | undefined;
937
+ };
938
+ }, {
939
+ id: string;
940
+ type: "mission_created";
941
+ project_key: string;
942
+ timestamp: string;
943
+ sequence: number;
944
+ data: {
945
+ mission_id: string;
946
+ title: string;
947
+ created_by: string;
948
+ description?: string | undefined;
949
+ priority?: "low" | "high" | "critical" | "medium" | undefined;
950
+ estimated_duration_hours?: number | undefined;
951
+ };
952
+ }>, z.ZodObject<{
953
+ id: z.ZodString;
954
+ project_key: z.ZodString;
955
+ timestamp: z.ZodString;
956
+ sequence: z.ZodNumber;
957
+ } & {
958
+ type: z.ZodLiteral<"mission_started">;
959
+ data: z.ZodObject<{
960
+ mission_id: z.ZodString;
961
+ started_by: z.ZodString;
962
+ started_at: z.ZodString;
963
+ }, "strip", z.ZodTypeAny, {
964
+ mission_id: string;
965
+ started_by: string;
966
+ started_at: string;
967
+ }, {
968
+ mission_id: string;
969
+ started_by: string;
970
+ started_at: string;
971
+ }>;
972
+ }, "strip", z.ZodTypeAny, {
973
+ id: string;
974
+ type: "mission_started";
975
+ project_key: string;
976
+ timestamp: string;
977
+ sequence: number;
978
+ data: {
979
+ mission_id: string;
980
+ started_by: string;
981
+ started_at: string;
982
+ };
983
+ }, {
984
+ id: string;
985
+ type: "mission_started";
986
+ project_key: string;
987
+ timestamp: string;
988
+ sequence: number;
989
+ data: {
990
+ mission_id: string;
991
+ started_by: string;
992
+ started_at: string;
993
+ };
994
+ }>, z.ZodObject<{
995
+ id: z.ZodString;
996
+ project_key: z.ZodString;
997
+ timestamp: z.ZodString;
998
+ sequence: z.ZodNumber;
999
+ } & {
1000
+ type: z.ZodLiteral<"mission_completed">;
1001
+ data: z.ZodObject<{
1002
+ mission_id: z.ZodString;
1003
+ completed_by: z.ZodString;
1004
+ completed_at: z.ZodString;
1005
+ result: z.ZodEnum<["success", "partial", "failed"]>;
1006
+ summary: z.ZodOptional<z.ZodString>;
1007
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ mission_id: string;
1010
+ completed_by: string;
1011
+ completed_at: string;
1012
+ result: "success" | "partial" | "failed";
1013
+ summary?: string | undefined;
1014
+ metrics?: Record<string, number> | undefined;
1015
+ }, {
1016
+ mission_id: string;
1017
+ completed_by: string;
1018
+ completed_at: string;
1019
+ result: "success" | "partial" | "failed";
1020
+ summary?: string | undefined;
1021
+ metrics?: Record<string, number> | undefined;
1022
+ }>;
1023
+ }, "strip", z.ZodTypeAny, {
1024
+ id: string;
1025
+ type: "mission_completed";
1026
+ project_key: string;
1027
+ timestamp: string;
1028
+ sequence: number;
1029
+ data: {
1030
+ mission_id: string;
1031
+ completed_by: string;
1032
+ completed_at: string;
1033
+ result: "success" | "partial" | "failed";
1034
+ summary?: string | undefined;
1035
+ metrics?: Record<string, number> | undefined;
1036
+ };
1037
+ }, {
1038
+ id: string;
1039
+ type: "mission_completed";
1040
+ project_key: string;
1041
+ timestamp: string;
1042
+ sequence: number;
1043
+ data: {
1044
+ mission_id: string;
1045
+ completed_by: string;
1046
+ completed_at: string;
1047
+ result: "success" | "partial" | "failed";
1048
+ summary?: string | undefined;
1049
+ metrics?: Record<string, number> | undefined;
1050
+ };
1051
+ }>, z.ZodObject<{
1052
+ id: z.ZodString;
1053
+ project_key: z.ZodString;
1054
+ timestamp: z.ZodString;
1055
+ sequence: z.ZodNumber;
1056
+ } & {
1057
+ type: z.ZodLiteral<"mission_updated">;
1058
+ data: z.ZodObject<{
1059
+ mission_id: z.ZodString;
1060
+ updated_by: z.ZodString;
1061
+ updated_at: z.ZodString;
1062
+ changes: z.ZodArray<z.ZodObject<{
1063
+ field: z.ZodString;
1064
+ old_value: z.ZodUnknown;
1065
+ new_value: z.ZodUnknown;
1066
+ }, "strip", z.ZodTypeAny, {
1067
+ field: string;
1068
+ old_value?: unknown;
1069
+ new_value?: unknown;
1070
+ }, {
1071
+ field: string;
1072
+ old_value?: unknown;
1073
+ new_value?: unknown;
1074
+ }>, "many">;
1075
+ }, "strip", z.ZodTypeAny, {
1076
+ updated_by: string;
1077
+ changes: {
1078
+ field: string;
1079
+ old_value?: unknown;
1080
+ new_value?: unknown;
1081
+ }[];
1082
+ mission_id: string;
1083
+ updated_at: string;
1084
+ }, {
1085
+ updated_by: string;
1086
+ changes: {
1087
+ field: string;
1088
+ old_value?: unknown;
1089
+ new_value?: unknown;
1090
+ }[];
1091
+ mission_id: string;
1092
+ updated_at: string;
1093
+ }>;
1094
+ }, "strip", z.ZodTypeAny, {
1095
+ id: string;
1096
+ type: "mission_updated";
1097
+ project_key: string;
1098
+ timestamp: string;
1099
+ sequence: number;
1100
+ data: {
1101
+ updated_by: string;
1102
+ changes: {
1103
+ field: string;
1104
+ old_value?: unknown;
1105
+ new_value?: unknown;
1106
+ }[];
1107
+ mission_id: string;
1108
+ updated_at: string;
1109
+ };
1110
+ }, {
1111
+ id: string;
1112
+ type: "mission_updated";
1113
+ project_key: string;
1114
+ timestamp: string;
1115
+ sequence: number;
1116
+ data: {
1117
+ updated_by: string;
1118
+ changes: {
1119
+ field: string;
1120
+ old_value?: unknown;
1121
+ new_value?: unknown;
1122
+ }[];
1123
+ mission_id: string;
1124
+ updated_at: string;
1125
+ };
1126
+ }>, z.ZodObject<{
1127
+ id: z.ZodString;
1128
+ project_key: z.ZodString;
1129
+ timestamp: z.ZodString;
1130
+ sequence: z.ZodNumber;
1131
+ } & {
1132
+ type: z.ZodLiteral<"checkpoint_created">;
1133
+ data: z.ZodObject<{
1134
+ checkpoint_id: z.ZodString;
1135
+ mission_id: z.ZodOptional<z.ZodString>;
1136
+ sortie_id: z.ZodOptional<z.ZodString>;
1137
+ callsign: z.ZodString;
1138
+ trigger: z.ZodString;
1139
+ progress_percent: z.ZodOptional<z.ZodNumber>;
1140
+ summary: z.ZodOptional<z.ZodString>;
1141
+ context_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1142
+ }, "strip", z.ZodTypeAny, {
1143
+ callsign: string;
1144
+ checkpoint_id: string;
1145
+ trigger: string;
1146
+ sortie_id?: string | undefined;
1147
+ mission_id?: string | undefined;
1148
+ summary?: string | undefined;
1149
+ progress_percent?: number | undefined;
1150
+ context_data?: Record<string, unknown> | undefined;
1151
+ }, {
1152
+ callsign: string;
1153
+ checkpoint_id: string;
1154
+ trigger: string;
1155
+ sortie_id?: string | undefined;
1156
+ mission_id?: string | undefined;
1157
+ summary?: string | undefined;
1158
+ progress_percent?: number | undefined;
1159
+ context_data?: Record<string, unknown> | undefined;
1160
+ }>;
1161
+ }, "strip", z.ZodTypeAny, {
1162
+ id: string;
1163
+ type: "checkpoint_created";
1164
+ project_key: string;
1165
+ timestamp: string;
1166
+ sequence: number;
1167
+ data: {
1168
+ callsign: string;
1169
+ checkpoint_id: string;
1170
+ trigger: string;
1171
+ sortie_id?: string | undefined;
1172
+ mission_id?: string | undefined;
1173
+ summary?: string | undefined;
1174
+ progress_percent?: number | undefined;
1175
+ context_data?: Record<string, unknown> | undefined;
1176
+ };
1177
+ }, {
1178
+ id: string;
1179
+ type: "checkpoint_created";
1180
+ project_key: string;
1181
+ timestamp: string;
1182
+ sequence: number;
1183
+ data: {
1184
+ callsign: string;
1185
+ checkpoint_id: string;
1186
+ trigger: string;
1187
+ sortie_id?: string | undefined;
1188
+ mission_id?: string | undefined;
1189
+ summary?: string | undefined;
1190
+ progress_percent?: number | undefined;
1191
+ context_data?: Record<string, unknown> | undefined;
1192
+ };
1193
+ }>, z.ZodObject<{
1194
+ id: z.ZodString;
1195
+ project_key: z.ZodString;
1196
+ timestamp: z.ZodString;
1197
+ sequence: z.ZodNumber;
1198
+ } & {
1199
+ type: z.ZodLiteral<"context_compacted">;
1200
+ data: z.ZodObject<{
1201
+ checkpoint_id: z.ZodString;
1202
+ compacted_by: z.ZodString;
1203
+ original_size: z.ZodNumber;
1204
+ compacted_size: z.ZodNumber;
1205
+ compression_ratio: z.ZodNumber;
1206
+ compacted_at: z.ZodString;
1207
+ }, "strip", z.ZodTypeAny, {
1208
+ checkpoint_id: string;
1209
+ compacted_by: string;
1210
+ original_size: number;
1211
+ compacted_size: number;
1212
+ compression_ratio: number;
1213
+ compacted_at: string;
1214
+ }, {
1215
+ checkpoint_id: string;
1216
+ compacted_by: string;
1217
+ original_size: number;
1218
+ compacted_size: number;
1219
+ compression_ratio: number;
1220
+ compacted_at: string;
1221
+ }>;
1222
+ }, "strip", z.ZodTypeAny, {
1223
+ id: string;
1224
+ type: "context_compacted";
1225
+ project_key: string;
1226
+ timestamp: string;
1227
+ sequence: number;
1228
+ data: {
1229
+ checkpoint_id: string;
1230
+ compacted_by: string;
1231
+ original_size: number;
1232
+ compacted_size: number;
1233
+ compression_ratio: number;
1234
+ compacted_at: string;
1235
+ };
1236
+ }, {
1237
+ id: string;
1238
+ type: "context_compacted";
1239
+ project_key: string;
1240
+ timestamp: string;
1241
+ sequence: number;
1242
+ data: {
1243
+ checkpoint_id: string;
1244
+ compacted_by: string;
1245
+ original_size: number;
1246
+ compacted_size: number;
1247
+ compression_ratio: number;
1248
+ compacted_at: string;
1249
+ };
1250
+ }>, z.ZodObject<{
1251
+ id: z.ZodString;
1252
+ project_key: z.ZodString;
1253
+ timestamp: z.ZodString;
1254
+ sequence: z.ZodNumber;
1255
+ } & {
1256
+ type: z.ZodLiteral<"checkpoint_restored">;
1257
+ data: z.ZodObject<{
1258
+ checkpoint_id: z.ZodString;
1259
+ restored_by: z.ZodString;
1260
+ restored_at: z.ZodString;
1261
+ restore_target: z.ZodString;
1262
+ success: z.ZodBoolean;
1263
+ notes: z.ZodOptional<z.ZodString>;
1264
+ }, "strip", z.ZodTypeAny, {
1265
+ success: boolean;
1266
+ checkpoint_id: string;
1267
+ restored_by: string;
1268
+ restored_at: string;
1269
+ restore_target: string;
1270
+ notes?: string | undefined;
1271
+ }, {
1272
+ success: boolean;
1273
+ checkpoint_id: string;
1274
+ restored_by: string;
1275
+ restored_at: string;
1276
+ restore_target: string;
1277
+ notes?: string | undefined;
1278
+ }>;
1279
+ }, "strip", z.ZodTypeAny, {
1280
+ id: string;
1281
+ type: "checkpoint_restored";
1282
+ project_key: string;
1283
+ timestamp: string;
1284
+ sequence: number;
1285
+ data: {
1286
+ success: boolean;
1287
+ checkpoint_id: string;
1288
+ restored_by: string;
1289
+ restored_at: string;
1290
+ restore_target: string;
1291
+ notes?: string | undefined;
1292
+ };
1293
+ }, {
1294
+ id: string;
1295
+ type: "checkpoint_restored";
1296
+ project_key: string;
1297
+ timestamp: string;
1298
+ sequence: number;
1299
+ data: {
1300
+ success: boolean;
1301
+ checkpoint_id: string;
1302
+ restored_by: string;
1303
+ restored_at: string;
1304
+ restore_target: string;
1305
+ notes?: string | undefined;
1306
+ };
1307
+ }>, z.ZodObject<{
1308
+ id: z.ZodString;
1309
+ project_key: z.ZodString;
1310
+ timestamp: z.ZodString;
1311
+ sequence: z.ZodNumber;
1312
+ } & {
1313
+ type: z.ZodLiteral<"checkpoint_deleted">;
1314
+ data: z.ZodObject<{
1315
+ checkpoint_id: z.ZodString;
1316
+ deleted_by: z.ZodString;
1317
+ deleted_at: z.ZodString;
1318
+ reason: z.ZodEnum<["expired", "manual", "cleanup"]>;
1319
+ }, "strip", z.ZodTypeAny, {
1320
+ reason: "manual" | "expired" | "cleanup";
1321
+ deleted_by: string;
1322
+ checkpoint_id: string;
1323
+ deleted_at: string;
1324
+ }, {
1325
+ reason: "manual" | "expired" | "cleanup";
1326
+ deleted_by: string;
1327
+ checkpoint_id: string;
1328
+ deleted_at: string;
1329
+ }>;
1330
+ }, "strip", z.ZodTypeAny, {
1331
+ id: string;
1332
+ type: "checkpoint_deleted";
1333
+ project_key: string;
1334
+ timestamp: string;
1335
+ sequence: number;
1336
+ data: {
1337
+ reason: "manual" | "expired" | "cleanup";
1338
+ deleted_by: string;
1339
+ checkpoint_id: string;
1340
+ deleted_at: string;
1341
+ };
1342
+ }, {
1343
+ id: string;
1344
+ type: "checkpoint_deleted";
1345
+ project_key: string;
1346
+ timestamp: string;
1347
+ sequence: number;
1348
+ data: {
1349
+ reason: "manual" | "expired" | "cleanup";
1350
+ deleted_by: string;
1351
+ checkpoint_id: string;
1352
+ deleted_at: string;
1353
+ };
1354
+ }>, z.ZodObject<{
1355
+ id: z.ZodString;
1356
+ project_key: z.ZodString;
1357
+ timestamp: z.ZodString;
1358
+ sequence: z.ZodNumber;
1359
+ } & {
1360
+ type: z.ZodLiteral<"coordinator_decision">;
1361
+ data: z.ZodObject<{
1362
+ decision_id: z.ZodString;
1363
+ coordinator: z.ZodString;
1364
+ decision_type: z.ZodEnum<["pilot_assignment", "task_priority", "resource_allocation", "conflict_resolution"]>;
1365
+ context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1366
+ decision: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1367
+ confidence: z.ZodNumber;
1368
+ reasoning: z.ZodOptional<z.ZodString>;
1369
+ }, "strip", z.ZodTypeAny, {
1370
+ decision_id: string;
1371
+ coordinator: string;
1372
+ decision_type: "pilot_assignment" | "task_priority" | "resource_allocation" | "conflict_resolution";
1373
+ context: Record<string, unknown>;
1374
+ decision: Record<string, unknown>;
1375
+ confidence: number;
1376
+ reasoning?: string | undefined;
1377
+ }, {
1378
+ decision_id: string;
1379
+ coordinator: string;
1380
+ decision_type: "pilot_assignment" | "task_priority" | "resource_allocation" | "conflict_resolution";
1381
+ context: Record<string, unknown>;
1382
+ decision: Record<string, unknown>;
1383
+ confidence: number;
1384
+ reasoning?: string | undefined;
1385
+ }>;
1386
+ }, "strip", z.ZodTypeAny, {
1387
+ id: string;
1388
+ type: "coordinator_decision";
1389
+ project_key: string;
1390
+ timestamp: string;
1391
+ sequence: number;
1392
+ data: {
1393
+ decision_id: string;
1394
+ coordinator: string;
1395
+ decision_type: "pilot_assignment" | "task_priority" | "resource_allocation" | "conflict_resolution";
1396
+ context: Record<string, unknown>;
1397
+ decision: Record<string, unknown>;
1398
+ confidence: number;
1399
+ reasoning?: string | undefined;
1400
+ };
1401
+ }, {
1402
+ id: string;
1403
+ type: "coordinator_decision";
1404
+ project_key: string;
1405
+ timestamp: string;
1406
+ sequence: number;
1407
+ data: {
1408
+ decision_id: string;
1409
+ coordinator: string;
1410
+ decision_type: "pilot_assignment" | "task_priority" | "resource_allocation" | "conflict_resolution";
1411
+ context: Record<string, unknown>;
1412
+ decision: Record<string, unknown>;
1413
+ confidence: number;
1414
+ reasoning?: string | undefined;
1415
+ };
1416
+ }>, z.ZodObject<{
1417
+ id: z.ZodString;
1418
+ project_key: z.ZodString;
1419
+ timestamp: z.ZodString;
1420
+ sequence: z.ZodNumber;
1421
+ } & {
1422
+ type: z.ZodLiteral<"pilot_spawned">;
1423
+ data: z.ZodObject<{
1424
+ callsign: z.ZodString;
1425
+ program: z.ZodEnum<["opencode", "claude-code", "custom"]>;
1426
+ model: z.ZodString;
1427
+ spawned_by: z.ZodString;
1428
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1429
+ }, "strip", z.ZodTypeAny, {
1430
+ callsign: string;
1431
+ program: "custom" | "opencode" | "claude-code";
1432
+ model: string;
1433
+ spawned_by: string;
1434
+ config?: Record<string, unknown> | undefined;
1435
+ }, {
1436
+ callsign: string;
1437
+ program: "custom" | "opencode" | "claude-code";
1438
+ model: string;
1439
+ spawned_by: string;
1440
+ config?: Record<string, unknown> | undefined;
1441
+ }>;
1442
+ }, "strip", z.ZodTypeAny, {
1443
+ id: string;
1444
+ type: "pilot_spawned";
1445
+ project_key: string;
1446
+ timestamp: string;
1447
+ sequence: number;
1448
+ data: {
1449
+ callsign: string;
1450
+ program: "custom" | "opencode" | "claude-code";
1451
+ model: string;
1452
+ spawned_by: string;
1453
+ config?: Record<string, unknown> | undefined;
1454
+ };
1455
+ }, {
1456
+ id: string;
1457
+ type: "pilot_spawned";
1458
+ project_key: string;
1459
+ timestamp: string;
1460
+ sequence: number;
1461
+ data: {
1462
+ callsign: string;
1463
+ program: "custom" | "opencode" | "claude-code";
1464
+ model: string;
1465
+ spawned_by: string;
1466
+ config?: Record<string, unknown> | undefined;
1467
+ };
1468
+ }>, z.ZodObject<{
1469
+ id: z.ZodString;
1470
+ project_key: z.ZodString;
1471
+ timestamp: z.ZodString;
1472
+ sequence: z.ZodNumber;
1473
+ } & {
1474
+ type: z.ZodLiteral<"pilot_terminated">;
1475
+ data: z.ZodObject<{
1476
+ callsign: z.ZodString;
1477
+ terminated_by: z.ZodString;
1478
+ reason: z.ZodEnum<["completed", "error", "timeout", "manual", "resource_limit"]>;
1479
+ exit_code: z.ZodOptional<z.ZodNumber>;
1480
+ final_state: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1481
+ }, "strip", z.ZodTypeAny, {
1482
+ callsign: string;
1483
+ terminated_by: string;
1484
+ reason: "completed" | "error" | "timeout" | "manual" | "resource_limit";
1485
+ exit_code?: number | undefined;
1486
+ final_state?: Record<string, unknown> | undefined;
1487
+ }, {
1488
+ callsign: string;
1489
+ terminated_by: string;
1490
+ reason: "completed" | "error" | "timeout" | "manual" | "resource_limit";
1491
+ exit_code?: number | undefined;
1492
+ final_state?: Record<string, unknown> | undefined;
1493
+ }>;
1494
+ }, "strip", z.ZodTypeAny, {
1495
+ id: string;
1496
+ type: "pilot_terminated";
1497
+ project_key: string;
1498
+ timestamp: string;
1499
+ sequence: number;
1500
+ data: {
1501
+ callsign: string;
1502
+ terminated_by: string;
1503
+ reason: "completed" | "error" | "timeout" | "manual" | "resource_limit";
1504
+ exit_code?: number | undefined;
1505
+ final_state?: Record<string, unknown> | undefined;
1506
+ };
1507
+ }, {
1508
+ id: string;
1509
+ type: "pilot_terminated";
1510
+ project_key: string;
1511
+ timestamp: string;
1512
+ sequence: number;
1513
+ data: {
1514
+ callsign: string;
1515
+ terminated_by: string;
1516
+ reason: "completed" | "error" | "timeout" | "manual" | "resource_limit";
1517
+ exit_code?: number | undefined;
1518
+ final_state?: Record<string, unknown> | undefined;
1519
+ };
1520
+ }>, z.ZodObject<{
1521
+ id: z.ZodString;
1522
+ project_key: z.ZodString;
1523
+ timestamp: z.ZodString;
1524
+ sequence: z.ZodNumber;
1525
+ } & {
1526
+ type: z.ZodLiteral<"lock_acquired">;
1527
+ data: z.ZodObject<{
1528
+ lock_key: z.ZodString;
1529
+ holder_id: z.ZodString;
1530
+ lock_type: z.ZodEnum<["exclusive", "shared"]>;
1531
+ ttl_seconds: z.ZodNumber;
1532
+ acquired_at: z.ZodString;
1533
+ }, "strip", z.ZodTypeAny, {
1534
+ lock_key: string;
1535
+ holder_id: string;
1536
+ lock_type: "exclusive" | "shared";
1537
+ ttl_seconds: number;
1538
+ acquired_at: string;
1539
+ }, {
1540
+ lock_key: string;
1541
+ holder_id: string;
1542
+ lock_type: "exclusive" | "shared";
1543
+ ttl_seconds: number;
1544
+ acquired_at: string;
1545
+ }>;
1546
+ }, "strip", z.ZodTypeAny, {
1547
+ id: string;
1548
+ type: "lock_acquired";
1549
+ project_key: string;
1550
+ timestamp: string;
1551
+ sequence: number;
1552
+ data: {
1553
+ lock_key: string;
1554
+ holder_id: string;
1555
+ lock_type: "exclusive" | "shared";
1556
+ ttl_seconds: number;
1557
+ acquired_at: string;
1558
+ };
1559
+ }, {
1560
+ id: string;
1561
+ type: "lock_acquired";
1562
+ project_key: string;
1563
+ timestamp: string;
1564
+ sequence: number;
1565
+ data: {
1566
+ lock_key: string;
1567
+ holder_id: string;
1568
+ lock_type: "exclusive" | "shared";
1569
+ ttl_seconds: number;
1570
+ acquired_at: string;
1571
+ };
1572
+ }>, z.ZodObject<{
1573
+ id: z.ZodString;
1574
+ project_key: z.ZodString;
1575
+ timestamp: z.ZodString;
1576
+ sequence: z.ZodNumber;
1577
+ } & {
1578
+ type: z.ZodLiteral<"lock_released">;
1579
+ data: z.ZodObject<{
1580
+ lock_key: z.ZodString;
1581
+ holder_id: z.ZodString;
1582
+ released_by: z.ZodString;
1583
+ released_at: z.ZodString;
1584
+ held_duration_ms: z.ZodNumber;
1585
+ }, "strip", z.ZodTypeAny, {
1586
+ lock_key: string;
1587
+ holder_id: string;
1588
+ released_by: string;
1589
+ released_at: string;
1590
+ held_duration_ms: number;
1591
+ }, {
1592
+ lock_key: string;
1593
+ holder_id: string;
1594
+ released_by: string;
1595
+ released_at: string;
1596
+ held_duration_ms: number;
1597
+ }>;
1598
+ }, "strip", z.ZodTypeAny, {
1599
+ id: string;
1600
+ type: "lock_released";
1601
+ project_key: string;
1602
+ timestamp: string;
1603
+ sequence: number;
1604
+ data: {
1605
+ lock_key: string;
1606
+ holder_id: string;
1607
+ released_by: string;
1608
+ released_at: string;
1609
+ held_duration_ms: number;
1610
+ };
1611
+ }, {
1612
+ id: string;
1613
+ type: "lock_released";
1614
+ project_key: string;
1615
+ timestamp: string;
1616
+ sequence: number;
1617
+ data: {
1618
+ lock_key: string;
1619
+ holder_id: string;
1620
+ released_by: string;
1621
+ released_at: string;
1622
+ held_duration_ms: number;
1623
+ };
1624
+ }>, z.ZodObject<{
1625
+ id: z.ZodString;
1626
+ project_key: z.ZodString;
1627
+ timestamp: z.ZodString;
1628
+ sequence: z.ZodNumber;
1629
+ } & {
1630
+ type: z.ZodLiteral<"cursor_moved">;
1631
+ data: z.ZodObject<{
1632
+ consumer_id: z.ZodString;
1633
+ stream_type: z.ZodString;
1634
+ old_position: z.ZodNumber;
1635
+ new_position: z.ZodNumber;
1636
+ moved_at: z.ZodString;
1637
+ batch_size: z.ZodOptional<z.ZodNumber>;
1638
+ }, "strip", z.ZodTypeAny, {
1639
+ consumer_id: string;
1640
+ stream_type: string;
1641
+ old_position: number;
1642
+ new_position: number;
1643
+ moved_at: string;
1644
+ batch_size?: number | undefined;
1645
+ }, {
1646
+ consumer_id: string;
1647
+ stream_type: string;
1648
+ old_position: number;
1649
+ new_position: number;
1650
+ moved_at: string;
1651
+ batch_size?: number | undefined;
1652
+ }>;
1653
+ }, "strip", z.ZodTypeAny, {
1654
+ id: string;
1655
+ type: "cursor_moved";
1656
+ project_key: string;
1657
+ timestamp: string;
1658
+ sequence: number;
1659
+ data: {
1660
+ consumer_id: string;
1661
+ stream_type: string;
1662
+ old_position: number;
1663
+ new_position: number;
1664
+ moved_at: string;
1665
+ batch_size?: number | undefined;
1666
+ };
1667
+ }, {
1668
+ id: string;
1669
+ type: "cursor_moved";
1670
+ project_key: string;
1671
+ timestamp: string;
1672
+ sequence: number;
1673
+ data: {
1674
+ consumer_id: string;
1675
+ stream_type: string;
1676
+ old_position: number;
1677
+ new_position: number;
1678
+ moved_at: string;
1679
+ batch_size?: number | undefined;
1680
+ };
1681
+ }>]>;
1682
+ export type FleetEvent = z.infer<typeof FleetEventSchema>;
1683
+ export type { PilotRegisteredEvent, PilotActiveEvent, PilotDeregisteredEvent, } from './pilots.js';
1684
+ export type { MessageSentEvent, MessageReadEvent, MessageAcknowledgedEvent, MessageUpdatedEvent, MessageDeletedEvent, } from './messages.js';
1685
+ export type { FileReservedEvent, FileReleasedEvent, FileConflictEvent, } from './reservations.js';
1686
+ export type { SortieCreatedEvent, SortieStartedEvent, SortieCompletedEvent, SortieBlockedEvent, SortieResumedEvent, SortieUpdatedEvent, } from './sorties.js';
1687
+ export type { MissionCreatedEvent, MissionStartedEvent, MissionCompletedEvent, MissionUpdatedEvent, } from './missions.js';
1688
+ export type { CheckpointCreatedEvent, ContextCompactedEvent, CheckpointRestoredEvent, CheckpointDeletedEvent, } from './checkpoints.js';
1689
+ export type { CoordinatorDecisionEvent, PilotSpawnedEvent, PilotTerminatedEvent, LockAcquiredEvent, LockReleasedEvent, CursorMovedEvent, } from './coordination.js';
1690
+ export { BaseEventSchema } from './base.js';
1691
+ export type { BaseEvent } from './base.js';
1692
+ //# sourceMappingURL=index.d.ts.map