@illalabs/interfaces 0.10.2-canary-beta-99447a7d → 0.10.2

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.
@@ -4,20 +4,20 @@ import { z } from "zod";
4
4
  * Telemetry event type enum values.
5
5
  * Used to infer TelemetryEventType in types/telemetry.ts
6
6
  */
7
- export declare const telemetryEventTypes: readonly ["iteration_start", "iteration_end", "tool_call_batch", "tool_input_start", "tool_input_delta", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "reasoning_start", "reasoning_delta", "reasoning_end", "finish", "error", "connected", "stream_end", "plan_generating", "plan_generated", "plan_step_started", "plan_step_retrying", "plan_step_completed", "plan_invalidated", "replan_started", "replan_complete", "plan_execution_complete", "plan_expired", "plan_step_simulated", "plan_step_verification_passed", "plan_step_verification_failed", "plan_execution_failed"];
7
+ export declare const telemetryEventTypes: readonly ["iteration_start", "iteration_end", "tool_call_batch", "tool_input_start", "tool_input_delta", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "finish", "error", "connected", "stream_end", "plan_generating", "plan_generated", "plan_step_started", "plan_step_retrying", "plan_step_completed", "plan_invalidated", "replan_started", "replan_complete", "plan_execution_complete", "plan_expired", "plan_step_simulated", "plan_step_verification_passed", "plan_step_verification_failed", "plan_execution_failed"];
8
8
  /**
9
9
  * Base telemetry event schema with common fields
10
10
  */
11
11
  export declare const baseTelemetryEventSchema: z.ZodObject<{
12
12
  requestId: z.ZodString;
13
- type: z.ZodEnum<["iteration_start", "iteration_end", "tool_call_batch", "tool_input_start", "tool_input_delta", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "reasoning_start", "reasoning_delta", "reasoning_end", "finish", "error", "connected", "stream_end", "plan_generating", "plan_generated", "plan_step_started", "plan_step_retrying", "plan_step_completed", "plan_invalidated", "replan_started", "replan_complete", "plan_execution_complete", "plan_expired", "plan_step_simulated", "plan_step_verification_passed", "plan_step_verification_failed", "plan_execution_failed"]>;
13
+ type: z.ZodEnum<["iteration_start", "iteration_end", "tool_call_batch", "tool_input_start", "tool_input_delta", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "finish", "error", "connected", "stream_end", "plan_generating", "plan_generated", "plan_step_started", "plan_step_retrying", "plan_step_completed", "plan_invalidated", "replan_started", "replan_complete", "plan_execution_complete", "plan_expired", "plan_step_simulated", "plan_step_verification_passed", "plan_step_verification_failed", "plan_execution_failed"]>;
14
14
  timestamp: z.ZodOptional<z.ZodNumber>;
15
15
  }, "strip", z.ZodTypeAny, {
16
- type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_input_start" | "tool_input_delta" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "reasoning_start" | "reasoning_delta" | "reasoning_end" | "finish" | "connected" | "stream_end" | "plan_generating" | "plan_generated" | "plan_step_started" | "plan_step_retrying" | "plan_step_completed" | "plan_invalidated" | "replan_started" | "replan_complete" | "plan_execution_complete" | "plan_expired" | "plan_step_simulated" | "plan_step_verification_passed" | "plan_step_verification_failed" | "plan_execution_failed";
16
+ type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_input_start" | "tool_input_delta" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "finish" | "connected" | "stream_end" | "plan_generating" | "plan_generated" | "plan_step_started" | "plan_step_retrying" | "plan_step_completed" | "plan_invalidated" | "replan_started" | "replan_complete" | "plan_execution_complete" | "plan_expired" | "plan_step_simulated" | "plan_step_verification_passed" | "plan_step_verification_failed" | "plan_execution_failed";
17
17
  requestId: string;
18
18
  timestamp?: number | undefined;
19
19
  }, {
20
- type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_input_start" | "tool_input_delta" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "reasoning_start" | "reasoning_delta" | "reasoning_end" | "finish" | "connected" | "stream_end" | "plan_generating" | "plan_generated" | "plan_step_started" | "plan_step_retrying" | "plan_step_completed" | "plan_invalidated" | "replan_started" | "replan_complete" | "plan_execution_complete" | "plan_expired" | "plan_step_simulated" | "plan_step_verification_passed" | "plan_step_verification_failed" | "plan_execution_failed";
20
+ type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_input_start" | "tool_input_delta" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "finish" | "connected" | "stream_end" | "plan_generating" | "plan_generated" | "plan_step_started" | "plan_step_retrying" | "plan_step_completed" | "plan_invalidated" | "replan_started" | "replan_complete" | "plan_execution_complete" | "plan_expired" | "plan_step_simulated" | "plan_step_verification_passed" | "plan_step_verification_failed" | "plan_execution_failed";
21
21
  requestId: string;
22
22
  timestamp?: number | undefined;
23
23
  }>;
@@ -71,17 +71,17 @@ export declare const iterationStartEventSchema: z.ZodObject<{
71
71
  iteration: number;
72
72
  }>;
73
73
  }, "strip", z.ZodTypeAny, {
74
- type: "iteration_start";
75
74
  data: {
76
75
  iteration: number;
77
76
  };
77
+ type: "iteration_start";
78
78
  requestId: string;
79
79
  timestamp?: number | undefined;
80
80
  }, {
81
- type: "iteration_start";
82
81
  data: {
83
82
  iteration: number;
84
83
  };
84
+ type: "iteration_start";
85
85
  requestId: string;
86
86
  timestamp?: number | undefined;
87
87
  }>;
@@ -107,21 +107,21 @@ export declare const iterationEndEventSchema: z.ZodObject<{
107
107
  shouldContinue: boolean;
108
108
  }>;
109
109
  }, "strip", z.ZodTypeAny, {
110
- type: "iteration_end";
111
110
  data: {
112
111
  iteration: number;
113
112
  hasToolCalls: boolean;
114
113
  shouldContinue: boolean;
115
114
  };
115
+ type: "iteration_end";
116
116
  requestId: string;
117
117
  timestamp?: number | undefined;
118
118
  }, {
119
- type: "iteration_end";
120
119
  data: {
121
120
  iteration: number;
122
121
  hasToolCalls: boolean;
123
122
  shouldContinue: boolean;
124
123
  };
124
+ type: "iteration_end";
125
125
  requestId: string;
126
126
  timestamp?: number | undefined;
127
127
  }>;
@@ -164,7 +164,6 @@ export declare const toolCallBatchEventSchema: z.ZodObject<{
164
164
  }[];
165
165
  }>;
166
166
  }, "strip", z.ZodTypeAny, {
167
- type: "tool_call_batch";
168
167
  data: {
169
168
  iteration: number;
170
169
  tools: {
@@ -173,10 +172,10 @@ export declare const toolCallBatchEventSchema: z.ZodObject<{
173
172
  args?: Record<string, unknown> | undefined;
174
173
  }[];
175
174
  };
175
+ type: "tool_call_batch";
176
176
  requestId: string;
177
177
  timestamp?: number | undefined;
178
178
  }, {
179
- type: "tool_call_batch";
180
179
  data: {
181
180
  iteration: number;
182
181
  tools: {
@@ -185,6 +184,7 @@ export declare const toolCallBatchEventSchema: z.ZodObject<{
185
184
  args?: Record<string, unknown> | undefined;
186
185
  }[];
187
186
  };
187
+ type: "tool_call_batch";
188
188
  requestId: string;
189
189
  timestamp?: number | undefined;
190
190
  }>;
@@ -207,19 +207,19 @@ export declare const toolInputStartEventSchema: z.ZodObject<{
207
207
  toolName: string;
208
208
  }>;
209
209
  }, "strip", z.ZodTypeAny, {
210
- type: "tool_input_start";
211
210
  data: {
212
211
  toolCallId: string;
213
212
  toolName: string;
214
213
  };
214
+ type: "tool_input_start";
215
215
  requestId: string;
216
216
  timestamp?: number | undefined;
217
217
  }, {
218
- type: "tool_input_start";
219
218
  data: {
220
219
  toolCallId: string;
221
220
  toolName: string;
222
221
  };
222
+ type: "tool_input_start";
223
223
  requestId: string;
224
224
  timestamp?: number | undefined;
225
225
  }>;
@@ -242,19 +242,19 @@ export declare const toolInputDeltaEventSchema: z.ZodObject<{
242
242
  inputTextDelta: string;
243
243
  }>;
244
244
  }, "strip", z.ZodTypeAny, {
245
- type: "tool_input_delta";
246
245
  data: {
247
246
  toolCallId: string;
248
247
  inputTextDelta: string;
249
248
  };
249
+ type: "tool_input_delta";
250
250
  requestId: string;
251
251
  timestamp?: number | undefined;
252
252
  }, {
253
- type: "tool_input_delta";
254
253
  data: {
255
254
  toolCallId: string;
256
255
  inputTextDelta: string;
257
256
  };
257
+ type: "tool_input_delta";
258
258
  requestId: string;
259
259
  timestamp?: number | undefined;
260
260
  }>;
