@illalabs/interfaces 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/schemas/chatContext.d.ts +20 -20
  2. package/dist/schemas/chatRequestBody.d.ts +65 -65
  3. package/dist/schemas/illaTools.d.ts +15 -15
  4. package/dist/schemas/index.d.ts +1 -0
  5. package/dist/schemas/index.d.ts.map +1 -1
  6. package/dist/schemas/index.js +1 -0
  7. package/dist/schemas/index.js.map +1 -1
  8. package/dist/schemas/messages.d.ts +52 -51
  9. package/dist/schemas/messages.d.ts.map +1 -1
  10. package/dist/schemas/messages.js +4 -1
  11. package/dist/schemas/messages.js.map +1 -1
  12. package/dist/schemas/planning.d.ts +22 -18
  13. package/dist/schemas/planning.d.ts.map +1 -1
  14. package/dist/schemas/planning.js +8 -0
  15. package/dist/schemas/planning.js.map +1 -1
  16. package/dist/schemas/planningRuntime.d.ts +15 -11
  17. package/dist/schemas/planningRuntime.d.ts.map +1 -1
  18. package/dist/schemas/planningRuntime.js +5 -0
  19. package/dist/schemas/planningRuntime.js.map +1 -1
  20. package/dist/schemas/telemetryEvents.d.ts +498 -302
  21. package/dist/schemas/telemetryEvents.d.ts.map +1 -1
  22. package/dist/schemas/telemetryEvents.js +29 -2
  23. package/dist/schemas/telemetryEvents.js.map +1 -1
  24. package/dist/schemas/uiMessageNormalizer.d.ts +22 -0
  25. package/dist/schemas/uiMessageNormalizer.d.ts.map +1 -0
  26. package/dist/schemas/uiMessageNormalizer.js +176 -0
  27. package/dist/schemas/uiMessageNormalizer.js.map +1 -0
  28. package/dist/types/planning.d.ts +4 -2
  29. package/dist/types/planning.d.ts.map +1 -1
  30. package/dist/types/planningRuntime.d.ts +3 -1
  31. package/dist/types/planningRuntime.d.ts.map +1 -1
  32. package/dist/types/telemetry.d.ts +3 -1
  33. package/dist/types/telemetry.d.ts.map +1 -1
  34. package/dist/types/telemetry.js +1 -1
  35. package/dist/types/telemetry.js.map +1 -1
  36. package/package.json +1 -1
@@ -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_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_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_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_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_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_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_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_step_simulated" | "plan_step_verification_passed" | "plan_step_verification_failed" | "plan_execution_failed";
16
+ type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "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_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_step_simulated" | "plan_step_verification_passed" | "plan_step_verification_failed" | "plan_execution_failed";
20
+ type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "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
  }>;
@@ -138,46 +138,53 @@ export declare const toolCallBatchEventSchema: z.ZodObject<{
138
138
  tools: z.ZodArray<z.ZodObject<{
139
139
  toolCallId: z.ZodString;
140
140
  toolName: z.ZodString;
141
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
141
142
  }, "strip", z.ZodTypeAny, {
142
143
  toolCallId: string;
143
144
  toolName: string;
145
+ args?: Record<string, unknown> | undefined;
144
146
  }, {
145
147
  toolCallId: string;
146
148
  toolName: string;
149
+ args?: Record<string, unknown> | undefined;
147
150
  }>, "many">;
148
151
  }, "strip", z.ZodTypeAny, {
149
152
  iteration: number;
150
153
  tools: {
151
154
  toolCallId: string;
152
155
  toolName: string;
156
+ args?: Record<string, unknown> | undefined;
153
157
  }[];
154
158
  }, {
155
159
  iteration: number;
156
160
  tools: {
157
161
  toolCallId: string;
158
162
  toolName: string;
163
+ args?: Record<string, unknown> | undefined;
159
164
  }[];
160
165
  }>;
161
166
  }, "strip", z.ZodTypeAny, {
162
- type: "tool_call_batch";
163
167
  data: {
164
168
  iteration: number;
165
169
  tools: {
166
170
  toolCallId: string;
167
171
  toolName: string;
172
+ args?: Record<string, unknown> | undefined;
168
173
  }[];
169
174
  };
175
+ type: "tool_call_batch";
170
176
  requestId: string;
171
177
  timestamp?: number | undefined;
172
178
  }, {
173
- type: "tool_call_batch";
174
179
  data: {
175
180
  iteration: number;
176
181
  tools: {
177
182
  toolCallId: string;
178
183
  toolName: string;
184
+ args?: Record<string, unknown> | undefined;
179
185
  }[];
180
186
  };
187
+ type: "tool_call_batch";
181
188
  requestId: string;
182
189
  timestamp?: number | undefined;
183
190
  }>;
@@ -195,80 +202,90 @@ export declare const toolResultEventSchema: z.ZodObject<{
195
202
  status: z.ZodLiteral<"pending">;
196
203
  /** Whether a simulation was performed for this pending tool */
197
204
  simulated: z.ZodOptional<z.ZodBoolean>;
205
+ result: z.ZodOptional<z.ZodUnknown>;
198
206
  }, "strip", z.ZodTypeAny, {
199
- status: "pending";
200
207
  toolCallId: string;
201
208
  toolName: string;
209
+ status: "pending";
210
+ result?: unknown;
202
211
  simulated?: boolean | undefined;
203
212
  }, {
204
- status: "pending";
205
213
  toolCallId: string;
206
214
  toolName: string;
215
+ status: "pending";
216
+ result?: unknown;
207
217
  simulated?: boolean | undefined;
208
218
  }>, z.ZodObject<{
209
219
  toolCallId: z.ZodString;
210
220
  toolName: z.ZodString;
211
221
  status: z.ZodLiteral<"success">;
222
+ result: z.ZodOptional<z.ZodUnknown>;
212
223
  }, "strip", z.ZodTypeAny, {
213
- status: "success";
214
224
  toolCallId: string;
215
225
  toolName: string;
216
- }, {
217
226
  status: "success";
227
+ result?: unknown;
228
+ }, {
218
229
  toolCallId: string;
219
230
  toolName: string;
231
+ status: "success";
232
+ result?: unknown;
220
233
  }>, z.ZodObject<{
221
234
  toolCallId: z.ZodString;
222
235
  toolName: z.ZodString;
223
236
  status: z.ZodLiteral<"failure">;
224
237
  error: z.ZodString;
225
238
  }, "strip", z.ZodTypeAny, {
226
- status: "failure";
227
- error: string;
228
239
  toolCallId: string;
229
240
  toolName: string;
230
- }, {
231
241
  status: "failure";
232
242
  error: string;
243
+ }, {
233
244
  toolCallId: string;
234
245
  toolName: string;
246
+ status: "failure";
247
+ error: string;
235
248
  }>]>;
236
249
  }, "strip", z.ZodTypeAny, {
237
- type: "tool_result";
238
250
  data: {
239
- status: "pending";
240
251
  toolCallId: string;
241
252
  toolName: string;
253
+ status: "pending";
254
+ result?: unknown;
242
255
  simulated?: boolean | undefined;
243
256
  } | {
244
- status: "success";
245
257
  toolCallId: string;
246
258
  toolName: string;
259
+ status: "success";
260
+ result?: unknown;
247
261
  } | {
248
- status: "failure";
249
- error: string;
250
262
  toolCallId: string;
251
263
  toolName: string;
264
+ status: "failure";
265
+ error: string;
252
266
  };
267
+ type: "tool_result";
253
268
  requestId: string;
254
269
  timestamp?: number | undefined;
255
270
  }, {
256
- type: "tool_result";
257
271
  data: {
258
- status: "pending";
259
272
  toolCallId: string;
260
273
  toolName: string;
274
+ status: "pending";
275
+ result?: unknown;
261
276
  simulated?: boolean | undefined;
262
277
  } | {
263
- status: "success";
264
278
  toolCallId: string;
265
279
  toolName: string;
280
+ status: "success";
281
+ result?: unknown;
266
282
  } | {
267
- status: "failure";
268
- error: string;
269
283
  toolCallId: string;
270
284
  toolName: string;
285
+ status: "failure";
286
+ error: string;
271
287
  };
288
+ type: "tool_result";
272
289
  requestId: string;
273
290
  timestamp?: number | undefined;
274
291
  }>;
@@ -288,17 +305,17 @@ export declare const scratchpadResetEventSchema: z.ZodObject<{
288
305
  reason: string;
289
306
  }>;
290
307
  }, "strip", z.ZodTypeAny, {
291
- type: "scratchpad_reset";
292
308
  data: {
293
309
  reason: string;
294
310
  };
311
+ type: "scratchpad_reset";
295
312
  requestId: string;
296
313
  timestamp?: number | undefined;
297
314
  }, {
298
- type: "scratchpad_reset";
299
315
  data: {
300
316
  reason: string;
301
317
  };
318
+ type: "scratchpad_reset";
302
319
  requestId: string;
303
320
  timestamp?: number | undefined;
304
321
  }>;
@@ -318,17 +335,17 @@ export declare const llmStartEventSchema: z.ZodObject<{
318
335
  iteration: number;
319
336
  }>;
320
337
  }, "strip", z.ZodTypeAny, {
321
- type: "llm_start";
322
338
  data: {
323
339
  iteration: number;
324
340
  };
341
+ type: "llm_start";
325
342
  requestId: string;
326
343
  timestamp?: number | undefined;
327
344
  }, {
328
- type: "llm_start";
329
345
  data: {
330
346
  iteration: number;
331
347
  };
348
+ type: "llm_start";
332
349
  requestId: string;
333
350
  timestamp?: number | undefined;
334
351
  }>;
@@ -354,21 +371,21 @@ export declare const llmEndEventSchema: z.ZodObject<{
354
371
  toolCallCount: number;
355
372
  }>;
356
373
  }, "strip", z.ZodTypeAny, {
357
- type: "llm_end";
358
374
  data: {
359
375
  iteration: number;
360
376
  hasText: boolean;
361
377
  toolCallCount: number;
362
378
  };
379
+ type: "llm_end";
363
380
  requestId: string;
364
381
  timestamp?: number | undefined;
365
382
  }, {
366
- type: "llm_end";
367
383
  data: {
368
384
  iteration: number;
369
385
  hasText: boolean;
370
386
  toolCallCount: number;
371
387
  };
388
+ type: "llm_end";
372
389
  requestId: string;
373
390
  timestamp?: number | undefined;
374
391
  }>;
@@ -388,17 +405,17 @@ export declare const textDeltaEventSchema: z.ZodObject<{
388
405
  delta: string;
389
406
  }>;
390
407
  }, "strip", z.ZodTypeAny, {
391
- type: "text_delta";
392
408
  data: {
393
409
  delta: string;
394
410
  };
411
+ type: "text_delta";
395
412
  requestId: string;
396
413
  timestamp?: number | undefined;
397
414
  }, {
398
- type: "text_delta";
399
415
  data: {
400
416
  delta: string;
401
417
  };
418
+ type: "text_delta";
402
419
  requestId: string;
403
420
  timestamp?: number | undefined;
404
421
  }>;
@@ -424,21 +441,21 @@ export declare const finishEventSchema: z.ZodObject<{
424
441
  hasToolErrors: boolean;
425
442
  }>;
426
443
  }, "strip", z.ZodTypeAny, {
427
- type: "finish";
428
444
  data: {
429
445
  totalIterations: number;
430
446
  hasPendingTools: boolean;
431
447
  hasToolErrors: boolean;
432
448
  };
449
+ type: "finish";
433
450
  requestId: string;
434
451
  timestamp?: number | undefined;
435
452
  }, {
436
- type: "finish";
437
453
  data: {
438
454
  totalIterations: number;
439
455
  hasPendingTools: boolean;
440
456
  hasToolErrors: boolean;
441
457
  };
458
+ type: "finish";
442
459
  requestId: string;
443
460
  timestamp?: number | undefined;
444
461
  }>;
@@ -462,19 +479,19 @@ export declare const errorTelemetryEventSchema: z.ZodObject<{
462
479
  code?: string | undefined;
463
480
  }>;
464
481
  }, "strip", z.ZodTypeAny, {
465
- type: "error";
466
482
  data: {
467
483
  message: string;
468
484
  code?: string | undefined;
469
485
  };
486
+ type: "error";
470
487
  requestId: string;
471
488
  timestamp?: number | undefined;
472
489
  }, {
473
- type: "error";
474
490
  data: {
475
491
  message: string;
476
492
  code?: string | undefined;
477
493
  };
494
+ type: "error";
478
495
  requestId: string;
479
496
  timestamp?: number | undefined;
480
497
  }>;
@@ -494,17 +511,17 @@ export declare const planGeneratingEventSchema: z.ZodObject<{
494
511
  messageCount: number;
495
512
  }>;
496
513
  }, "strip", z.ZodTypeAny, {
497
- type: "plan_generating";
498
514
  data: {
499
515
  messageCount: number;
500
516
  };
517
+ type: "plan_generating";
501
518
  requestId: string;
502
519
  timestamp?: number | undefined;
503
520
  }, {
504
- type: "plan_generating";
505
521
  data: {
506
522
  messageCount: number;
507
523
  };
524
+ type: "plan_generating";
508
525
  requestId: string;
509
526
  timestamp?: number | undefined;
510
527
  }>;
@@ -542,7 +559,6 @@ export declare const planGeneratedEventSchema: z.ZodObject<{
542
559
  hasConflicts: z.ZodBoolean;
543
560
  }, z.ZodTypeAny, "passthrough">>;
