@fleettools/events 0.1.0 → 0.2.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.
@@ -1,1691 +0,0 @@
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;
32
- }, {
33
- callsign?: string;
34
- program?: "custom" | "opencode" | "claude-code";
35
- model?: string;
36
- task_description?: string;
37
- }>;
38
- }, "strip", z.ZodTypeAny, {
39
- type?: "pilot_registered";
40
- id?: string;
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;
49
- };
50
- }, {
51
- type?: "pilot_registered";
52
- id?: string;
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;
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;
77
- }, {
78
- status?: "active" | "idle" | "busy";
79
- callsign?: string;
80
- current_task?: string;
81
- }>;
82
- }, "strip", z.ZodTypeAny, {
83
- type?: "pilot_active";
84
- id?: string;
85
- project_key?: string;
86
- timestamp?: string;
87
- sequence?: number;
88
- data?: {
89
- status?: "active" | "idle" | "busy";
90
- callsign?: string;
91
- current_task?: string;
92
- };
93
- }, {
94
- type?: "pilot_active";
95
- id?: string;
96
- project_key?: string;
97
- timestamp?: string;
98
- sequence?: number;
99
- data?: {
100
- status?: "active" | "idle" | "busy";
101
- callsign?: string;
102
- current_task?: string;
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;
119
- }, {
120
- callsign?: string;
121
- reason?: "completed" | "error" | "timeout" | "manual";
122
- final_status?: string;
123
- }>;
124
- }, "strip", z.ZodTypeAny, {
125
- type?: "pilot_deregistered";
126
- id?: string;
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;
134
- };
135
- }, {
136
- type?: "pilot_deregistered";
137
- id?: string;
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;
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
- thread_id?: string;
167
- importance?: "low" | "normal" | "high" | "critical";
168
- ack_required?: boolean;
169
- }, {
170
- from_callsign?: string;
171
- to_callsigns?: string[];
172
- subject?: string;
173
- body?: string;
174
- thread_id?: string;
175
- importance?: "low" | "normal" | "high" | "critical";
176
- ack_required?: boolean;
177
- }>;
178
- }, "strip", z.ZodTypeAny, {
179
- type?: "message_sent";
180
- id?: string;
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
- thread_id?: string;
190
- importance?: "low" | "normal" | "high" | "critical";
191
- ack_required?: boolean;
192
- };
193
- }, {
194
- type?: "message_sent";
195
- id?: string;
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;
205
- importance?: "low" | "normal" | "high" | "critical";
206
- ack_required?: boolean;
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
- type?: "message_read";
230
- id?: string;
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
- type?: "message_read";
241
- id?: string;
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;
267
- }, {
268
- callsign?: string;
269
- message_id?: string;
270
- acknowledged_at?: string;
271
- notes?: string;
272
- }>;
273
- }, "strip", z.ZodTypeAny, {
274
- type?: "message_acknowledged";
275
- id?: string;
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;
284
- };
285
- }, {
286
- type?: "message_acknowledged";
287
- id?: string;
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;
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
- type?: "message_updated";
339
- id?: string;
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
- type?: "message_updated";
354
- id?: string;
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
- reason?: string;
380
- message_id?: string;
381
- deleted_by?: string;
382
- }, {
383
- reason?: string;
384
- message_id?: string;
385
- deleted_by?: string;
386
- }>;
387
- }, "strip", z.ZodTypeAny, {
388
- type?: "message_deleted";
389
- id?: string;
390
- project_key?: string;
391
- timestamp?: string;
392
- sequence?: number;
393
- data?: {
394
- reason?: string;
395
- message_id?: string;
396
- deleted_by?: string;
397
- };
398
- }, {
399
- type?: "message_deleted";
400
- id?: string;
401
- project_key?: string;
402
- timestamp?: string;
403
- sequence?: number;
404
- data?: {
405
- reason?: string;
406
- message_id?: string;
407
- deleted_by?: string;
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
- reason?: string;
425
- path_pattern?: string;
426
- exclusive?: boolean;
427
- ttl_seconds?: number;
428
- }, {
429
- callsign?: string;
430
- reason?: string;
431
- path_pattern?: string;
432
- exclusive?: boolean;
433
- ttl_seconds?: number;
434
- }>;
435
- }, "strip", z.ZodTypeAny, {
436
- type?: "file_reserved";
437
- id?: string;
438
- project_key?: string;
439
- timestamp?: string;
440
- sequence?: number;
441
- data?: {
442
- callsign?: string;
443
- reason?: string;
444
- path_pattern?: string;
445
- exclusive?: boolean;
446
- ttl_seconds?: number;
447
- };
448
- }, {
449
- type?: "file_reserved";
450
- id?: string;
451
- project_key?: string;
452
- timestamp?: string;
453
- sequence?: number;
454
- data?: {
455
- callsign?: string;
456
- reason?: string;
457
- path_pattern?: string;
458
- exclusive?: boolean;
459
- ttl_seconds?: number;
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
- reason?: string;
476
- path_pattern?: string;
477
- released_by?: string;
478
- }, {
479
- callsign?: string;
480
- reason?: string;
481
- path_pattern?: string;
482
- released_by?: string;
483
- }>;
484
- }, "strip", z.ZodTypeAny, {
485
- type?: "file_released";
486
- id?: string;
487
- project_key?: string;
488
- timestamp?: string;
489
- sequence?: number;
490
- data?: {
491
- callsign?: string;
492
- reason?: string;
493
- path_pattern?: string;
494
- released_by?: string;
495
- };
496
- }, {
497
- type?: "file_released";
498
- id?: string;
499
- project_key?: string;
500
- timestamp?: string;
501
- sequence?: number;
502
- data?: {
503
- callsign?: string;
504
- reason?: string;
505
- path_pattern?: string;
506
- released_by?: string;
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;
533
- }>;
534
- }, "strip", z.ZodTypeAny, {
535
- type?: "file_conflict";
536
- id?: string;
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
- type?: "file_conflict";
549
- id?: string;
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;
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
- description?: string;
578
- sortie_id?: string;
579
- mission_id?: string;
580
- title?: string;
581
- priority?: "low" | "high" | "critical" | "medium";
582
- assigned_to?: string;
583
- files?: string[];
584
- estimated_hours?: number;
585
- }, {
586
- description?: string;
587
- sortie_id?: string;
588
- mission_id?: string;
589
- title?: string;
590
- priority?: "low" | "high" | "critical" | "medium";
591
- assigned_to?: string;
592
- files?: string[];
593
- estimated_hours?: number;
594
- }>;
595
- }, "strip", z.ZodTypeAny, {
596
- type?: "sortie_created";
597
- id?: string;
598
- project_key?: string;
599
- timestamp?: string;
600
- sequence?: number;
601
- data?: {
602
- description?: string;
603
- sortie_id?: string;
604
- mission_id?: string;
605
- title?: string;
606
- priority?: "low" | "high" | "critical" | "medium";
607
- assigned_to?: string;
608
- files?: string[];
609
- estimated_hours?: number;
610
- };
611
- }, {
612
- type?: "sortie_created";
613
- id?: string;
614
- project_key?: string;
615
- timestamp?: string;
616
- sequence?: number;
617
- data?: {
618
- description?: string;
619
- sortie_id?: string;
620
- mission_id?: string;
621
- title?: string;
622
- priority?: "low" | "high" | "critical" | "medium";
623
- assigned_to?: string;
624
- files?: string[];
625
- estimated_hours?: number;
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
- type?: "sortie_started";
649
- id?: string;
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
- type?: "sortie_started";
660
- id?: string;
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
- notes?: string;
684
- sortie_id?: string;
685
- completed_by?: string;
686
- completed_at?: string;
687
- result?: "partial" | "success" | "failed";
688
- }, {
689
- notes?: string;
690
- sortie_id?: string;
691
- completed_by?: string;
692
- completed_at?: string;
693
- result?: "partial" | "success" | "failed";
694
- }>;
695
- }, "strip", z.ZodTypeAny, {
696
- type?: "sortie_completed";
697
- id?: string;
698
- project_key?: string;
699
- timestamp?: string;
700
- sequence?: number;
701
- data?: {
702
- notes?: string;
703
- sortie_id?: string;
704
- completed_by?: string;
705
- completed_at?: string;
706
- result?: "partial" | "success" | "failed";
707
- };
708
- }, {
709
- type?: "sortie_completed";
710
- id?: string;
711
- project_key?: string;
712
- timestamp?: string;
713
- sequence?: number;
714
- data?: {
715
- notes?: string;
716
- sortie_id?: string;
717
- completed_by?: string;
718
- completed_at?: string;
719
- result?: "partial" | "success" | "failed";
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;
740
- }, {
741
- sortie_id?: string;
742
- blocked_by?: string;
743
- blocked_reason?: string;
744
- blocked_at?: string;
745
- blocked_by_callsign?: string;
746
- }>;
747
- }, "strip", z.ZodTypeAny, {
748
- type?: "sortie_blocked";
749
- id?: string;
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;
759
- };
760
- }, {
761
- type?: "sortie_blocked";
762
- id?: string;
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;
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
- type?: "sortie_resumed";
798
- id?: string;
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
- type?: "sortie_resumed";
810
- id?: string;
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
- type?: "sortie_updated";
865
- id?: string;
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
- type?: "sortie_updated";
881
- id?: string;
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
- description?: string;
911
- mission_id?: string;
912
- title?: string;
913
- priority?: "low" | "high" | "critical" | "medium";
914
- estimated_duration_hours?: number;
915
- created_by?: string;
916
- }, {
917
- description?: string;
918
- mission_id?: string;
919
- title?: string;
920
- priority?: "low" | "high" | "critical" | "medium";
921
- estimated_duration_hours?: number;
922
- created_by?: string;
923
- }>;
924
- }, "strip", z.ZodTypeAny, {
925
- type?: "mission_created";
926
- id?: string;
927
- project_key?: string;
928
- timestamp?: string;
929
- sequence?: number;
930
- data?: {
931
- description?: string;
932
- mission_id?: string;
933
- title?: string;
934
- priority?: "low" | "high" | "critical" | "medium";
935
- estimated_duration_hours?: number;
936
- created_by?: string;
937
- };
938
- }, {
939
- type?: "mission_created";
940
- id?: string;
941
- project_key?: string;
942
- timestamp?: string;
943
- sequence?: number;
944
- data?: {
945
- description?: string;
946
- mission_id?: string;
947
- title?: string;
948
- priority?: "low" | "high" | "critical" | "medium";
949
- estimated_duration_hours?: number;
950
- created_by?: string;
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
- type?: "mission_started";
974
- id?: string;
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
- type?: "mission_started";
985
- id?: string;
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?: "partial" | "success" | "failed";
1013
- summary?: string;
1014
- metrics?: Record<string, number>;
1015
- }, {
1016
- mission_id?: string;
1017
- completed_by?: string;
1018
- completed_at?: string;
1019
- result?: "partial" | "success" | "failed";
1020
- summary?: string;
1021
- metrics?: Record<string, number>;
1022
- }>;
1023
- }, "strip", z.ZodTypeAny, {
1024
- type?: "mission_completed";
1025
- id?: string;
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?: "partial" | "success" | "failed";
1034
- summary?: string;
1035
- metrics?: Record<string, number>;
1036
- };
1037
- }, {
1038
- type?: "mission_completed";
1039
- id?: string;
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?: "partial" | "success" | "failed";
1048
- summary?: string;
1049
- metrics?: Record<string, number>;
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
- type?: "mission_updated";
1096
- id?: string;
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
- type?: "mission_updated";
1112
- id?: string;
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
- sortie_id?: string;
1145
- mission_id?: string;
1146
- summary?: string;
1147
- checkpoint_id?: string;
1148
- trigger?: string;
1149
- progress_percent?: number;
1150
- context_data?: Record<string, unknown>;
1151
- }, {
1152
- callsign?: string;
1153
- sortie_id?: string;
1154
- mission_id?: string;
1155
- summary?: string;
1156
- checkpoint_id?: string;
1157
- trigger?: string;
1158
- progress_percent?: number;
1159
- context_data?: Record<string, unknown>;
1160
- }>;
1161
- }, "strip", z.ZodTypeAny, {
1162
- type?: "checkpoint_created";
1163
- id?: string;
1164
- project_key?: string;
1165
- timestamp?: string;
1166
- sequence?: number;
1167
- data?: {
1168
- callsign?: string;
1169
- sortie_id?: string;
1170
- mission_id?: string;
1171
- summary?: string;
1172
- checkpoint_id?: string;
1173
- trigger?: string;
1174
- progress_percent?: number;
1175
- context_data?: Record<string, unknown>;
1176
- };
1177
- }, {
1178
- type?: "checkpoint_created";
1179
- id?: string;
1180
- project_key?: string;
1181
- timestamp?: string;
1182
- sequence?: number;
1183
- data?: {
1184
- callsign?: string;
1185
- sortie_id?: string;
1186
- mission_id?: string;
1187
- summary?: string;
1188
- checkpoint_id?: string;
1189
- trigger?: string;
1190
- progress_percent?: number;
1191
- context_data?: Record<string, unknown>;
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
- type?: "context_compacted";
1224
- id?: string;
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
- type?: "context_compacted";
1238
- id?: string;
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
- notes?: string;
1266
- success?: boolean;
1267
- checkpoint_id?: string;
1268
- restored_by?: string;
1269
- restored_at?: string;
1270
- restore_target?: string;
1271
- }, {
1272
- notes?: string;
1273
- success?: boolean;
1274
- checkpoint_id?: string;
1275
- restored_by?: string;
1276
- restored_at?: string;
1277
- restore_target?: string;
1278
- }>;
1279
- }, "strip", z.ZodTypeAny, {
1280
- type?: "checkpoint_restored";
1281
- id?: string;
1282
- project_key?: string;
1283
- timestamp?: string;
1284
- sequence?: number;
1285
- data?: {
1286
- notes?: string;
1287
- success?: boolean;
1288
- checkpoint_id?: string;
1289
- restored_by?: string;
1290
- restored_at?: string;
1291
- restore_target?: string;
1292
- };
1293
- }, {
1294
- type?: "checkpoint_restored";
1295
- id?: string;
1296
- project_key?: string;
1297
- timestamp?: string;
1298
- sequence?: number;
1299
- data?: {
1300
- notes?: string;
1301
- success?: boolean;
1302
- checkpoint_id?: string;
1303
- restored_by?: string;
1304
- restored_at?: string;
1305
- restore_target?: string;
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
- type?: "checkpoint_deleted";
1332
- id?: string;
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
- type?: "checkpoint_deleted";
1344
- id?: string;
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;
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;
1385
- }>;
1386
- }, "strip", z.ZodTypeAny, {
1387
- type?: "coordinator_decision";
1388
- id?: string;
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;
1400
- };
1401
- }, {
1402
- type?: "coordinator_decision";
1403
- id?: string;
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;
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>;
1435
- }, {
1436
- callsign?: string;
1437
- program?: "custom" | "opencode" | "claude-code";
1438
- model?: string;
1439
- spawned_by?: string;
1440
- config?: Record<string, unknown>;
1441
- }>;
1442
- }, "strip", z.ZodTypeAny, {
1443
- type?: "pilot_spawned";
1444
- id?: string;
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>;
1454
- };
1455
- }, {
1456
- type?: "pilot_spawned";
1457
- id?: string;
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>;
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
- reason?: "completed" | "error" | "timeout" | "manual" | "resource_limit";
1484
- terminated_by?: string;
1485
- exit_code?: number;
1486
- final_state?: Record<string, unknown>;
1487
- }, {
1488
- callsign?: string;
1489
- reason?: "completed" | "error" | "timeout" | "manual" | "resource_limit";
1490
- terminated_by?: string;
1491
- exit_code?: number;
1492
- final_state?: Record<string, unknown>;
1493
- }>;
1494
- }, "strip", z.ZodTypeAny, {
1495
- type?: "pilot_terminated";
1496
- id?: string;
1497
- project_key?: string;
1498
- timestamp?: string;
1499
- sequence?: number;
1500
- data?: {
1501
- callsign?: string;
1502
- reason?: "completed" | "error" | "timeout" | "manual" | "resource_limit";
1503
- terminated_by?: string;
1504
- exit_code?: number;
1505
- final_state?: Record<string, unknown>;
1506
- };
1507
- }, {
1508
- type?: "pilot_terminated";
1509
- id?: string;
1510
- project_key?: string;
1511
- timestamp?: string;
1512
- sequence?: number;
1513
- data?: {
1514
- callsign?: string;
1515
- reason?: "completed" | "error" | "timeout" | "manual" | "resource_limit";
1516
- terminated_by?: string;
1517
- exit_code?: number;
1518
- final_state?: Record<string, unknown>;
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
- ttl_seconds?: number;
1535
- lock_key?: string;
1536
- holder_id?: string;
1537
- lock_type?: "exclusive" | "shared";
1538
- acquired_at?: string;
1539
- }, {
1540
- ttl_seconds?: number;
1541
- lock_key?: string;
1542
- holder_id?: string;
1543
- lock_type?: "exclusive" | "shared";
1544
- acquired_at?: string;
1545
- }>;
1546
- }, "strip", z.ZodTypeAny, {
1547
- type?: "lock_acquired";
1548
- id?: string;
1549
- project_key?: string;
1550
- timestamp?: string;
1551
- sequence?: number;
1552
- data?: {
1553
- ttl_seconds?: number;
1554
- lock_key?: string;
1555
- holder_id?: string;
1556
- lock_type?: "exclusive" | "shared";
1557
- acquired_at?: string;
1558
- };
1559
- }, {
1560
- type?: "lock_acquired";
1561
- id?: string;
1562
- project_key?: string;
1563
- timestamp?: string;
1564
- sequence?: number;
1565
- data?: {
1566
- ttl_seconds?: number;
1567
- lock_key?: string;
1568
- holder_id?: string;
1569
- lock_type?: "exclusive" | "shared";
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
- released_by?: string;
1587
- lock_key?: string;
1588
- holder_id?: string;
1589
- released_at?: string;
1590
- held_duration_ms?: number;
1591
- }, {
1592
- released_by?: string;
1593
- lock_key?: string;
1594
- holder_id?: string;
1595
- released_at?: string;
1596
- held_duration_ms?: number;
1597
- }>;
1598
- }, "strip", z.ZodTypeAny, {
1599
- type?: "lock_released";
1600
- id?: string;
1601
- project_key?: string;
1602
- timestamp?: string;
1603
- sequence?: number;
1604
- data?: {
1605
- released_by?: string;
1606
- lock_key?: string;
1607
- holder_id?: string;
1608
- released_at?: string;
1609
- held_duration_ms?: number;
1610
- };
1611
- }, {
1612
- type?: "lock_released";
1613
- id?: string;
1614
- project_key?: string;
1615
- timestamp?: string;
1616
- sequence?: number;
1617
- data?: {
1618
- released_by?: string;
1619
- lock_key?: string;
1620
- holder_id?: 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;
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;
1652
- }>;
1653
- }, "strip", z.ZodTypeAny, {
1654
- type?: "cursor_moved";
1655
- id?: string;
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;
1666
- };
1667
- }, {
1668
- type?: "cursor_moved";
1669
- id?: string;
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;
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';