@@ -274,15 +274,15 @@ export declare const toolResultEventSchema: z.ZodObject<{
274
274
  simulated: z.ZodOptional<z.ZodBoolean>;
275
275
  result: z.ZodOptional<z.ZodUnknown>;
276
276
  }, "strip", z.ZodTypeAny, {
277
- status: "pending";
278
277
  toolCallId: string;
279
278
  toolName: string;
279
+ status: "pending";
280
280
  result?: unknown;
281
281
  simulated?: boolean | undefined;
282
282
  }, {
283
- status: "pending";
284
283
  toolCallId: string;
285
284
  toolName: string;
285
+ status: "pending";
286
286
  result?: unknown;
287
287
  simulated?: boolean | undefined;
288
288
  }>, z.ZodObject<{
@@ -291,14 +291,14 @@ export declare const toolResultEventSchema: z.ZodObject<{
291
291
  status: z.ZodLiteral<"success">;
292
292
  result: z.ZodOptional<z.ZodUnknown>;
293
293
  }, "strip", z.ZodTypeAny, {
294
- status: "success";
295
294
  toolCallId: string;
296
295
  toolName: string;
296
+ status: "success";
297
297
  result?: unknown;
298
298
  }, {
299
- status: "success";
300
299
  toolCallId: string;
301
300
  toolName: string;
301
+ status: "success";
302
302
  result?: unknown;
303
303
  }>, z.ZodObject<{
304
304
  toolCallId: z.ZodString;
@@ -306,56 +306,56 @@ export declare const toolResultEventSchema: z.ZodObject<{
306
306
  status: z.ZodLiteral<"failure">;
307
307
  error: z.ZodString;
308
308
  }, "strip", z.ZodTypeAny, {
309
- status: "failure";
310
- error: string;
311
309
  toolCallId: string;
312
310
  toolName: string;
313
- }, {
314
311
  status: "failure";
315
312
  error: string;
313
+ }, {
316
314
  toolCallId: string;
317
315
  toolName: string;
316
+ status: "failure";
317
+ error: string;
318
318
  }>]>;
319
319
  }, "strip", z.ZodTypeAny, {
320
- type: "tool_result";
321
320
  data: {
322
- status: "pending";
323
321
  toolCallId: string;
324
322
  toolName: string;
323
+ status: "pending";
325
324
  result?: unknown;
326
325
  simulated?: boolean | undefined;
327
326
  } | {
328
- status: "success";
329
327
  toolCallId: string;
330
328
  toolName: string;
329
+ status: "success";
331
330
  result?: unknown;
332
331
  } | {
333
- status: "failure";
334
- error: string;
335
332
  toolCallId: string;
336
333
  toolName: string;
334
+ status: "failure";
335
+ error: string;
337
336
  };
337
+ type: "tool_result";
338
338
  requestId: string;
339
339
  timestamp?: number | undefined;
340
340
  }, {
341
- type: "tool_result";
342
341
  data: {
343
- status: "pending";
344
342
  toolCallId: string;
345
343
  toolName: string;
344
+ status: "pending";
346
345
  result?: unknown;
347
346
  simulated?: boolean | undefined;
348
347
  } | {
349
- status: "success";
350
348
  toolCallId: string;
351
349
  toolName: string;
350
+ status: "success";
352
351
  result?: unknown;
353
352
  } | {
354
- status: "failure";
355
- error: string;
356
353
  toolCallId: string;
357
354
  toolName: string;
355
+ status: "failure";
356
+ error: string;
358
357
  };
358
+ type: "tool_result";
359
359
  requestId: string;
360
360
  timestamp?: number | undefined;
361
361
  }>;
@@ -375,17 +375,17 @@ export declare const scratchpadResetEventSchema: z.ZodObject<{
375
375
  reason: string;
376
376
  }>;
377
377
  }, "strip", z.ZodTypeAny, {
378
- type: "scratchpad_reset";
379
378
  data: {
380
379
  reason: string;
381
380
  };
381
+ type: "scratchpad_reset";
382
382
  requestId: string;
383
383
  timestamp?: number | undefined;
384
384
  }, {
385
- type: "scratchpad_reset";
386
385
  data: {
387
386
  reason: string;
388
387
  };
388
+ type: "scratchpad_reset";
389
389
  requestId: string;
390
390
  timestamp?: number | undefined;
391
391
  }>;
@@ -405,17 +405,17 @@ export declare const llmStartEventSchema: z.ZodObject<{
405
405
  iteration: number;
406
406
  }>;
407
407
  }, "strip", z.ZodTypeAny, {
408
- type: "llm_start";
409
408
  data: {
410
409
  iteration: number;
411
410
  };
411
+ type: "llm_start";
412
412
  requestId: string;
413
413
  timestamp?: number | undefined;
414
414
  }, {
415
- type: "llm_start";
416
415
  data: {
417
416
  iteration: number;
418
417
  };
418
+ type: "llm_start";
419
419
  requestId: string;
420
420
  timestamp?: number | undefined;
421
421
  }>;
@@ -441,21 +441,21 @@ export declare const llmEndEventSchema: z.ZodObject<{
441
441
  toolCallCount: number;
442
442
  }>;
443
443
  }, "strip", z.ZodTypeAny, {
444
- type: "llm_end";
445
444
  data: {
446
445
  iteration: number;
447
446
  hasText: boolean;
448
447
  toolCallCount: number;
449
448
  };
449
+ type: "llm_end";
450
450
  requestId: string;
451
451
  timestamp?: number | undefined;
452
452
  }, {
453
- type: "llm_end";
454
453
  data: {
455
454
  iteration: number;
456
455
  hasText: boolean;
457
456
  toolCallCount: number;
458
457
  };
458
+ type: "llm_end";
459
459
  requestId: string;
460
460
  timestamp?: number | undefined;
461
461
  }>;
@@ -475,112 +475,17 @@ export declare const textDeltaEventSchema: z.ZodObject<{
475
475
  delta: string;
476
476
  }>;
477
477
  }, "strip", z.ZodTypeAny, {
478
- type: "text_delta";
479
478
  data: {
480
479
  delta: string;
481
480
  };
482
- requestId: string;
483
- timestamp?: number | undefined;
484
- }, {
485
481
  type: "text_delta";
486
- data: {
487
- delta: string;
488
- };
489
- requestId: string;
490
- timestamp?: number | undefined;
491
- }>;
492
- /**
493
- * Reasoning start event schema - emitted when reasoning stream starts.
494
- */
495
- export declare const reasoningStartEventSchema: z.ZodObject<{
496
- requestId: z.ZodString;
497
- timestamp: z.ZodOptional<z.ZodNumber>;
498
- } & {
499
- type: z.ZodLiteral<"reasoning_start">;
500
- data: z.ZodObject<{
501
- reasoningId: z.ZodString;
502
- }, "strip", z.ZodTypeAny, {
503
- reasoningId: string;
504
- }, {
505
- reasoningId: string;
506
- }>;
507
- }, "strip", z.ZodTypeAny, {
508
- type: "reasoning_start";
509
- data: {
510
- reasoningId: string;
511
- };
512
- requestId: string;
513
- timestamp?: number | undefined;
514
- }, {
515
- type: "reasoning_start";
516
- data: {
517
- reasoningId: string;
518
- };
519
- requestId: string;
520
- timestamp?: number | undefined;
521
- }>;
522
- /**
523
- * Reasoning delta event schema - emitted when reasoning text chunk is received.
524
- */
525
- export declare const reasoningDeltaEventSchema: z.ZodObject<{
526
- requestId: z.ZodString;
527
- timestamp: z.ZodOptional<z.ZodNumber>;
528
- } & {
529
- type: z.ZodLiteral<"reasoning_delta">;
530
- data: z.ZodObject<{
531
- reasoningId: z.ZodString;
532
- delta: z.ZodString;
533
- }, "strip", z.ZodTypeAny, {
534
- delta: string;
535
- reasoningId: string;
536
- }, {
537
- delta: string;
538
- reasoningId: string;
539
- }>;
540
- }, "strip", z.ZodTypeAny, {
541
- type: "reasoning_delta";
542
- data: {
543
- delta: string;
544
- reasoningId: string;
545
- };
546
482
  requestId: string;
547
483
  timestamp?: number | undefined;
548
484
  }, {
549
- type: "reasoning_delta";
550
485
  data: {
551
486
  delta: string;
552
- reasoningId: string;
553
- };
554
- requestId: string;
555
- timestamp?: number | undefined;
556
- }>;
557
- /**
558
- * Reasoning end event schema - emitted when reasoning stream ends.
559
- */
560
- export declare const reasoningEndEventSchema: z.ZodObject<{
561
- requestId: z.ZodString;
562
- timestamp: z.ZodOptional<z.ZodNumber>;
563
- } & {
564
- type: z.ZodLiteral<"reasoning_end">;
565
- data: z.ZodObject<{
566
- reasoningId: z.ZodString;
567
- }, "strip", z.ZodTypeAny, {
568
- reasoningId: string;
569
- }, {
570
- reasoningId: string;
571
- }>;
572
- }, "strip", z.ZodTypeAny, {
573
- type: "reasoning_end";
574
- data: {
575
- reasoningId: string;
576
- };
577
- requestId: string;
578
- timestamp?: number | undefined;
579
- }, {
580
- type: "reasoning_end";
581
- data: {
582
- reasoningId: string;
583
487
  };
488
+ type: "text_delta";
584
489
  requestId: string;
585
490
  timestamp?: number | undefined;
586
491
  }>;
@@ -606,21 +511,21 @@ export declare const finishEventSchema: z.ZodObject<{
606
511
  hasToolErrors: boolean;
607
512
  }>;
608
513
  }, "strip", z.ZodTypeAny, {
609
- type: "finish";
610
514
  data: {
611
515
  totalIterations: number;
612
516
  hasPendingTools: boolean;
613
517
  hasToolErrors: boolean;
614
518
  };
519
+ type: "finish";
615
520
  requestId: string;
616
521
  timestamp?: number | undefined;
617
522
  }, {
618
- type: "finish";
619
523
  data: {
620
524
  totalIterations: number;
621
525
  hasPendingTools: boolean;
622
526
  hasToolErrors: boolean;
623
527
  };
528
+ type: "finish";
624
529
  requestId: string;
625
530
  timestamp?: number | undefined;
626
531
  }>;
@@ -644,19 +549,19 @@ export declare const errorTelemetryEventSchema: z.ZodObject<{
644
549
  code?: string | undefined;
645
550
  }>;