544
561
  }, "strip", z.ZodTypeAny, {
545
- type: "plan_generated";
546
562
  data: {
547
563
  complexity: "low" | "medium" | "high";
548
564
  planId: string;
@@ -554,10 +570,10 @@ export declare const planGeneratedEventSchema: z.ZodObject<{
554
570
  } & {
555
571
  [k: string]: unknown;
556
572
  };
573
+ type: "plan_generated";
557
574
  requestId: string;
558
575
  timestamp?: number | undefined;
559
576
  }, {
560
- type: "plan_generated";
561
577
  data: {
562
578
  complexity: "low" | "medium" | "high";
563
579
  planId: string;
@@ -569,6 +585,7 @@ export declare const planGeneratedEventSchema: z.ZodObject<{
569
585
  } & {
570
586
  [k: string]: unknown;
571
587
  };
588
+ type: "plan_generated";
572
589
  requestId: string;
573
590
  timestamp?: number | undefined;
574
591
  }>;
@@ -597,23 +614,23 @@ export declare const planStepStartedEventSchema: z.ZodObject<{
597
614
  planId: string;
598
615
  }>;
599
616
  }, "strip", z.ZodTypeAny, {
600
- type: "plan_step_started";
601
617
  data: {
602
618
  description: string;
603
619
  stepNumber: number;
604
620
  operationType: "read" | "write";
605
621
  planId: string;
606
622
  };
623
+ type: "plan_step_started";
607
624
  requestId: string;
608
625
  timestamp?: number | undefined;
609
626
  }, {
610
- type: "plan_step_started";
611
627
  data: {
612
628
  description: string;
613
629
  stepNumber: number;
614
630
  operationType: "read" | "write";
615
631
  planId: string;
616
632
  };
633
+ type: "plan_step_started";
617
634
  requestId: string;
618
635
  timestamp?: number | undefined;
619
636
  }>;
@@ -652,7 +669,6 @@ export declare const planStepRetryingEventSchema: z.ZodObject<{
652
669
  error?: string | undefined;
653
670
  }>;
654
671
  }, "strip", z.ZodTypeAny, {
655
- type: "plan_step_retrying";
656
672
  data: {
657
673
  stepNumber: number;
658
674
  planId: string;
@@ -661,10 +677,10 @@ export declare const planStepRetryingEventSchema: z.ZodObject<{
661
677
  phase: "execution" | "simulation";
662
678
  error?: string | undefined;
663
679
  };
680
+ type: "plan_step_retrying";
664
681
  requestId: string;
665
682
  timestamp?: number | undefined;
666
683
  }, {
667
- type: "plan_step_retrying";
668
684
  data: {
669
685
  stepNumber: number;
670
686
  planId: string;
@@ -673,6 +689,7 @@ export declare const planStepRetryingEventSchema: z.ZodObject<{
673
689
  phase: "execution" | "simulation";
674
690
  error?: string | undefined;
675
691
  };
692
+ type: "plan_step_retrying";
676
693
  requestId: string;
677
694
  timestamp?: number | undefined;
678
695
  }>;
@@ -701,7 +718,6 @@ export declare const planStepCompletedEventSchema: z.ZodObject<{
701
718
  error: z.ZodOptional<z.ZodString>;
702
719
  }, z.ZodTypeAny, "passthrough">>;
703
720
  }, "strip", z.ZodTypeAny, {
704
- type: "plan_step_completed";
705
721
  data: {
706
722
  status: "completed" | "failed" | "skipped";
707
723
  stepNumber: number;
@@ -710,10 +726,10 @@ export declare const planStepCompletedEventSchema: z.ZodObject<{
710
726
  } & {
711
727
  [k: string]: unknown;
712
728
  };
729
+ type: "plan_step_completed";
713
730
  requestId: string;
714
731
  timestamp?: number | undefined;
715
732
  }, {
716
- type: "plan_step_completed";
717
733
  data: {
718
734
  status: "completed" | "failed" | "skipped";
719
735
  stepNumber: number;
@@ -722,6 +738,7 @@ export declare const planStepCompletedEventSchema: z.ZodObject<{
722
738
  } & {
723
739
  [k: string]: unknown;
724
740
  };
741
+ type: "plan_step_completed";
725
742
  requestId: string;
726
743
  timestamp?: number | undefined;
727
744
  }>;
@@ -747,21 +764,21 @@ export declare const planInvalidatedEventSchema: z.ZodObject<{
747
764
  failedStepNumber?: number | undefined;
748
765
  }>;
749
766
  }, "strip", z.ZodTypeAny, {
750
- type: "plan_invalidated";
751
767
  data: {
752
768
  planId: string;
753
769
  reason: string;
754
770
  failedStepNumber?: number | undefined;
755
771
  };
772
+ type: "plan_invalidated";
756
773
  requestId: string;
757
774
  timestamp?: number | undefined;
758
775
  }, {
759
- type: "plan_invalidated";
760
776
  data: {
761
777
  planId: string;
762
778
  reason: string;
763
779
  failedStepNumber?: number | undefined;
764
780
  };
781
+ type: "plan_invalidated";
765
782
  requestId: string;
766
783
  timestamp?: number | undefined;
767
784
  }>;
@@ -787,21 +804,21 @@ export declare const replanStartedEventSchema: z.ZodObject<{
787
804
  preservedStepCount: number;
788
805
  }>;
789
806
  }, "strip", z.ZodTypeAny, {
790
- type: "replan_started";
791
807
  data: {
792
808
  previousPlanId: string;
793
809
  reason: string;
794
810
  preservedStepCount: number;
795
811
  };
812
+ type: "replan_started";
796
813
  requestId: string;
797
814
  timestamp?: number | undefined;
798
815
  }, {
799
- type: "replan_started";
800
816
  data: {
801
817
  previousPlanId: string;
802
818
  reason: string;
803
819
  preservedStepCount: number;
804
820
  };
821
+ type: "replan_started";
805
822
  requestId: string;
806
823
  timestamp?: number | undefined;
807
824
  }>;
@@ -827,7 +844,6 @@ export declare const replanCompleteEventSchema: z.ZodObject<{
827
844
  newVersion: z.ZodNumber;
828
845
  }, z.ZodTypeAny, "passthrough">>;
829
846
  }, "strip", z.ZodTypeAny, {
830
- type: "replan_complete";
831
847
  data: {
832
848
  previousPlanId: string;
833
849
  newPlanId: string;
@@ -835,10 +851,10 @@ export declare const replanCompleteEventSchema: z.ZodObject<{
835
851
  } & {
836
852
  [k: string]: unknown;
837
853
  };
854
+ type: "replan_complete";
838
855
  requestId: string;
839
856
  timestamp?: number | undefined;
840
857
  }, {
841
- type: "replan_complete";
842
858
  data: {
843
859
  previousPlanId: string;
844
860
  newPlanId: string;
@@ -846,6 +862,7 @@ export declare const replanCompleteEventSchema: z.ZodObject<{
846
862
  } & {
847
863
  [k: string]: unknown;
848
864
  };
865
+ type: "replan_complete";
849
866
  requestId: string;
850
867
  timestamp?: number | undefined;
851
868
  }>;
@@ -874,23 +891,106 @@ export declare const planExecutionCompleteEventSchema: z.ZodObject<{
874
891
  totalSteps: number;
875
892
  }>;
876
893
  }, "strip", z.ZodTypeAny, {
877
- type: "plan_execution_complete";
878
894
  data: {
879
895
  status: "failed" | "complete" | "partial";
880
896
  planId: string;
881
897
  completedSteps: number;
882
898
  totalSteps: number;
883
899
  };
900
+ type: "plan_execution_complete";
884
901
  requestId: string;
885
902
  timestamp?: number | undefined;
886
903
  }, {
887
- type: "plan_execution_complete";
888
904
  data: {
889
905
  status: "failed" | "complete" | "partial";
890
906
  planId: string;
891
907
  completedSteps: number;
892
908
  totalSteps: number;
893
909
  };
910
+ type: "plan_execution_complete";
911
+ requestId: string;
912
+ timestamp?: number | undefined;
913
+ }>;
914
+ /**
915
+ * Emitted when a plan or planning session expires before the next user-driven resume step.
916
+ */
917
+ export declare const planExpiredEventSchema: z.ZodObject<{
918
+ requestId: z.ZodString;
919
+ timestamp: z.ZodOptional<z.ZodNumber>;
920
+ } & {
921
+ type: z.ZodLiteral<"plan_expired">;
922
+ data: z.ZodEffects<z.ZodObject<{
923
+ planId: z.ZodString;
924
+ planVersion: z.ZodOptional<z.ZodNumber>;
925
+ subject: z.ZodEnum<["plan", "session"]>;
926
+ blockedAction: z.ZodEnum<["initial_acceptance", "replan_acceptance", "step_decision_resume"]>;
927
+ phase: z.ZodLiteral<"expired">;
928
+ expiresAt: z.ZodOptional<z.ZodString>;
929
+ expiredAt: z.ZodString;
930
+ reason: z.ZodOptional<z.ZodString>;
931
+ }, "strip", z.ZodTypeAny, {
932
+ planId: string;
933
+ phase: "expired";
934
+ subject: "plan" | "session";
935
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
936
+ expiredAt: string;
937
+ expiresAt?: string | undefined;
938
+ planVersion?: number | undefined;
939
+ reason?: string | undefined;
940
+ }, {
941
+ planId: string;
942
+ phase: "expired";
943
+ subject: "plan" | "session";
944
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
945
+ expiredAt: string;
946
+ expiresAt?: string | undefined;
947
+ planVersion?: number | undefined;
948
+ reason?: string | undefined;
949
+ }>, {
950
+ planId: string;
951
+ phase: "expired";
952
+ subject: "plan" | "session";
953
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
954
+ expiredAt: string;
955
+ expiresAt?: string | undefined;
956
+ planVersion?: number | undefined;
957
+ reason?: string | undefined;
958
+ }, {
959
+ planId: string;
960
+ phase: "expired";
961
+ subject: "plan" | "session";
962
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
963
+ expiredAt: string;
964
+ expiresAt?: string | undefined;
965
+ planVersion?: number | undefined;
966
+ reason?: string | undefined;
967
+ }>;
968
+ }, "strip", z.ZodTypeAny, {
969
+ data: {
970
+ planId: string;
971
+ phase: "expired";
972
+ subject: "plan" | "session";
973
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
974
+ expiredAt: string;
975
+ expiresAt?: string | undefined;
976
+ planVersion?: number | undefined;
977
+ reason?: string | undefined;
978
+ };
979
+ type: "plan_expired";
980
+ requestId: string;
981
+ timestamp?: number | undefined;
982
+ }, {
983
+ data: {
984
+ planId: string;
985
+ phase: "expired";
986
+ subject: "plan" | "session";
987
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
988
+ expiredAt: string;
989
+ expiresAt?: string | undefined;
990
+ planVersion?: number | undefined;
991
+ reason?: string | undefined;
992
+ };
993
+ type: "plan_expired";
894
994
  requestId: string;
895
995
  timestamp?: number | undefined;
896
996
  }>;
@@ -919,23 +1019,23 @@ export declare const planStepSimulatedEventSchema: z.ZodObject<{
919
1019
  simulationSummary: string;
920
1020
  }>;
921
1021
  }, "strip", z.ZodTypeAny, {
922
- type: "plan_step_simulated";
923
1022
  data: {
924
1023
  stepNumber: number;
925
1024
  planId: string;
926
1025
  simulationSuccess: boolean;
927
1026
  simulationSummary: string;
928
1027
  };
1028
+ type: "plan_step_simulated";
929
1029
  requestId: string;
930
1030
  timestamp?: number | undefined;
931
1031
  }, {
932
- type: "plan_step_simulated";
933
1032
  data: {
934
1033
  stepNumber: number;
935
1034
  planId: string;
936
1035
  simulationSuccess: boolean;
937
1036
  simulationSummary: string;
938
1037
  };
1038
+ type: "plan_step_simulated";
939
1039
  requestId: string;
940
1040
  timestamp?: number | undefined;
941
1041
  }>;
@@ -964,23 +1064,23 @@ export declare const planStepVerificationPassedEventSchema: z.ZodObject<{
964
1064
  reason: string;
965
1065
  }>;
966
1066
  }, "strip", z.ZodTypeAny, {
967
- type: "plan_step_verification_passed";
968
1067
  data: {
969
1068
  stepNumber: number;
970
1069
  planId: string;
971
1070
  confidence: number;
972
1071
  reason: string;
973
1072
  };
1073
+ type: "plan_step_verification_passed";
974
1074
  requestId: string;
975
1075
  timestamp?: number | undefined;
976
1076
  }, {
977
- type: "plan_step_verification_passed";
978
1077
  data: {
979
1078
  stepNumber: number;
980
1079
  planId: string;
981
1080
  confidence: number;
982
1081
  reason: string;
983
1082
  };
1083
+ type: "plan_step_verification_passed";
984
1084
  requestId: string;
985
1085
  timestamp?: number | undefined;
986
1086
  }>;
@@ -1002,12 +1102,12 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1002
1102
  message: z.ZodString;
1003
1103
  suggestion: z.ZodOptional<z.ZodString>;
1004
1104
  }, "strip", z.ZodTypeAny, {
1005
- message: string;
1006
1105
  type: string;
1106
+ message: string;
1007
1107
  suggestion?: string | undefined;
1008
1108
  }, {
1009
- message: string;
1010
1109
  type: string;
1110
+ message: string;
1011
1111
  suggestion?: string | undefined;
1012
1112
  }>, "many">;
1013
1113
  recommendedAction: z.ZodEnum<["continue", "ask_user", "replan"]>;
@@ -1015,8 +1115,8 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1015
1115
  stepNumber: number;
1016
1116
  planId: string;
1017
1117
  conflicts: {
1018
- message: string;
1019
1118
  type: string;
1119
+ message: string;
1020
1120
  suggestion?: string | undefined;
1021
1121
  }[];
1022
1122
  confidence: number;
@@ -1026,8 +1126,8 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1026
1126
  stepNumber: number;
1027
1127
  planId: string;
1028
1128
  conflicts: {
1029
- message: string;
1030
1129
  type: string;
1130
+ message: string;
1031
1131
  suggestion?: string | undefined;
1032
1132
  }[];
1033
1133
  confidence: number;
@@ -1035,35 +1135,35 @@ export declare const planStepVerificationFailedEventSchema: z.ZodObject<{
1035
1135
  reason: string;
1036
1136
  }>;