646
551
  }, "strip", z.ZodTypeAny, {
647
- type: "error";
648
552
  data: {
649
553
  message: string;
650
554
  code?: string | undefined;
651
555
  };
556
+ type: "error";
652
557
  requestId: string;
653
558
  timestamp?: number | undefined;
654
559
  }, {
655
- type: "error";
656
560
  data: {
657
561
  message: string;
658
562
  code?: string | undefined;
659
563
  };
564
+ type: "error";
660
565
  requestId: string;
661
566
  timestamp?: number | undefined;
662
567
  }>;
@@ -676,17 +581,17 @@ export declare const planGeneratingEventSchema: z.ZodObject<{
676
581
  messageCount: number;
677
582
  }>;
678
583
  }, "strip", z.ZodTypeAny, {
679
- type: "plan_generating";
680
584
  data: {
681
585
  messageCount: number;
682
586
  };
587
+ type: "plan_generating";
683
588
  requestId: string;
684
589
  timestamp?: number | undefined;
685
590
  }, {
686
- type: "plan_generating";
687
591
  data: {
688
592
  messageCount: number;
689
593
  };
594
+ type: "plan_generating";
690
595
  requestId: string;
691
596
  timestamp?: number | undefined;
692
597
  }>;
@@ -724,7 +629,6 @@ export declare const planGeneratedEventSchema: z.ZodObject<{
724
629
  hasConflicts: z.ZodBoolean;
725
630
  }, z.ZodTypeAny, "passthrough">>;
726
631
  }, "strip", z.ZodTypeAny, {
727
- type: "plan_generated";
728
632
  data: {
729
633
  complexity: "low" | "medium" | "high";
730
634
  planId: string;
@@ -736,10 +640,10 @@ export declare const planGeneratedEventSchema: z.ZodObject<{
736
640
  } & {
737
641
  [k: string]: unknown;
738
642
  };
643
+ type: "plan_generated";
739
644
  requestId: string;
740
645
  timestamp?: number | undefined;
741
646
  }, {
742
- type: "plan_generated";
743
647
  data: {
744
648
  complexity: "low" | "medium" | "high";
745
649
  planId: string;
@@ -751,6 +655,7 @@ export declare const planGeneratedEventSchema: z.ZodObject<{
751
655
  } & {
752
656
  [k: string]: unknown;
753
657
  };
658
+ type: "plan_generated";
754
659
  requestId: string;
755
660
  timestamp?: number | undefined;
756
661
  }>;
@@ -779,23 +684,23 @@ export declare const planStepStartedEventSchema: z.ZodObject<{
779
684
  planId: string;
780
685
  }>;
781
686
  }, "strip", z.ZodTypeAny, {
782
- type: "plan_step_started";
783
687
  data: {
784
688
  description: string;
785
689
  stepNumber: number;
786
690
  operationType: "read" | "write";
787
691
  planId: string;
788
692
  };
693
+ type: "plan_step_started";
789
694
  requestId: string;
790
695
  timestamp?: number | undefined;
791
696
  }, {
792
- type: "plan_step_started";
793
697
  data: {
794
698
  description: string;
795
699
  stepNumber: number;
796
700
  operationType: "read" | "write";
797
701
  planId: string;
798
702
  };
703
+ type: "plan_step_started";
799
704
  requestId: string;
800
705
  timestamp?: number | undefined;
801
706
  }>;
@@ -834,7 +739,6 @@ export declare const planStepRetryingEventSchema: z.ZodObject<{
834
739
  error?: string | undefined;
835
740
  }>;
836
741
  }, "strip", z.ZodTypeAny, {
837
- type: "plan_step_retrying";
838
742
  data: {
839
743
  stepNumber: number;
840
744
  planId: string;
@@ -843,10 +747,10 @@ export declare const planStepRetryingEventSchema: z.ZodObject<{
843
747
  phase: "execution" | "simulation";
844
748
  error?: string | undefined;
845
749
  };
750
+ type: "plan_step_retrying";
846
751
  requestId: string;
847
752
  timestamp?: number | undefined;
848
753
  }, {
849
- type: "plan_step_retrying";
850
754
  data: {
851
755
  stepNumber: number;
852
756
  planId: string;
@@ -855,6 +759,7 @@ export declare const planStepRetryingEventSchema: z.ZodObject<{
855
759
  phase: "execution" | "simulation";
856
760
  error?: string | undefined;
857
761
  };
762
+ type: "plan_step_retrying";
858
763
  requestId: string;
859
764
  timestamp?: number | undefined;
860
765
  }>;
@@ -883,27 +788,27 @@ export declare const planStepCompletedEventSchema: z.ZodObject<{
883
788
  error: z.ZodOptional<z.ZodString>;
884
789
  }, z.ZodTypeAny, "passthrough">>;
885
790
  }, "strip", z.ZodTypeAny, {
886
- type: "plan_step_completed";
887
791
  data: {
888
- status: "skipped" | "completed" | "failed";
792
+ status: "completed" | "failed" | "skipped";
889
793
  stepNumber: number;
890
794
  planId: string;
891
795
  error?: string | undefined;
892
796
  } & {
893
797
  [k: string]: unknown;
894
798
  };
799
+ type: "plan_step_completed";
895
800
  requestId: string;
896
801
  timestamp?: number | undefined;
897
802
  }, {
898
- type: "plan_step_completed";
899
803
  data: {
900
- status: "skipped" | "completed" | "failed";
804
+ status: "completed" | "failed" | "skipped";
901
805
  stepNumber: number;
902
806
  planId: string;
903
807
  error?: string | undefined;
904
808
  } & {
905
809
  [k: string]: unknown;
906
810
  };
811
+ type: "plan_step_completed";
907
812
  requestId: string;
908
813
  timestamp?: number | undefined;
909
814
  }>;
@@ -920,30 +825,30 @@ export declare const planInvalidatedEventSchema: z.ZodObject<{
920
825
  reason: z.ZodString;
921
826
  failedStepNumber: z.ZodOptional<z.ZodNumber>;
922
827
  }, "strip", z.ZodTypeAny, {
923
- reason: string;
924
828
  planId: string;
829
+ reason: string;
925
830
  failedStepNumber?: number | undefined;
926
831
  }, {
927
- reason: string;
928
832
  planId: string;
833
+ reason: string;
929
834
  failedStepNumber?: number | undefined;
930
835
  }>;
931
836
  }, "strip", z.ZodTypeAny, {
932
- type: "plan_invalidated";
933
837
  data: {
934
- reason: string;
935
838
  planId: string;
839
+ reason: string;
936
840
  failedStepNumber?: number | undefined;
937
841
  };
842
+ type: "plan_invalidated";
938
843
  requestId: string;
939
844
  timestamp?: number | undefined;
940
845
  }, {
941
- type: "plan_invalidated";
942
846
  data: {
943
- reason: string;
944
847
  planId: string;
848
+ reason: string;
945
849
  failedStepNumber?: number | undefined;
946
850
  };
851
+ type: "plan_invalidated";
947
852
  requestId: string;
948
853
  timestamp?: number | undefined;
949
854
  }>;
@@ -960,30 +865,30 @@ export declare const replanStartedEventSchema: z.ZodObject<{
960
865
  reason: z.ZodString;
961
866
  preservedStepCount: z.ZodNumber;
962
867
  }, "strip", z.ZodTypeAny, {
963
- reason: string;
964
868
  previousPlanId: string;
869
+ reason: string;
965
870
  preservedStepCount: number;
966
871
  }, {
967
- reason: string;
968
872
  previousPlanId: string;
873
+ reason: string;
969
874
  preservedStepCount: number;
970
875
  }>;
971
876
  }, "strip", z.ZodTypeAny, {
972
- type: "replan_started";
973
877
  data: {
974
- reason: string;
975
878
  previousPlanId: string;
879
+ reason: string;
976
880
  preservedStepCount: number;
977
881
  };
882
+ type: "replan_started";
978
883
  requestId: string;
979
884
  timestamp?: number | undefined;
980
885
  }, {
981
- type: "replan_started";
982
886
  data: {
983
- reason: string;
984
887
  previousPlanId: string;
888
+ reason: string;
985
889
  preservedStepCount: number;
986
890
  };
891
+ type: "replan_started";
987
892
  requestId: string;
988
893
  timestamp?: number | undefined;
989
894
  }>;
@@ -1009,7 +914,6 @@ export declare const replanCompleteEventSchema: z.ZodObject<{
1009
914
  newVersion: z.ZodNumber;
1010
915
  }, z.ZodTypeAny, "passthrough">>;
1011
916
  }, "strip", z.ZodTypeAny, {
1012
- type: "replan_complete";
1013
917
  data: {
1014
918
  previousPlanId: string;
1015
919
  newPlanId: string;
@@ -1017,10 +921,10 @@ export declare const replanCompleteEventSchema: z.ZodObject<{
1017
921
  } & {
1018
922
  [k: string]: unknown;
1019
923
  };
924
+ type: "replan_complete";
1020
925
  requestId: string;
1021
926
  timestamp?: number | undefined;
1022
927
  }, {
1023
- type: "replan_complete";
1024
928
  data: {
1025
929
  previousPlanId: string;
1026
930
  newPlanId: string;
@@ -1028,6 +932,7 @@ export declare const replanCompleteEventSchema: z.ZodObject<{
1028
932
  } & {
1029
933
  [k: string]: unknown;
1030
934
  };
935
+ type: "replan_complete";
1031
936
  requestId: string;
1032
937
  timestamp?: number | undefined;
1033
938
  }>;
@@ -1056,23 +961,23 @@ export declare const planExecutionCompleteEventSchema: z.ZodObject<{
1056
961
  totalSteps: number;
1057
962
  }>;
1058
963
  }, "strip", z.ZodTypeAny, {
1059
- type: "plan_execution_complete";
1060
964
  data: {
1061
965
  status: "failed" | "complete" | "partial";
1062
966
  planId: string;
1063
967
  completedSteps: number;
1064
968
  totalSteps: number;
1065
969
  };
970
+ type: "plan_execution_complete";
1066
971
  requestId: string;
1067
972
  timestamp?: number | undefined;
1068
973
  }, {
1069
- type: "plan_execution_complete";
1070
974
  data: {
1071
975
  status: "failed" | "complete" | "partial";
1072
976
  planId: string;
1073
977
  completedSteps: number;
1074
978
  totalSteps: number;
1075
979
  };
980
+ type: "plan_execution_complete";
1076
981
  requestId: string;
1077
982
  timestamp?: number | undefined;
1078
983
  }>;
@@ -1099,63 +1004,63 @@ export declare const planExpiredEventSchema: z.ZodObject<{
1099
1004
  subject: "plan" | "session";
1100
1005
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
1101
1006
  expiredAt: string;
1102
- reason?: string | undefined;
1103
1007
  expiresAt?: string | undefined;
1104
1008
  planVersion?: number | undefined;
1009
+ reason?: string | undefined;
1105
1010
  }, {
1106
1011
  planId: string;
1107
1012
  phase: "expired";
1108
1013
  subject: "plan" | "session";
1109
1014
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
1110
1015
  expiredAt: string;
1111
- reason?: string | undefined;
1112
1016
  expiresAt?: string | undefined;
1113
1017
  planVersion?: number | undefined;
1018
+ reason?: string | undefined;
1114
1019
  }>, {
1115
1020
  planId: string;
1116
1021
  phase: "expired";
1117
1022
  subject: "plan" | "session";
1118
1023
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
1119
1024
  expiredAt: string;
1120
- reason?: string | undefined;
1121
1025
  expiresAt?: string | undefined;
1122
1026
  planVersion?: number | undefined;
1027
+ reason?: string | undefined;
1123
1028
  }, {
1124
1029
  planId: string;
1125
1030
  phase: "expired";
1126
1031
  subject: "plan" | "session";
1127
1032
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
1128
1033
  expiredAt: string;
1129
- reason?: string | undefined;
1130
1034
  expiresAt?: string | undefined;
1131
1035
  planVersion?: number | undefined;
1036
+ reason?: string | undefined;
1132
1037
  }>;
1133
1038
  }, "strip", z.ZodTypeAny, {
1134
- type: "plan_expired";
1135
1039
  data: {
1136
1040
  planId: string;
1137
1041
  phase: "expired";
1138
1042
  subject: "plan" | "session";
1139
1043
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
1140
1044
  expiredAt: string;
1141
- reason?: string | undefined;
1142
1045
  expiresAt?: string | undefined;
1143
1046
  planVersion?: number | undefined;
1047
+ reason?: string | undefined;
1144
1048
  };
1049
+ type: "plan_expired";
1145
1050
  requestId: string;
1146
1051
  timestamp?: number | undefined;
1147
1052
  }, {
1148
- type: "plan_expired";
1149
1053
  data: {
1150
1054
  planId: string;
1151
1055
  phase: "expired";
1152
1056
  subject: "plan" | "session";
1153
1057
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
1154
1058
  expiredAt: string;
1155
- reason?: string | undefined;
1156
1059
  expiresAt?: string | undefined;
1157
1060
  planVersion?: number | undefined;
1061
+ reason?: string | undefined;
1158
1062
  };
1063
+ type: "plan_expired";
1159
1064
  requestId: string;
1160
1065
  timestamp?: number | undefined;
1161
1066
  }>;
@@ -1184,23 +1089,23 @@ export declare const planStepSimulatedEventSchema: z.ZodObject<{
1184
1089
  simulationSummary: string;
1185
1090
  }>;
1186
1091
  }, "strip", z.ZodTypeAny, {
1187
- type: "plan_step_simulated";
1188
1092
  data: {
1189
1093
  stepNumber: number;
1190
1094
  planId: string;
1191
1095
  simulationSuccess: boolean;
1192
1096
  simulationSummary: string;
1193
1097
  };
1098
+ type: "plan_step_simulated";
1194
1099
  requestId: string;
1195
1100
  timestamp?: number | undefined;
1196
1101
  }, {
1197
- type: "plan_step_simulated";
1198
1102
  data: {
1199
1103
  stepNumber: number;
1200
1104
  planId: string;
1201
1105
  simulationSuccess: boolean;
1202
1106
  simulationSummary: string;
1203
1107
  };
1108
+ type: "plan_step_simulated";
1204
1109
  requestId: string;
1205
1110
  timestamp?: number | undefined;
1206
1111
  }>;
@@ -1218,34 +1123,34 @@ export declare const planStepVerificationPassedEventSchema: z.ZodObject<{
1218
1123
  confidence: z.ZodNumber;
1219
1124
  reason: z.ZodString;
1220
1125
  }, "strip", z.ZodTypeAny, {
1221
- reason: string;
1222
1126
  stepNumber: number;
1223
1127
  planId: string;
1224
1128
  confidence: number;
1225
- }, {
1226
1129
  reason: string;
1130
+ }, {
1227
1131
  stepNumber: number;
1228
1132
  planId: string;
1229
1133
  confidence: number;
1134
+ reason: string;
1230
1135
  }>;
1231
1136
  }, "strip", z.ZodTypeAny, {
1232
- type: "plan_step_verification_passed";
1233
1137
  data: {
1234
- reason: string;
1235
1138
  stepNumber: number;
1236
1139
  planId: string;
1237
1140
  confidence: number;
1141
+ reason: string;
1238
1142
  };
1143
+ type: "plan_step_verification_passed";
1239
1144
  requestId: string;
1240
1145
  timestamp?: number | undefined;
1241
1146
  }, {
1242
- type: "plan_step_verification_passed";
1243
1147
  data: {
1244
- reason: string;
1245
1148
  stepNumber: number;
1246
1149
  planId: string;
1247
1150
  confidence: number;
1151
+ reason: string;
1248
1152
  };
1153
+ type: "plan_step_verification_passed";
1249
1154
  requestId: string;
1250
1155
  timestamp?: number | undefined;
1251
1156
  }>;
@@ -1277,7 +1182,6 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1277
1182
  }>, "many">;
1278
1183
  recommendedAction: z.ZodEnum<["continue", "ask_user", "replan"]>;
1279
1184
  }, "strip", z.ZodTypeAny, {
1280
- reason: string;
1281
1185
  stepNumber: number;
1282
1186
  planId: string;
1283
1187
  conflicts: {
@@ -1287,8 +1191,8 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1287
1191
  }[];
1288
1192
  confidence: number;
1289
1193
  recommendedAction: "continue" | "replan" | "ask_user";
1290
- }, {
1291
1194
  reason: string;
1195
+ }, {
1292
1196
  stepNumber: number;
1293
1197
  planId: string;
1294
1198
  conflicts: {
@@ -1298,11 +1202,10 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1298
1202
  }[];
1299
1203
  confidence: number;
1300
1204
  recommendedAction: "continue" | "replan" | "ask_user";
1205
+ reason: string;
1301
1206
  }>;
1302
1207
  }, "strip", z.ZodTypeAny, {
1303
- type: "plan_step_verification_failed";
1304
1208
  data: {
1305
- reason: string;
1306
1209
  stepNumber: number;
1307
1210
  planId: string;
1308
1211
  conflicts: {
@@ -1312,13 +1215,13 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1312
1215
  }[];
1313
1216
  confidence: number;
1314
1217
  recommendedAction: "continue" | "replan" | "ask_user";
1218
+ reason: string;
1315
1219
  };
1220
+ type: "plan_step_verification_failed";
1316
1221
  requestId: string;
1317
1222
  timestamp?: number | undefined;
1318
1223
  }, {
1319
- type: "plan_step_verification_failed";
1320
1224
  data: {
1321
- reason: string;
1322
1225
  stepNumber: number;
1323
1226
  planId: string;
1324
1227
  conflicts: {
@@ -1328,7 +1231,9 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1328
1231
  }[];
1329
1232
  confidence: number;
1330
1233
  recommendedAction: "continue" | "replan" | "ask_user";
1234
+ reason: string;
1331
1235
  };
1236
+ type: "plan_step_verification_failed";
1332
1237
  requestId: string;
1333
1238
  timestamp?: number | undefined;
1334
1239
  }>;
@@ -1354,21 +1259,21 @@ export declare const planExecutionFailedEventSchema: z.ZodObject<{
1354
1259
  phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
1355
1260
  }>;
1356
1261
  }, "strip", z.ZodTypeAny, {
1357
- type: "plan_execution_failed";
1358
1262
  data: {
1359
1263
  error: string;
1360
1264
  planId: string;
1361
1265
  phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
1362
1266
  };
1267
+ type: "plan_execution_failed";
1363
1268
  requestId: string;
1364
1269
  timestamp?: number | undefined;
1365
1270
  }, {
1366
- type: "plan_execution_failed";
1367
1271
  data: {
1368
1272
  error: string;
1369
1273
  planId: string;
1370
1274
  phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
1371
1275
  };
1276
+ type: "plan_execution_failed";
1372
1277
  requestId: string;
1373
1278
  timestamp?: number | undefined;
1374
1279
  }>;
@@ -1415,17 +1320,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1415
1320
  iteration: number;
1416
1321
  }>;
1417
1322
  }, "strip", z.ZodTypeAny, {
1418
- type: "iteration_start";
1419
1323
  data: {
1420
1324
  iteration: number;
1421
1325
  };
1326
+ type: "iteration_start";
1422
1327
  requestId: string;
1423
1328
  timestamp?: number | undefined;
1424
1329
  }, {
1425
- type: "iteration_start";
1426
1330
  data: {
1427
1331
  iteration: number;
1428
1332
  };
1333
+ type: "iteration_start";
1429
1334
  requestId: string;
1430
1335
  timestamp?: number | undefined;
1431
1336
  }>, z.ZodObject<{
@@ -1447,21 +1352,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1447
1352
  shouldContinue: boolean;
1448
1353
  }>;