1037
1137
  }, "strip", z.ZodTypeAny, {
1038
- type: "plan_step_verification_failed";
1039
1138
  data: {
1040
1139
  stepNumber: number;
1041
1140
  planId: string;
1042
1141
  conflicts: {
1043
- message: string;
1044
1142
  type: string;
1143
+ message: string;
1045
1144
  suggestion?: string | undefined;
1046
1145
  }[];
1047
1146
  confidence: number;
1048
1147
  recommendedAction: "continue" | "replan" | "ask_user";
1049
1148
  reason: string;
1050
1149
  };
1150
+ type: "plan_step_verification_failed";
1051
1151
  requestId: string;
1052
1152
  timestamp?: number | undefined;
1053
1153
  }, {
1054
- type: "plan_step_verification_failed";
1055
1154
  data: {
1056
1155
  stepNumber: number;
1057
1156
  planId: string;
1058
1157
  conflicts: {
1059
- message: string;
1060
1158
  type: string;
1159
+ message: string;
1061
1160
  suggestion?: string | undefined;
1062
1161
  }[];
1063
1162
  confidence: number;
1064
1163
  recommendedAction: "continue" | "replan" | "ask_user";
1065
1164
  reason: string;
1066
1165
  };
1166
+ type: "plan_step_verification_failed";
1067
1167
  requestId: string;
1068
1168
  timestamp?: number | undefined;
1069
1169
  }>;
@@ -1078,32 +1178,32 @@ export declare const planExecutionFailedEventSchema: z.ZodObject<{
1078
1178
  data: z.ZodObject<{
1079
1179
  planId: z.ZodString;
1080
1180
  error: z.ZodString;
1081
- phase: z.ZodEnum<["idle", "generating_plan", "awaiting_plan_acceptance", "executing", "awaiting_user_execution", "awaiting_user_decision", "replanning", "completed", "failed"]>;
1181
+ phase: z.ZodEnum<["idle", "generating_plan", "awaiting_plan_acceptance", "executing", "awaiting_user_execution", "awaiting_user_decision", "replanning", "completed", "expired", "failed"]>;
1082
1182
  }, "strip", z.ZodTypeAny, {
1083
1183
  error: string;
1084
1184
  planId: string;
1085
- phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning";
1185
+ phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
1086
1186
  }, {
1087
1187
  error: string;
1088
1188
  planId: string;
1089
- phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning";
1189
+ phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
1090
1190
  }>;
1091
1191
  }, "strip", z.ZodTypeAny, {
1092
- type: "plan_execution_failed";
1093
1192
  data: {
1094
1193
  error: string;
1095
1194
  planId: string;
1096
- phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning";
1195
+ phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
1097
1196
  };
1197
+ type: "plan_execution_failed";
1098
1198
  requestId: string;
1099
1199
  timestamp?: number | undefined;
1100
1200
  }, {
1101
- type: "plan_execution_failed";
1102
1201
  data: {
1103
1202
  error: string;
1104
1203
  planId: string;
1105
- phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning";
1204
+ phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
1106
1205
  };
1206
+ type: "plan_execution_failed";
1107
1207
  requestId: string;
1108
1208
  timestamp?: number | undefined;
1109
1209
  }>;
@@ -1150,17 +1250,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1150
1250
  iteration: number;
1151
1251
  }>;
1152
1252
  }, "strip", z.ZodTypeAny, {
1153
- type: "iteration_start";
1154
1253
  data: {
1155
1254
  iteration: number;
1156
1255
  };
1256
+ type: "iteration_start";
1157
1257
  requestId: string;
1158
1258
  timestamp?: number | undefined;
1159
1259
  }, {
1160
- type: "iteration_start";
1161
1260
  data: {
1162
1261
  iteration: number;
1163
1262
  };
1263
+ type: "iteration_start";
1164
1264
  requestId: string;
1165
1265
  timestamp?: number | undefined;
1166
1266
  }>, z.ZodObject<{
@@ -1182,21 +1282,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1182
1282
  shouldContinue: boolean;
1183
1283
  }>;
1184
1284
  }, "strip", z.ZodTypeAny, {
1185
- type: "iteration_end";
1186
1285
  data: {
1187
1286
  iteration: number;
1188
1287
  hasToolCalls: boolean;
1189
1288
  shouldContinue: boolean;
1190
1289
  };
1290
+ type: "iteration_end";
1191
1291
  requestId: string;
1192
1292
  timestamp?: number | undefined;
1193
1293
  }, {
1194
- type: "iteration_end";
1195
1294
  data: {
1196
1295
  iteration: number;
1197
1296
  hasToolCalls: boolean;
1198
1297
  shouldContinue: boolean;
1199
1298
  };
1299
+ type: "iteration_end";
1200
1300
  requestId: string;
1201
1301
  timestamp?: number | undefined;
1202
1302
  }>, z.ZodObject<{
@@ -1209,46 +1309,53 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1209
1309
  tools: z.ZodArray<z.ZodObject<{
1210
1310
  toolCallId: z.ZodString;
1211
1311
  toolName: z.ZodString;
1312
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1212
1313
  }, "strip", z.ZodTypeAny, {
1213
1314
  toolCallId: string;
1214
1315
  toolName: string;
1316
+ args?: Record<string, unknown> | undefined;
1215
1317
  }, {
1216
1318
  toolCallId: string;
1217
1319
  toolName: string;
1320
+ args?: Record<string, unknown> | undefined;
1218
1321
  }>, "many">;
1219
1322
  }, "strip", z.ZodTypeAny, {
1220
1323
  iteration: number;
1221
1324
  tools: {
1222
1325
  toolCallId: string;
1223
1326
  toolName: string;
1327
+ args?: Record<string, unknown> | undefined;
1224
1328
  }[];
1225
1329
  }, {
1226
1330
  iteration: number;
1227
1331
  tools: {
1228
1332
  toolCallId: string;
1229
1333
  toolName: string;
1334
+ args?: Record<string, unknown> | undefined;
1230
1335
  }[];
1231
1336
  }>;
1232
1337
  }, "strip", z.ZodTypeAny, {
1233
- type: "tool_call_batch";
1234
1338
  data: {
1235
1339
  iteration: number;
1236
1340
  tools: {
1237
1341
  toolCallId: string;
1238
1342
  toolName: string;
1343
+ args?: Record<string, unknown> | undefined;
1239
1344
  }[];
1240
1345
  };
1346
+ type: "tool_call_batch";
1241
1347
  requestId: string;
1242
1348
  timestamp?: number | undefined;
1243
1349
  }, {
1244
- type: "tool_call_batch";
1245
1350
  data: {
1246
1351
  iteration: number;
1247
1352
  tools: {
1248
1353
  toolCallId: string;
1249
1354
  toolName: string;
1355
+ args?: Record<string, unknown> | undefined;
1250
1356
  }[];
1251
1357
  };
1358
+ type: "tool_call_batch";
1252
1359
  requestId: string;
1253
1360
  timestamp?: number | undefined;
1254
1361
  }>, z.ZodObject<{
@@ -1262,80 +1369,90 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1262
1369
  status: z.ZodLiteral<"pending">;
1263
1370
  /** Whether a simulation was performed for this pending tool */
1264
1371
  simulated: z.ZodOptional<z.ZodBoolean>;
1372
+ result: z.ZodOptional<z.ZodUnknown>;
1265
1373
  }, "strip", z.ZodTypeAny, {
1266
- status: "pending";
1267
1374
  toolCallId: string;
1268
1375
  toolName: string;
1376
+ status: "pending";
1377
+ result?: unknown;
1269
1378
  simulated?: boolean | undefined;
1270
1379
  }, {
1271
- status: "pending";
1272
1380
  toolCallId: string;
1273
1381
  toolName: string;
1382
+ status: "pending";
1383
+ result?: unknown;
1274
1384
  simulated?: boolean | undefined;
1275
1385
  }>, z.ZodObject<{
1276
1386
  toolCallId: z.ZodString;
1277
1387
  toolName: z.ZodString;
1278
1388
  status: z.ZodLiteral<"success">;
1389
+ result: z.ZodOptional<z.ZodUnknown>;
1279
1390
  }, "strip", z.ZodTypeAny, {
1280
- status: "success";
1281
1391
  toolCallId: string;
1282
1392
  toolName: string;
1283
- }, {
1284
1393
  status: "success";
1394
+ result?: unknown;
1395
+ }, {
1285
1396
  toolCallId: string;
1286
1397
  toolName: string;
1398
+ status: "success";
1399
+ result?: unknown;
1287
1400
  }>, z.ZodObject<{
1288
1401
  toolCallId: z.ZodString;
1289
1402
  toolName: z.ZodString;
1290
1403
  status: z.ZodLiteral<"failure">;
1291
1404
  error: z.ZodString;
1292
1405
  }, "strip", z.ZodTypeAny, {
1293
- status: "failure";
1294
- error: string;
1295
1406
  toolCallId: string;
1296
1407
  toolName: string;
1297
- }, {
1298
1408
  status: "failure";
1299
1409
  error: string;
1410
+ }, {
1300
1411
  toolCallId: string;
1301
1412
  toolName: string;
1413
+ status: "failure";
1414
+ error: string;
1302
1415
  }>]>;
1303
1416
  }, "strip", z.ZodTypeAny, {
1304
- type: "tool_result";
1305
1417
  data: {
1306
- status: "pending";
1307
1418
  toolCallId: string;
1308
1419
  toolName: string;
1420
+ status: "pending";
1421
+ result?: unknown;
1309
1422
  simulated?: boolean | undefined;
1310
1423
  } | {
1311
- status: "success";
1312
1424
  toolCallId: string;
1313
1425
  toolName: string;
1426
+ status: "success";
1427
+ result?: unknown;
1314
1428
  } | {
1315
- status: "failure";
1316
- error: string;
1317
1429
  toolCallId: string;
1318
1430
  toolName: string;
1431
+ status: "failure";
1432
+ error: string;
1319
1433
  };
1434
+ type: "tool_result";
1320
1435
  requestId: string;
1321
1436
  timestamp?: number | undefined;
1322
1437
  }, {
1323
- type: "tool_result";
1324
1438
  data: {
1325
- status: "pending";
1326
1439
  toolCallId: string;
1327
1440
  toolName: string;
1441
+ status: "pending";
1442
+ result?: unknown;
1328
1443
  simulated?: boolean | undefined;
1329
1444
  } | {
1330
- status: "success";
1331
1445
  toolCallId: string;
1332
1446
  toolName: string;
1447
+ status: "success";
1448
+ result?: unknown;
1333
1449
  } | {
1334
- status: "failure";
1335
- error: string;
1336
1450
  toolCallId: string;
1337
1451
  toolName: string;
1452
+ status: "failure";
1453
+ error: string;
1338
1454
  };
1455
+ type: "tool_result";
1339
1456
  requestId: string;
1340
1457
  timestamp?: number | undefined;
1341
1458
  }>, z.ZodObject<{
@@ -1351,17 +1468,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1351
1468
  reason: string;
1352
1469
  }>;
1353
1470
  }, "strip", z.ZodTypeAny, {
1354
- type: "scratchpad_reset";
1355
1471
  data: {
1356
1472
  reason: string;
1357
1473
  };
1474
+ type: "scratchpad_reset";
1358
1475
  requestId: string;
1359
1476
  timestamp?: number | undefined;
1360
1477
  }, {
1361
- type: "scratchpad_reset";
1362
1478
  data: {
1363
1479
  reason: string;
1364
1480
  };
1481
+ type: "scratchpad_reset";
1365
1482
  requestId: string;
1366
1483
  timestamp?: number | undefined;
1367
1484
  }>, z.ZodObject<{
@@ -1377,17 +1494,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1377
1494
  iteration: number;
1378
1495
  }>;
1379
1496
  }, "strip", z.ZodTypeAny, {
1380
- type: "llm_start";
1381
1497
  data: {
1382
1498
  iteration: number;
1383
1499
  };
1500
+ type: "llm_start";
1384
1501
  requestId: string;
1385
1502
  timestamp?: number | undefined;
1386
1503
  }, {
1387
- type: "llm_start";
1388
1504
  data: {
1389
1505
  iteration: number;
1390
1506
  };
1507
+ type: "llm_start";
1391
1508
  requestId: string;
1392
1509
  timestamp?: number | undefined;
1393
1510
  }>, z.ZodObject<{
@@ -1409,21 +1526,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1409
1526
  toolCallCount: number;
1410
1527
  }>;
1411
1528
  }, "strip", z.ZodTypeAny, {
1412
- type: "llm_end";
1413
1529
  data: {
1414
1530
  iteration: number;
1415
1531
  hasText: boolean;
1416
1532
  toolCallCount: number;
1417
1533
  };
1534
+ type: "llm_end";
1418
1535
  requestId: string;
1419
1536
  timestamp?: number | undefined;
1420
1537
  }, {
1421
- type: "llm_end";
1422
1538
  data: {
1423
1539
  iteration: number;
1424
1540
  hasText: boolean;
1425
1541
  toolCallCount: number;
1426
1542
  };
1543
+ type: "llm_end";
1427
1544
  requestId: string;
1428
1545
  timestamp?: number | undefined;
1429
1546
  }>, z.ZodObject<{
@@ -1439,17 +1556,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1439
1556
  delta: string;
1440
1557
  }>;
1441
1558
  }, "strip", z.ZodTypeAny, {
1442
- type: "text_delta";
1443
1559
  data: {
1444
1560
  delta: string;
1445
1561
  };
1562
+ type: "text_delta";
1446
1563
  requestId: string;
1447
1564
  timestamp?: number | undefined;
1448
1565
  }, {
1449
- type: "text_delta";
1450
1566
  data: {
1451
1567
  delta: string;
1452
1568
  };
1569
+ type: "text_delta";
1453
1570
  requestId: string;
1454
1571
  timestamp?: number | undefined;
1455
1572
  }>, z.ZodObject<{
@@ -1471,21 +1588,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1471
1588
  hasToolErrors: boolean;
1472
1589
  }>;