1449
1354
  }, "strip", z.ZodTypeAny, {
1450
- type: "iteration_end";
1451
1355
  data: {
1452
1356
  iteration: number;
1453
1357
  hasToolCalls: boolean;
1454
1358
  shouldContinue: boolean;
1455
1359
  };
1360
+ type: "iteration_end";
1456
1361
  requestId: string;
1457
1362
  timestamp?: number | undefined;
1458
1363
  }, {
1459
- type: "iteration_end";
1460
1364
  data: {
1461
1365
  iteration: number;
1462
1366
  hasToolCalls: boolean;
1463
1367
  shouldContinue: boolean;
1464
1368
  };
1369
+ type: "iteration_end";
1465
1370
  requestId: string;
1466
1371
  timestamp?: number | undefined;
1467
1372
  }>, z.ZodObject<{
@@ -1500,7 +1405,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1500
1405
  }[];
1501
1406
  }>;
1502
1407
  }, "strip", z.ZodTypeAny, {
1503
- type: "tool_call_batch";
1504
1408
  data: {
1505
1409
  iteration: number;
1506
1410
  tools: {
@@ -1509,10 +1413,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1509
1413
  args?: Record<string, unknown> | undefined;
1510
1414
  }[];
1511
1415
  };
1416
+ type: "tool_call_batch";
1512
1417
  requestId: string;
1513
1418
  timestamp?: number | undefined;
1514
1419
  }, {
1515
- type: "tool_call_batch";
1516
1420
  data: {
1517
1421
  iteration: number;
1518
1422
  tools: {
@@ -1521,6 +1425,7 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1521
1425
  args?: Record<string, unknown> | undefined;
1522
1426
  }[];
1523
1427
  };
1428
+ type: "tool_call_batch";
1524
1429
  requestId: string;
1525
1430
  timestamp?: number | undefined;
1526
1431
  }>, z.ZodObject<{
@@ -1539,19 +1444,19 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1539
1444
  toolName: string;
1540
1445
  }>;
1541
1446
  }, "strip", z.ZodTypeAny, {
1542
- type: "tool_input_start";
1543
1447
  data: {
1544
1448
  toolCallId: string;
1545
1449
  toolName: string;
1546
1450
  };
1451
+ type: "tool_input_start";
1547
1452
  requestId: string;
1548
1453
  timestamp?: number | undefined;
1549
1454
  }, {
1550
- type: "tool_input_start";
1551
1455
  data: {
1552
1456
  toolCallId: string;
1553
1457
  toolName: string;
1554
1458
  };
1459
+ type: "tool_input_start";
1555
1460
  requestId: string;
1556
1461
  timestamp?: number | undefined;
1557
1462
  }>, z.ZodObject<{
@@ -1570,19 +1475,19 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1570
1475
  inputTextDelta: string;
1571
1476
  }>;
1572
1477
  }, "strip", z.ZodTypeAny, {
1573
- type: "tool_input_delta";
1574
1478
  data: {
1575
1479
  toolCallId: string;
1576
1480
  inputTextDelta: string;
1577
1481
  };
1482
+ type: "tool_input_delta";
1578
1483
  requestId: string;
1579
1484
  timestamp?: number | undefined;
1580
1485
  }, {
1581
- type: "tool_input_delta";
1582
1486
  data: {
1583
1487
  toolCallId: string;
1584
1488
  inputTextDelta: string;
1585
1489
  };
1490
+ type: "tool_input_delta";
1586
1491
  requestId: string;
1587
1492
  timestamp?: number | undefined;
1588
1493
  }>, z.ZodObject<{
@@ -1598,15 +1503,15 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1598
1503
  simulated: z.ZodOptional<z.ZodBoolean>;
1599
1504
  result: z.ZodOptional<z.ZodUnknown>;
1600
1505
  }, "strip", z.ZodTypeAny, {
1601
- status: "pending";
1602
1506
  toolCallId: string;
1603
1507
  toolName: string;
1508
+ status: "pending";
1604
1509
  result?: unknown;
1605
1510
  simulated?: boolean | undefined;
1606
1511
  }, {
1607
- status: "pending";
1608
1512
  toolCallId: string;
1609
1513
  toolName: string;
1514
+ status: "pending";
1610
1515
  result?: unknown;
1611
1516
  simulated?: boolean | undefined;
1612
1517
  }>, z.ZodObject<{
@@ -1615,14 +1520,14 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1615
1520
  status: z.ZodLiteral<"success">;
1616
1521
  result: z.ZodOptional<z.ZodUnknown>;
1617
1522
  }, "strip", z.ZodTypeAny, {
1618
- status: "success";
1619
1523
  toolCallId: string;
1620
1524
  toolName: string;
1525
+ status: "success";
1621
1526
  result?: unknown;
1622
1527
  }, {
1623
- status: "success";
1624
1528
  toolCallId: string;
1625
1529
  toolName: string;
1530
+ status: "success";
1626
1531
  result?: unknown;
1627
1532
  }>, z.ZodObject<{
1628
1533
  toolCallId: z.ZodString;
@@ -1630,56 +1535,56 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1630
1535
  status: z.ZodLiteral<"failure">;
1631
1536
  error: z.ZodString;
1632
1537
  }, "strip", z.ZodTypeAny, {
1633
- status: "failure";
1634
- error: string;
1635
1538
  toolCallId: string;
1636
1539
  toolName: string;
1637
- }, {
1638
1540
  status: "failure";
1639
1541
  error: string;
1542
+ }, {
1640
1543
  toolCallId: string;
1641
1544
  toolName: string;
1545
+ status: "failure";
1546
+ error: string;
1642
1547
  }>]>;
1643
1548
  }, "strip", z.ZodTypeAny, {
1644
- type: "tool_result";
1645
1549
  data: {
1646
- status: "pending";
1647
1550
  toolCallId: string;
1648
1551
  toolName: string;
1552
+ status: "pending";
1649
1553
  result?: unknown;
1650
1554
  simulated?: boolean | undefined;
1651
1555
  } | {
1652
- status: "success";
1653
1556
  toolCallId: string;
1654
1557
  toolName: string;
1558
+ status: "success";
1655
1559
  result?: unknown;
1656
1560
  } | {
1657
- status: "failure";
1658
- error: string;
1659
1561
  toolCallId: string;
1660
1562
  toolName: string;
1563
+ status: "failure";
1564
+ error: string;
1661
1565
  };
1566
+ type: "tool_result";
1662
1567
  requestId: string;
1663
1568
  timestamp?: number | undefined;
1664
1569
  }, {
1665
- type: "tool_result";
1666
1570
  data: {
1667
- status: "pending";
1668
1571
  toolCallId: string;
1669
1572
  toolName: string;
1573
+ status: "pending";
1670
1574
  result?: unknown;
1671
1575
  simulated?: boolean | undefined;
1672
1576
  } | {
1673
- status: "success";
1674
1577
  toolCallId: string;
1675
1578
  toolName: string;
1579
+ status: "success";
1676
1580
  result?: unknown;
1677
1581
  } | {
1678
- status: "failure";
1679
- error: string;
1680
1582
  toolCallId: string;
1681
1583
  toolName: string;
1584
+ status: "failure";
1585
+ error: string;
1682
1586
  };
1587
+ type: "tool_result";
1683
1588
  requestId: string;
1684
1589
  timestamp?: number | undefined;
1685
1590
  }>, z.ZodObject<{
@@ -1695,17 +1600,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1695
1600
  reason: string;
1696
1601
  }>;
1697
1602
  }, "strip", z.ZodTypeAny, {
1698
- type: "scratchpad_reset";
1699
1603
  data: {
1700
1604
  reason: string;
1701
1605
  };
1606
+ type: "scratchpad_reset";
1702
1607
  requestId: string;
1703
1608
  timestamp?: number | undefined;
1704
1609
  }, {
1705
- type: "scratchpad_reset";
1706
1610
  data: {
1707
1611
  reason: string;
1708
1612
  };
1613
+ type: "scratchpad_reset";
1709
1614
  requestId: string;
1710
1615
  timestamp?: number | undefined;
1711
1616
  }>, z.ZodObject<{
@@ -1721,17 +1626,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1721
1626
  iteration: number;
1722
1627
  }>;
1723
1628
  }, "strip", z.ZodTypeAny, {
1724
- type: "llm_start";
1725
1629
  data: {
1726
1630
  iteration: number;
1727
1631
  };
1632
+ type: "llm_start";
1728
1633
  requestId: string;
1729
1634
  timestamp?: number | undefined;
1730
1635
  }, {
1731
- type: "llm_start";
1732
1636
  data: {
1733
1637
  iteration: number;
1734
1638
  };
1639
+ type: "llm_start";
1735
1640
  requestId: string;
1736
1641
  timestamp?: number | undefined;
1737
1642
  }>, z.ZodObject<{
@@ -1753,21 +1658,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1753
1658
  toolCallCount: number;
1754
1659
  }>;
1755
1660
  }, "strip", z.ZodTypeAny, {
1756
- type: "llm_end";
1757
1661
  data: {
1758
1662
  iteration: number;
1759
1663
  hasText: boolean;
1760
1664
  toolCallCount: number;
1761
1665
  };
1666
+ type: "llm_end";
1762
1667
  requestId: string;
1763
1668
  timestamp?: number | undefined;
1764
1669
  }, {
1765
- type: "llm_end";
1766
1670
  data: {
1767
1671
  iteration: number;
1768
1672
  hasText: boolean;
1769
1673
  toolCallCount: number;
1770
1674
  };
1675
+ type: "llm_end";
1771
1676
  requestId: string;
1772
1677
  timestamp?: number | undefined;
1773
1678
  }>, z.ZodObject<{
@@ -1783,100 +1688,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1783
1688
  delta: string;
1784
1689
  }>;
1785
1690
  }, "strip", z.ZodTypeAny, {
1786
- type: "text_delta";
1787
1691
  data: {
1788
1692
  delta: string;
1789
1693
  };
1790
- requestId: string;
1791
- timestamp?: number | undefined;
1792
- }, {
1793
1694
  type: "text_delta";
1794
- data: {
1795
- delta: string;
1796
- };
1797
- requestId: string;
1798
- timestamp?: number | undefined;
1799
- }>, z.ZodObject<{
1800
- requestId: z.ZodString;
1801
- timestamp: z.ZodOptional<z.ZodNumber>;
1802
- } & {
1803
- type: z.ZodLiteral<"reasoning_start">;
1804
- data: z.ZodObject<{
1805
- reasoningId: z.ZodString;
1806
- }, "strip", z.ZodTypeAny, {
1807
- reasoningId: string;
1808
- }, {
1809
- reasoningId: string;
1810
- }>;
1811
- }, "strip", z.ZodTypeAny, {
1812
- type: "reasoning_start";
1813
- data: {
1814
- reasoningId: string;
1815
- };
1816
- requestId: string;
1817
- timestamp?: number | undefined;
1818
- }, {
1819
- type: "reasoning_start";
1820
- data: {
1821
- reasoningId: string;
1822
- };
1823
- requestId: string;
1824
- timestamp?: number | undefined;
1825
- }>, z.ZodObject<{
1826
- requestId: z.ZodString;
1827
- timestamp: z.ZodOptional<z.ZodNumber>;
1828
- } & {
1829
- type: z.ZodLiteral<"reasoning_delta">;
1830
- data: z.ZodObject<{
1831
- reasoningId: z.ZodString;
1832
- delta: z.ZodString;
1833
- }, "strip", z.ZodTypeAny, {
1834
- delta: string;
1835
- reasoningId: string;
1836
- }, {
1837
- delta: string;
1838
- reasoningId: string;
1839
- }>;
1840
- }, "strip", z.ZodTypeAny, {
1841
- type: "reasoning_delta";
1842
- data: {
1843
- delta: string;
1844
- reasoningId: string;
1845
- };
1846
1695
  requestId: string;
1847
1696
  timestamp?: number | undefined;
1848
1697
  }, {
1849
- type: "reasoning_delta";
1850
1698
  data: {
1851
1699
  delta: string;
1852
- reasoningId: string;
1853
- };
1854
- requestId: string;
1855
- timestamp?: number | undefined;
1856
- }>, z.ZodObject<{
1857
- requestId: z.ZodString;
1858
- timestamp: z.ZodOptional<z.ZodNumber>;
1859
- } & {
1860
- type: z.ZodLiteral<"reasoning_end">;
1861
- data: z.ZodObject<{
1862
- reasoningId: z.ZodString;
1863
- }, "strip", z.ZodTypeAny, {
1864
- reasoningId: string;
1865
- }, {
1866
- reasoningId: string;
1867
- }>;
1868
- }, "strip", z.ZodTypeAny, {
1869
- type: "reasoning_end";
1870
- data: {
1871
- reasoningId: string;
1872
- };
1873
- requestId: string;
1874
- timestamp?: number | undefined;
1875
- }, {
1876
- type: "reasoning_end";
1877
- data: {
1878
- reasoningId: string;
1879
1700
  };
1701
+ type: "text_delta";
1880
1702
  requestId: string;
1881
1703
  timestamp?: number | undefined;
1882
1704
  }>, z.ZodObject<{
@@ -1898,21 +1720,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1898
1720
  hasToolErrors: boolean;
1899
1721
  }>;
1900
1722
  }, "strip", z.ZodTypeAny, {
1901
- type: "finish";
1902
1723
  data: {
1903
1724
  totalIterations: number;
1904
1725
  hasPendingTools: boolean;
1905
1726
  hasToolErrors: boolean;
1906
1727
  };
1728
+ type: "finish";
1907
1729
  requestId: string;
1908
1730
  timestamp?: number | undefined;
1909
1731
  }, {
1910
- type: "finish";
1911
1732
  data: {
1912
1733
  totalIterations: number;
1913
1734
  hasPendingTools: boolean;
1914
1735
  hasToolErrors: boolean;
1915
1736
  };
1737
+ type: "finish";
1916
1738
  requestId: string;
1917
1739
  timestamp?: number | undefined;
1918
1740
  }>, z.ZodObject<{
@@ -1931,19 +1753,19 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1931
1753
  code?: string | undefined;
1932
1754
  }>;
1933
1755
  }, "strip", z.ZodTypeAny, {
1934
- type: "error";
1935
1756
  data: {
1936
1757
  message: string;
1937
1758
  code?: string | undefined;
1938
1759
  };
1760
+ type: "error";
1939
1761
  requestId: string;
1940
1762
  timestamp?: number | undefined;
1941
1763
  }, {
1942
- type: "error";
1943
1764
  data: {
1944
1765
  message: string;
1945
1766
  code?: string | undefined;
1946
1767
  };
1768
+ type: "error";
1947
1769
  requestId: string;
1948
1770
  timestamp?: number | undefined;
1949
1771
  }>, z.ZodObject<{
@@ -1959,17 +1781,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1959
1781
  messageCount: number;
1960
1782
  }>;
1961
1783
  }, "strip", z.ZodTypeAny, {
1962
- type: "plan_generating";
1963
1784
  data: {
1964
1785
  messageCount: number;
1965
1786
  };
1787
+ type: "plan_generating";
1966
1788
  requestId: string;
1967
1789
  timestamp?: number | undefined;
1968
1790
  }, {
1969
- type: "plan_generating";
1970
1791
  data: {
1971
1792
  messageCount: number;
1972
1793
  };
1794
+ type: "plan_generating";
1973
1795
  requestId: string;
1974
1796
  timestamp?: number | undefined;
1975
1797
  }>, z.ZodObject<{
@@ -2003,7 +1825,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2003
1825
  hasConflicts: z.ZodBoolean;
2004
1826
  }, z.ZodTypeAny, "passthrough">>;
2005
1827
  }, "strip", z.ZodTypeAny, {
2006
- type: "plan_generated";
2007
1828
  data: {
2008
1829
  complexity: "low" | "medium" | "high";
2009
1830
  planId: string;
@@ -2015,10 +1836,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2015
1836
  } & {
2016
1837
  [k: string]: unknown;
2017
1838
  };
1839
+ type: "plan_generated";
2018
1840
  requestId: string;
2019
1841
  timestamp?: number | undefined;
2020
1842
  }, {
2021
- type: "plan_generated";
2022
1843
  data: {
2023
1844
  complexity: "low" | "medium" | "high";
2024
1845
  planId: string;
@@ -2030,6 +1851,7 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2030
1851
  } & {
2031
1852
  [k: string]: unknown;
2032
1853
  };
1854
+ type: "plan_generated";
2033
1855
  requestId: string;
2034
1856
  timestamp?: number | undefined;
2035
1857
  }>, z.ZodObject<{
@@ -2054,23 +1876,23 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2054
1876
  planId: string;
2055
1877
  }>;
2056
1878
  }, "strip", z.ZodTypeAny, {
2057
- type: "plan_step_started";
2058
1879
  data: {
2059
1880
  description: string;
2060
1881
  stepNumber: number;
2061
1882
  operationType: "read" | "write";
2062
1883
  planId: string;
2063
1884
  };
1885
+ type: "plan_step_started";
2064
1886
  requestId: string;
2065
1887
  timestamp?: number | undefined;
2066
1888
  }, {
2067
- type: "plan_step_started";
2068
1889
  data: {
2069
1890
  description: string;
2070
1891
  stepNumber: number;
2071
1892
  operationType: "read" | "write";
2072
1893
  planId: string;
2073
1894
  };
1895
+ type: "plan_step_started";
2074
1896
  requestId: string;
2075
1897
  timestamp?: number | undefined;
2076
1898
  }>, z.ZodObject<{
@@ -2101,7 +1923,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2101
1923
  error?: string | undefined;
2102
1924
  }>;
2103
1925
  }, "strip", z.ZodTypeAny, {
2104
- type: "plan_step_retrying";
2105
1926
  data: {
2106
1927
  stepNumber: number;
2107
1928
  planId: string;
@@ -2110,10 +1931,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2110
1931
  phase: "execution" | "simulation";
2111
1932
  error?: string | undefined;
2112
1933
  };
1934
+ type: "plan_step_retrying";
2113
1935
  requestId: string;
2114
1936
  timestamp?: number | undefined;
2115
1937
  }, {
2116
- type: "plan_step_retrying";
2117
1938
  data: {
2118
1939
  stepNumber: number;
2119
1940
  planId: string;
@@ -2122,6 +1943,7 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2122
1943
  phase: "execution" | "simulation";
2123
1944
  error?: string | undefined;
2124
1945
  };
1946
+ type: "plan_step_retrying";
2125
1947
  requestId: string;
2126
1948
  timestamp?: number | undefined;
2127
1949
  }>, z.ZodObject<{
@@ -2146,27 +1968,27 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2146
1968
  error: z.ZodOptional<z.ZodString>;
2147
1969
  }, z.ZodTypeAny, "passthrough">>;
2148
1970
  }, "strip", z.ZodTypeAny, {
2149
- type: "plan_step_completed";
2150
1971
  data: {
2151
- status: "skipped" | "completed" | "failed";
1972
+ status: "completed" | "failed" | "skipped";
2152
1973
  stepNumber: number;
2153
1974
  planId: string;
2154
1975
  error?: string | undefined;
2155
1976
  } & {
2156
1977
  [k: string]: unknown;
2157
1978
  };
1979
+ type: "plan_step_completed";
2158
1980
  requestId: string;
2159
1981
  timestamp?: number | undefined;
2160
1982
  }, {
2161
- type: "plan_step_completed";
2162
1983
  data: {
2163
- status: "skipped" | "completed" | "failed";
1984
+ status: "completed" | "failed" | "skipped";
2164
1985
  stepNumber: number;
2165
1986
  planId: string;
2166
1987
  error?: string | undefined;
2167
1988
  } & {
2168
1989
  [k: string]: unknown;
2169
1990
  };
1991
+ type: "plan_step_completed";
2170
1992
  requestId: string;
2171
1993
  timestamp?: number | undefined;
2172
1994
  }>, z.ZodObject<{
@@ -2179,30 +2001,30 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2179
2001
  reason: z.ZodString;
2180
2002
  failedStepNumber: z.ZodOptional<z.ZodNumber>;
2181
2003
  }, "strip", z.ZodTypeAny, {
2182
- reason: string;
2183
2004
  planId: string;
2005
+ reason: string;
2184
2006
  failedStepNumber?: number | undefined;
2185
2007
  }, {
2186
- reason: string;
2187
2008
  planId: string;
2009
+ reason: string;
2188
2010
  failedStepNumber?: number | undefined;
2189
2011
  }>;