1473
1590
  }, "strip", z.ZodTypeAny, {
1474
- type: "finish";
1475
1591
  data: {
1476
1592
  totalIterations: number;
1477
1593
  hasPendingTools: boolean;
1478
1594
  hasToolErrors: boolean;
1479
1595
  };
1596
+ type: "finish";
1480
1597
  requestId: string;
1481
1598
  timestamp?: number | undefined;
1482
1599
  }, {
1483
- type: "finish";
1484
1600
  data: {
1485
1601
  totalIterations: number;
1486
1602
  hasPendingTools: boolean;
1487
1603
  hasToolErrors: boolean;
1488
1604
  };
1605
+ type: "finish";
1489
1606
  requestId: string;
1490
1607
  timestamp?: number | undefined;
1491
1608
  }>, z.ZodObject<{
@@ -1504,19 +1621,19 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1504
1621
  code?: string | undefined;
1505
1622
  }>;
1506
1623
  }, "strip", z.ZodTypeAny, {
1507
- type: "error";
1508
1624
  data: {
1509
1625
  message: string;
1510
1626
  code?: string | undefined;
1511
1627
  };
1628
+ type: "error";
1512
1629
  requestId: string;
1513
1630
  timestamp?: number | undefined;
1514
1631
  }, {
1515
- type: "error";
1516
1632
  data: {
1517
1633
  message: string;
1518
1634
  code?: string | undefined;
1519
1635
  };
1636
+ type: "error";
1520
1637
  requestId: string;
1521
1638
  timestamp?: number | undefined;
1522
1639
  }>, z.ZodObject<{
@@ -1532,17 +1649,17 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1532
1649
  messageCount: number;
1533
1650
  }>;
1534
1651
  }, "strip", z.ZodTypeAny, {
1535
- type: "plan_generating";
1536
1652
  data: {
1537
1653
  messageCount: number;
1538
1654
  };
1655
+ type: "plan_generating";
1539
1656
  requestId: string;
1540
1657
  timestamp?: number | undefined;
1541
1658
  }, {
1542
- type: "plan_generating";
1543
1659
  data: {
1544
1660
  messageCount: number;
1545
1661
  };
1662
+ type: "plan_generating";
1546
1663
  requestId: string;
1547
1664
  timestamp?: number | undefined;
1548
1665
  }>, z.ZodObject<{
@@ -1576,7 +1693,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1576
1693
  hasConflicts: z.ZodBoolean;
1577
1694
  }, z.ZodTypeAny, "passthrough">>;
1578
1695
  }, "strip", z.ZodTypeAny, {
1579
- type: "plan_generated";
1580
1696
  data: {
1581
1697
  complexity: "low" | "medium" | "high";
1582
1698
  planId: string;
@@ -1588,10 +1704,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1588
1704
  } & {
1589
1705
  [k: string]: unknown;
1590
1706
  };
1707
+ type: "plan_generated";
1591
1708
  requestId: string;
1592
1709
  timestamp?: number | undefined;
1593
1710
  }, {
1594
- type: "plan_generated";
1595
1711
  data: {
1596
1712
  complexity: "low" | "medium" | "high";
1597
1713
  planId: string;
@@ -1603,6 +1719,7 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1603
1719
  } & {
1604
1720
  [k: string]: unknown;
1605
1721
  };
1722
+ type: "plan_generated";
1606
1723
  requestId: string;
1607
1724
  timestamp?: number | undefined;
1608
1725
  }>, z.ZodObject<{
@@ -1627,23 +1744,23 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1627
1744
  planId: string;
1628
1745
  }>;
1629
1746
  }, "strip", z.ZodTypeAny, {
1630
- type: "plan_step_started";
1631
1747
  data: {
1632
1748
  description: string;
1633
1749
  stepNumber: number;
1634
1750
  operationType: "read" | "write";
1635
1751
  planId: string;
1636
1752
  };
1753
+ type: "plan_step_started";
1637
1754
  requestId: string;
1638
1755
  timestamp?: number | undefined;
1639
1756
  }, {
1640
- type: "plan_step_started";
1641
1757
  data: {
1642
1758
  description: string;
1643
1759
  stepNumber: number;
1644
1760
  operationType: "read" | "write";
1645
1761
  planId: string;
1646
1762
  };
1763
+ type: "plan_step_started";
1647
1764
  requestId: string;
1648
1765
  timestamp?: number | undefined;
1649
1766
  }>, z.ZodObject<{
@@ -1674,7 +1791,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1674
1791
  error?: string | undefined;
1675
1792
  }>;
1676
1793
  }, "strip", z.ZodTypeAny, {
1677
- type: "plan_step_retrying";
1678
1794
  data: {
1679
1795
  stepNumber: number;
1680
1796
  planId: string;
@@ -1683,10 +1799,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1683
1799
  phase: "execution" | "simulation";
1684
1800
  error?: string | undefined;
1685
1801
  };
1802
+ type: "plan_step_retrying";
1686
1803
  requestId: string;
1687
1804
  timestamp?: number | undefined;
1688
1805
  }, {
1689
- type: "plan_step_retrying";
1690
1806
  data: {
1691
1807
  stepNumber: number;
1692
1808
  planId: string;
@@ -1695,6 +1811,7 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1695
1811
  phase: "execution" | "simulation";
1696
1812
  error?: string | undefined;
1697
1813
  };
1814
+ type: "plan_step_retrying";
1698
1815
  requestId: string;
1699
1816
  timestamp?: number | undefined;
1700
1817
  }>, z.ZodObject<{
@@ -1719,7 +1836,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1719
1836
  error: z.ZodOptional<z.ZodString>;
1720
1837
  }, z.ZodTypeAny, "passthrough">>;
1721
1838
  }, "strip", z.ZodTypeAny, {
1722
- type: "plan_step_completed";
1723
1839
  data: {
1724
1840
  status: "completed" | "failed" | "skipped";
1725
1841
  stepNumber: number;
@@ -1728,10 +1844,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1728
1844
  } & {
1729
1845
  [k: string]: unknown;
1730
1846
  };
1847
+ type: "plan_step_completed";
1731
1848
  requestId: string;
1732
1849
  timestamp?: number | undefined;
1733
1850
  }, {
1734
- type: "plan_step_completed";
1735
1851
  data: {
1736
1852
  status: "completed" | "failed" | "skipped";
1737
1853
  stepNumber: number;
@@ -1740,6 +1856,7 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1740
1856
  } & {
1741
1857
  [k: string]: unknown;
1742
1858
  };
1859
+ type: "plan_step_completed";
1743
1860
  requestId: string;
1744
1861
  timestamp?: number | undefined;
1745
1862
  }>, z.ZodObject<{
@@ -1761,21 +1878,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1761
1878
  failedStepNumber?: number | undefined;
1762
1879
  }>;
1763
1880
  }, "strip", z.ZodTypeAny, {
1764
- type: "plan_invalidated";
1765
1881
  data: {
1766
1882
  planId: string;
1767
1883
  reason: string;
1768
1884
  failedStepNumber?: number | undefined;
1769
1885
  };
1886
+ type: "plan_invalidated";
1770
1887
  requestId: string;
1771
1888
  timestamp?: number | undefined;
1772
1889
  }, {
1773
- type: "plan_invalidated";
1774
1890
  data: {
1775
1891
  planId: string;
1776
1892
  reason: string;
1777
1893
  failedStepNumber?: number | undefined;
1778
1894
  };
1895
+ type: "plan_invalidated";
1779
1896
  requestId: string;
1780
1897
  timestamp?: number | undefined;
1781
1898
  }>, z.ZodObject<{
@@ -1797,21 +1914,21 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1797
1914
  preservedStepCount: number;
1798
1915
  }>;
1799
1916
  }, "strip", z.ZodTypeAny, {
1800
- type: "replan_started";
1801
1917
  data: {
1802
1918
  previousPlanId: string;
1803
1919
  reason: string;
1804
1920
  preservedStepCount: number;
1805
1921
  };
1922
+ type: "replan_started";
1806
1923
  requestId: string;
1807
1924
  timestamp?: number | undefined;
1808
1925
  }, {
1809
- type: "replan_started";
1810
1926
  data: {
1811
1927
  previousPlanId: string;
1812
1928
  reason: string;
1813
1929
  preservedStepCount: number;
1814
1930
  };
1931
+ type: "replan_started";
1815
1932
  requestId: string;
1816
1933
  timestamp?: number | undefined;
1817
1934
  }>, z.ZodObject<{
@@ -1833,7 +1950,6 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1833
1950
  newVersion: z.ZodNumber;
1834
1951
  }, z.ZodTypeAny, "passthrough">>;
1835
1952
  }, "strip", z.ZodTypeAny, {
1836
- type: "replan_complete";
1837
1953
  data: {
1838
1954
  previousPlanId: string;
1839
1955
  newPlanId: string;
@@ -1841,10 +1957,10 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1841
1957
  } & {
1842
1958
  [k: string]: unknown;
1843
1959
  };
1960
+ type: "replan_complete";
1844
1961
  requestId: string;
1845
1962
  timestamp?: number | undefined;
1846
1963
  }, {
1847
- type: "replan_complete";
1848
1964
  data: {
1849
1965
  previousPlanId: string;
1850
1966
  newPlanId: string;
@@ -1852,6 +1968,7 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1852
1968
  } & {
1853
1969
  [k: string]: unknown;
1854
1970
  };
1971
+ type: "replan_complete";
1855
1972
  requestId: string;
1856
1973
  timestamp?: number | undefined;
1857
1974
  }>, z.ZodObject<{
@@ -1876,23 +1993,102 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1876
1993
  totalSteps: number;
1877
1994
  }>;
1878
1995
  }, "strip", z.ZodTypeAny, {
1879
- type: "plan_execution_complete";
1880
1996
  data: {
1881
1997
  status: "failed" | "complete" | "partial";
1882
1998
  planId: string;
1883
1999
  completedSteps: number;
1884
2000
  totalSteps: number;
1885
2001
  };
2002
+ type: "plan_execution_complete";
1886
2003
  requestId: string;
1887
2004
  timestamp?: number | undefined;
1888
2005
  }, {
1889
- type: "plan_execution_complete";
1890
2006
  data: {
1891
2007
  status: "failed" | "complete" | "partial";
1892
2008
  planId: string;
1893
2009
  completedSteps: number;
1894
2010
  totalSteps: number;
1895
2011
  };
2012
+ type: "plan_execution_complete";
2013
+ requestId: string;
2014
+ timestamp?: number | undefined;
2015
+ }>, z.ZodObject<{
2016
+ requestId: z.ZodString;
2017
+ timestamp: z.ZodOptional<z.ZodNumber>;
2018
+ } & {
2019
+ type: z.ZodLiteral<"plan_expired">;
2020
+ data: z.ZodEffects<z.ZodObject<{
2021
+ planId: z.ZodString;
2022
+ planVersion: z.ZodOptional<z.ZodNumber>;
2023
+ subject: z.ZodEnum<["plan", "session"]>;
2024
+ blockedAction: z.ZodEnum<["initial_acceptance", "replan_acceptance", "step_decision_resume"]>;
2025
+ phase: z.ZodLiteral<"expired">;
2026
+ expiresAt: z.ZodOptional<z.ZodString>;
2027
+ expiredAt: z.ZodString;
2028
+ reason: z.ZodOptional<z.ZodString>;
2029
+ }, "strip", z.ZodTypeAny, {
2030
+ planId: string;
2031
+ phase: "expired";
2032
+ subject: "plan" | "session";
2033
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2034
+ expiredAt: string;
2035
+ expiresAt?: string | undefined;
2036
+ planVersion?: number | undefined;
2037
+ reason?: string | undefined;
2038
+ }, {
2039
+ planId: string;
2040
+ phase: "expired";
2041
+ subject: "plan" | "session";
2042
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2043
+ expiredAt: string;
2044
+ expiresAt?: string | undefined;
2045
+ planVersion?: number | undefined;
2046
+ reason?: string | undefined;
2047
+ }>, {
2048
+ planId: string;
2049
+ phase: "expired";
2050
+ subject: "plan" | "session";
2051
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2052
+ expiredAt: string;
2053
+ expiresAt?: string | undefined;
2054
+ planVersion?: number | undefined;
2055
+ reason?: string | undefined;
2056
+ }, {
2057
+ planId: string;
2058
+ phase: "expired";
2059
+ subject: "plan" | "session";
2060
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2061
+ expiredAt: string;
2062
+ expiresAt?: string | undefined;
2063
+ planVersion?: number | undefined;
2064
+ reason?: string | undefined;
2065
+ }>;
2066
+ }, "strip", z.ZodTypeAny, {
2067
+ data: {
2068
+ planId: string;
2069
+ phase: "expired";
2070
+ subject: "plan" | "session";
2071
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2072
+ expiredAt: string;
2073
+ expiresAt?: string | undefined;
2074
+ planVersion?: number | undefined;
2075
+ reason?: string | undefined;
2076
+ };
2077
+ type: "plan_expired";
2078
+ requestId: string;
2079
+ timestamp?: number | undefined;
2080
+ }, {
2081
+ data: {
2082
+ planId: string;
2083
+ phase: "expired";
2084
+ subject: "plan" | "session";
2085
+ blockedAction: "initial_acceptance" | "replan_acceptance" | "step_decision_resume";
2086
+ expiredAt: string;
2087
+ expiresAt?: string | undefined;
2088
+ planVersion?: number | undefined;
2089
+ reason?: string | undefined;
2090
+ };
2091
+ type: "plan_expired";
1896
2092
  requestId: string;
1897
2093
  timestamp?: number | undefined;
1898
2094
  }>, z.ZodObject<{
@@ -1917,23 +2113,23 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1917
2113
  simulationSummary: string;
1918
2114
  }>;
1919
2115
  }, "strip", z.ZodTypeAny, {
1920
- type: "plan_step_simulated";
1921
2116
  data: {
1922
2117
  stepNumber: number;
1923
2118
  planId: string;
1924
2119
  simulationSuccess: boolean;
1925
2120
  simulationSummary: string;
1926
2121
  };
2122
+ type: "plan_step_simulated";
1927
2123
  requestId: string;
1928
2124
  timestamp?: number | undefined;
1929
2125
  }, {
1930
- type: "plan_step_simulated";
1931
2126
  data: {
1932
2127
  stepNumber: number;
1933
2128
  planId: string;
1934
2129
  simulationSuccess: boolean;
1935
2130
  simulationSummary: string;
1936
2131
  };
2132
+ type: "plan_step_simulated";
1937
2133
  requestId: string;
1938
2134
  timestamp?: number | undefined;
1939
2135
  }>, z.ZodObject<{
@@ -1958,23 +2154,23 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1958
2154
  reason: string;
1959
2155
  }>;
1960
2156
  }, "strip", z.ZodTypeAny, {
1961
- type: "plan_step_verification_passed";
1962
2157
  data: {
1963
2158
  stepNumber: number;
1964
2159
  planId: string;
1965
2160
  confidence: number;
1966
2161
  reason: string;
1967
2162
  };
2163
+ type: "plan_step_verification_passed";
1968
2164
  requestId: string;
1969
2165
  timestamp?: number | undefined;
1970
2166
  }, {
1971
- type: "plan_step_verification_passed";
1972
2167
  data: {
1973
2168
  stepNumber: number;
1974
2169
  planId: string;
1975
2170
  confidence: number;
1976
2171
  reason: string;
1977
2172
  };
2173
+ type: "plan_step_verification_passed";
1978
2174
  requestId: string;
1979
2175
  timestamp?: number | undefined;
1980
2176
  }>, z.ZodObject<{
@@ -1992,12 +2188,12 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
1992
2188
  message: z.ZodString;
1993
2189
  suggestion: z.ZodOptional<z.ZodString>;
1994
2190
  }, "strip", z.ZodTypeAny, {
1995
- message: string;
1996
2191
  type: string;
2192
+ message: string;
1997
2193
  suggestion?: string | undefined;
1998
2194
  }, {
1999
- message: string;
2000
2195
  type: string;
2196
+ message: string;
2001
2197
  suggestion?: string | undefined;
2002
2198
  }>, "many">;
2003
2199
  recommendedAction: z.ZodEnum<["continue", "ask_user", "replan"]>;
@@ -2005,8 +2201,8 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2005
2201
  stepNumber: number;
2006
2202
  planId: string;
2007
2203
  conflicts: {
2008
- message: string;
2009
2204
  type: string;
2205
+ message: string;
2010
2206
  suggestion?: string | undefined;
2011
2207
  }[];
2012
2208
  confidence: number;
@@ -2016,8 +2212,8 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2016
2212
  stepNumber: number;
2017
2213
  planId: string;
2018
2214
  conflicts: {
2019
- message: string;
2020
2215
  type: string;
2216
+ message: string;
2021
2217
  suggestion?: string | undefined;
2022
2218
  }[];
2023
2219
  confidence: number;
@@ -2025,35 +2221,35 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2025
2221
  reason: string;
2026
2222
  }>;
2027
2223
  }, "strip", z.ZodTypeAny, {
2028
- type: "plan_step_verification_failed";
2029
2224
  data: {
2030
2225
  stepNumber: number;
2031
2226
  planId: string;
2032
2227
  conflicts: {
2033
- message: string;
2034
2228
  type: string;
2229
+ message: string;
2035
2230
  suggestion?: string | undefined;
2036
2231
  }[];
2037
2232
  confidence: number;
2038
2233
  recommendedAction: "continue" | "replan" | "ask_user";
2039
2234
  reason: string;
2040
2235
  };
2236
+ type: "plan_step_verification_failed";
2041
2237
  requestId: string;
2042
2238
  timestamp?: number | undefined;
2043
2239
  }, {
2044
- type: "plan_step_verification_failed";
2045
2240
  data: {
2046
2241
  stepNumber: number;
2047
2242
  planId: string;
2048
2243
  conflicts: {
2049
- message: string;
2050
2244
  type: string;
2245
+ message: string;
2051
2246
  suggestion?: string | undefined;
2052
2247
  }[];
2053
2248
  confidence: number;
2054
2249
  recommendedAction: "continue" | "replan" | "ask_user";
2055
2250
  reason: string;
2056
2251
  };
2252
+ type: "plan_step_verification_failed";
2057
2253
  requestId: string;
2058
2254
  timestamp?: number | undefined;
2059
2255
  }>, z.ZodObject<{
@@ -2064,32 +2260,32 @@ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
2064
2260
  data: z.ZodObject<{
2065
2261
  planId: z.ZodString;
2066
2262
  error: z.ZodString;
2067
- phase: z.ZodEnum<["idle", "generating_plan", "awaiting_plan_acceptance", "executing", "awaiting_user_execution", "awaiting_user_decision", "replanning", "completed", "failed"]>;
2263
+ phase: z.ZodEnum<["idle", "generating_plan", "awaiting_plan_acceptance", "executing", "awaiting_user_execution", "awaiting_user_decision", "replanning", "completed", "expired", "failed"]>;
2068
2264
  }, "strip", z.ZodTypeAny, {
2069
2265
  error: string;
2070
2266
  planId: string;
2071
- phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning";
2267
+ phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
2072
2268
  }, {
2073
2269
  error: string;
2074
2270
  planId: string;
2075
- phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning";
2271
+ phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
2076
2272
  }>;
2077
2273
  }, "strip", z.ZodTypeAny, {
2078
- type: "plan_execution_failed";
2079
2274
  data: {
2080
2275
  error: string;
2081
2276
  planId: string;
2082
- phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning";
2277
+ phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
2083
2278
  };
2279
+ type: "plan_execution_failed";
2084
2280
  requestId: string;
2085
2281
  timestamp?: number | undefined;
2086
2282
  }, {
2087
- type: "plan_execution_failed";
2088
2283
  data: {
2089
2284
  error: string;
2090
2285
  planId: string;
2091
- phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning";
2286
+ phase: "completed" | "failed" | "awaiting_user_execution" | "idle" | "generating_plan" | "awaiting_plan_acceptance" | "executing" | "awaiting_user_decision" | "replanning" | "expired";
2092
2287
  };
2288
+ type: "plan_execution_failed";
2093
2289
  requestId: string;
2094
2290
  timestamp?: number | undefined;
2095
2291
  }>]>;
@@ -2135,6 +2331,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
2135
2331
  } | undefined;
2136
2332
  }>, "many">;
2137
2333
  }, "strip", z.ZodTypeAny, {
2334
+ type: "BatchTransactions";
2138
2335
  value: {
2139
2336
  transaction: import("viem").PrepareTransactionRequestReturnType;
2140
2337
  metadata?: {
@@ -2142,8 +2339,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2142
2339
  usdValue?: string | undefined;
2143
2340
  } | undefined;
2144
2341
  }[];
2145
- type: "BatchTransactions";
2146
2342
  }, {
2343
+ type: "BatchTransactions";
2147
2344
  value: {
2148
2345
  transaction: import("viem").PrepareTransactionRequestReturnType;
2149
2346
  metadata?: {
@@ -2151,7 +2348,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
2151
2348
  usdValue?: string | undefined;
2152
2349
  } | undefined;
2153
2350
  }[];
2154
- type: "BatchTransactions";
2155
2351
  }>, z.ZodObject<{
2156
2352
  type: z.ZodLiteral<"SingleTransaction">;
2157
2353
  value: z.ZodObject<{
@@ -2180,6 +2376,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
2180
2376
  } | undefined;
2181
2377
  }>;
2182
2378
  }, "strip", z.ZodTypeAny, {
2379
+ type: "SingleTransaction";
2183
2380
  value: {
2184
2381
  transaction: import("viem").PrepareTransactionRequestReturnType;
2185
2382
  metadata?: {
@@ -2187,8 +2384,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2187
2384
  usdValue?: string | undefined;
2188
2385
  } | undefined;
2189
2386
  };
2190
- type: "SingleTransaction";
2191
2387
  }, {
2388
+ type: "SingleTransaction";
2192
2389
  value: {
2193
2390
  transaction: import("viem").PrepareTransactionRequestReturnType;
2194
2391
  metadata?: {
@@ -2196,7 +2393,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
2196
2393
  usdValue?: string | undefined;
2197
2394
  } | undefined;
2198
2395
  };
2199
- type: "SingleTransaction";
2200
2396
  }>, z.ZodObject<{
2201
2397
  type: z.ZodLiteral<"SignatureRequests">;
2202
2398
  value: z.ZodObject<{
@@ -2341,6 +2537,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
2341
2537
  })[];
2342
2538
  }>;
2343
2539
  }, "strip", z.ZodTypeAny, {
2540
+ type: "SignatureRequests";
2344
2541
  value: {
2345
2542
  signatureRequests: ({
2346
2543
  id: string;
@@ -2366,8 +2563,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2366
2563
  metadata?: Record<string, unknown> | undefined;
2367
2564
  })[];
2368
2565
  };
2369
- type: "SignatureRequests";
2370
2566
  }, {
2567
+ type: "SignatureRequests";
2371
2568
  value: {
2372
2569
  signatureRequests: ({
2373
2570
  id: string;
@@ -2393,7 +2590,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
2393
2590
  metadata?: Record<string, unknown> | undefined;
2394
2591
  })[];
2395
2592
  };
2396
- type: "SignatureRequests";
2397
2593
  }>, z.ZodObject<{
2398
2594
  type: z.ZodLiteral<"ActionSequence">;
2399
2595
  value: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2424,6 +2620,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
2424
2620
  } | undefined;
2425
2621
  }>;
2426
2622
  }, "strip", z.ZodTypeAny, {
2623
+ type: "SingleTransaction";
2427
2624
  value: {
2428
2625
  transaction: import("viem").PrepareTransactionRequestReturnType;
2429
2626
  metadata?: {
@@ -2431,8 +2628,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2431
2628
  usdValue?: string | undefined;
2432
2629
  } | undefined;
2433
2630
  };
2434
- type: "SingleTransaction";
2435
2631
  }, {
2632
+ type: "SingleTransaction";
2436
2633
  value: {
2437
2634
  transaction: import("viem").PrepareTransactionRequestReturnType;
2438
2635
  metadata?: {
@@ -2440,7 +2637,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
2440
2637
  usdValue?: string | undefined;
2441
2638
  } | undefined;
2442
2639
  };
2443
- type: "SingleTransaction";
2444
2640
  }>, z.ZodObject<{
2445
2641
  type: z.ZodLiteral<"BatchTransactions">;
2446
2642
  value: z.ZodArray<z.ZodObject<{
@@ -2469,6 +2665,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
2469
2665
  } | undefined;
2470
2666
  }>, "many">;
2471
2667
  }, "strip", z.ZodTypeAny, {
2668
+ type: "BatchTransactions";
2472
2669
  value: {
2473
2670
  transaction: import("viem").PrepareTransactionRequestReturnType;
2474
2671
  metadata?: {
@@ -2476,8 +2673,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2476
2673
  usdValue?: string | undefined;
2477
2674
  } | undefined;
2478
2675
  }[];
2479
- type: "BatchTransactions";
2480
2676
  }, {
2677
+ type: "BatchTransactions";
2481
2678
  value: {
2482
2679
  transaction: import("viem").PrepareTransactionRequestReturnType;
2483
2680
  metadata?: {
@@ -2485,7 +2682,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
2485
2682
  usdValue?: string | undefined;
2486
2683
  } | undefined;
2487
2684
  }[];
2488
- type: "BatchTransactions";
2489
2685
  }>, z.ZodObject<{
2490
2686
  type: z.ZodLiteral<"SignatureRequests">;
2491
2687
  value: z.ZodObject<{
@@ -2630,6 +2826,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
2630
2826
  })[];
2631
2827
  }>;
2632
2828
  }, "strip", z.ZodTypeAny, {
2829
+ type: "SignatureRequests";
2633
2830
  value: {
2634
2831
  signatureRequests: ({
2635
2832
  id: string;
@@ -2655,8 +2852,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2655
2852
  metadata?: Record<string, unknown> | undefined;
2656
2853
  })[];
2657
2854
  };
2658
- type: "SignatureRequests";
2659
2855
  }, {
2856
+ type: "SignatureRequests";
2660
2857
  value: {
2661
2858
  signatureRequests: ({
2662
2859
  id: string;
@@ -2682,10 +2879,11 @@ export declare const resultEventDataSchema: z.ZodObject<{
2682
2879
  metadata?: Record<string, unknown> | undefined;
2683
2880
  })[];
2684
2881
  };
2685
- type: "SignatureRequests";
2686
2882
  }>]>, "many">;