2190
2012
  }, "strip", z.ZodTypeAny, {
2191
- type: "plan_invalidated";
2192
2013
  data: {
2193
- reason: string;
2194
2014
  planId: string;
2015
+ reason: string;
2195
2016
  failedStepNumber?: number | undefined;
2196
2017
  };
2018
+ type: "plan_invalidated";
2197
2019
  requestId: string;
2198
2020
  timestamp?: number | undefined;
2199
2021
  }, {
2200
- type: "plan_invalidated";
2201
2022
  data: {
2202
- reason: string;
2203
2023
  planId: string;
2024
+ reason: string;
2204
2025
  failedStepNumber?: number | undefined;
2205
2026
  };
2027
+ type: "plan_invalidated";
2206
2028
  requestId: string;
2207
2029
  timestamp?: number | undefined;
2208
2030
  }>, z.ZodObject<{
@@ -2215,30 +2037,30 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2215
2037
  reason: z.ZodString;
2216
2038
  preservedStepCount: z.ZodNumber;
2217
2039
  }, "strip", z.ZodTypeAny, {
2218
- reason: string;
2219
2040
  previousPlanId: string;
2041
+ reason: string;
2220
2042
  preservedStepCount: number;
2221
2043
  }, {
2222
- reason: string;
2223
2044
  previousPlanId: string;
2045
+ reason: string;
2224
2046
  preservedStepCount: number;
2225
2047
  }>;
2226
2048
  }, "strip", z.ZodTypeAny, {
2227
- type: "replan_started";
2228
2049
  data: {
2229
- reason: string;
2230
2050
  previousPlanId: string;
2051
+ reason: string;
2231
2052
  preservedStepCount: number;
2232
2053
  };
2054
+ type: "replan_started";
2233
2055
  requestId: string;
2234
2056
  timestamp?: number | undefined;
2235
2057
  }, {
2236
- type: "replan_started";
2237
2058
  data: {
2238
- reason: string;
2239
2059
  previousPlanId: string;
2060
+ reason: string;
2240
2061
  preservedStepCount: number;
2241
2062
  };
2063
+ type: "replan_started";
2242
2064
  requestId: string;
2243
2065
  timestamp?: number | undefined;
2244
2066
  }>, z.ZodObject<{
@@ -2260,7 +2082,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2260
2082
  newVersion: z.ZodNumber;
2261
2083
  }, z.ZodTypeAny, "passthrough">>;
2262
2084
  }, "strip", z.ZodTypeAny, {
2263
- type: "replan_complete";
2264
2085
  data: {
2265
2086
  previousPlanId: string;
2266
2087
  newPlanId: string;
@@ -2268,10 +2089,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2268
2089
  } & {
2269
2090
  [k: string]: unknown;
2270
2091
  };
2092
+ type: "replan_complete";
2271
2093
  requestId: string;
2272
2094
  timestamp?: number | undefined;
2273
2095
  }, {
2274
- type: "replan_complete";
2275
2096
  data: {
2276
2097
  previousPlanId: string;
2277
2098
  newPlanId: string;
@@ -2279,6 +2100,7 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2279
2100
  } & {
2280
2101
  [k: string]: unknown;
2281
2102
  };
2103
+ type: "replan_complete";
2282
2104
  requestId: string;
2283
2105
  timestamp?: number | undefined;
2284
2106
  }>, z.ZodObject<{
@@ -2303,23 +2125,23 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2303
2125
  totalSteps: number;
2304
2126
  }>;
2305
2127
  }, "strip", z.ZodTypeAny, {
2306
- type: "plan_execution_complete";
2307
2128
  data: {
2308
2129
  status: "failed" | "complete" | "partial";
2309
2130
  planId: string;
2310
2131
  completedSteps: number;
2311
2132
  totalSteps: number;
2312
2133
  };
2134
+ type: "plan_execution_complete";
2313
2135
  requestId: string;
2314
2136
  timestamp?: number | undefined;
2315
2137
  }, {
2316
- type: "plan_execution_complete";
2317
2138
  data: {
2318
2139
  status: "failed" | "complete" | "partial";
2319
2140
  planId: string;
2320
2141
  completedSteps: number;
2321
2142
  totalSteps: number;
2322
2143
  };
2144
+ type: "plan_execution_complete";
2323
2145
  requestId: string;
2324
2146
  timestamp?: number | undefined;
2325
2147
  }>, z.ZodObject<{
@@ -2342,63 +2164,63 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2342
2164
  subject: "plan" | "session";
2343
2165
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2344
2166
  expiredAt: string;
2345
- reason?: string | undefined;
2346
2167
  expiresAt?: string | undefined;
2347
2168
  planVersion?: number | undefined;
2169
+ reason?: string | undefined;
2348
2170
  }, {
2349
2171
  planId: string;
2350
2172
  phase: "expired";
2351
2173
  subject: "plan" | "session";
2352
2174
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2353
2175
  expiredAt: string;
2354
- reason?: string | undefined;
2355
2176
  expiresAt?: string | undefined;
2356
2177
  planVersion?: number | undefined;
2178
+ reason?: string | undefined;
2357
2179
  }>, {
2358
2180
  planId: string;
2359
2181
  phase: "expired";
2360
2182
  subject: "plan" | "session";
2361
2183
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2362
2184
  expiredAt: string;
2363
- reason?: string | undefined;
2364
2185
  expiresAt?: string | undefined;
2365
2186
  planVersion?: number | undefined;
2187
+ reason?: string | undefined;
2366
2188
  }, {
2367
2189
  planId: string;
2368
2190
  phase: "expired";
2369
2191
  subject: "plan" | "session";
2370
2192
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2371
2193
  expiredAt: string;
2372
- reason?: string | undefined;
2373
2194
  expiresAt?: string | undefined;
2374
2195
  planVersion?: number | undefined;
2196
+ reason?: string | undefined;
2375
2197
  }>;
2376
2198
  }, "strip", z.ZodTypeAny, {
2377
- type: "plan_expired";
2378
2199
  data: {
2379
2200
  planId: string;
2380
2201
  phase: "expired";
2381
2202
  subject: "plan" | "session";
2382
2203
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2383
2204
  expiredAt: string;
2384
- reason?: string | undefined;
2385
2205
  expiresAt?: string | undefined;
2386
2206
  planVersion?: number | undefined;
2207
+ reason?: string | undefined;
2387
2208
  };
2209
+ type: "plan_expired";
2388
2210
  requestId: string;
2389
2211
  timestamp?: number | undefined;
2390
2212
  }, {
2391
- type: "plan_expired";
2392
2213
  data: {
2393
2214
  planId: string;
2394
2215
  phase: "expired";
2395
2216
  subject: "plan" | "session";
2396
2217
  blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2397
2218
  expiredAt: string;
2398
- reason?: string | undefined;
2399
2219
  expiresAt?: string | undefined;
2400
2220
  planVersion?: number | undefined;
2221
+ reason?: string | undefined;
2401
2222
  };
2223
+ type: "plan_expired";
2402
2224
  requestId: string;
2403
2225
  timestamp?: number | undefined;
2404
2226
  }>, z.ZodObject<{
@@ -2423,23 +2245,23 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2423
2245
  simulationSummary: string;
2424
2246
  }>;
2425
2247
  }, "strip", z.ZodTypeAny, {
2426
- type: "plan_step_simulated";
2427
2248
  data: {
2428
2249
  stepNumber: number;
2429
2250
  planId: string;
2430
2251
  simulationSuccess: boolean;
2431
2252
  simulationSummary: string;
2432
2253
  };
2254
+ type: "plan_step_simulated";
2433
2255
  requestId: string;
2434
2256
  timestamp?: number | undefined;
2435
2257
  }, {
2436
- type: "plan_step_simulated";
2437
2258
  data: {
2438
2259
  stepNumber: number;
2439
2260
  planId: string;
2440
2261
  simulationSuccess: boolean;
2441
2262
  simulationSummary: string;
2442
2263
  };
2264
+ type: "plan_step_simulated";
2443
2265
  requestId: string;
2444
2266
  timestamp?: number | undefined;
2445
2267
  }>, z.ZodObject<{
@@ -2453,34 +2275,34 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2453
2275
  confidence: z.ZodNumber;
2454
2276
  reason: z.ZodString;
2455
2277
  }, "strip", z.ZodTypeAny, {
2456
- reason: string;
2457
2278
  stepNumber: number;
2458
2279
  planId: string;
2459
2280
  confidence: number;
2460
- }, {
2461
2281
  reason: string;
2282
+ }, {
2462
2283
  stepNumber: number;
2463
2284
  planId: string;
2464
2285
  confidence: number;
2286
+ reason: string;
2465
2287
  }>;
2466
2288
  }, "strip", z.ZodTypeAny, {
2467
- type: "plan_step_verification_passed";
2468
2289
  data: {
2469
- reason: string;
2470
2290
  stepNumber: number;
2471
2291
  planId: string;
2472
2292
  confidence: number;
2293
+ reason: string;
2473
2294
  };
2295
+ type: "plan_step_verification_passed";
2474
2296
  requestId: string;
2475
2297
  timestamp?: number | undefined;
2476
2298
  }, {
2477
- type: "plan_step_verification_passed";
2478
2299
  data: {
2479
- reason: string;
2480
2300
  stepNumber: number;
2481
2301
  planId: string;
2482
2302
  confidence: number;
2303
+ reason: string;
2483
2304
  };
2305
+ type: "plan_step_verification_passed";
2484
2306
  requestId: string;
2485
2307
  timestamp?: number | undefined;
2486
2308
  }>, z.ZodObject<{
@@ -2508,7 +2330,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2508
2330
  }>, "many">;