2687
2883
  }, "strip", z.ZodTypeAny, {
2884
+ type: "ActionSequence";
2688
2885
  value: ({
2886
+ type: "BatchTransactions";
2689
2887
  value: {
2690
2888
  transaction: import("viem").PrepareTransactionRequestReturnType;
2691
2889
  metadata?: {
@@ -2693,8 +2891,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2693
2891
  usdValue?: string | undefined;
2694
2892
  } | undefined;
2695
2893
  }[];
2696
- type: "BatchTransactions";
2697
2894
  } | {
2895
+ type: "SingleTransaction";
2698
2896
  value: {
2699
2897
  transaction: import("viem").PrepareTransactionRequestReturnType;
2700
2898
  metadata?: {
@@ -2702,8 +2900,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2702
2900
  usdValue?: string | undefined;
2703
2901
  } | undefined;
2704
2902
  };
2705
- type: "SingleTransaction";
2706
2903
  } | {
2904
+ type: "SignatureRequests";
2707
2905
  value: {
2708
2906
  signatureRequests: ({
2709
2907
  id: string;
@@ -2729,11 +2927,11 @@ export declare const resultEventDataSchema: z.ZodObject<{
2729
2927
  metadata?: Record<string, unknown> | undefined;
2730
2928
  })[];
2731
2929
  };
2732
- type: "SignatureRequests";
2733
2930
  })[];
2734
- type: "ActionSequence";
2735
2931
  }, {
2932
+ type: "ActionSequence";
2736
2933
  value: ({
2934
+ type: "BatchTransactions";
2737
2935
  value: {
2738
2936
  transaction: import("viem").PrepareTransactionRequestReturnType;
2739
2937
  metadata?: {
@@ -2741,8 +2939,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2741
2939
  usdValue?: string | undefined;
2742
2940
  } | undefined;
2743
2941
  }[];
2744
- type: "BatchTransactions";
2745
2942
  } | {
2943
+ type: "SingleTransaction";
2746
2944
  value: {
2747
2945
  transaction: import("viem").PrepareTransactionRequestReturnType;
2748
2946
  metadata?: {
@@ -2750,8 +2948,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2750
2948
  usdValue?: string | undefined;
2751
2949
  } | undefined;
2752
2950
  };
2753
- type: "SingleTransaction";
2754
2951
  } | {
2952
+ type: "SignatureRequests";
2755
2953
  value: {
2756
2954
  signatureRequests: ({
2757
2955
  id: string;
@@ -2777,9 +2975,7 @@ export declare const resultEventDataSchema: z.ZodObject<{
2777
2975
  metadata?: Record<string, unknown> | undefined;
2778
2976
  })[];
2779
2977
  };
2780
- type: "SignatureRequests";
2781
2978
  })[];
2782
- type: "ActionSequence";
2783
2979
  }>]>;
2784
2980
  } & {
2785
2981
  simulated: z.ZodOptional<z.ZodBoolean>;
@@ -2982,8 +3178,10 @@ export declare const resultEventDataSchema: z.ZodObject<{
2982
3178
  nativeTokenSymbol?: string | undefined;
2983
3179
  }>>;
2984
3180
  }, "strict", z.ZodTypeAny, {
2985
- type: "tool-call";
3181
+ toolCallId: string;
3182
+ toolName: string;
2986
3183
  input: {
3184
+ type: "BatchTransactions";
2987
3185
  value: {
2988
3186
  transaction: import("viem").PrepareTransactionRequestReturnType;
2989
3187
  metadata?: {
@@ -2991,8 +3189,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
2991
3189
  usdValue?: string | undefined;
2992
3190
  } | undefined;
2993
3191
  }[];
2994
- type: "BatchTransactions";
2995
3192
  } | {
3193
+ type: "SingleTransaction";
2996
3194
  value: {
2997
3195
  transaction: import("viem").PrepareTransactionRequestReturnType;
2998
3196
  metadata?: {
@@ -3000,8 +3198,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3000
3198
  usdValue?: string | undefined;
3001
3199
  } | undefined;
3002
3200
  };
3003
- type: "SingleTransaction";
3004
3201
  } | {
3202
+ type: "SignatureRequests";
3005
3203
  value: {
3006
3204
  signatureRequests: ({
3007
3205
  id: string;
@@ -3027,9 +3225,10 @@ export declare const resultEventDataSchema: z.ZodObject<{
3027
3225
  metadata?: Record<string, unknown> | undefined;
3028
3226
  })[];
3029
3227
  };
3030
- type: "SignatureRequests";
3031
3228
  } | {
3229
+ type: "ActionSequence";
3032
3230
  value: ({
3231
+ type: "BatchTransactions";
3033
3232
  value: {
3034
3233
  transaction: import("viem").PrepareTransactionRequestReturnType;
3035
3234
  metadata?: {
@@ -3037,8 +3236,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3037
3236
  usdValue?: string | undefined;
3038
3237
  } | undefined;
3039
3238
  }[];
3040
- type: "BatchTransactions";
3041
3239
  } | {
3240
+ type: "SingleTransaction";
3042
3241
  value: {
3043
3242
  transaction: import("viem").PrepareTransactionRequestReturnType;
3044
3243
  metadata?: {
@@ -3046,8 +3245,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3046
3245
  usdValue?: string | undefined;
3047
3246
  } | undefined;
3048
3247
  };
3049
- type: "SingleTransaction";
3050
3248
  } | {
3249
+ type: "SignatureRequests";
3051
3250
  value: {
3052
3251
  signatureRequests: ({
3053
3252
  id: string;
@@ -3073,12 +3272,9 @@ export declare const resultEventDataSchema: z.ZodObject<{
3073
3272
  metadata?: Record<string, unknown> | undefined;
3074
3273
  })[];
3075
3274
  };
3076
- type: "SignatureRequests";
3077
3275
  })[];
3078
- type: "ActionSequence";
3079
3276
  };
3080
- toolCallId: string;
3081
- toolName: string;
3277
+ type: "tool-call";
3082
3278
  simulated?: boolean | undefined;
3083
3279
  simulation?: {
3084
3280
  willSucceed: boolean;
@@ -3127,8 +3323,10 @@ export declare const resultEventDataSchema: z.ZodObject<{
3127
3323
  nativeTokenSymbol?: string | undefined;
3128
3324
  } | undefined;
3129
3325
  }, {
3130
- type: "tool-call";
3326
+ toolCallId: string;
3327
+ toolName: string;
3131
3328
  input: {
3329
+ type: "BatchTransactions";
3132
3330
  value: {
3133
3331
  transaction: import("viem").PrepareTransactionRequestReturnType;
3134
3332
  metadata?: {
@@ -3136,8 +3334,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3136
3334
  usdValue?: string | undefined;
3137
3335
  } | undefined;
3138
3336
  }[];
3139
- type: "BatchTransactions";
3140
3337
  } | {
3338
+ type: "SingleTransaction";
3141
3339
  value: {
3142
3340
  transaction: import("viem").PrepareTransactionRequestReturnType;
3143
3341
  metadata?: {
@@ -3145,8 +3343,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3145
3343
  usdValue?: string | undefined;
3146
3344
  } | undefined;
3147
3345
  };
3148
- type: "SingleTransaction";
3149
3346
  } | {
3347
+ type: "SignatureRequests";
3150
3348
  value: {
3151
3349
  signatureRequests: ({
3152
3350
  id: string;
@@ -3172,9 +3370,10 @@ export declare const resultEventDataSchema: z.ZodObject<{
3172
3370
  metadata?: Record<string, unknown> | undefined;
3173
3371
  })[];
3174
3372
  };
3175
- type: "SignatureRequests";
3176
3373
  } | {
3374
+ type: "ActionSequence";
3177
3375
  value: ({
3376
+ type: "BatchTransactions";
3178
3377
  value: {
3179
3378
  transaction: import("viem").PrepareTransactionRequestReturnType;
3180
3379
  metadata?: {
@@ -3182,8 +3381,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3182
3381
  usdValue?: string | undefined;
3183
3382
  } | undefined;
3184
3383
  }[];
3185
- type: "BatchTransactions";
3186
3384
  } | {
3385
+ type: "SingleTransaction";
3187
3386
  value: {
3188
3387
  transaction: import("viem").PrepareTransactionRequestReturnType;
3189
3388
  metadata?: {
@@ -3191,8 +3390,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3191
3390
  usdValue?: string | undefined;
3192
3391
  } | undefined;
3193
3392
  };
3194
- type: "SingleTransaction";
3195
3393
  } | {
3394
+ type: "SignatureRequests";
3196
3395
  value: {
3197
3396
  signatureRequests: ({
3198
3397
  id: string;
@@ -3218,12 +3417,9 @@ export declare const resultEventDataSchema: z.ZodObject<{
3218
3417
  metadata?: Record<string, unknown> | undefined;
3219
3418
  })[];
3220
3419
  };
3221
- type: "SignatureRequests";
3222
3420
  })[];
3223
- type: "ActionSequence";
3224
3421
  };
3225
- toolCallId: string;
3226
- toolName: string;
3422
+ type: "tool-call";
3227
3423
  simulated?: boolean | undefined;
3228
3424
  simulation?: {
3229
3425
  willSucceed: boolean;
@@ -3317,17 +3513,15 @@ export declare const resultEventDataSchema: z.ZodObject<{
3317
3513
  message: z.ZodString;
3318
3514
  details: z.ZodOptional<z.ZodUnknown>;
3319
3515
  }, "strict", z.ZodTypeAny, {
3320
- message: string;
3321
3516
  type: "execution";
3517
+ message: string;
3322
3518
  details?: unknown;
3323
3519
  }, {
3324
- message: string;
3325
3520
  type: "execution";
3521
+ message: string;
3326
3522
  details?: unknown;
3327
3523
  }>]>;
3328
3524
  }, "strict", z.ZodTypeAny, {
3329
- id: string;
3330
- name: string;
3331
3525
  data: {
3332
3526
  type: "input";
3333
3527
  errors: {
@@ -3335,13 +3529,13 @@ export declare const resultEventDataSchema: z.ZodObject<{
3335
3529
  message: string;
3336
3530
  }[];
3337
3531
  } | {
3338
- message: string;
3339
3532
  type: "execution";
3533
+ message: string;
3340
3534
  details?: unknown;
3341
3535
  };
3342
- }, {
3343
3536
  id: string;
3344
3537
  name: string;
3538
+ }, {
3345
3539
  data: {
3346
3540
  type: "input";
3347
3541
  errors: {
@@ -3349,21 +3543,25 @@ export declare const resultEventDataSchema: z.ZodObject<{
3349
3543
  message: string;
3350
3544
  }[];
3351
3545
  } | {
3352
- message: string;
3353
3546
  type: "execution";
3547
+ message: string;
3354
3548
  details?: unknown;
3355
3549
  };
3550
+ id: string;
3551
+ name: string;
3356
3552
  }>, "many">>;
3357
3553
  requestId: z.ZodString;
3358
3554
  }, "strip", z.ZodTypeAny, {
3555
+ text: string;
3359
3556
  type: "result";
3360
3557
  status: 200;
3361
- text: string;
3362
3558
  messages: ModelMessage[];
3363
3559
  requestId: string;
3364
3560
  pendingTools?: {
3365
- type: "tool-call";
3561
+ toolCallId: string;
3562
+ toolName: string;
3366
3563
  input: {
3564
+ type: "BatchTransactions";
3367
3565
  value: {
3368
3566
  transaction: import("viem").PrepareTransactionRequestReturnType;
3369
3567
  metadata?: {
@@ -3371,8 +3569,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3371
3569
  usdValue?: string | undefined;
3372
3570
  } | undefined;
3373
3571
  }[];
3374
- type: "BatchTransactions";
3375
3572
  } | {
3573
+ type: "SingleTransaction";
3376
3574
  value: {
3377
3575
  transaction: import("viem").PrepareTransactionRequestReturnType;
3378
3576
  metadata?: {
@@ -3380,8 +3578,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3380
3578
  usdValue?: string | undefined;
3381
3579
  } | undefined;
3382
3580
  };
3383
- type: "SingleTransaction";
3384
3581
  } | {
3582
+ type: "SignatureRequests";
3385
3583
  value: {
3386
3584
  signatureRequests: ({
3387
3585
  id: string;
@@ -3407,9 +3605,10 @@ export declare const resultEventDataSchema: z.ZodObject<{
3407
3605
  metadata?: Record<string, unknown> | undefined;
3408
3606
  })[];
3409
3607
  };
3410
- type: "SignatureRequests";
3411
3608
  } | {
3609
+ type: "ActionSequence";
3412
3610
  value: ({
3611
+ type: "BatchTransactions";
3413
3612
  value: {
3414
3613
  transaction: import("viem").PrepareTransactionRequestReturnType;
3415
3614
  metadata?: {
@@ -3417,8 +3616,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3417
3616
  usdValue?: string | undefined;
3418
3617
  } | undefined;
3419
3618
  }[];
3420
- type: "BatchTransactions";
3421
3619
  } | {
3620
+ type: "SingleTransaction";
3422
3621
  value: {
3423
3622
  transaction: import("viem").PrepareTransactionRequestReturnType;
3424
3623
  metadata?: {
@@ -3426,8 +3625,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3426
3625
  usdValue?: string | undefined;
3427
3626
  } | undefined;
3428
3627
  };
3429
- type: "SingleTransaction";
3430
3628
  } | {
3629
+ type: "SignatureRequests";
3431
3630
  value: {
3432
3631
  signatureRequests: ({
3433
3632
  id: string;
@@ -3453,12 +3652,9 @@ export declare const resultEventDataSchema: z.ZodObject<{
3453
3652
  metadata?: Record<string, unknown> | undefined;
3454
3653
  })[];
3455
3654
  };
3456
- type: "SignatureRequests";
3457
3655
  })[];
3458
- type: "ActionSequence";
3459
3656
  };
3460
- toolCallId: string;
3461
- toolName: string;
3657
+ type: "tool-call";
3462
3658
  simulated?: boolean | undefined;
3463
3659
  simulation?: {
3464
3660
  willSucceed: boolean;
@@ -3513,8 +3709,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
3513
3709
  toolInput?: unknown;
3514
3710
  }[] | undefined;
3515
3711
  toolErrors?: {
3516
- id: string;
3517
- name: string;
3518
3712
  data: {
3519
3713
  type: "input";
3520
3714
  errors: {
@@ -3522,20 +3716,24 @@ export declare const resultEventDataSchema: z.ZodObject<{
3522
3716
  message: string;
3523
3717
  }[];
3524
3718
  } | {
3525
- message: string;
3526
3719
  type: "execution";
3720
+ message: string;
3527
3721
  details?: unknown;
3528
3722
  };
3723
+ id: string;
3724
+ name: string;
3529
3725
  }[] | undefined;
3530
3726
  }, {
3727
+ text: string;
3531
3728
  type: "result";
3532
3729
  status: 200;
3533
- text: string;
3534
3730
  messages: ModelMessage[];
3535
3731
  requestId: string;
3536
3732
  pendingTools?: {
3537
- type: "tool-call";
3733
+ toolCallId: string;
3734
+ toolName: string;
3538
3735
  input: {
3736
+ type: "BatchTransactions";
3539
3737
  value: {
3540
3738
  transaction: import("viem").PrepareTransactionRequestReturnType;
3541
3739
  metadata?: {
@@ -3543,8 +3741,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3543
3741
  usdValue?: string | undefined;
3544
3742
  } | undefined;
3545
3743
  }[];
3546
- type: "BatchTransactions";
3547
3744
  } | {
3745
+ type: "SingleTransaction";
3548
3746
  value: {
3549
3747
  transaction: import("viem").PrepareTransactionRequestReturnType;
3550
3748
  metadata?: {
@@ -3552,8 +3750,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3552
3750
  usdValue?: string | undefined;
3553
3751
  } | undefined;
3554
3752
  };
3555
- type: "SingleTransaction";
3556
3753
  } | {
3754
+ type: "SignatureRequests";
3557
3755
  value: {
3558
3756
  signatureRequests: ({
3559
3757
  id: string;
@@ -3579,9 +3777,10 @@ export declare const resultEventDataSchema: z.ZodObject<{
3579
3777
  metadata?: Record<string, unknown> | undefined;
3580
3778
  })[];
3581
3779
  };
3582
- type: "SignatureRequests";
3583
3780
  } | {
3781
+ type: "ActionSequence";
3584
3782
  value: ({
3783
+ type: "BatchTransactions";
3585
3784
  value: {
3586
3785
  transaction: import("viem").PrepareTransactionRequestReturnType;
3587
3786
  metadata?: {
@@ -3589,8 +3788,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3589
3788
  usdValue?: string | undefined;
3590
3789
  } | undefined;
3591
3790
  }[];
3592
- type: "BatchTransactions";
3593
3791
  } | {
3792
+ type: "SingleTransaction";
3594
3793
  value: {
3595
3794
  transaction: import("viem").PrepareTransactionRequestReturnType;
3596
3795
  metadata?: {
@@ -3598,8 +3797,8 @@ export declare const resultEventDataSchema: z.ZodObject<{
3598
3797
  usdValue?: string | undefined;
3599
3798
  } | undefined;
3600
3799
  };
3601
- type: "SingleTransaction";
3602
3800
  } | {
3801
+ type: "SignatureRequests";
3603
3802
  value: {
3604
3803
  signatureRequests: ({
3605
3804
  id: string;
@@ -3625,12 +3824,9 @@ export declare const resultEventDataSchema: z.ZodObject<{
3625
3824
  metadata?: Record<string, unknown> | undefined;
3626
3825
  })[];
3627
3826
  };
3628
- type: "SignatureRequests";
3629
3827
  })[];
3630
- type: "ActionSequence";
3631
3828
  };
3632
- toolCallId: string;
3633
- toolName: string;
3829
+ type: "tool-call";
3634
3830
  simulated?: boolean | undefined;
3635
3831
  simulation?: {
3636
3832
  willSucceed: boolean;
@@ -3685,8 +3881,6 @@ export declare const resultEventDataSchema: z.ZodObject<{
3685
3881
  toolInput?: unknown;
3686
3882
  }[] | undefined;
3687
3883
  toolErrors?: {
3688
- id: string;
3689
- name: string;
3690
3884
  data: {
3691
3885
  type: "input";
3692
3886
  errors: {
@@ -3694,10 +3888,12 @@ export declare const resultEventDataSchema: z.ZodObject<{
3694
3888
  message: string;
3695
3889
  }[];
3696
3890
  } | {
3697
- message: string;
3698
3891
  type: "execution";
3892
+ message: string;
3699
3893
  details?: unknown;
3700
3894
  };
3895
+ id: string;
3896
+ name: string;
3701
3897
  }[] | undefined;
3702
3898
  }>;
3703
3899
  /**
@@ -3718,19 +3914,19 @@ export declare const errorEventDataSchema: z.ZodObject<{
3718
3914
  code?: string | undefined;
3719
3915
  }>;
3720
3916
  }, "strip", z.ZodTypeAny, {
3721
- type: "error";
3722
3917
  data: {
3723
3918
  message: string;
3724
3919
  code?: string | undefined;
3725
3920
  };
3921
+ type: "error";
3726
3922
  requestId: string;
3727
3923
  timestamp?: number | undefined;
3728
3924
  }, {
3729
- type: "error";
3730
3925
  data: {
3731
3926
  message: string;
3732
3927
  code?: string | undefined;
3733
3928
  };
3929
+ type: "error";
3734
3930
  requestId: string;
3735
3931
  timestamp?: number | undefined;
3736
3932
  }>;
@@ -3791,6 +3987,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3791
3987
  } | undefined;
3792
3988
  }>, "many">;
3793
3989
  }, "strip", z.ZodTypeAny, {
3990
+ type: "BatchTransactions";
3794
3991
  value: {
3795
3992
  transaction: import("viem").PrepareTransactionRequestReturnType;
3796
3993
  metadata?: {
@@ -3798,8 +3995,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3798
3995
  usdValue?: string | undefined;
3799
3996
  } | undefined;
3800
3997
  }[];
3801
- type: "BatchTransactions";
3802
3998
  }, {
3999
+ type: "BatchTransactions";
3803
4000
  value: {
3804
4001
  transaction: import("viem").PrepareTransactionRequestReturnType;
3805
4002
  metadata?: {
@@ -3807,7 +4004,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3807
4004
  usdValue?: string | undefined;
3808
4005
  } | undefined;
3809
4006
  }[];
3810
- type: "BatchTransactions";
3811
4007
  }>, z.ZodObject<{
3812
4008
  type: z.ZodLiteral<"SingleTransaction">;
3813
4009
  value: z.ZodObject<{
@@ -3836,6 +4032,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3836
4032
  } | undefined;
3837
4033
  }>;
3838
4034
  }, "strip", z.ZodTypeAny, {
4035
+ type: "SingleTransaction";
3839
4036
  value: {
3840
4037
  transaction: import("viem").PrepareTransactionRequestReturnType;
3841
4038
  metadata?: {
@@ -3843,8 +4040,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3843
4040
  usdValue?: string | undefined;
3844
4041
  } | undefined;
3845
4042
  };
3846
- type: "SingleTransaction";
3847
4043
  }, {
4044
+ type: "SingleTransaction";
3848
4045
  value: {
3849
4046
  transaction: import("viem").PrepareTransactionRequestReturnType;
3850
4047
  metadata?: {
@@ -3852,7 +4049,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3852
4049
  usdValue?: string | undefined;
3853
4050
  } | undefined;
3854
4051
  };
3855
- type: "SingleTransaction";
3856
4052
  }>, z.ZodObject<{
3857
4053
  type: z.ZodLiteral<"SignatureRequests">;
3858
4054
  value: z.ZodObject<{
@@ -3997,6 +4193,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3997
4193
  })[];
3998
4194
  }>;
3999
4195
  }, "strip", z.ZodTypeAny, {
4196
+ type: "SignatureRequests";
4000
4197
  value: {
4001
4198
  signatureRequests: ({
4002
4199
  id: string;
@@ -4022,8 +4219,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4022
4219
  metadata?: Record<string, unknown> | undefined;
4023
4220
  })[];
4024
4221
  };
4025
- type: "SignatureRequests";
4026
4222
  }, {
4223
+ type: "SignatureRequests";
4027
4224
  value: {
4028
4225
  signatureRequests: ({
4029
4226
  id: string;
@@ -4049,7 +4246,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4049
4246
  metadata?: Record<string, unknown> | undefined;
4050
4247
  })[];
4051
4248
  };
4052
- type: "SignatureRequests";
4053
4249
  }>, z.ZodObject<{
4054
4250
  type: z.ZodLiteral<"ActionSequence">;
4055
4251
  value: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -4080,6 +4276,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4080
4276
  } | undefined;
4081
4277
  }>;
4082
4278
  }, "strip", z.ZodTypeAny, {
4279
+ type: "SingleTransaction";
4083
4280
  value: {
4084
4281
  transaction: import("viem").PrepareTransactionRequestReturnType;
4085
4282
  metadata?: {
@@ -4087,8 +4284,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4087
4284
  usdValue?: string | undefined;
4088
4285
  } | undefined;
4089
4286
  };
4090
- type: "SingleTransaction";
4091
4287
  }, {
4288
+ type: "SingleTransaction";
4092
4289
  value: {
4093
4290
  transaction: import("viem").PrepareTransactionRequestReturnType;
4094
4291
  metadata?: {
@@ -4096,7 +4293,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4096
4293
  usdValue?: string | undefined;
4097
4294
  } | undefined;
4098
4295
  };
4099
- type: "SingleTransaction";
4100
4296
  }>, z.ZodObject<{
4101
4297
  type: z.ZodLiteral<"BatchTransactions">;
4102
4298
  value: z.ZodArray<z.ZodObject<{
@@ -4125,6 +4321,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4125
4321
  } | undefined;
4126
4322
  }>, "many">;
4127
4323
  }, "strip", z.ZodTypeAny, {
4324
+ type: "BatchTransactions";
4128
4325
  value: {
4129
4326
  transaction: import("viem").PrepareTransactionRequestReturnType;
4130
4327
  metadata?: {
@@ -4132,8 +4329,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4132
4329
  usdValue?: string | undefined;
4133
4330
  } | undefined;
4134
4331
  }[];
4135
- type: "BatchTransactions";
4136
4332
  }, {
4333
+ type: "BatchTransactions";
4137
4334
  value: {
4138
4335
  transaction: import("viem").PrepareTransactionRequestReturnType;
4139
4336
  metadata?: {
@@ -4141,7 +4338,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4141
4338
  usdValue?: string | undefined;
4142
4339
  } | undefined;
4143
4340
  }[];
4144
- type: "BatchTransactions";
4145
4341
  }>, z.ZodObject<{
4146
4342
  type: z.ZodLiteral<"SignatureRequests">;
4147
4343
  value: z.ZodObject<{
@@ -4286,6 +4482,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4286
4482
  })[];
4287
4483
  }>;
4288
4484
  }, "strip", z.ZodTypeAny, {
4485
+ type: "SignatureRequests";
4289
4486
  value: {
4290
4487
  signatureRequests: ({
4291
4488
  id: string;
@@ -4311,8 +4508,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4311
4508
  metadata?: Record<string, unknown> | undefined;
4312
4509
  })[];
4313
4510
  };
4314
- type: "SignatureRequests";
4315
4511
  }, {
4512
+ type: "SignatureRequests";
4316
4513
  value: {
4317
4514
  signatureRequests: ({
4318
4515
  id: string;
@@ -4338,10 +4535,11 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4338
4535
  metadata?: Record<string, unknown> | undefined;
4339
4536
  })[];
4340
4537
  };
4341
- type: "SignatureRequests";
4342
4538
  }>]>, "many">;
4343
4539
  }, "strip", z.ZodTypeAny, {
4540
+ type: "ActionSequence";
4344
4541
  value: ({
4542
+ type: "BatchTransactions";
4345
4543
  value: {
4346
4544
  transaction: import("viem").PrepareTransactionRequestReturnType;
4347
4545
  metadata?: {
@@ -4349,8 +4547,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4349
4547
  usdValue?: string | undefined;
4350
4548
  } | undefined;
4351
4549
  }[];
4352
- type: "BatchTransactions";
4353
4550
  } | {
4551
+ type: "SingleTransaction";
4354
4552
  value: {
4355
4553
  transaction: import("viem").PrepareTransactionRequestReturnType;
4356
4554
  metadata?: {
@@ -4358,8 +4556,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4358
4556
  usdValue?: string | undefined;
4359
4557
  } | undefined;
4360
4558
  };
4361
- type: "SingleTransaction";
4362
4559
  } | {
4560
+ type: "SignatureRequests";
4363
4561
  value: {
4364
4562
  signatureRequests: ({
4365
4563
  id: string;
@@ -4385,11 +4583,11 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4385
4583
  metadata?: Record<string, unknown> | undefined;
4386
4584
  })[];
4387
4585
  };
4388
- type: "SignatureRequests";
4389
4586
  })[];
4390
- type: "ActionSequence";
4391
4587
  }, {
4588
+ type: "ActionSequence";
4392
4589
  value: ({
4590
+ type: "BatchTransactions";
4393
4591
  value: {
4394
4592
  transaction: import("viem").PrepareTransactionRequestReturnType;
4395
4593
  metadata?: {
@@ -4397,8 +4595,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4397
4595
  usdValue?: string | undefined;
4398
4596
  } | undefined;
4399
4597
  }[];
4400
- type: "BatchTransactions";
4401
4598
  } | {
4599
+ type: "SingleTransaction";
4402
4600
  value: {
4403
4601
  transaction: import("viem").PrepareTransactionRequestReturnType;
4404
4602
  metadata?: {
@@ -4406,8 +4604,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4406
4604
  usdValue?: string | undefined;
4407
4605
  } | undefined;
4408
4606
  };
4409
- type: "SingleTransaction";
4410
4607
  } | {
4608
+ type: "SignatureRequests";
4411
4609
  value: {
4412
4610
  signatureRequests: ({
4413
4611
  id: string;
@@ -4433,9 +4631,7 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4433
4631
  metadata?: Record<string, unknown> | undefined;
4434
4632
  })[];
4435
4633
  };
4436
- type: "SignatureRequests";
4437
4634
  })[];
4438
- type: "ActionSequence";
4439
4635
  }>]>;
4440
4636
  } & {
4441
4637
  simulated: z.ZodOptional<z.ZodBoolean>;
@@ -4638,8 +4834,10 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4638
4834
  nativeTokenSymbol?: string | undefined;
4639
4835
  }>>;
4640
4836
  }, "strict", z.ZodTypeAny, {
4641
- type: "tool-call";
4837
+ toolCallId: string;
4838
+ toolName: string;
4642
4839
  input: {
4840
+ type: "BatchTransactions";
4643
4841
  value: {
4644
4842
  transaction: import("viem").PrepareTransactionRequestReturnType;
4645
4843
  metadata?: {
@@ -4647,8 +4845,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4647
4845
  usdValue?: string | undefined;
4648
4846
  } | undefined;
4649
4847
  }[];
4650
- type: "BatchTransactions";
4651
4848
  } | {
4849
+ type: "SingleTransaction";
4652
4850
  value: {
4653
4851
  transaction: import("viem").PrepareTransactionRequestReturnType;
4654
4852
  metadata?: {
@@ -4656,8 +4854,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4656
4854
  usdValue?: string | undefined;
4657
4855
  } | undefined;
4658
4856
  };
4659
- type: "SingleTransaction";
4660
4857
  } | {
4858
+ type: "SignatureRequests";
4661
4859
  value: {
4662
4860
  signatureRequests: ({
4663
4861
  id: string;
@@ -4683,9 +4881,10 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4683
4881
  metadata?: Record<string, unknown> | undefined;
4684
4882
  })[];
4685
4883
  };
4686
- type: "SignatureRequests";
4687
4884
  } | {
4885
+ type: "ActionSequence";
4688
4886
  value: ({
4887
+ type: "BatchTransactions";
4689
4888
  value: {
4690
4889
  transaction: import("viem").PrepareTransactionRequestReturnType;
4691
4890
  metadata?: {
@@ -4693,8 +4892,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4693
4892
  usdValue?: string | undefined;
4694
4893
  } | undefined;
4695
4894
  }[];
4696
- type: "BatchTransactions";
4697
4895
  } | {
4896
+ type: "SingleTransaction";
4698
4897
  value: {
4699
4898
  transaction: import("viem").PrepareTransactionRequestReturnType;
4700
4899
  metadata?: {
@@ -4702,8 +4901,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4702
4901
  usdValue?: string | undefined;
4703
4902
  } | undefined;
4704
4903
  };
4705
- type: "SingleTransaction";
4706
4904
  } | {
4905
+ type: "SignatureRequests";
4707
4906
  value: {
4708
4907
  signatureRequests: ({
4709
4908
  id: string;
@@ -4729,12 +4928,9 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4729
4928
  metadata?: Record<string, unknown> | undefined;
4730
4929
  })[];
4731
4930
  };
4732
- type: "SignatureRequests";
4733
4931
  })[];
4734
- type: "ActionSequence";
4735
4932
  };
4736
- toolCallId: string;
4737
- toolName: string;
4933
+ type: "tool-call";
4738
4934
  simulated?: boolean | undefined;
4739
4935
  simulation?: {
4740
4936
  willSucceed: boolean;
@@ -4783,8 +4979,10 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4783
4979
  nativeTokenSymbol?: string | undefined;
4784
4980
  } | undefined;
4785
4981
  }, {
4786
- type: "tool-call";
4982
+ toolCallId: string;
4983
+ toolName: string;
4787
4984
  input: {
4985
+ type: "BatchTransactions";
4788
4986
  value: {
4789
4987
  transaction: import("viem").PrepareTransactionRequestReturnType;
4790
4988
  metadata?: {
@@ -4792,8 +4990,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4792
4990
  usdValue?: string | undefined;
4793
4991
  } | undefined;
4794
4992
  }[];
4795
- type: "BatchTransactions";
4796
4993
  } | {
4994
+ type: "SingleTransaction";
4797
4995
  value: {
4798
4996
  transaction: import("viem").PrepareTransactionRequestReturnType;
4799
4997
  metadata?: {
@@ -4801,8 +4999,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4801
4999
  usdValue?: string | undefined;
4802
5000
  } | undefined;
4803
5001
  };
4804
- type: "SingleTransaction";
4805
5002
  } | {
5003
+ type: "SignatureRequests";
4806
5004
  value: {
4807
5005
  signatureRequests: ({
4808
5006
  id: string;
@@ -4828,9 +5026,10 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4828
5026
  metadata?: Record<string, unknown> | undefined;
4829
5027
  })[];
4830
5028
  };
4831
- type: "SignatureRequests";
4832
5029
  } | {
5030
+ type: "ActionSequence";
4833
5031
  value: ({
5032
+ type: "BatchTransactions";
4834
5033
  value: {
4835
5034
  transaction: import("viem").PrepareTransactionRequestReturnType;
4836
5035
  metadata?: {
@@ -4838,8 +5037,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4838
5037
  usdValue?: string | undefined;
4839
5038
  } | undefined;
4840
5039
  }[];
4841
- type: "BatchTransactions";
4842
5040
  } | {
5041
+ type: "SingleTransaction";
4843
5042
  value: {
4844
5043
  transaction: import("viem").PrepareTransactionRequestReturnType;
4845
5044
  metadata?: {
@@ -4847,8 +5046,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4847
5046
  usdValue?: string | undefined;
4848
5047
  } | undefined;
4849
5048
  };
4850
- type: "SingleTransaction";
4851
5049
  } | {
5050
+ type: "SignatureRequests";
4852
5051
  value: {
4853
5052
  signatureRequests: ({
4854
5053
  id: string;
@@ -4874,12 +5073,9 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4874
5073
  metadata?: Record<string, unknown> | undefined;
4875
5074
  })[];
4876
5075
  };
4877
- type: "SignatureRequests";
4878
5076
  })[];
4879
- type: "ActionSequence";
4880
5077
  };
4881
- toolCallId: string;
4882
- toolName: string;
5078
+ type: "tool-call";
4883
5079
  simulated?: boolean | undefined;
4884
5080
  simulation?: {
4885
5081
  willSucceed: boolean;
@@ -4973,17 +5169,15 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4973
5169
  message: z.ZodString;
4974
5170
  details: z.ZodOptional<z.ZodUnknown>;
4975
5171
  }, "strict", z.ZodTypeAny, {
4976
- message: string;
4977
5172
  type: "execution";
5173
+ message: string;
4978
5174
  details?: unknown;
4979
5175
  }, {
4980
- message: string;
4981
5176
  type: "execution";
5177
+ message: string;
4982
5178
  details?: unknown;
4983
5179
  }>]>;
4984
5180
  }, "strict", z.ZodTypeAny, {
4985
- id: string;
4986
- name: string;
4987
5181
  data: {
4988
5182
  type: "input";
4989
5183
  errors: {
@@ -4991,13 +5185,13 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4991
5185
  message: string;
4992
5186
  }[];
4993
5187
  } | {
4994
- message: string;
4995
5188
  type: "execution";
5189
+ message: string;
4996
5190
  details?: unknown;
4997
5191
  };
4998
- }, {
4999
5192
  id: string;
5000
5193
  name: string;
5194
+ }, {
5001
5195
  data: {
5002
5196
  type: "input";
5003
5197
  errors: {
@@ -5005,21 +5199,25 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5005
5199
  message: string;
5006
5200
  }[];
5007
5201
  } | {
5008
- message: string;
5009
5202
  type: "execution";
5203
+ message: string;
5010
5204
  details?: unknown;
5011
5205
  };
5206
+ id: string;
5207
+ name: string;
5012
5208
  }>, "many">>;
5013
5209
  requestId: z.ZodString;
5014
5210
  }, "strip", z.ZodTypeAny, {
5211
+ text: string;
5015
5212
  type: "result";
5016
5213
  status: 200;
5017
- text: string;
5018
5214
  messages: ModelMessage[];
5019
5215
  requestId: string;
5020
5216
  pendingTools?: {
5021
- type: "tool-call";
5217
+ toolCallId: string;
5218
+ toolName: string;
5022
5219
  input: {
5220
+ type: "BatchTransactions";
5023
5221
  value: {
5024
5222
  transaction: import("viem").PrepareTransactionRequestReturnType;
5025
5223
  metadata?: {
@@ -5027,8 +5225,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5027
5225
  usdValue?: string | undefined;
5028
5226
  } | undefined;
5029
5227
  }[];
5030
- type: "BatchTransactions";
5031
5228
  } | {
5229
+ type: "SingleTransaction";
5032
5230
  value: {
5033
5231
  transaction: import("viem").PrepareTransactionRequestReturnType;
5034
5232
  metadata?: {
@@ -5036,8 +5234,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5036
5234
  usdValue?: string | undefined;
5037
5235
  } | undefined;
5038
5236
  };
5039
- type: "SingleTransaction";
5040
5237
  } | {
5238
+ type: "SignatureRequests";
5041
5239
  value: {
5042
5240
  signatureRequests: ({
5043
5241
  id: string;
@@ -5063,9 +5261,10 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5063
5261
  metadata?: Record<string, unknown> | undefined;
5064
5262
  })[];
5065
5263
  };
5066
- type: "SignatureRequests";
5067
5264
  } | {
5265
+ type: "ActionSequence";
5068
5266
  value: ({
5267
+ type: "BatchTransactions";
5069
5268
  value: {
5070
5269
  transaction: import("viem").PrepareTransactionRequestReturnType;
5071
5270
  metadata?: {
@@ -5073,8 +5272,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5073
5272
  usdValue?: string | undefined;
5074
5273
  } | undefined;
5075
5274
  }[];
5076
- type: "BatchTransactions";
5077
5275
  } | {
5276
+ type: "SingleTransaction";
5078
5277
  value: {
5079
5278
  transaction: import("viem").PrepareTransactionRequestReturnType;
5080
5279
  metadata?: {
@@ -5082,8 +5281,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5082
5281
  usdValue?: string | undefined;
5083
5282
  } | undefined;
5084
5283
  };
5085
- type: "SingleTransaction";
5086
5284
  } | {
5285
+ type: "SignatureRequests";
5087
5286
  value: {
5088
5287
  signatureRequests: ({
5089
5288
  id: string;
@@ -5109,12 +5308,9 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5109
5308
  metadata?: Record<string, unknown> | undefined;
5110
5309
  })[];
5111
5310
  };
5112
- type: "SignatureRequests";
5113
5311
  })[];
5114
- type: "ActionSequence";
5115
5312
  };
5116
- toolCallId: string;
5117
- toolName: string;
5313
+ type: "tool-call";
5118
5314
  simulated?: boolean | undefined;
5119
5315
  simulation?: {
5120
5316
  willSucceed: boolean;
@@ -5169,8 +5365,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5169
5365
  toolInput?: unknown;
5170
5366
  }[] | undefined;
5171
5367
  toolErrors?: {
5172
- id: string;
5173
- name: string;
5174
5368
  data: {
5175
5369
  type: "input";
5176
5370
  errors: {
@@ -5178,20 +5372,24 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5178
5372
  message: string;
5179
5373
  }[];
5180
5374
  } | {
5181
- message: string;
5182
5375
  type: "execution";
5376
+ message: string;
5183
5377
  details?: unknown;
5184
5378
  };
5379
+ id: string;
5380
+ name: string;
5185
5381
  }[] | undefined;
5186
5382
  }, {
5383
+ text: string;
5187
5384
  type: "result";
5188
5385
  status: 200;
5189
- text: string;
5190
5386
  messages: ModelMessage[];
5191
5387
  requestId: string;
5192
5388
  pendingTools?: {
5193
- type: "tool-call";
5389
+ toolCallId: string;
5390
+ toolName: string;
5194
5391
  input: {
5392
+ type: "BatchTransactions";
5195
5393
  value: {
5196
5394
  transaction: import("viem").PrepareTransactionRequestReturnType;
5197
5395
  metadata?: {
@@ -5199,8 +5397,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5199
5397
  usdValue?: string | undefined;
5200
5398
  } | undefined;
5201
5399
  }[];
5202
- type: "BatchTransactions";
5203
5400
  } | {
5401
+ type: "SingleTransaction";
5204
5402
  value: {
5205
5403
  transaction: import("viem").PrepareTransactionRequestReturnType;
5206
5404
  metadata?: {
@@ -5208,8 +5406,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5208
5406
  usdValue?: string | undefined;
5209
5407
  } | undefined;
5210
5408
  };
5211
- type: "SingleTransaction";
5212
5409
  } | {
5410
+ type: "SignatureRequests";
5213
5411
  value: {
5214
5412
  signatureRequests: ({
5215
5413
  id: string;
@@ -5235,9 +5433,10 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5235
5433
  metadata?: Record<string, unknown> | undefined;
5236
5434
  })[];
5237
5435
  };
5238
- type: "SignatureRequests";
5239
5436
  } | {
5437
+ type: "ActionSequence";
5240
5438
  value: ({
5439
+ type: "BatchTransactions";
5241
5440
  value: {
5242
5441
  transaction: import("viem").PrepareTransactionRequestReturnType;
5243
5442
  metadata?: {
@@ -5245,8 +5444,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5245
5444
  usdValue?: string | undefined;
5246
5445
  } | undefined;
5247
5446
  }[];
5248
- type: "BatchTransactions";
5249
5447
  } | {
5448
+ type: "SingleTransaction";
5250
5449
  value: {
5251
5450
  transaction: import("viem").PrepareTransactionRequestReturnType;
5252
5451
  metadata?: {
@@ -5254,8 +5453,8 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5254
5453
  usdValue?: string | undefined;
5255
5454
  } | undefined;
5256
5455
  };
5257
- type: "SingleTransaction";
5258
5456
  } | {
5457
+ type: "SignatureRequests";
5259
5458
  value: {
5260
5459
  signatureRequests: ({
5261
5460
  id: string;
@@ -5281,12 +5480,9 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5281
5480
  metadata?: Record<string, unknown> | undefined;
5282
5481
  })[];
5283
5482
  };
5284
- type: "SignatureRequests";
5285
5483
  })[];
5286
- type: "ActionSequence";
5287
5484
  };
5288
- toolCallId: string;
5289
- toolName: string;
5485
+ type: "tool-call";
5290
5486
  simulated?: boolean | undefined;
5291
5487
  simulation?: {
5292
5488
  willSucceed: boolean;
@@ -5341,8 +5537,6 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5341
5537
  toolInput?: unknown;
5342
5538
  }[] | undefined;
5343
5539
  toolErrors?: {
5344
- id: string;
5345
- name: string;
5346
5540
  data: {
5347
5541
  type: "input";
5348
5542
  errors: {
@@ -5350,10 +5544,12 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5350
5544
  message: string;
5351
5545
  }[];
5352
5546
  } | {
5353
- message: string;
5354
5547
  type: "execution";
5548
+ message: string;
5355
5549
  details?: unknown;
5356
5550
  };
5551
+ id: string;
5552
+ name: string;
5357
5553
  }[] | undefined;
5358
5554
  }>, z.ZodObject<{
5359
5555
  type: z.ZodLiteral<"error">;
@@ -5370,19 +5566,19 @@ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.Z
5370
5566
  code?: string | undefined;
5371
5567
  }>;
5372
5568
  }, "strip", z.ZodTypeAny, {
5373
- type: "error";
5374
5569
  data: {
5375
5570
  message: string;
5376
5571
  code?: string | undefined;
5377
5572
  };
5573
+ type: "error";
5378
5574
  requestId: string;
5379
5575
  timestamp?: number | undefined;
5380
5576
  }, {
5381
- type: "error";
5382
5577
  data: {
5383
5578
  message: string;
5384
5579
  code?: string | undefined;
5385
5580
  };
5581
+ type: "error";
5386
5582
  requestId: string;
5387
5583
  timestamp?: number | undefined;
5388
5584
  }>, z.ZodObject<{