2509
2331
  recommendedAction: z.ZodEnum<["continue", "ask_user", "replan"]>;
2510
2332
  }, "strip", z.ZodTypeAny, {
2511
- reason: string;
2512
2333
  stepNumber: number;
2513
2334
  planId: string;
2514
2335
  conflicts: {
@@ -2518,8 +2339,8 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2518
2339
  }[];
2519
2340
  confidence: number;
2520
2341
  recommendedAction: "continue" | "replan" | "ask_user";
2521
- }, {
2522
2342
  reason: string;
2343
+ }, {
2523
2344
  stepNumber: number;
2524
2345
  planId: string;
2525
2346
  conflicts: {
@@ -2529,11 +2350,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2529
2350
  }[];
2530
2351
  confidence: number;
2531
2352
  recommendedAction: "continue" | "replan" | "ask_user";
2353
+ reason: string;
2532
2354
  }>;
2533
2355
  }, "strip", z.ZodTypeAny, {
2534
- type: "plan_step_verification_failed";
2535
2356
  data: {
2536
- reason: string;
2537
2357
  stepNumber: number;
2538
2358
  planId: string;
2539
2359
  conflicts: {
@@ -2543,13 +2363,13 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2543
2363
  }[];
2544
2364
  confidence: number;
2545
2365
  recommendedAction: "continue" | "replan" | "ask_user";
2366
+ reason: string;
2546
2367
  };
2368
+ type: "plan_step_verification_failed";
2547
2369
  requestId: string;
2548
2370
  timestamp?: number | undefined;
2549
2371
  }, {
2550
- type: "plan_step_verification_failed";
2551
2372
  data: {
2552
- reason: string;
2553
2373
  stepNumber: number;
2554
2374
  planId: string;
2555
2375
  conflicts: {
@@ -2559,7 +2379,9 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2559
2379
  }[];
2560
2380
  confidence: number;
2561
2381
  recommendedAction: "continue" | "replan" | "ask_user";
2382
+ reason: string;
2562
2383
  };
2384
+ type: "plan_step_verification_failed";
2563
2385
  requestId: string;
2564
2386
  timestamp?: number | undefined;
2565
2387
  }>, z.ZodObject<{
@@ -2581,21 +2403,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2581
2403
  phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
2582
2404
  }>;
2583
2405
  }, "strip", z.ZodTypeAny, {
2584
- type: "plan_execution_failed";
2585
2406
  data: {
2586
2407
  error: string;
2587
2408
  planId: string;
2588
2409
  phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
2589
2410
  };
2411
+ type: "plan_execution_failed";
2590
2412
  requestId: string;
2591
2413
  timestamp?: number | undefined;
2592
2414
  }, {
2593
- type: "plan_execution_failed";
2594
2415
  data: {
2595
2416
  error: string;
2596
2417
  planId: string;
2597
2418
  phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
2598
2419
  };
2420
+ type: "plan_execution_failed";
2599
2421
  requestId: string;
2600
2422
  timestamp?: number | undefined;
2601
2423
  }>]>;
@@ -8392,7 +8214,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
8392
8214
  nativeTokenSymbol?: string | undefined;
8393
8215
  }>>;
8394
8216
  }, "strict", z.ZodTypeAny, {
8395
- type: "tool-call";
8396
8217
  toolCallId: string;
8397
8218
  toolName: string;
8398
8219
  input: {
@@ -9245,6 +9066,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
9245
9066
  amountUSDValue?: string | undefined;
9246
9067
  } | undefined;
9247
9068
  };
9069
+ type: "tool-call";
9248
9070
  simulated?: boolean | undefined;
9249
9071
  simulation?: {
9250
9072
  willSucceed: boolean;
@@ -9293,7 +9115,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
9293
9115
  nativeTokenSymbol?: string | undefined;
9294
9116
  } | undefined;
9295
9117
  }, {
9296
- type: "tool-call";
9297
9118
  toolCallId: string;
9298
9119
  toolName: string;
9299
9120
  input: {
@@ -10146,6 +9967,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
10146
9967
  amountUSDValue?: string | undefined;
10147
9968
  } | undefined;
10148
9969
  };
9970
+ type: "tool-call";
10149
9971
  simulated?: boolean | undefined;
10150
9972
  simulation?: {
10151
9973
  willSucceed: boolean;
@@ -10284,7 +10106,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
10284
10106
  messages: ModelMessage[];
10285
10107
  requestId: string;
10286
10108
  pendingTools?: {
10287
- type: "tool-call";
10288
10109
  toolCallId: string;
10289
10110
  toolName: string;
10290
10111
  input: {
@@ -11137,6 +10958,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
11137
10958
  amountUSDValue?: string | undefined;
11138
10959
  } | undefined;
11139
10960
  };
10961
+ type: "tool-call";
11140
10962
  simulated?: boolean | undefined;
11141
10963
  simulation?: {
11142
10964
  willSucceed: boolean;
@@ -11212,7 +11034,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
11212
11034
  messages: ModelMessage[];
11213
11035
  requestId: string;
11214
11036
  pendingTools?: {
11215
- type: "tool-call";
11216
11037
  toolCallId: string;
11217
11038
  toolName: string;
11218
11039
  input: {
@@ -12065,6 +11886,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
12065
11886
  amountUSDValue?: string | undefined;
12066
11887
  } | undefined;
12067
11888
  };
11889
+ type: "tool-call";
12068
11890
  simulated?: boolean | undefined;
12069
11891
  simulation?: {
12070
11892
  willSucceed: boolean;
@@ -12152,19 +11974,19 @@ export declare const errorEventDataSchema: z.ZodObject<{
12152
11974
  code?: string | undefined;
12153
11975
  }>;
12154
11976
  }, "strip", z.ZodTypeAny, {
12155
- type: "error";
12156
11977
  data: {
12157
11978
  message: string;
12158
11979
  code?: string | undefined;
12159
11980
  };
11981
+ type: "error";
12160
11982
  requestId: string;
12161
11983
  timestamp?: number | undefined;
12162
11984
  }, {
12163
- type: "error";
12164
11985
  data: {
12165
11986
  message: string;
12166
11987
  code?: string | undefined;
12167
11988
  };
11989
+ type: "error";
12168
11990
  requestId: string;
12169
11991
  timestamp?: number | undefined;
12170
11992
  }>;
@@ -17976,7 +17798,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
17976
17798
  nativeTokenSymbol?: string | undefined;
17977
17799
  }>>;
17978
17800
  }, "strict", z.ZodTypeAny, {
17979
- type: "tool-call";
17980
17801
  toolCallId: string;
17981
17802
  toolName: string;
17982
17803
  input: {
@@ -18829,6 +18650,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
18829
18650
  amountUSDValue?: string | undefined;
18830
18651
  } | undefined;
18831
18652
  };
18653
+ type: "tool-call";
18832
18654
  simulated?: boolean | undefined;
18833
18655
  simulation?: {
18834
18656
  willSucceed: boolean;
@@ -18877,7 +18699,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
18877
18699
  nativeTokenSymbol?: string | undefined;
18878
18700
  } | undefined;
18879
18701
  }, {
18880
- type: "tool-call";
18881
18702
  toolCallId: string;
18882
18703
  toolName: string;
18883
18704
  input: {
@@ -19730,6 +19551,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
19730
19551
  amountUSDValue?: string | undefined;
19731
19552
  } | undefined;
19732
19553
  };
19554
+ type: "tool-call";
19733
19555
  simulated?: boolean | undefined;
19734
19556
  simulation?: {
19735
19557
  willSucceed: boolean;
@@ -19868,7 +19690,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
19868
19690
  messages: ModelMessage[];
19869
19691
  requestId: string;
19870
19692
  pendingTools?: {
19871
- type: "tool-call";
19872
19693
  toolCallId: string;
19873
19694
  toolName: string;
19874
19695
  input: {
@@ -20721,6 +20542,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
20721
20542
  amountUSDValue?: string | undefined;
20722
20543
  } | undefined;
20723
20544
  };
20545
+ type: "tool-call";
20724
20546
  simulated?: boolean | undefined;
20725
20547
  simulation?: {
20726
20548
  willSucceed: boolean;
@@ -20796,7 +20618,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
20796
20618
  messages: ModelMessage[];
20797
20619
  requestId: string;
20798
20620
  pendingTools?: {
20799
- type: "tool-call";
20800
20621
  toolCallId: string;
20801
20622
  toolName: string;
20802
20623
  input: {
@@ -21649,6 +21470,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
21649
21470
  amountUSDValue?: string | undefined;
21650
21471
  } | undefined;
21651
21472
  };
21473
+ type: "tool-call";
21652
21474
  simulated?: boolean | undefined;
21653
21475
  simulation?: {
21654
21476
  willSucceed: boolean;
@@ -21732,19 +21554,19 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
21732
21554
  code?: string | undefined;
21733
21555
  }>;
21734
21556
  }, "strip", z.ZodTypeAny, {
21735
- type: "error";
21736
21557
  data: {
21737
21558
  message: string;
21738
21559
  code?: string | undefined;
21739
21560
  };
21561
+ type: "error";
21740
21562
  requestId: string;
21741
21563
  timestamp?: number | undefined;
21742
21564
  }, {
21743
- type: "error";
21744
21565
  data: {
21745
21566
  message: string;
21746
21567
  code?: string | undefined;
21747
21568
  };
21569
+ type: "error";
21748
21570
  requestId: string;
21749
21571
  timestamp?: number | undefined;
21750
21572
  }>, z.ZodObject<{