@kmmao/happy-wire 0.2.1 → 0.2.3

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.
package/dist/index.d.cts CHANGED
@@ -11,9 +11,9 @@ declare const MessageMetaSchema: z.ZodObject<{
11
11
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
12
12
  displayText: z.ZodOptional<z.ZodString>;
13
13
  }, "strip", z.ZodTypeAny, {
14
+ model?: string | null | undefined;
14
15
  sentFrom?: string | undefined;
15
16
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
16
- model?: string | null | undefined;
17
17
  fallbackModel?: string | null | undefined;
18
18
  customSystemPrompt?: string | null | undefined;
19
19
  appendSystemPrompt?: string | null | undefined;
@@ -21,9 +21,9 @@ declare const MessageMetaSchema: z.ZodObject<{
21
21
  disallowedTools?: string[] | null | undefined;
22
22
  displayText?: string | undefined;
23
23
  }, {
24
+ model?: string | null | undefined;
24
25
  sentFrom?: string | undefined;
25
26
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
26
- model?: string | null | undefined;
27
27
  fallbackModel?: string | null | undefined;
28
28
  customSystemPrompt?: string | null | undefined;
29
29
  appendSystemPrompt?: string | null | undefined;
@@ -61,22 +61,22 @@ declare const SessionMessageSchema: z.ZodObject<{
61
61
  createdAt: z.ZodNumber;
62
62
  updatedAt: z.ZodNumber;
63
63
  }, "strip", z.ZodTypeAny, {
64
+ id: string;
65
+ seq: number;
64
66
  content: {
65
67
  c: string;
66
68
  t: "encrypted";
67
69
  };
68
- id: string;
69
- seq: number;
70
70
  createdAt: number;
71
71
  updatedAt: number;
72
72
  localId?: string | null | undefined;
73
73
  }, {
74
+ id: string;
75
+ seq: number;
74
76
  content: {
75
77
  c: string;
76
78
  t: "encrypted";
77
79
  };
78
- id: string;
79
- seq: number;
80
80
  createdAt: number;
81
81
  updatedAt: number;
82
82
  localId?: string | null | undefined;
@@ -96,22 +96,22 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
96
96
  text: z.ZodString;
97
97
  thinking: z.ZodOptional<z.ZodBoolean>;
98
98
  }, "strip", z.ZodTypeAny, {
99
- text: string;
100
99
  t: "text";
100
+ text: string;
101
101
  thinking?: boolean | undefined;
102
102
  }, {
103
- text: string;
104
103
  t: "text";
104
+ text: string;
105
105
  thinking?: boolean | undefined;
106
106
  }>, z.ZodObject<{
107
107
  t: z.ZodLiteral<"service">;
108
108
  text: z.ZodString;
109
109
  }, "strip", z.ZodTypeAny, {
110
- text: string;
111
110
  t: "service";
112
- }, {
113
111
  text: string;
112
+ }, {
114
113
  t: "service";
114
+ text: string;
115
115
  }>, z.ZodObject<{
116
116
  t: z.ZodLiteral<"tool-call-start">;
117
117
  call: z.ZodString;
@@ -217,8 +217,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
217
217
  }>>;
218
218
  durationMs: z.ZodOptional<z.ZodNumber>;
219
219
  }, "strip", z.ZodTypeAny, {
220
- status: "completed" | "failed" | "cancelled";
221
220
  t: "turn-end";
221
+ status: "completed" | "failed" | "cancelled";
222
222
  model?: string | undefined;
223
223
  usage?: {
224
224
  input_tokens: number;
@@ -228,8 +228,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
228
228
  } | undefined;
229
229
  durationMs?: number | undefined;
230
230
  }, {
231
- status: "completed" | "failed" | "cancelled";
232
231
  t: "turn-end";
232
+ status: "completed" | "failed" | "cancelled";
233
233
  model?: string | undefined;
234
234
  usage?: {
235
235
  input_tokens: number;
@@ -284,18 +284,139 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
284
284
  };
285
285
  model?: string | undefined;
286
286
  durationMs?: number | undefined;
287
+ }>, z.ZodObject<{
288
+ t: z.ZodLiteral<"task-start">;
289
+ taskId: z.ZodString;
290
+ toolUseId: z.ZodOptional<z.ZodString>;
291
+ description: z.ZodString;
292
+ taskType: z.ZodOptional<z.ZodString>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ t: "task-start";
295
+ description: string;
296
+ taskId: string;
297
+ toolUseId?: string | undefined;
298
+ taskType?: string | undefined;
299
+ }, {
300
+ t: "task-start";
301
+ description: string;
302
+ taskId: string;
303
+ toolUseId?: string | undefined;
304
+ taskType?: string | undefined;
305
+ }>, z.ZodObject<{
306
+ t: z.ZodLiteral<"task-progress">;
307
+ taskId: z.ZodString;
308
+ description: z.ZodString;
309
+ usage: z.ZodObject<{
310
+ totalTokens: z.ZodNumber;
311
+ toolUses: z.ZodNumber;
312
+ durationMs: z.ZodNumber;
313
+ }, "strip", z.ZodTypeAny, {
314
+ durationMs: number;
315
+ totalTokens: number;
316
+ toolUses: number;
317
+ }, {
318
+ durationMs: number;
319
+ totalTokens: number;
320
+ toolUses: number;
321
+ }>;
322
+ lastToolName: z.ZodOptional<z.ZodString>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ t: "task-progress";
325
+ description: string;
326
+ usage: {
327
+ durationMs: number;
328
+ totalTokens: number;
329
+ toolUses: number;
330
+ };
331
+ taskId: string;
332
+ lastToolName?: string | undefined;
333
+ }, {
334
+ t: "task-progress";
335
+ description: string;
336
+ usage: {
337
+ durationMs: number;
338
+ totalTokens: number;
339
+ toolUses: number;
340
+ };
341
+ taskId: string;
342
+ lastToolName?: string | undefined;
343
+ }>, z.ZodObject<{
344
+ t: z.ZodLiteral<"task-end">;
345
+ taskId: z.ZodString;
346
+ status: z.ZodEnum<["completed", "failed", "stopped"]>;
347
+ summary: z.ZodString;
348
+ usage: z.ZodOptional<z.ZodObject<{
349
+ totalTokens: z.ZodNumber;
350
+ toolUses: z.ZodNumber;
351
+ durationMs: z.ZodNumber;
352
+ }, "strip", z.ZodTypeAny, {
353
+ durationMs: number;
354
+ totalTokens: number;
355
+ toolUses: number;
356
+ }, {
357
+ durationMs: number;
358
+ totalTokens: number;
359
+ toolUses: number;
360
+ }>>;
361
+ }, "strip", z.ZodTypeAny, {
362
+ t: "task-end";
363
+ status: "completed" | "failed" | "stopped";
364
+ taskId: string;
365
+ summary: string;
366
+ usage?: {
367
+ durationMs: number;
368
+ totalTokens: number;
369
+ toolUses: number;
370
+ } | undefined;
371
+ }, {
372
+ t: "task-end";
373
+ status: "completed" | "failed" | "stopped";
374
+ taskId: string;
375
+ summary: string;
376
+ usage?: {
377
+ durationMs: number;
378
+ totalTokens: number;
379
+ toolUses: number;
380
+ } | undefined;
381
+ }>, z.ZodObject<{
382
+ t: z.ZodLiteral<"tool-progress">;
383
+ toolUseId: z.ZodString;
384
+ toolName: z.ZodString;
385
+ elapsedSeconds: z.ZodNumber;
386
+ taskId: z.ZodOptional<z.ZodString>;
387
+ }, "strip", z.ZodTypeAny, {
388
+ t: "tool-progress";
389
+ toolUseId: string;
390
+ toolName: string;
391
+ elapsedSeconds: number;
392
+ taskId?: string | undefined;
393
+ }, {
394
+ t: "tool-progress";
395
+ toolUseId: string;
396
+ toolName: string;
397
+ elapsedSeconds: number;
398
+ taskId?: string | undefined;
399
+ }>, z.ZodObject<{
400
+ t: z.ZodLiteral<"prompt-suggestion">;
401
+ suggestion: z.ZodString;
402
+ }, "strip", z.ZodTypeAny, {
403
+ t: "prompt-suggestion";
404
+ suggestion: string;
405
+ }, {
406
+ t: "prompt-suggestion";
407
+ suggestion: string;
287
408
  }>]>;
288
409
  }, "strip", z.ZodTypeAny, {
289
- role: "user" | "agent";
290
410
  id: string;
411
+ role: "user" | "agent";
291
412
  time: number;
292
413
  ev: {
293
- text: string;
294
414
  t: "text";
415
+ text: string;
295
416
  thinking?: boolean | undefined;
296
417
  } | {
297
- text: string;
298
418
  t: "service";
419
+ text: string;
299
420
  } | {
300
421
  t: "tool-call-start";
301
422
  call: string;
@@ -322,8 +443,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
322
443
  t: "start";
323
444
  title?: string | undefined;
324
445
  } | {
325
- status: "completed" | "failed" | "cancelled";
326
446
  t: "turn-end";
447
+ status: "completed" | "failed" | "cancelled";
327
448
  model?: string | undefined;
328
449
  usage?: {
329
450
  input_tokens: number;
@@ -344,20 +465,55 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
344
465
  };
345
466
  model?: string | undefined;
346
467
  durationMs?: number | undefined;
468
+ } | {
469
+ t: "task-start";
470
+ description: string;
471
+ taskId: string;
472
+ toolUseId?: string | undefined;
473
+ taskType?: string | undefined;
474
+ } | {
475
+ t: "task-progress";
476
+ description: string;
477
+ usage: {
478
+ durationMs: number;
479
+ totalTokens: number;
480
+ toolUses: number;
481
+ };
482
+ taskId: string;
483
+ lastToolName?: string | undefined;
484
+ } | {
485
+ t: "task-end";
486
+ status: "completed" | "failed" | "stopped";
487
+ taskId: string;
488
+ summary: string;
489
+ usage?: {
490
+ durationMs: number;
491
+ totalTokens: number;
492
+ toolUses: number;
493
+ } | undefined;
494
+ } | {
495
+ t: "tool-progress";
496
+ toolUseId: string;
497
+ toolName: string;
498
+ elapsedSeconds: number;
499
+ taskId?: string | undefined;
500
+ } | {
501
+ t: "prompt-suggestion";
502
+ suggestion: string;
347
503
  };
348
504
  turn?: string | undefined;
349
505
  subagent?: string | undefined;
350
506
  }, {
351
- role: "user" | "agent";
352
507
  id: string;
508
+ role: "user" | "agent";
353
509
  time: number;
354
510
  ev: {
355
- text: string;
356
511
  t: "text";
512
+ text: string;
357
513
  thinking?: boolean | undefined;
358
514
  } | {
359
- text: string;
360
515
  t: "service";
516
+ text: string;
361
517
  } | {
362
518
  t: "tool-call-start";
363
519
  call: string;
@@ -384,8 +540,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
384
540
  t: "start";
385
541
  title?: string | undefined;
386
542
  } | {
387
- status: "completed" | "failed" | "cancelled";
388
543
  t: "turn-end";
544
+ status: "completed" | "failed" | "cancelled";
389
545
  model?: string | undefined;
390
546
  usage?: {
391
547
  input_tokens: number;
@@ -406,20 +562,55 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
406
562
  };
407
563
  model?: string | undefined;
408
564
  durationMs?: number | undefined;
565
+ } | {
566
+ t: "task-start";
567
+ description: string;
568
+ taskId: string;
569
+ toolUseId?: string | undefined;
570
+ taskType?: string | undefined;
571
+ } | {
572
+ t: "task-progress";
573
+ description: string;
574
+ usage: {
575
+ durationMs: number;
576
+ totalTokens: number;
577
+ toolUses: number;
578
+ };
579
+ taskId: string;
580
+ lastToolName?: string | undefined;
581
+ } | {
582
+ t: "task-end";
583
+ status: "completed" | "failed" | "stopped";
584
+ taskId: string;
585
+ summary: string;
586
+ usage?: {
587
+ durationMs: number;
588
+ totalTokens: number;
589
+ toolUses: number;
590
+ } | undefined;
591
+ } | {
592
+ t: "tool-progress";
593
+ toolUseId: string;
594
+ toolName: string;
595
+ elapsedSeconds: number;
596
+ taskId?: string | undefined;
597
+ } | {
598
+ t: "prompt-suggestion";
599
+ suggestion: string;
409
600
  };
410
601
  turn?: string | undefined;
411
602
  subagent?: string | undefined;
412
603
  }>, {
413
- role: "user" | "agent";
414
604
  id: string;
605
+ role: "user" | "agent";
415
606
  time: number;
416
607
  ev: {
417
- text: string;
418
608
  t: "text";
609
+ text: string;
419
610
  thinking?: boolean | undefined;
420
611
  } | {
421
- text: string;
422
612
  t: "service";
613
+ text: string;
423
614
  } | {
424
615
  t: "tool-call-start";
425
616
  call: string;
@@ -446,8 +637,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
446
637
  t: "start";
447
638
  title?: string | undefined;
448
639
  } | {
449
- status: "completed" | "failed" | "cancelled";
450
640
  t: "turn-end";
641
+ status: "completed" | "failed" | "cancelled";
451
642
  model?: string | undefined;
452
643
  usage?: {
453
644
  input_tokens: number;
@@ -468,20 +659,55 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
468
659
  };
469
660
  model?: string | undefined;
470
661
  durationMs?: number | undefined;
662
+ } | {
663
+ t: "task-start";
664
+ description: string;
665
+ taskId: string;
666
+ toolUseId?: string | undefined;
667
+ taskType?: string | undefined;
668
+ } | {
669
+ t: "task-progress";
670
+ description: string;
671
+ usage: {
672
+ durationMs: number;
673
+ totalTokens: number;
674
+ toolUses: number;
675
+ };
676
+ taskId: string;
677
+ lastToolName?: string | undefined;
678
+ } | {
679
+ t: "task-end";
680
+ status: "completed" | "failed" | "stopped";
681
+ taskId: string;
682
+ summary: string;
683
+ usage?: {
684
+ durationMs: number;
685
+ totalTokens: number;
686
+ toolUses: number;
687
+ } | undefined;
688
+ } | {
689
+ t: "tool-progress";
690
+ toolUseId: string;
691
+ toolName: string;
692
+ elapsedSeconds: number;
693
+ taskId?: string | undefined;
694
+ } | {
695
+ t: "prompt-suggestion";
696
+ suggestion: string;
471
697
  };
472
698
  turn?: string | undefined;
473
699
  subagent?: string | undefined;
474
700
  }, {
475
- role: "user" | "agent";
476
701
  id: string;
702
+ role: "user" | "agent";
477
703
  time: number;
478
704
  ev: {
479
- text: string;
480
705
  t: "text";
706
+ text: string;
481
707
  thinking?: boolean | undefined;
482
708
  } | {
483
- text: string;
484
709
  t: "service";
710
+ text: string;
485
711
  } | {
486
712
  t: "tool-call-start";
487
713
  call: string;
@@ -508,8 +734,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
508
734
  t: "start";
509
735
  title?: string | undefined;
510
736
  } | {
511
- status: "completed" | "failed" | "cancelled";
512
737
  t: "turn-end";
738
+ status: "completed" | "failed" | "cancelled";
513
739
  model?: string | undefined;
514
740
  usage?: {
515
741
  input_tokens: number;
@@ -530,6 +756,41 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
530
756
  };
531
757
  model?: string | undefined;
532
758
  durationMs?: number | undefined;
759
+ } | {
760
+ t: "task-start";
761
+ description: string;
762
+ taskId: string;
763
+ toolUseId?: string | undefined;
764
+ taskType?: string | undefined;
765
+ } | {
766
+ t: "task-progress";
767
+ description: string;
768
+ usage: {
769
+ durationMs: number;
770
+ totalTokens: number;
771
+ toolUses: number;
772
+ };
773
+ taskId: string;
774
+ lastToolName?: string | undefined;
775
+ } | {
776
+ t: "task-end";
777
+ status: "completed" | "failed" | "stopped";
778
+ taskId: string;
779
+ summary: string;
780
+ usage?: {
781
+ durationMs: number;
782
+ totalTokens: number;
783
+ toolUses: number;
784
+ } | undefined;
785
+ } | {
786
+ t: "tool-progress";
787
+ toolUseId: string;
788
+ toolName: string;
789
+ elapsedSeconds: number;
790
+ taskId?: string | undefined;
791
+ } | {
792
+ t: "prompt-suggestion";
793
+ suggestion: string;
533
794
  };
534
795
  turn?: string | undefined;
535
796
  subagent?: string | undefined;
@@ -545,9 +806,9 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
545
806
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
546
807
  displayText: z.ZodOptional<z.ZodString>;
547
808
  }, "strip", z.ZodTypeAny, {
809
+ model?: string | null | undefined;
548
810
  sentFrom?: string | undefined;
549
811
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
550
- model?: string | null | undefined;
551
812
  fallbackModel?: string | null | undefined;
552
813
  customSystemPrompt?: string | null | undefined;
553
814
  appendSystemPrompt?: string | null | undefined;
@@ -555,9 +816,9 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
555
816
  disallowedTools?: string[] | null | undefined;
556
817
  displayText?: string | undefined;
557
818
  }, {
819
+ model?: string | null | undefined;
558
820
  sentFrom?: string | undefined;
559
821
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
560
- model?: string | null | undefined;
561
822
  fallbackModel?: string | null | undefined;
562
823
  customSystemPrompt?: string | null | undefined;
563
824
  appendSystemPrompt?: string | null | undefined;
@@ -566,18 +827,17 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
566
827
  displayText?: string | undefined;
567
828
  }>>;
568
829
  }, "strip", z.ZodTypeAny, {
569
- role: "session";
570
830
  content: {
571
- role: "user" | "agent";
572
831
  id: string;
832
+ role: "user" | "agent";
573
833
  time: number;
574
834
  ev: {
575
- text: string;
576
835
  t: "text";
836
+ text: string;
577
837
  thinking?: boolean | undefined;
578
838
  } | {
579
- text: string;
580
839
  t: "service";
840
+ text: string;
581
841
  } | {
582
842
  t: "tool-call-start";
583
843
  call: string;
@@ -604,8 +864,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
604
864
  t: "start";
605
865
  title?: string | undefined;
606
866
  } | {
607
- status: "completed" | "failed" | "cancelled";
608
867
  t: "turn-end";
868
+ status: "completed" | "failed" | "cancelled";
609
869
  model?: string | undefined;
610
870
  usage?: {
611
871
  input_tokens: number;
@@ -626,14 +886,50 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
626
886
  };
627
887
  model?: string | undefined;
628
888
  durationMs?: number | undefined;
889
+ } | {
890
+ t: "task-start";
891
+ description: string;
892
+ taskId: string;
893
+ toolUseId?: string | undefined;
894
+ taskType?: string | undefined;
895
+ } | {
896
+ t: "task-progress";
897
+ description: string;
898
+ usage: {
899
+ durationMs: number;
900
+ totalTokens: number;
901
+ toolUses: number;
902
+ };
903
+ taskId: string;
904
+ lastToolName?: string | undefined;
905
+ } | {
906
+ t: "task-end";
907
+ status: "completed" | "failed" | "stopped";
908
+ taskId: string;
909
+ summary: string;
910
+ usage?: {
911
+ durationMs: number;
912
+ totalTokens: number;
913
+ toolUses: number;
914
+ } | undefined;
915
+ } | {
916
+ t: "tool-progress";
917
+ toolUseId: string;
918
+ toolName: string;
919
+ elapsedSeconds: number;
920
+ taskId?: string | undefined;
921
+ } | {
922
+ t: "prompt-suggestion";
923
+ suggestion: string;
629
924
  };
630
925
  turn?: string | undefined;
631
926
  subagent?: string | undefined;
632
927
  };
928
+ role: "session";
633
929
  meta?: {
930
+ model?: string | null | undefined;
634
931
  sentFrom?: string | undefined;
635
932
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
636
- model?: string | null | undefined;
637
933
  fallbackModel?: string | null | undefined;
638
934
  customSystemPrompt?: string | null | undefined;
639
935
  appendSystemPrompt?: string | null | undefined;
@@ -642,18 +938,17 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
642
938
  displayText?: string | undefined;
643
939
  } | undefined;
644
940
  }, {
645
- role: "session";
646
941
  content: {
647
- role: "user" | "agent";
648
942
  id: string;
943
+ role: "user" | "agent";
649
944
  time: number;
650
945
  ev: {
651
- text: string;
652
946
  t: "text";
947
+ text: string;
653
948
  thinking?: boolean | undefined;
654
949
  } | {
655
- text: string;
656
950
  t: "service";
951
+ text: string;
657
952
  } | {
658
953
  t: "tool-call-start";
659
954
  call: string;
@@ -680,8 +975,8 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
680
975
  t: "start";
681
976
  title?: string | undefined;
682
977
  } | {
683
- status: "completed" | "failed" | "cancelled";
684
978
  t: "turn-end";
979
+ status: "completed" | "failed" | "cancelled";
685
980
  model?: string | undefined;
686
981
  usage?: {
687
982
  input_tokens: number;
@@ -702,14 +997,50 @@ declare const SessionProtocolMessageSchema: z.ZodObject<{
702
997
  };
703
998
  model?: string | undefined;
704
999
  durationMs?: number | undefined;
1000
+ } | {
1001
+ t: "task-start";
1002
+ description: string;
1003
+ taskId: string;
1004
+ toolUseId?: string | undefined;
1005
+ taskType?: string | undefined;
1006
+ } | {
1007
+ t: "task-progress";
1008
+ description: string;
1009
+ usage: {
1010
+ durationMs: number;
1011
+ totalTokens: number;
1012
+ toolUses: number;
1013
+ };
1014
+ taskId: string;
1015
+ lastToolName?: string | undefined;
1016
+ } | {
1017
+ t: "task-end";
1018
+ status: "completed" | "failed" | "stopped";
1019
+ taskId: string;
1020
+ summary: string;
1021
+ usage?: {
1022
+ durationMs: number;
1023
+ totalTokens: number;
1024
+ toolUses: number;
1025
+ } | undefined;
1026
+ } | {
1027
+ t: "tool-progress";
1028
+ toolUseId: string;
1029
+ toolName: string;
1030
+ elapsedSeconds: number;
1031
+ taskId?: string | undefined;
1032
+ } | {
1033
+ t: "prompt-suggestion";
1034
+ suggestion: string;
705
1035
  };
706
1036
  turn?: string | undefined;
707
1037
  subagent?: string | undefined;
708
1038
  };
1039
+ role: "session";
709
1040
  meta?: {
1041
+ model?: string | null | undefined;
710
1042
  sentFrom?: string | undefined;
711
1043
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
712
- model?: string | null | undefined;
713
1044
  fallbackModel?: string | null | undefined;
714
1045
  customSystemPrompt?: string | null | undefined;
715
1046
  appendSystemPrompt?: string | null | undefined;
@@ -743,9 +1074,9 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
743
1074
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
744
1075
  displayText: z.ZodOptional<z.ZodString>;
745
1076
  }, "strip", z.ZodTypeAny, {
1077
+ model?: string | null | undefined;
746
1078
  sentFrom?: string | undefined;
747
1079
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
748
- model?: string | null | undefined;
749
1080
  fallbackModel?: string | null | undefined;
750
1081
  customSystemPrompt?: string | null | undefined;
751
1082
  appendSystemPrompt?: string | null | undefined;
@@ -753,9 +1084,9 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
753
1084
  disallowedTools?: string[] | null | undefined;
754
1085
  displayText?: string | undefined;
755
1086
  }, {
1087
+ model?: string | null | undefined;
756
1088
  sentFrom?: string | undefined;
757
1089
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
758
- model?: string | null | undefined;
759
1090
  fallbackModel?: string | null | undefined;
760
1091
  customSystemPrompt?: string | null | undefined;
761
1092
  appendSystemPrompt?: string | null | undefined;
@@ -764,16 +1095,15 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
764
1095
  displayText?: string | undefined;
765
1096
  }>>;
766
1097
  }, "strip", z.ZodTypeAny, {
767
- role: "user";
768
1098
  content: {
769
1099
  type: "text";
770
1100
  text: string;
771
1101
  };
772
- localKey?: string | undefined;
1102
+ role: "user";
773
1103
  meta?: {
1104
+ model?: string | null | undefined;
774
1105
  sentFrom?: string | undefined;
775
1106
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
776
- model?: string | null | undefined;
777
1107
  fallbackModel?: string | null | undefined;
778
1108
  customSystemPrompt?: string | null | undefined;
779
1109
  appendSystemPrompt?: string | null | undefined;
@@ -781,17 +1111,17 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
781
1111
  disallowedTools?: string[] | null | undefined;
782
1112
  displayText?: string | undefined;
783
1113
  } | undefined;
1114
+ localKey?: string | undefined;
784
1115
  }, {
785
- role: "user";
786
1116
  content: {
787
1117
  type: "text";
788
1118
  text: string;
789
1119
  };
790
- localKey?: string | undefined;
1120
+ role: "user";
791
1121
  meta?: {
1122
+ model?: string | null | undefined;
792
1123
  sentFrom?: string | undefined;
793
1124
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
794
- model?: string | null | undefined;
795
1125
  fallbackModel?: string | null | undefined;
796
1126
  customSystemPrompt?: string | null | undefined;
797
1127
  appendSystemPrompt?: string | null | undefined;
@@ -799,6 +1129,7 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
799
1129
  disallowedTools?: string[] | null | undefined;
800
1130
  displayText?: string | undefined;
801
1131
  } | undefined;
1132
+ localKey?: string | undefined;
802
1133
  }>, z.ZodObject<{
803
1134
  role: z.ZodLiteral<"agent">;
804
1135
  content: z.ZodObject<{
@@ -819,9 +1150,9 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
819
1150
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
820
1151
  displayText: z.ZodOptional<z.ZodString>;
821
1152
  }, "strip", z.ZodTypeAny, {
1153
+ model?: string | null | undefined;
822
1154
  sentFrom?: string | undefined;
823
1155
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
824
- model?: string | null | undefined;
825
1156
  fallbackModel?: string | null | undefined;
826
1157
  customSystemPrompt?: string | null | undefined;
827
1158
  appendSystemPrompt?: string | null | undefined;
@@ -829,9 +1160,9 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
829
1160
  disallowedTools?: string[] | null | undefined;
830
1161
  displayText?: string | undefined;
831
1162
  }, {
1163
+ model?: string | null | undefined;
832
1164
  sentFrom?: string | undefined;
833
1165
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
834
- model?: string | null | undefined;
835
1166
  fallbackModel?: string | null | undefined;
836
1167
  customSystemPrompt?: string | null | undefined;
837
1168
  appendSystemPrompt?: string | null | undefined;
@@ -840,16 +1171,16 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
840
1171
  displayText?: string | undefined;
841
1172
  }>>;
842
1173
  }, "strip", z.ZodTypeAny, {
843
- role: "agent";
844
1174
  content: {
845
1175
  type: string;
846
1176
  } & {
847
1177
  [k: string]: unknown;
848
1178
  };
1179
+ role: "agent";
849
1180
  meta?: {
1181
+ model?: string | null | undefined;
850
1182
  sentFrom?: string | undefined;
851
1183
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
852
- model?: string | null | undefined;
853
1184
  fallbackModel?: string | null | undefined;
854
1185
  customSystemPrompt?: string | null | undefined;
855
1186
  appendSystemPrompt?: string | null | undefined;
@@ -858,16 +1189,16 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
858
1189
  displayText?: string | undefined;
859
1190
  } | undefined;
860
1191
  }, {
861
- role: "agent";
862
1192
  content: {
863
1193
  type: string;
864
1194
  } & {
865
1195
  [k: string]: unknown;
866
1196
  };
1197
+ role: "agent";
867
1198
  meta?: {
1199
+ model?: string | null | undefined;
868
1200
  sentFrom?: string | undefined;
869
1201
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
870
- model?: string | null | undefined;
871
1202
  fallbackModel?: string | null | undefined;
872
1203
  customSystemPrompt?: string | null | undefined;
873
1204
  appendSystemPrompt?: string | null | undefined;
@@ -888,22 +1219,22 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
888
1219
  text: z.ZodString;
889
1220
  thinking: z.ZodOptional<z.ZodBoolean>;
890
1221
  }, "strip", z.ZodTypeAny, {
891
- text: string;
892
1222
  t: "text";
1223
+ text: string;
893
1224
  thinking?: boolean | undefined;
894
1225
  }, {
895
- text: string;
896
1226
  t: "text";
1227
+ text: string;
897
1228
  thinking?: boolean | undefined;
898
1229
  }>, z.ZodObject<{
899
1230
  t: z.ZodLiteral<"service">;
900
1231
  text: z.ZodString;
901
1232
  }, "strip", z.ZodTypeAny, {
902
- text: string;
903
1233
  t: "service";
904
- }, {
905
1234
  text: string;
1235
+ }, {
906
1236
  t: "service";
1237
+ text: string;
907
1238
  }>, z.ZodObject<{
908
1239
  t: z.ZodLiteral<"tool-call-start">;
909
1240
  call: z.ZodString;
@@ -1009,8 +1340,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1009
1340
  }>>;
1010
1341
  durationMs: z.ZodOptional<z.ZodNumber>;
1011
1342
  }, "strip", z.ZodTypeAny, {
1012
- status: "completed" | "failed" | "cancelled";
1013
1343
  t: "turn-end";
1344
+ status: "completed" | "failed" | "cancelled";
1014
1345
  model?: string | undefined;
1015
1346
  usage?: {
1016
1347
  input_tokens: number;
@@ -1020,8 +1351,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1020
1351
  } | undefined;
1021
1352
  durationMs?: number | undefined;
1022
1353
  }, {
1023
- status: "completed" | "failed" | "cancelled";
1024
1354
  t: "turn-end";
1355
+ status: "completed" | "failed" | "cancelled";
1025
1356
  model?: string | undefined;
1026
1357
  usage?: {
1027
1358
  input_tokens: number;
@@ -1076,33 +1407,154 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1076
1407
  };
1077
1408
  model?: string | undefined;
1078
1409
  durationMs?: number | undefined;
1079
- }>]>;
1080
- }, "strip", z.ZodTypeAny, {
1081
- role: "user" | "agent";
1082
- id: string;
1083
- time: number;
1084
- ev: {
1085
- text: string;
1086
- t: "text";
1087
- thinking?: boolean | undefined;
1088
- } | {
1089
- text: string;
1090
- t: "service";
1091
- } | {
1092
- t: "tool-call-start";
1093
- call: string;
1094
- name: string;
1095
- title: string;
1410
+ }>, z.ZodObject<{
1411
+ t: z.ZodLiteral<"task-start">;
1412
+ taskId: z.ZodString;
1413
+ toolUseId: z.ZodOptional<z.ZodString>;
1414
+ description: z.ZodString;
1415
+ taskType: z.ZodOptional<z.ZodString>;
1416
+ }, "strip", z.ZodTypeAny, {
1417
+ t: "task-start";
1096
1418
  description: string;
1097
- args: Record<string, unknown>;
1098
- } | {
1099
- t: "tool-call-end";
1100
- call: string;
1101
- } | {
1102
- t: "file";
1103
- name: string;
1104
- ref: string;
1105
- size: number;
1419
+ taskId: string;
1420
+ toolUseId?: string | undefined;
1421
+ taskType?: string | undefined;
1422
+ }, {
1423
+ t: "task-start";
1424
+ description: string;
1425
+ taskId: string;
1426
+ toolUseId?: string | undefined;
1427
+ taskType?: string | undefined;
1428
+ }>, z.ZodObject<{
1429
+ t: z.ZodLiteral<"task-progress">;
1430
+ taskId: z.ZodString;
1431
+ description: z.ZodString;
1432
+ usage: z.ZodObject<{
1433
+ totalTokens: z.ZodNumber;
1434
+ toolUses: z.ZodNumber;
1435
+ durationMs: z.ZodNumber;
1436
+ }, "strip", z.ZodTypeAny, {
1437
+ durationMs: number;
1438
+ totalTokens: number;
1439
+ toolUses: number;
1440
+ }, {
1441
+ durationMs: number;
1442
+ totalTokens: number;
1443
+ toolUses: number;
1444
+ }>;
1445
+ lastToolName: z.ZodOptional<z.ZodString>;
1446
+ }, "strip", z.ZodTypeAny, {
1447
+ t: "task-progress";
1448
+ description: string;
1449
+ usage: {
1450
+ durationMs: number;
1451
+ totalTokens: number;
1452
+ toolUses: number;
1453
+ };
1454
+ taskId: string;
1455
+ lastToolName?: string | undefined;
1456
+ }, {
1457
+ t: "task-progress";
1458
+ description: string;
1459
+ usage: {
1460
+ durationMs: number;
1461
+ totalTokens: number;
1462
+ toolUses: number;
1463
+ };
1464
+ taskId: string;
1465
+ lastToolName?: string | undefined;
1466
+ }>, z.ZodObject<{
1467
+ t: z.ZodLiteral<"task-end">;
1468
+ taskId: z.ZodString;
1469
+ status: z.ZodEnum<["completed", "failed", "stopped"]>;
1470
+ summary: z.ZodString;
1471
+ usage: z.ZodOptional<z.ZodObject<{
1472
+ totalTokens: z.ZodNumber;
1473
+ toolUses: z.ZodNumber;
1474
+ durationMs: z.ZodNumber;
1475
+ }, "strip", z.ZodTypeAny, {
1476
+ durationMs: number;
1477
+ totalTokens: number;
1478
+ toolUses: number;
1479
+ }, {
1480
+ durationMs: number;
1481
+ totalTokens: number;
1482
+ toolUses: number;
1483
+ }>>;
1484
+ }, "strip", z.ZodTypeAny, {
1485
+ t: "task-end";
1486
+ status: "completed" | "failed" | "stopped";
1487
+ taskId: string;
1488
+ summary: string;
1489
+ usage?: {
1490
+ durationMs: number;
1491
+ totalTokens: number;
1492
+ toolUses: number;
1493
+ } | undefined;
1494
+ }, {
1495
+ t: "task-end";
1496
+ status: "completed" | "failed" | "stopped";
1497
+ taskId: string;
1498
+ summary: string;
1499
+ usage?: {
1500
+ durationMs: number;
1501
+ totalTokens: number;
1502
+ toolUses: number;
1503
+ } | undefined;
1504
+ }>, z.ZodObject<{
1505
+ t: z.ZodLiteral<"tool-progress">;
1506
+ toolUseId: z.ZodString;
1507
+ toolName: z.ZodString;
1508
+ elapsedSeconds: z.ZodNumber;
1509
+ taskId: z.ZodOptional<z.ZodString>;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ t: "tool-progress";
1512
+ toolUseId: string;
1513
+ toolName: string;
1514
+ elapsedSeconds: number;
1515
+ taskId?: string | undefined;
1516
+ }, {
1517
+ t: "tool-progress";
1518
+ toolUseId: string;
1519
+ toolName: string;
1520
+ elapsedSeconds: number;
1521
+ taskId?: string | undefined;
1522
+ }>, z.ZodObject<{
1523
+ t: z.ZodLiteral<"prompt-suggestion">;
1524
+ suggestion: z.ZodString;
1525
+ }, "strip", z.ZodTypeAny, {
1526
+ t: "prompt-suggestion";
1527
+ suggestion: string;
1528
+ }, {
1529
+ t: "prompt-suggestion";
1530
+ suggestion: string;
1531
+ }>]>;
1532
+ }, "strip", z.ZodTypeAny, {
1533
+ id: string;
1534
+ role: "user" | "agent";
1535
+ time: number;
1536
+ ev: {
1537
+ t: "text";
1538
+ text: string;
1539
+ thinking?: boolean | undefined;
1540
+ } | {
1541
+ t: "service";
1542
+ text: string;
1543
+ } | {
1544
+ t: "tool-call-start";
1545
+ call: string;
1546
+ name: string;
1547
+ title: string;
1548
+ description: string;
1549
+ args: Record<string, unknown>;
1550
+ } | {
1551
+ t: "tool-call-end";
1552
+ call: string;
1553
+ } | {
1554
+ t: "file";
1555
+ name: string;
1556
+ ref: string;
1557
+ size: number;
1106
1558
  image?: {
1107
1559
  width: number;
1108
1560
  height: number;
@@ -1114,8 +1566,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1114
1566
  t: "start";
1115
1567
  title?: string | undefined;
1116
1568
  } | {
1117
- status: "completed" | "failed" | "cancelled";
1118
1569
  t: "turn-end";
1570
+ status: "completed" | "failed" | "cancelled";
1119
1571
  model?: string | undefined;
1120
1572
  usage?: {
1121
1573
  input_tokens: number;
@@ -1136,20 +1588,55 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1136
1588
  };
1137
1589
  model?: string | undefined;
1138
1590
  durationMs?: number | undefined;
1591
+ } | {
1592
+ t: "task-start";
1593
+ description: string;
1594
+ taskId: string;
1595
+ toolUseId?: string | undefined;
1596
+ taskType?: string | undefined;
1597
+ } | {
1598
+ t: "task-progress";
1599
+ description: string;
1600
+ usage: {
1601
+ durationMs: number;
1602
+ totalTokens: number;
1603
+ toolUses: number;
1604
+ };
1605
+ taskId: string;
1606
+ lastToolName?: string | undefined;
1607
+ } | {
1608
+ t: "task-end";
1609
+ status: "completed" | "failed" | "stopped";
1610
+ taskId: string;
1611
+ summary: string;
1612
+ usage?: {
1613
+ durationMs: number;
1614
+ totalTokens: number;
1615
+ toolUses: number;
1616
+ } | undefined;
1617
+ } | {
1618
+ t: "tool-progress";
1619
+ toolUseId: string;
1620
+ toolName: string;
1621
+ elapsedSeconds: number;
1622
+ taskId?: string | undefined;
1623
+ } | {
1624
+ t: "prompt-suggestion";
1625
+ suggestion: string;
1139
1626
  };
1140
1627
  turn?: string | undefined;
1141
1628
  subagent?: string | undefined;
1142
1629
  }, {
1143
- role: "user" | "agent";
1144
1630
  id: string;
1631
+ role: "user" | "agent";
1145
1632
  time: number;
1146
1633
  ev: {
1147
- text: string;
1148
1634
  t: "text";
1635
+ text: string;
1149
1636
  thinking?: boolean | undefined;
1150
1637
  } | {
1151
- text: string;
1152
1638
  t: "service";
1639
+ text: string;
1153
1640
  } | {
1154
1641
  t: "tool-call-start";
1155
1642
  call: string;
@@ -1176,8 +1663,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1176
1663
  t: "start";
1177
1664
  title?: string | undefined;
1178
1665
  } | {
1179
- status: "completed" | "failed" | "cancelled";
1180
1666
  t: "turn-end";
1667
+ status: "completed" | "failed" | "cancelled";
1181
1668
  model?: string | undefined;
1182
1669
  usage?: {
1183
1670
  input_tokens: number;
@@ -1198,20 +1685,55 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1198
1685
  };
1199
1686
  model?: string | undefined;
1200
1687
  durationMs?: number | undefined;
1688
+ } | {
1689
+ t: "task-start";
1690
+ description: string;
1691
+ taskId: string;
1692
+ toolUseId?: string | undefined;
1693
+ taskType?: string | undefined;
1694
+ } | {
1695
+ t: "task-progress";
1696
+ description: string;
1697
+ usage: {
1698
+ durationMs: number;
1699
+ totalTokens: number;
1700
+ toolUses: number;
1701
+ };
1702
+ taskId: string;
1703
+ lastToolName?: string | undefined;
1704
+ } | {
1705
+ t: "task-end";
1706
+ status: "completed" | "failed" | "stopped";
1707
+ taskId: string;
1708
+ summary: string;
1709
+ usage?: {
1710
+ durationMs: number;
1711
+ totalTokens: number;
1712
+ toolUses: number;
1713
+ } | undefined;
1714
+ } | {
1715
+ t: "tool-progress";
1716
+ toolUseId: string;
1717
+ toolName: string;
1718
+ elapsedSeconds: number;
1719
+ taskId?: string | undefined;
1720
+ } | {
1721
+ t: "prompt-suggestion";
1722
+ suggestion: string;
1201
1723
  };
1202
1724
  turn?: string | undefined;
1203
1725
  subagent?: string | undefined;
1204
1726
  }>, {
1205
- role: "user" | "agent";
1206
1727
  id: string;
1728
+ role: "user" | "agent";
1207
1729
  time: number;
1208
1730
  ev: {
1209
- text: string;
1210
1731
  t: "text";
1732
+ text: string;
1211
1733
  thinking?: boolean | undefined;
1212
1734
  } | {
1213
- text: string;
1214
1735
  t: "service";
1736
+ text: string;
1215
1737
  } | {
1216
1738
  t: "tool-call-start";
1217
1739
  call: string;
@@ -1238,8 +1760,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1238
1760
  t: "start";
1239
1761
  title?: string | undefined;
1240
1762
  } | {
1241
- status: "completed" | "failed" | "cancelled";
1242
1763
  t: "turn-end";
1764
+ status: "completed" | "failed" | "cancelled";
1243
1765
  model?: string | undefined;
1244
1766
  usage?: {
1245
1767
  input_tokens: number;
@@ -1260,20 +1782,55 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1260
1782
  };
1261
1783
  model?: string | undefined;
1262
1784
  durationMs?: number | undefined;
1785
+ } | {
1786
+ t: "task-start";
1787
+ description: string;
1788
+ taskId: string;
1789
+ toolUseId?: string | undefined;
1790
+ taskType?: string | undefined;
1791
+ } | {
1792
+ t: "task-progress";
1793
+ description: string;
1794
+ usage: {
1795
+ durationMs: number;
1796
+ totalTokens: number;
1797
+ toolUses: number;
1798
+ };
1799
+ taskId: string;
1800
+ lastToolName?: string | undefined;
1801
+ } | {
1802
+ t: "task-end";
1803
+ status: "completed" | "failed" | "stopped";
1804
+ taskId: string;
1805
+ summary: string;
1806
+ usage?: {
1807
+ durationMs: number;
1808
+ totalTokens: number;
1809
+ toolUses: number;
1810
+ } | undefined;
1811
+ } | {
1812
+ t: "tool-progress";
1813
+ toolUseId: string;
1814
+ toolName: string;
1815
+ elapsedSeconds: number;
1816
+ taskId?: string | undefined;
1817
+ } | {
1818
+ t: "prompt-suggestion";
1819
+ suggestion: string;
1263
1820
  };
1264
1821
  turn?: string | undefined;
1265
1822
  subagent?: string | undefined;
1266
1823
  }, {
1267
- role: "user" | "agent";
1268
1824
  id: string;
1825
+ role: "user" | "agent";
1269
1826
  time: number;
1270
1827
  ev: {
1271
- text: string;
1272
1828
  t: "text";
1829
+ text: string;
1273
1830
  thinking?: boolean | undefined;
1274
1831
  } | {
1275
- text: string;
1276
1832
  t: "service";
1833
+ text: string;
1277
1834
  } | {
1278
1835
  t: "tool-call-start";
1279
1836
  call: string;
@@ -1300,8 +1857,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1300
1857
  t: "start";
1301
1858
  title?: string | undefined;
1302
1859
  } | {
1303
- status: "completed" | "failed" | "cancelled";
1304
1860
  t: "turn-end";
1861
+ status: "completed" | "failed" | "cancelled";
1305
1862
  model?: string | undefined;
1306
1863
  usage?: {
1307
1864
  input_tokens: number;
@@ -1322,6 +1879,41 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1322
1879
  };
1323
1880
  model?: string | undefined;
1324
1881
  durationMs?: number | undefined;
1882
+ } | {
1883
+ t: "task-start";
1884
+ description: string;
1885
+ taskId: string;
1886
+ toolUseId?: string | undefined;
1887
+ taskType?: string | undefined;
1888
+ } | {
1889
+ t: "task-progress";
1890
+ description: string;
1891
+ usage: {
1892
+ durationMs: number;
1893
+ totalTokens: number;
1894
+ toolUses: number;
1895
+ };
1896
+ taskId: string;
1897
+ lastToolName?: string | undefined;
1898
+ } | {
1899
+ t: "task-end";
1900
+ status: "completed" | "failed" | "stopped";
1901
+ taskId: string;
1902
+ summary: string;
1903
+ usage?: {
1904
+ durationMs: number;
1905
+ totalTokens: number;
1906
+ toolUses: number;
1907
+ } | undefined;
1908
+ } | {
1909
+ t: "tool-progress";
1910
+ toolUseId: string;
1911
+ toolName: string;
1912
+ elapsedSeconds: number;
1913
+ taskId?: string | undefined;
1914
+ } | {
1915
+ t: "prompt-suggestion";
1916
+ suggestion: string;
1325
1917
  };
1326
1918
  turn?: string | undefined;
1327
1919
  subagent?: string | undefined;
@@ -1337,9 +1929,9 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1337
1929
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
1338
1930
  displayText: z.ZodOptional<z.ZodString>;
1339
1931
  }, "strip", z.ZodTypeAny, {
1932
+ model?: string | null | undefined;
1340
1933
  sentFrom?: string | undefined;
1341
1934
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
1342
- model?: string | null | undefined;
1343
1935
  fallbackModel?: string | null | undefined;
1344
1936
  customSystemPrompt?: string | null | undefined;
1345
1937
  appendSystemPrompt?: string | null | undefined;
@@ -1347,9 +1939,9 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1347
1939
  disallowedTools?: string[] | null | undefined;
1348
1940
  displayText?: string | undefined;
1349
1941
  }, {
1942
+ model?: string | null | undefined;
1350
1943
  sentFrom?: string | undefined;
1351
1944
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
1352
- model?: string | null | undefined;
1353
1945
  fallbackModel?: string | null | undefined;
1354
1946
  customSystemPrompt?: string | null | undefined;
1355
1947
  appendSystemPrompt?: string | null | undefined;
@@ -1358,18 +1950,17 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1358
1950
  displayText?: string | undefined;
1359
1951
  }>>;
1360
1952
  }, "strip", z.ZodTypeAny, {
1361
- role: "session";
1362
1953
  content: {
1363
- role: "user" | "agent";
1364
1954
  id: string;
1955
+ role: "user" | "agent";
1365
1956
  time: number;
1366
1957
  ev: {
1367
- text: string;
1368
1958
  t: "text";
1959
+ text: string;
1369
1960
  thinking?: boolean | undefined;
1370
1961
  } | {
1371
- text: string;
1372
1962
  t: "service";
1963
+ text: string;
1373
1964
  } | {
1374
1965
  t: "tool-call-start";
1375
1966
  call: string;
@@ -1396,8 +1987,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1396
1987
  t: "start";
1397
1988
  title?: string | undefined;
1398
1989
  } | {
1399
- status: "completed" | "failed" | "cancelled";
1400
1990
  t: "turn-end";
1991
+ status: "completed" | "failed" | "cancelled";
1401
1992
  model?: string | undefined;
1402
1993
  usage?: {
1403
1994
  input_tokens: number;
@@ -1418,14 +2009,50 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1418
2009
  };
1419
2010
  model?: string | undefined;
1420
2011
  durationMs?: number | undefined;
2012
+ } | {
2013
+ t: "task-start";
2014
+ description: string;
2015
+ taskId: string;
2016
+ toolUseId?: string | undefined;
2017
+ taskType?: string | undefined;
2018
+ } | {
2019
+ t: "task-progress";
2020
+ description: string;
2021
+ usage: {
2022
+ durationMs: number;
2023
+ totalTokens: number;
2024
+ toolUses: number;
2025
+ };
2026
+ taskId: string;
2027
+ lastToolName?: string | undefined;
2028
+ } | {
2029
+ t: "task-end";
2030
+ status: "completed" | "failed" | "stopped";
2031
+ taskId: string;
2032
+ summary: string;
2033
+ usage?: {
2034
+ durationMs: number;
2035
+ totalTokens: number;
2036
+ toolUses: number;
2037
+ } | undefined;
2038
+ } | {
2039
+ t: "tool-progress";
2040
+ toolUseId: string;
2041
+ toolName: string;
2042
+ elapsedSeconds: number;
2043
+ taskId?: string | undefined;
2044
+ } | {
2045
+ t: "prompt-suggestion";
2046
+ suggestion: string;
1421
2047
  };
1422
2048
  turn?: string | undefined;
1423
2049
  subagent?: string | undefined;
1424
2050
  };
2051
+ role: "session";
1425
2052
  meta?: {
2053
+ model?: string | null | undefined;
1426
2054
  sentFrom?: string | undefined;
1427
2055
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
1428
- model?: string | null | undefined;
1429
2056
  fallbackModel?: string | null | undefined;
1430
2057
  customSystemPrompt?: string | null | undefined;
1431
2058
  appendSystemPrompt?: string | null | undefined;
@@ -1434,18 +2061,17 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1434
2061
  displayText?: string | undefined;
1435
2062
  } | undefined;
1436
2063
  }, {
1437
- role: "session";
1438
2064
  content: {
1439
- role: "user" | "agent";
1440
2065
  id: string;
2066
+ role: "user" | "agent";
1441
2067
  time: number;
1442
2068
  ev: {
1443
- text: string;
1444
2069
  t: "text";
2070
+ text: string;
1445
2071
  thinking?: boolean | undefined;
1446
2072
  } | {
1447
- text: string;
1448
2073
  t: "service";
2074
+ text: string;
1449
2075
  } | {
1450
2076
  t: "tool-call-start";
1451
2077
  call: string;
@@ -1472,8 +2098,8 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1472
2098
  t: "start";
1473
2099
  title?: string | undefined;
1474
2100
  } | {
1475
- status: "completed" | "failed" | "cancelled";
1476
2101
  t: "turn-end";
2102
+ status: "completed" | "failed" | "cancelled";
1477
2103
  model?: string | undefined;
1478
2104
  usage?: {
1479
2105
  input_tokens: number;
@@ -1494,14 +2120,50 @@ declare const MessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject
1494
2120
  };
1495
2121
  model?: string | undefined;
1496
2122
  durationMs?: number | undefined;
2123
+ } | {
2124
+ t: "task-start";
2125
+ description: string;
2126
+ taskId: string;
2127
+ toolUseId?: string | undefined;
2128
+ taskType?: string | undefined;
2129
+ } | {
2130
+ t: "task-progress";
2131
+ description: string;
2132
+ usage: {
2133
+ durationMs: number;
2134
+ totalTokens: number;
2135
+ toolUses: number;
2136
+ };
2137
+ taskId: string;
2138
+ lastToolName?: string | undefined;
2139
+ } | {
2140
+ t: "task-end";
2141
+ status: "completed" | "failed" | "stopped";
2142
+ taskId: string;
2143
+ summary: string;
2144
+ usage?: {
2145
+ durationMs: number;
2146
+ totalTokens: number;
2147
+ toolUses: number;
2148
+ } | undefined;
2149
+ } | {
2150
+ t: "tool-progress";
2151
+ toolUseId: string;
2152
+ toolName: string;
2153
+ elapsedSeconds: number;
2154
+ taskId?: string | undefined;
2155
+ } | {
2156
+ t: "prompt-suggestion";
2157
+ suggestion: string;
1497
2158
  };
1498
2159
  turn?: string | undefined;
1499
2160
  subagent?: string | undefined;
1500
2161
  };
2162
+ role: "session";
1501
2163
  meta?: {
2164
+ model?: string | null | undefined;
1502
2165
  sentFrom?: string | undefined;
1503
2166
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
1504
- model?: string | null | undefined;
1505
2167
  fallbackModel?: string | null | undefined;
1506
2168
  customSystemPrompt?: string | null | undefined;
1507
2169
  appendSystemPrompt?: string | null | undefined;
@@ -1553,53 +2215,53 @@ declare const UpdateNewMessageBodySchema: z.ZodObject<{
1553
2215
  createdAt: z.ZodNumber;
1554
2216
  updatedAt: z.ZodNumber;
1555
2217
  }, "strip", z.ZodTypeAny, {
2218
+ id: string;
2219
+ seq: number;
1556
2220
  content: {
1557
2221
  c: string;
1558
2222
  t: "encrypted";
1559
2223
  };
1560
- id: string;
1561
- seq: number;
1562
2224
  createdAt: number;
1563
2225
  updatedAt: number;
1564
2226
  localId?: string | null | undefined;
1565
2227
  }, {
2228
+ id: string;
2229
+ seq: number;
1566
2230
  content: {
1567
2231
  c: string;
1568
2232
  t: "encrypted";
1569
2233
  };
1570
- id: string;
1571
- seq: number;
1572
2234
  createdAt: number;
1573
2235
  updatedAt: number;
1574
2236
  localId?: string | null | undefined;
1575
2237
  }>;
1576
2238
  }, "strip", z.ZodTypeAny, {
2239
+ t: "new-message";
1577
2240
  message: {
2241
+ id: string;
2242
+ seq: number;
1578
2243
  content: {
1579
2244
  c: string;
1580
2245
  t: "encrypted";
1581
2246
  };
1582
- id: string;
1583
- seq: number;
1584
2247
  createdAt: number;
1585
2248
  updatedAt: number;
1586
2249
  localId?: string | null | undefined;
1587
2250
  };
1588
- t: "new-message";
1589
2251
  sid: string;
1590
2252
  }, {
2253
+ t: "new-message";
1591
2254
  message: {
2255
+ id: string;
2256
+ seq: number;
1592
2257
  content: {
1593
2258
  c: string;
1594
2259
  t: "encrypted";
1595
2260
  };
1596
- id: string;
1597
- seq: number;
1598
2261
  createdAt: number;
1599
2262
  updatedAt: number;
1600
2263
  localId?: string | null | undefined;
1601
2264
  };
1602
- t: "new-message";
1603
2265
  sid: string;
1604
2266
  }>;
1605
2267
  type UpdateNewMessageBody = z.infer<typeof UpdateNewMessageBodySchema>;
@@ -1734,53 +2396,53 @@ declare const CoreUpdateBodySchema: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
1734
2396
  createdAt: z.ZodNumber;
1735
2397
  updatedAt: z.ZodNumber;
1736
2398
  }, "strip", z.ZodTypeAny, {
2399
+ id: string;
2400
+ seq: number;
1737
2401
  content: {
1738
2402
  c: string;
1739
2403
  t: "encrypted";
1740
2404
  };
1741
- id: string;
1742
- seq: number;
1743
2405
  createdAt: number;
1744
2406
  updatedAt: number;
1745
2407
  localId?: string | null | undefined;
1746
2408
  }, {
2409
+ id: string;
2410
+ seq: number;
1747
2411
  content: {
1748
2412
  c: string;
1749
2413
  t: "encrypted";
1750
2414
  };
1751
- id: string;
1752
- seq: number;
1753
2415
  createdAt: number;
1754
2416
  updatedAt: number;
1755
2417
  localId?: string | null | undefined;
1756
2418
  }>;
1757
2419
  }, "strip", z.ZodTypeAny, {
2420
+ t: "new-message";
1758
2421
  message: {
2422
+ id: string;
2423
+ seq: number;
1759
2424
  content: {
1760
2425
  c: string;
1761
2426
  t: "encrypted";
1762
2427
  };
1763
- id: string;
1764
- seq: number;
1765
2428
  createdAt: number;
1766
2429
  updatedAt: number;
1767
2430
  localId?: string | null | undefined;
1768
2431
  };
1769
- t: "new-message";
1770
2432
  sid: string;
1771
2433
  }, {
2434
+ t: "new-message";
1772
2435
  message: {
2436
+ id: string;
2437
+ seq: number;
1773
2438
  content: {
1774
2439
  c: string;
1775
2440
  t: "encrypted";
1776
2441
  };
1777
- id: string;
1778
- seq: number;
1779
2442
  createdAt: number;
1780
2443
  updatedAt: number;
1781
2444
  localId?: string | null | undefined;
1782
2445
  };
1783
- t: "new-message";
1784
2446
  sid: string;
1785
2447
  }>, z.ZodObject<{
1786
2448
  t: z.ZodLiteral<"update-session">;
@@ -1903,53 +2565,53 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
1903
2565
  createdAt: z.ZodNumber;
1904
2566
  updatedAt: z.ZodNumber;
1905
2567
  }, "strip", z.ZodTypeAny, {
2568
+ id: string;
2569
+ seq: number;
1906
2570
  content: {
1907
2571
  c: string;
1908
2572
  t: "encrypted";
1909
2573
  };
1910
- id: string;
1911
- seq: number;
1912
2574
  createdAt: number;
1913
2575
  updatedAt: number;
1914
2576
  localId?: string | null | undefined;
1915
2577
  }, {
2578
+ id: string;
2579
+ seq: number;
1916
2580
  content: {
1917
2581
  c: string;
1918
2582
  t: "encrypted";
1919
2583
  };
1920
- id: string;
1921
- seq: number;
1922
2584
  createdAt: number;
1923
2585
  updatedAt: number;
1924
2586
  localId?: string | null | undefined;
1925
2587
  }>;
1926
2588
  }, "strip", z.ZodTypeAny, {
2589
+ t: "new-message";
1927
2590
  message: {
2591
+ id: string;
2592
+ seq: number;
1928
2593
  content: {
1929
2594
  c: string;
1930
2595
  t: "encrypted";
1931
2596
  };
1932
- id: string;
1933
- seq: number;
1934
2597
  createdAt: number;
1935
2598
  updatedAt: number;
1936
2599
  localId?: string | null | undefined;
1937
2600
  };
1938
- t: "new-message";
1939
2601
  sid: string;
1940
2602
  }, {
2603
+ t: "new-message";
1941
2604
  message: {
2605
+ id: string;
2606
+ seq: number;
1942
2607
  content: {
1943
2608
  c: string;
1944
2609
  t: "encrypted";
1945
2610
  };
1946
- id: string;
1947
- seq: number;
1948
2611
  createdAt: number;
1949
2612
  updatedAt: number;
1950
2613
  localId?: string | null | undefined;
1951
2614
  };
1952
- t: "new-message";
1953
2615
  sid: string;
1954
2616
  }>, z.ZodObject<{
1955
2617
  t: z.ZodLiteral<"update-session">;
@@ -2054,18 +2716,18 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
2054
2716
  seq: number;
2055
2717
  createdAt: number;
2056
2718
  body: {
2719
+ t: "new-message";
2057
2720
  message: {
2721
+ id: string;
2722
+ seq: number;
2058
2723
  content: {
2059
2724
  c: string;
2060
2725
  t: "encrypted";
2061
2726
  };
2062
- id: string;
2063
- seq: number;
2064
2727
  createdAt: number;
2065
2728
  updatedAt: number;
2066
2729
  localId?: string | null | undefined;
2067
2730
  };
2068
- t: "new-message";
2069
2731
  sid: string;
2070
2732
  } | {
2071
2733
  t: "update-session";
@@ -2097,18 +2759,18 @@ declare const CoreUpdateContainerSchema: z.ZodObject<{
2097
2759
  seq: number;
2098
2760
  createdAt: number;
2099
2761
  body: {
2762
+ t: "new-message";
2100
2763
  message: {
2764
+ id: string;
2765
+ seq: number;
2101
2766
  content: {
2102
2767
  c: string;
2103
2768
  t: "encrypted";
2104
2769
  };
2105
- id: string;
2106
- seq: number;
2107
2770
  createdAt: number;
2108
2771
  updatedAt: number;
2109
2772
  localId?: string | null | undefined;
2110
2773
  };
2111
- t: "new-message";
2112
2774
  sid: string;
2113
2775
  } | {
2114
2776
  t: "update-session";
@@ -2154,22 +2816,22 @@ declare const ApiMessageSchema: z.ZodObject<{
2154
2816
  createdAt: z.ZodNumber;
2155
2817
  updatedAt: z.ZodNumber;
2156
2818
  }, "strip", z.ZodTypeAny, {
2819
+ id: string;
2820
+ seq: number;
2157
2821
  content: {
2158
2822
  c: string;
2159
2823
  t: "encrypted";
2160
2824
  };
2161
- id: string;
2162
- seq: number;
2163
2825
  createdAt: number;
2164
2826
  updatedAt: number;
2165
2827
  localId?: string | null | undefined;
2166
2828
  }, {
2829
+ id: string;
2830
+ seq: number;
2167
2831
  content: {
2168
2832
  c: string;
2169
2833
  t: "encrypted";
2170
2834
  };
2171
- id: string;
2172
- seq: number;
2173
2835
  createdAt: number;
2174
2836
  updatedAt: number;
2175
2837
  localId?: string | null | undefined;
@@ -2195,53 +2857,53 @@ declare const ApiUpdateNewMessageSchema: z.ZodObject<{
2195
2857
  createdAt: z.ZodNumber;
2196
2858
  updatedAt: z.ZodNumber;
2197
2859
  }, "strip", z.ZodTypeAny, {
2860
+ id: string;
2861
+ seq: number;
2198
2862
  content: {
2199
2863
  c: string;
2200
2864
  t: "encrypted";
2201
2865
  };
2202
- id: string;
2203
- seq: number;
2204
2866
  createdAt: number;
2205
2867
  updatedAt: number;
2206
2868
  localId?: string | null | undefined;
2207
2869
  }, {
2870
+ id: string;
2871
+ seq: number;
2208
2872
  content: {
2209
2873
  c: string;
2210
2874
  t: "encrypted";
2211
2875
  };
2212
- id: string;
2213
- seq: number;
2214
2876
  createdAt: number;
2215
2877
  updatedAt: number;
2216
2878
  localId?: string | null | undefined;
2217
2879
  }>;
2218
2880
  }, "strip", z.ZodTypeAny, {
2881
+ t: "new-message";
2219
2882
  message: {
2883
+ id: string;
2884
+ seq: number;
2220
2885
  content: {
2221
2886
  c: string;
2222
2887
  t: "encrypted";
2223
2888
  };
2224
- id: string;
2225
- seq: number;
2226
2889
  createdAt: number;
2227
2890
  updatedAt: number;
2228
2891
  localId?: string | null | undefined;
2229
2892
  };
2230
- t: "new-message";
2231
2893
  sid: string;
2232
2894
  }, {
2895
+ t: "new-message";
2233
2896
  message: {
2897
+ id: string;
2898
+ seq: number;
2234
2899
  content: {
2235
2900
  c: string;
2236
2901
  t: "encrypted";
2237
2902
  };
2238
- id: string;
2239
- seq: number;
2240
2903
  createdAt: number;
2241
2904
  updatedAt: number;
2242
2905
  localId?: string | null | undefined;
2243
2906
  };
2244
- t: "new-message";
2245
2907
  sid: string;
2246
2908
  }>;
2247
2909
  type ApiUpdateNewMessage = UpdateNewMessageBody;
@@ -2365,53 +3027,53 @@ declare const UpdateBodySchema: z.ZodObject<{
2365
3027
  createdAt: z.ZodNumber;
2366
3028
  updatedAt: z.ZodNumber;
2367
3029
  }, "strip", z.ZodTypeAny, {
3030
+ id: string;
3031
+ seq: number;
2368
3032
  content: {
2369
3033
  c: string;
2370
3034
  t: "encrypted";
2371
3035
  };
2372
- id: string;
2373
- seq: number;
2374
3036
  createdAt: number;
2375
3037
  updatedAt: number;
2376
3038
  localId?: string | null | undefined;
2377
3039
  }, {
3040
+ id: string;
3041
+ seq: number;
2378
3042
  content: {
2379
3043
  c: string;
2380
3044
  t: "encrypted";
2381
3045
  };
2382
- id: string;
2383
- seq: number;
2384
3046
  createdAt: number;
2385
3047
  updatedAt: number;
2386
3048
  localId?: string | null | undefined;
2387
3049
  }>;
2388
3050
  }, "strip", z.ZodTypeAny, {
3051
+ t: "new-message";
2389
3052
  message: {
3053
+ id: string;
3054
+ seq: number;
2390
3055
  content: {
2391
3056
  c: string;
2392
3057
  t: "encrypted";
2393
3058
  };
2394
- id: string;
2395
- seq: number;
2396
3059
  createdAt: number;
2397
3060
  updatedAt: number;
2398
3061
  localId?: string | null | undefined;
2399
3062
  };
2400
- t: "new-message";
2401
3063
  sid: string;
2402
3064
  }, {
3065
+ t: "new-message";
2403
3066
  message: {
3067
+ id: string;
3068
+ seq: number;
2404
3069
  content: {
2405
3070
  c: string;
2406
3071
  t: "encrypted";
2407
3072
  };
2408
- id: string;
2409
- seq: number;
2410
3073
  createdAt: number;
2411
3074
  updatedAt: number;
2412
3075
  localId?: string | null | undefined;
2413
3076
  };
2414
- t: "new-message";
2415
3077
  sid: string;
2416
3078
  }>;
2417
3079
  type UpdateBody = UpdateNewMessageBody;
@@ -2438,53 +3100,53 @@ declare const UpdateSchema: z.ZodObject<{
2438
3100
  createdAt: z.ZodNumber;
2439
3101
  updatedAt: z.ZodNumber;
2440
3102
  }, "strip", z.ZodTypeAny, {
3103
+ id: string;
3104
+ seq: number;
2441
3105
  content: {
2442
3106
  c: string;
2443
3107
  t: "encrypted";
2444
3108
  };
2445
- id: string;
2446
- seq: number;
2447
3109
  createdAt: number;
2448
3110
  updatedAt: number;
2449
3111
  localId?: string | null | undefined;
2450
3112
  }, {
3113
+ id: string;
3114
+ seq: number;
2451
3115
  content: {
2452
3116
  c: string;
2453
3117
  t: "encrypted";
2454
3118
  };
2455
- id: string;
2456
- seq: number;
2457
3119
  createdAt: number;
2458
3120
  updatedAt: number;
2459
3121
  localId?: string | null | undefined;
2460
3122
  }>;
2461
3123
  }, "strip", z.ZodTypeAny, {
3124
+ t: "new-message";
2462
3125
  message: {
3126
+ id: string;
3127
+ seq: number;
2463
3128
  content: {
2464
3129
  c: string;
2465
3130
  t: "encrypted";
2466
3131
  };
2467
- id: string;
2468
- seq: number;
2469
3132
  createdAt: number;
2470
3133
  updatedAt: number;
2471
3134
  localId?: string | null | undefined;
2472
3135
  };
2473
- t: "new-message";
2474
3136
  sid: string;
2475
3137
  }, {
3138
+ t: "new-message";
2476
3139
  message: {
3140
+ id: string;
3141
+ seq: number;
2477
3142
  content: {
2478
3143
  c: string;
2479
3144
  t: "encrypted";
2480
3145
  };
2481
- id: string;
2482
- seq: number;
2483
3146
  createdAt: number;
2484
3147
  updatedAt: number;
2485
3148
  localId?: string | null | undefined;
2486
3149
  };
2487
- t: "new-message";
2488
3150
  sid: string;
2489
3151
  }>, z.ZodObject<{
2490
3152
  t: z.ZodLiteral<"update-session">;
@@ -2589,18 +3251,18 @@ declare const UpdateSchema: z.ZodObject<{
2589
3251
  seq: number;
2590
3252
  createdAt: number;
2591
3253
  body: {
3254
+ t: "new-message";
2592
3255
  message: {
3256
+ id: string;
3257
+ seq: number;
2593
3258
  content: {
2594
3259
  c: string;
2595
3260
  t: "encrypted";
2596
3261
  };
2597
- id: string;
2598
- seq: number;
2599
3262
  createdAt: number;
2600
3263
  updatedAt: number;
2601
3264
  localId?: string | null | undefined;
2602
3265
  };
2603
- t: "new-message";
2604
3266
  sid: string;
2605
3267
  } | {
2606
3268
  t: "update-session";
@@ -2632,18 +3294,18 @@ declare const UpdateSchema: z.ZodObject<{
2632
3294
  seq: number;
2633
3295
  createdAt: number;
2634
3296
  body: {
3297
+ t: "new-message";
2635
3298
  message: {
3299
+ id: string;
3300
+ seq: number;
2636
3301
  content: {
2637
3302
  c: string;
2638
3303
  t: "encrypted";
2639
3304
  };
2640
- id: string;
2641
- seq: number;
2642
3305
  createdAt: number;
2643
3306
  updatedAt: number;
2644
3307
  localId?: string | null | undefined;
2645
3308
  };
2646
- t: "new-message";
2647
3309
  sid: string;
2648
3310
  } | {
2649
3311
  t: "update-session";
@@ -2697,9 +3359,9 @@ declare const UserMessageSchema: z.ZodObject<{
2697
3359
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2698
3360
  displayText: z.ZodOptional<z.ZodString>;
2699
3361
  }, "strip", z.ZodTypeAny, {
3362
+ model?: string | null | undefined;
2700
3363
  sentFrom?: string | undefined;
2701
3364
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2702
- model?: string | null | undefined;
2703
3365
  fallbackModel?: string | null | undefined;
2704
3366
  customSystemPrompt?: string | null | undefined;
2705
3367
  appendSystemPrompt?: string | null | undefined;
@@ -2707,9 +3369,9 @@ declare const UserMessageSchema: z.ZodObject<{
2707
3369
  disallowedTools?: string[] | null | undefined;
2708
3370
  displayText?: string | undefined;
2709
3371
  }, {
3372
+ model?: string | null | undefined;
2710
3373
  sentFrom?: string | undefined;
2711
3374
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2712
- model?: string | null | undefined;
2713
3375
  fallbackModel?: string | null | undefined;
2714
3376
  customSystemPrompt?: string | null | undefined;
2715
3377
  appendSystemPrompt?: string | null | undefined;
@@ -2718,16 +3380,15 @@ declare const UserMessageSchema: z.ZodObject<{
2718
3380
  displayText?: string | undefined;
2719
3381
  }>>;
2720
3382
  }, "strip", z.ZodTypeAny, {
2721
- role: "user";
2722
3383
  content: {
2723
3384
  type: "text";
2724
3385
  text: string;
2725
3386
  };
2726
- localKey?: string | undefined;
3387
+ role: "user";
2727
3388
  meta?: {
3389
+ model?: string | null | undefined;
2728
3390
  sentFrom?: string | undefined;
2729
3391
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2730
- model?: string | null | undefined;
2731
3392
  fallbackModel?: string | null | undefined;
2732
3393
  customSystemPrompt?: string | null | undefined;
2733
3394
  appendSystemPrompt?: string | null | undefined;
@@ -2735,17 +3396,17 @@ declare const UserMessageSchema: z.ZodObject<{
2735
3396
  disallowedTools?: string[] | null | undefined;
2736
3397
  displayText?: string | undefined;
2737
3398
  } | undefined;
3399
+ localKey?: string | undefined;
2738
3400
  }, {
2739
- role: "user";
2740
3401
  content: {
2741
3402
  type: "text";
2742
3403
  text: string;
2743
3404
  };
2744
- localKey?: string | undefined;
3405
+ role: "user";
2745
3406
  meta?: {
3407
+ model?: string | null | undefined;
2746
3408
  sentFrom?: string | undefined;
2747
3409
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2748
- model?: string | null | undefined;
2749
3410
  fallbackModel?: string | null | undefined;
2750
3411
  customSystemPrompt?: string | null | undefined;
2751
3412
  appendSystemPrompt?: string | null | undefined;
@@ -2753,6 +3414,7 @@ declare const UserMessageSchema: z.ZodObject<{
2753
3414
  disallowedTools?: string[] | null | undefined;
2754
3415
  displayText?: string | undefined;
2755
3416
  } | undefined;
3417
+ localKey?: string | undefined;
2756
3418
  }>;
2757
3419
  type UserMessage = z.infer<typeof UserMessageSchema>;
2758
3420
  declare const AgentMessageSchema: z.ZodObject<{
@@ -2775,9 +3437,9 @@ declare const AgentMessageSchema: z.ZodObject<{
2775
3437
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2776
3438
  displayText: z.ZodOptional<z.ZodString>;
2777
3439
  }, "strip", z.ZodTypeAny, {
3440
+ model?: string | null | undefined;
2778
3441
  sentFrom?: string | undefined;
2779
3442
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2780
- model?: string | null | undefined;
2781
3443
  fallbackModel?: string | null | undefined;
2782
3444
  customSystemPrompt?: string | null | undefined;
2783
3445
  appendSystemPrompt?: string | null | undefined;
@@ -2785,9 +3447,9 @@ declare const AgentMessageSchema: z.ZodObject<{
2785
3447
  disallowedTools?: string[] | null | undefined;
2786
3448
  displayText?: string | undefined;
2787
3449
  }, {
3450
+ model?: string | null | undefined;
2788
3451
  sentFrom?: string | undefined;
2789
3452
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2790
- model?: string | null | undefined;
2791
3453
  fallbackModel?: string | null | undefined;
2792
3454
  customSystemPrompt?: string | null | undefined;
2793
3455
  appendSystemPrompt?: string | null | undefined;
@@ -2796,16 +3458,16 @@ declare const AgentMessageSchema: z.ZodObject<{
2796
3458
  displayText?: string | undefined;
2797
3459
  }>>;
2798
3460
  }, "strip", z.ZodTypeAny, {
2799
- role: "agent";
2800
3461
  content: {
2801
3462
  type: string;
2802
3463
  } & {
2803
3464
  [k: string]: unknown;
2804
3465
  };
3466
+ role: "agent";
2805
3467
  meta?: {
3468
+ model?: string | null | undefined;
2806
3469
  sentFrom?: string | undefined;
2807
3470
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2808
- model?: string | null | undefined;
2809
3471
  fallbackModel?: string | null | undefined;
2810
3472
  customSystemPrompt?: string | null | undefined;
2811
3473
  appendSystemPrompt?: string | null | undefined;
@@ -2814,16 +3476,16 @@ declare const AgentMessageSchema: z.ZodObject<{
2814
3476
  displayText?: string | undefined;
2815
3477
  } | undefined;
2816
3478
  }, {
2817
- role: "agent";
2818
3479
  content: {
2819
3480
  type: string;
2820
3481
  } & {
2821
3482
  [k: string]: unknown;
2822
3483
  };
3484
+ role: "agent";
2823
3485
  meta?: {
3486
+ model?: string | null | undefined;
2824
3487
  sentFrom?: string | undefined;
2825
3488
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2826
- model?: string | null | undefined;
2827
3489
  fallbackModel?: string | null | undefined;
2828
3490
  customSystemPrompt?: string | null | undefined;
2829
3491
  appendSystemPrompt?: string | null | undefined;
@@ -2857,9 +3519,9 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2857
3519
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2858
3520
  displayText: z.ZodOptional<z.ZodString>;
2859
3521
  }, "strip", z.ZodTypeAny, {
3522
+ model?: string | null | undefined;
2860
3523
  sentFrom?: string | undefined;
2861
3524
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2862
- model?: string | null | undefined;
2863
3525
  fallbackModel?: string | null | undefined;
2864
3526
  customSystemPrompt?: string | null | undefined;
2865
3527
  appendSystemPrompt?: string | null | undefined;
@@ -2867,9 +3529,9 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2867
3529
  disallowedTools?: string[] | null | undefined;
2868
3530
  displayText?: string | undefined;
2869
3531
  }, {
3532
+ model?: string | null | undefined;
2870
3533
  sentFrom?: string | undefined;
2871
3534
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2872
- model?: string | null | undefined;
2873
3535
  fallbackModel?: string | null | undefined;
2874
3536
  customSystemPrompt?: string | null | undefined;
2875
3537
  appendSystemPrompt?: string | null | undefined;
@@ -2878,16 +3540,15 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2878
3540
  displayText?: string | undefined;
2879
3541
  }>>;
2880
3542
  }, "strip", z.ZodTypeAny, {
2881
- role: "user";
2882
3543
  content: {
2883
3544
  type: "text";
2884
3545
  text: string;
2885
3546
  };
2886
- localKey?: string | undefined;
3547
+ role: "user";
2887
3548
  meta?: {
3549
+ model?: string | null | undefined;
2888
3550
  sentFrom?: string | undefined;
2889
3551
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2890
- model?: string | null | undefined;
2891
3552
  fallbackModel?: string | null | undefined;
2892
3553
  customSystemPrompt?: string | null | undefined;
2893
3554
  appendSystemPrompt?: string | null | undefined;
@@ -2895,17 +3556,17 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2895
3556
  disallowedTools?: string[] | null | undefined;
2896
3557
  displayText?: string | undefined;
2897
3558
  } | undefined;
3559
+ localKey?: string | undefined;
2898
3560
  }, {
2899
- role: "user";
2900
3561
  content: {
2901
3562
  type: "text";
2902
3563
  text: string;
2903
3564
  };
2904
- localKey?: string | undefined;
3565
+ role: "user";
2905
3566
  meta?: {
3567
+ model?: string | null | undefined;
2906
3568
  sentFrom?: string | undefined;
2907
3569
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2908
- model?: string | null | undefined;
2909
3570
  fallbackModel?: string | null | undefined;
2910
3571
  customSystemPrompt?: string | null | undefined;
2911
3572
  appendSystemPrompt?: string | null | undefined;
@@ -2913,6 +3574,7 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2913
3574
  disallowedTools?: string[] | null | undefined;
2914
3575
  displayText?: string | undefined;
2915
3576
  } | undefined;
3577
+ localKey?: string | undefined;
2916
3578
  }>, z.ZodObject<{
2917
3579
  role: z.ZodLiteral<"agent">;
2918
3580
  content: z.ZodObject<{
@@ -2933,9 +3595,9 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2933
3595
  disallowedTools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
2934
3596
  displayText: z.ZodOptional<z.ZodString>;
2935
3597
  }, "strip", z.ZodTypeAny, {
3598
+ model?: string | null | undefined;
2936
3599
  sentFrom?: string | undefined;
2937
3600
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2938
- model?: string | null | undefined;
2939
3601
  fallbackModel?: string | null | undefined;
2940
3602
  customSystemPrompt?: string | null | undefined;
2941
3603
  appendSystemPrompt?: string | null | undefined;
@@ -2943,9 +3605,9 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2943
3605
  disallowedTools?: string[] | null | undefined;
2944
3606
  displayText?: string | undefined;
2945
3607
  }, {
3608
+ model?: string | null | undefined;
2946
3609
  sentFrom?: string | undefined;
2947
3610
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2948
- model?: string | null | undefined;
2949
3611
  fallbackModel?: string | null | undefined;
2950
3612
  customSystemPrompt?: string | null | undefined;
2951
3613
  appendSystemPrompt?: string | null | undefined;
@@ -2954,16 +3616,16 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2954
3616
  displayText?: string | undefined;
2955
3617
  }>>;
2956
3618
  }, "strip", z.ZodTypeAny, {
2957
- role: "agent";
2958
3619
  content: {
2959
3620
  type: string;
2960
3621
  } & {
2961
3622
  [k: string]: unknown;
2962
3623
  };
3624
+ role: "agent";
2963
3625
  meta?: {
3626
+ model?: string | null | undefined;
2964
3627
  sentFrom?: string | undefined;
2965
3628
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2966
- model?: string | null | undefined;
2967
3629
  fallbackModel?: string | null | undefined;
2968
3630
  customSystemPrompt?: string | null | undefined;
2969
3631
  appendSystemPrompt?: string | null | undefined;
@@ -2972,16 +3634,16 @@ declare const LegacyMessageContentSchema: z.ZodDiscriminatedUnion<"role", [z.Zod
2972
3634
  displayText?: string | undefined;
2973
3635
  } | undefined;
2974
3636
  }, {
2975
- role: "agent";
2976
3637
  content: {
2977
3638
  type: string;
2978
3639
  } & {
2979
3640
  [k: string]: unknown;
2980
3641
  };
3642
+ role: "agent";
2981
3643
  meta?: {
3644
+ model?: string | null | undefined;
2982
3645
  sentFrom?: string | undefined;
2983
3646
  permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "read-only" | "safe-yolo" | "yolo" | undefined;
2984
- model?: string | null | undefined;
2985
3647
  fallbackModel?: string | null | undefined;
2986
3648
  customSystemPrompt?: string | null | undefined;
2987
3649
  appendSystemPrompt?: string | null | undefined;
@@ -2999,23 +3661,23 @@ declare const sessionTextEventSchema: z.ZodObject<{
2999
3661
  text: z.ZodString;
3000
3662
  thinking: z.ZodOptional<z.ZodBoolean>;
3001
3663
  }, "strip", z.ZodTypeAny, {
3002
- text: string;
3003
3664
  t: "text";
3665
+ text: string;
3004
3666
  thinking?: boolean | undefined;
3005
3667
  }, {
3006
- text: string;
3007
3668
  t: "text";
3669
+ text: string;
3008
3670
  thinking?: boolean | undefined;
3009
3671
  }>;
3010
3672
  declare const sessionServiceMessageEventSchema: z.ZodObject<{
3011
3673
  t: z.ZodLiteral<"service">;
3012
3674
  text: z.ZodString;
3013
3675
  }, "strip", z.ZodTypeAny, {
3014
- text: string;
3015
3676
  t: "service";
3016
- }, {
3017
3677
  text: string;
3678
+ }, {
3018
3679
  t: "service";
3680
+ text: string;
3019
3681
  }>;
3020
3682
  declare const sessionToolCallStartEventSchema: z.ZodObject<{
3021
3683
  t: z.ZodLiteral<"tool-call-start">;
@@ -3129,8 +3791,8 @@ declare const sessionTurnEndEventSchema: z.ZodObject<{
3129
3791
  }>>;
3130
3792
  durationMs: z.ZodOptional<z.ZodNumber>;
3131
3793
  }, "strip", z.ZodTypeAny, {
3132
- status: "completed" | "failed" | "cancelled";
3133
3794
  t: "turn-end";
3795
+ status: "completed" | "failed" | "cancelled";
3134
3796
  model?: string | undefined;
3135
3797
  usage?: {
3136
3798
  input_tokens: number;
@@ -3140,8 +3802,8 @@ declare const sessionTurnEndEventSchema: z.ZodObject<{
3140
3802
  } | undefined;
3141
3803
  durationMs?: number | undefined;
3142
3804
  }, {
3143
- status: "completed" | "failed" | "cancelled";
3144
3805
  t: "turn-end";
3806
+ status: "completed" | "failed" | "cancelled";
3145
3807
  model?: string | undefined;
3146
3808
  usage?: {
3147
3809
  input_tokens: number;
@@ -3199,27 +3861,153 @@ declare const sessionUsageUpdateEventSchema: z.ZodObject<{
3199
3861
  model?: string | undefined;
3200
3862
  durationMs?: number | undefined;
3201
3863
  }>;
3864
+ declare const sessionTaskStartEventSchema: z.ZodObject<{
3865
+ t: z.ZodLiteral<"task-start">;
3866
+ taskId: z.ZodString;
3867
+ toolUseId: z.ZodOptional<z.ZodString>;
3868
+ description: z.ZodString;
3869
+ taskType: z.ZodOptional<z.ZodString>;
3870
+ }, "strip", z.ZodTypeAny, {
3871
+ t: "task-start";
3872
+ description: string;
3873
+ taskId: string;
3874
+ toolUseId?: string | undefined;
3875
+ taskType?: string | undefined;
3876
+ }, {
3877
+ t: "task-start";
3878
+ description: string;
3879
+ taskId: string;
3880
+ toolUseId?: string | undefined;
3881
+ taskType?: string | undefined;
3882
+ }>;
3883
+ declare const sessionTaskProgressEventSchema: z.ZodObject<{
3884
+ t: z.ZodLiteral<"task-progress">;
3885
+ taskId: z.ZodString;
3886
+ description: z.ZodString;
3887
+ usage: z.ZodObject<{
3888
+ totalTokens: z.ZodNumber;
3889
+ toolUses: z.ZodNumber;
3890
+ durationMs: z.ZodNumber;
3891
+ }, "strip", z.ZodTypeAny, {
3892
+ durationMs: number;
3893
+ totalTokens: number;
3894
+ toolUses: number;
3895
+ }, {
3896
+ durationMs: number;
3897
+ totalTokens: number;
3898
+ toolUses: number;
3899
+ }>;
3900
+ lastToolName: z.ZodOptional<z.ZodString>;
3901
+ }, "strip", z.ZodTypeAny, {
3902
+ t: "task-progress";
3903
+ description: string;
3904
+ usage: {
3905
+ durationMs: number;
3906
+ totalTokens: number;
3907
+ toolUses: number;
3908
+ };
3909
+ taskId: string;
3910
+ lastToolName?: string | undefined;
3911
+ }, {
3912
+ t: "task-progress";
3913
+ description: string;
3914
+ usage: {
3915
+ durationMs: number;
3916
+ totalTokens: number;
3917
+ toolUses: number;
3918
+ };
3919
+ taskId: string;
3920
+ lastToolName?: string | undefined;
3921
+ }>;
3922
+ declare const sessionTaskEndEventSchema: z.ZodObject<{
3923
+ t: z.ZodLiteral<"task-end">;
3924
+ taskId: z.ZodString;
3925
+ status: z.ZodEnum<["completed", "failed", "stopped"]>;
3926
+ summary: z.ZodString;
3927
+ usage: z.ZodOptional<z.ZodObject<{
3928
+ totalTokens: z.ZodNumber;
3929
+ toolUses: z.ZodNumber;
3930
+ durationMs: z.ZodNumber;
3931
+ }, "strip", z.ZodTypeAny, {
3932
+ durationMs: number;
3933
+ totalTokens: number;
3934
+ toolUses: number;
3935
+ }, {
3936
+ durationMs: number;
3937
+ totalTokens: number;
3938
+ toolUses: number;
3939
+ }>>;
3940
+ }, "strip", z.ZodTypeAny, {
3941
+ t: "task-end";
3942
+ status: "completed" | "failed" | "stopped";
3943
+ taskId: string;
3944
+ summary: string;
3945
+ usage?: {
3946
+ durationMs: number;
3947
+ totalTokens: number;
3948
+ toolUses: number;
3949
+ } | undefined;
3950
+ }, {
3951
+ t: "task-end";
3952
+ status: "completed" | "failed" | "stopped";
3953
+ taskId: string;
3954
+ summary: string;
3955
+ usage?: {
3956
+ durationMs: number;
3957
+ totalTokens: number;
3958
+ toolUses: number;
3959
+ } | undefined;
3960
+ }>;
3961
+ declare const sessionToolProgressEventSchema: z.ZodObject<{
3962
+ t: z.ZodLiteral<"tool-progress">;
3963
+ toolUseId: z.ZodString;
3964
+ toolName: z.ZodString;
3965
+ elapsedSeconds: z.ZodNumber;
3966
+ taskId: z.ZodOptional<z.ZodString>;
3967
+ }, "strip", z.ZodTypeAny, {
3968
+ t: "tool-progress";
3969
+ toolUseId: string;
3970
+ toolName: string;
3971
+ elapsedSeconds: number;
3972
+ taskId?: string | undefined;
3973
+ }, {
3974
+ t: "tool-progress";
3975
+ toolUseId: string;
3976
+ toolName: string;
3977
+ elapsedSeconds: number;
3978
+ taskId?: string | undefined;
3979
+ }>;
3980
+ declare const sessionPromptSuggestionEventSchema: z.ZodObject<{
3981
+ t: z.ZodLiteral<"prompt-suggestion">;
3982
+ suggestion: z.ZodString;
3983
+ }, "strip", z.ZodTypeAny, {
3984
+ t: "prompt-suggestion";
3985
+ suggestion: string;
3986
+ }, {
3987
+ t: "prompt-suggestion";
3988
+ suggestion: string;
3989
+ }>;
3202
3990
  declare const sessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
3203
3991
  t: z.ZodLiteral<"text">;
3204
3992
  text: z.ZodString;
3205
3993
  thinking: z.ZodOptional<z.ZodBoolean>;
3206
3994
  }, "strip", z.ZodTypeAny, {
3207
- text: string;
3208
3995
  t: "text";
3996
+ text: string;
3209
3997
  thinking?: boolean | undefined;
3210
3998
  }, {
3211
- text: string;
3212
3999
  t: "text";
4000
+ text: string;
3213
4001
  thinking?: boolean | undefined;
3214
4002
  }>, z.ZodObject<{
3215
4003
  t: z.ZodLiteral<"service">;
3216
4004
  text: z.ZodString;
3217
4005
  }, "strip", z.ZodTypeAny, {
3218
- text: string;
3219
4006
  t: "service";
3220
- }, {
3221
4007
  text: string;
4008
+ }, {
3222
4009
  t: "service";
4010
+ text: string;
3223
4011
  }>, z.ZodObject<{
3224
4012
  t: z.ZodLiteral<"tool-call-start">;
3225
4013
  call: z.ZodString;
@@ -3325,8 +4113,8 @@ declare const sessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
3325
4113
  }>>;
3326
4114
  durationMs: z.ZodOptional<z.ZodNumber>;
3327
4115
  }, "strip", z.ZodTypeAny, {
3328
- status: "completed" | "failed" | "cancelled";
3329
4116
  t: "turn-end";
4117
+ status: "completed" | "failed" | "cancelled";
3330
4118
  model?: string | undefined;
3331
4119
  usage?: {
3332
4120
  input_tokens: number;
@@ -3336,8 +4124,8 @@ declare const sessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
3336
4124
  } | undefined;
3337
4125
  durationMs?: number | undefined;
3338
4126
  }, {
3339
- status: "completed" | "failed" | "cancelled";
3340
4127
  t: "turn-end";
4128
+ status: "completed" | "failed" | "cancelled";
3341
4129
  model?: string | undefined;
3342
4130
  usage?: {
3343
4131
  input_tokens: number;
@@ -3392,6 +4180,127 @@ declare const sessionEventSchema: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
3392
4180
  };
3393
4181
  model?: string | undefined;
3394
4182
  durationMs?: number | undefined;
4183
+ }>, z.ZodObject<{
4184
+ t: z.ZodLiteral<"task-start">;
4185
+ taskId: z.ZodString;
4186
+ toolUseId: z.ZodOptional<z.ZodString>;
4187
+ description: z.ZodString;
4188
+ taskType: z.ZodOptional<z.ZodString>;
4189
+ }, "strip", z.ZodTypeAny, {
4190
+ t: "task-start";
4191
+ description: string;
4192
+ taskId: string;
4193
+ toolUseId?: string | undefined;
4194
+ taskType?: string | undefined;
4195
+ }, {
4196
+ t: "task-start";
4197
+ description: string;
4198
+ taskId: string;
4199
+ toolUseId?: string | undefined;
4200
+ taskType?: string | undefined;
4201
+ }>, z.ZodObject<{
4202
+ t: z.ZodLiteral<"task-progress">;
4203
+ taskId: z.ZodString;
4204
+ description: z.ZodString;
4205
+ usage: z.ZodObject<{
4206
+ totalTokens: z.ZodNumber;
4207
+ toolUses: z.ZodNumber;
4208
+ durationMs: z.ZodNumber;
4209
+ }, "strip", z.ZodTypeAny, {
4210
+ durationMs: number;
4211
+ totalTokens: number;
4212
+ toolUses: number;
4213
+ }, {
4214
+ durationMs: number;
4215
+ totalTokens: number;
4216
+ toolUses: number;
4217
+ }>;
4218
+ lastToolName: z.ZodOptional<z.ZodString>;
4219
+ }, "strip", z.ZodTypeAny, {
4220
+ t: "task-progress";
4221
+ description: string;
4222
+ usage: {
4223
+ durationMs: number;
4224
+ totalTokens: number;
4225
+ toolUses: number;
4226
+ };
4227
+ taskId: string;
4228
+ lastToolName?: string | undefined;
4229
+ }, {
4230
+ t: "task-progress";
4231
+ description: string;
4232
+ usage: {
4233
+ durationMs: number;
4234
+ totalTokens: number;
4235
+ toolUses: number;
4236
+ };
4237
+ taskId: string;
4238
+ lastToolName?: string | undefined;
4239
+ }>, z.ZodObject<{
4240
+ t: z.ZodLiteral<"task-end">;
4241
+ taskId: z.ZodString;
4242
+ status: z.ZodEnum<["completed", "failed", "stopped"]>;
4243
+ summary: z.ZodString;
4244
+ usage: z.ZodOptional<z.ZodObject<{
4245
+ totalTokens: z.ZodNumber;
4246
+ toolUses: z.ZodNumber;
4247
+ durationMs: z.ZodNumber;
4248
+ }, "strip", z.ZodTypeAny, {
4249
+ durationMs: number;
4250
+ totalTokens: number;
4251
+ toolUses: number;
4252
+ }, {
4253
+ durationMs: number;
4254
+ totalTokens: number;
4255
+ toolUses: number;
4256
+ }>>;
4257
+ }, "strip", z.ZodTypeAny, {
4258
+ t: "task-end";
4259
+ status: "completed" | "failed" | "stopped";
4260
+ taskId: string;
4261
+ summary: string;
4262
+ usage?: {
4263
+ durationMs: number;
4264
+ totalTokens: number;
4265
+ toolUses: number;
4266
+ } | undefined;
4267
+ }, {
4268
+ t: "task-end";
4269
+ status: "completed" | "failed" | "stopped";
4270
+ taskId: string;
4271
+ summary: string;
4272
+ usage?: {
4273
+ durationMs: number;
4274
+ totalTokens: number;
4275
+ toolUses: number;
4276
+ } | undefined;
4277
+ }>, z.ZodObject<{
4278
+ t: z.ZodLiteral<"tool-progress">;
4279
+ toolUseId: z.ZodString;
4280
+ toolName: z.ZodString;
4281
+ elapsedSeconds: z.ZodNumber;
4282
+ taskId: z.ZodOptional<z.ZodString>;
4283
+ }, "strip", z.ZodTypeAny, {
4284
+ t: "tool-progress";
4285
+ toolUseId: string;
4286
+ toolName: string;
4287
+ elapsedSeconds: number;
4288
+ taskId?: string | undefined;
4289
+ }, {
4290
+ t: "tool-progress";
4291
+ toolUseId: string;
4292
+ toolName: string;
4293
+ elapsedSeconds: number;
4294
+ taskId?: string | undefined;
4295
+ }>, z.ZodObject<{
4296
+ t: z.ZodLiteral<"prompt-suggestion">;
4297
+ suggestion: z.ZodString;
4298
+ }, "strip", z.ZodTypeAny, {
4299
+ t: "prompt-suggestion";
4300
+ suggestion: string;
4301
+ }, {
4302
+ t: "prompt-suggestion";
4303
+ suggestion: string;
3395
4304
  }>]>;
3396
4305
  type SessionEvent = z.infer<typeof sessionEventSchema>;
3397
4306
  declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
@@ -3405,22 +4314,22 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3405
4314
  text: z.ZodString;
3406
4315
  thinking: z.ZodOptional<z.ZodBoolean>;
3407
4316
  }, "strip", z.ZodTypeAny, {
3408
- text: string;
3409
4317
  t: "text";
4318
+ text: string;
3410
4319
  thinking?: boolean | undefined;
3411
4320
  }, {
3412
- text: string;
3413
4321
  t: "text";
4322
+ text: string;
3414
4323
  thinking?: boolean | undefined;
3415
4324
  }>, z.ZodObject<{
3416
4325
  t: z.ZodLiteral<"service">;
3417
4326
  text: z.ZodString;
3418
4327
  }, "strip", z.ZodTypeAny, {
3419
- text: string;
3420
4328
  t: "service";
3421
- }, {
3422
4329
  text: string;
4330
+ }, {
3423
4331
  t: "service";
4332
+ text: string;
3424
4333
  }>, z.ZodObject<{
3425
4334
  t: z.ZodLiteral<"tool-call-start">;
3426
4335
  call: z.ZodString;
@@ -3526,8 +4435,8 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3526
4435
  }>>;
3527
4436
  durationMs: z.ZodOptional<z.ZodNumber>;
3528
4437
  }, "strip", z.ZodTypeAny, {
3529
- status: "completed" | "failed" | "cancelled";
3530
4438
  t: "turn-end";
4439
+ status: "completed" | "failed" | "cancelled";
3531
4440
  model?: string | undefined;
3532
4441
  usage?: {
3533
4442
  input_tokens: number;
@@ -3537,8 +4446,8 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3537
4446
  } | undefined;
3538
4447
  durationMs?: number | undefined;
3539
4448
  }, {
3540
- status: "completed" | "failed" | "cancelled";
3541
4449
  t: "turn-end";
4450
+ status: "completed" | "failed" | "cancelled";
3542
4451
  model?: string | undefined;
3543
4452
  usage?: {
3544
4453
  input_tokens: number;
@@ -3593,18 +4502,139 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3593
4502
  };
3594
4503
  model?: string | undefined;
3595
4504
  durationMs?: number | undefined;
4505
+ }>, z.ZodObject<{
4506
+ t: z.ZodLiteral<"task-start">;
4507
+ taskId: z.ZodString;
4508
+ toolUseId: z.ZodOptional<z.ZodString>;
4509
+ description: z.ZodString;
4510
+ taskType: z.ZodOptional<z.ZodString>;
4511
+ }, "strip", z.ZodTypeAny, {
4512
+ t: "task-start";
4513
+ description: string;
4514
+ taskId: string;
4515
+ toolUseId?: string | undefined;
4516
+ taskType?: string | undefined;
4517
+ }, {
4518
+ t: "task-start";
4519
+ description: string;
4520
+ taskId: string;
4521
+ toolUseId?: string | undefined;
4522
+ taskType?: string | undefined;
4523
+ }>, z.ZodObject<{
4524
+ t: z.ZodLiteral<"task-progress">;
4525
+ taskId: z.ZodString;
4526
+ description: z.ZodString;
4527
+ usage: z.ZodObject<{
4528
+ totalTokens: z.ZodNumber;
4529
+ toolUses: z.ZodNumber;
4530
+ durationMs: z.ZodNumber;
4531
+ }, "strip", z.ZodTypeAny, {
4532
+ durationMs: number;
4533
+ totalTokens: number;
4534
+ toolUses: number;
4535
+ }, {
4536
+ durationMs: number;
4537
+ totalTokens: number;
4538
+ toolUses: number;
4539
+ }>;
4540
+ lastToolName: z.ZodOptional<z.ZodString>;
4541
+ }, "strip", z.ZodTypeAny, {
4542
+ t: "task-progress";
4543
+ description: string;
4544
+ usage: {
4545
+ durationMs: number;
4546
+ totalTokens: number;
4547
+ toolUses: number;
4548
+ };
4549
+ taskId: string;
4550
+ lastToolName?: string | undefined;
4551
+ }, {
4552
+ t: "task-progress";
4553
+ description: string;
4554
+ usage: {
4555
+ durationMs: number;
4556
+ totalTokens: number;
4557
+ toolUses: number;
4558
+ };
4559
+ taskId: string;
4560
+ lastToolName?: string | undefined;
4561
+ }>, z.ZodObject<{
4562
+ t: z.ZodLiteral<"task-end">;
4563
+ taskId: z.ZodString;
4564
+ status: z.ZodEnum<["completed", "failed", "stopped"]>;
4565
+ summary: z.ZodString;
4566
+ usage: z.ZodOptional<z.ZodObject<{
4567
+ totalTokens: z.ZodNumber;
4568
+ toolUses: z.ZodNumber;
4569
+ durationMs: z.ZodNumber;
4570
+ }, "strip", z.ZodTypeAny, {
4571
+ durationMs: number;
4572
+ totalTokens: number;
4573
+ toolUses: number;
4574
+ }, {
4575
+ durationMs: number;
4576
+ totalTokens: number;
4577
+ toolUses: number;
4578
+ }>>;
4579
+ }, "strip", z.ZodTypeAny, {
4580
+ t: "task-end";
4581
+ status: "completed" | "failed" | "stopped";
4582
+ taskId: string;
4583
+ summary: string;
4584
+ usage?: {
4585
+ durationMs: number;
4586
+ totalTokens: number;
4587
+ toolUses: number;
4588
+ } | undefined;
4589
+ }, {
4590
+ t: "task-end";
4591
+ status: "completed" | "failed" | "stopped";
4592
+ taskId: string;
4593
+ summary: string;
4594
+ usage?: {
4595
+ durationMs: number;
4596
+ totalTokens: number;
4597
+ toolUses: number;
4598
+ } | undefined;
4599
+ }>, z.ZodObject<{
4600
+ t: z.ZodLiteral<"tool-progress">;
4601
+ toolUseId: z.ZodString;
4602
+ toolName: z.ZodString;
4603
+ elapsedSeconds: z.ZodNumber;
4604
+ taskId: z.ZodOptional<z.ZodString>;
4605
+ }, "strip", z.ZodTypeAny, {
4606
+ t: "tool-progress";
4607
+ toolUseId: string;
4608
+ toolName: string;
4609
+ elapsedSeconds: number;
4610
+ taskId?: string | undefined;
4611
+ }, {
4612
+ t: "tool-progress";
4613
+ toolUseId: string;
4614
+ toolName: string;
4615
+ elapsedSeconds: number;
4616
+ taskId?: string | undefined;
4617
+ }>, z.ZodObject<{
4618
+ t: z.ZodLiteral<"prompt-suggestion">;
4619
+ suggestion: z.ZodString;
4620
+ }, "strip", z.ZodTypeAny, {
4621
+ t: "prompt-suggestion";
4622
+ suggestion: string;
4623
+ }, {
4624
+ t: "prompt-suggestion";
4625
+ suggestion: string;
3596
4626
  }>]>;
3597
4627
  }, "strip", z.ZodTypeAny, {
3598
- role: "user" | "agent";
3599
4628
  id: string;
4629
+ role: "user" | "agent";
3600
4630
  time: number;
3601
4631
  ev: {
3602
- text: string;
3603
4632
  t: "text";
4633
+ text: string;
3604
4634
  thinking?: boolean | undefined;
3605
4635
  } | {
3606
- text: string;
3607
4636
  t: "service";
4637
+ text: string;
3608
4638
  } | {
3609
4639
  t: "tool-call-start";
3610
4640
  call: string;
@@ -3631,8 +4661,8 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3631
4661
  t: "start";
3632
4662
  title?: string | undefined;
3633
4663
  } | {
3634
- status: "completed" | "failed" | "cancelled";
3635
4664
  t: "turn-end";
4665
+ status: "completed" | "failed" | "cancelled";
3636
4666
  model?: string | undefined;
3637
4667
  usage?: {
3638
4668
  input_tokens: number;
@@ -3653,20 +4683,55 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3653
4683
  };
3654
4684
  model?: string | undefined;
3655
4685
  durationMs?: number | undefined;
4686
+ } | {
4687
+ t: "task-start";
4688
+ description: string;
4689
+ taskId: string;
4690
+ toolUseId?: string | undefined;
4691
+ taskType?: string | undefined;
4692
+ } | {
4693
+ t: "task-progress";
4694
+ description: string;
4695
+ usage: {
4696
+ durationMs: number;
4697
+ totalTokens: number;
4698
+ toolUses: number;
4699
+ };
4700
+ taskId: string;
4701
+ lastToolName?: string | undefined;
4702
+ } | {
4703
+ t: "task-end";
4704
+ status: "completed" | "failed" | "stopped";
4705
+ taskId: string;
4706
+ summary: string;
4707
+ usage?: {
4708
+ durationMs: number;
4709
+ totalTokens: number;
4710
+ toolUses: number;
4711
+ } | undefined;
4712
+ } | {
4713
+ t: "tool-progress";
4714
+ toolUseId: string;
4715
+ toolName: string;
4716
+ elapsedSeconds: number;
4717
+ taskId?: string | undefined;
4718
+ } | {
4719
+ t: "prompt-suggestion";
4720
+ suggestion: string;
3656
4721
  };
3657
4722
  turn?: string | undefined;
3658
4723
  subagent?: string | undefined;
3659
4724
  }, {
3660
- role: "user" | "agent";
3661
4725
  id: string;
4726
+ role: "user" | "agent";
3662
4727
  time: number;
3663
4728
  ev: {
3664
- text: string;
3665
4729
  t: "text";
4730
+ text: string;
3666
4731
  thinking?: boolean | undefined;
3667
4732
  } | {
3668
- text: string;
3669
4733
  t: "service";
4734
+ text: string;
3670
4735
  } | {
3671
4736
  t: "tool-call-start";
3672
4737
  call: string;
@@ -3693,8 +4758,8 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3693
4758
  t: "start";
3694
4759
  title?: string | undefined;
3695
4760
  } | {
3696
- status: "completed" | "failed" | "cancelled";
3697
4761
  t: "turn-end";
4762
+ status: "completed" | "failed" | "cancelled";
3698
4763
  model?: string | undefined;
3699
4764
  usage?: {
3700
4765
  input_tokens: number;
@@ -3715,20 +4780,55 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3715
4780
  };
3716
4781
  model?: string | undefined;
3717
4782
  durationMs?: number | undefined;
4783
+ } | {
4784
+ t: "task-start";
4785
+ description: string;
4786
+ taskId: string;
4787
+ toolUseId?: string | undefined;
4788
+ taskType?: string | undefined;
4789
+ } | {
4790
+ t: "task-progress";
4791
+ description: string;
4792
+ usage: {
4793
+ durationMs: number;
4794
+ totalTokens: number;
4795
+ toolUses: number;
4796
+ };
4797
+ taskId: string;
4798
+ lastToolName?: string | undefined;
4799
+ } | {
4800
+ t: "task-end";
4801
+ status: "completed" | "failed" | "stopped";
4802
+ taskId: string;
4803
+ summary: string;
4804
+ usage?: {
4805
+ durationMs: number;
4806
+ totalTokens: number;
4807
+ toolUses: number;
4808
+ } | undefined;
4809
+ } | {
4810
+ t: "tool-progress";
4811
+ toolUseId: string;
4812
+ toolName: string;
4813
+ elapsedSeconds: number;
4814
+ taskId?: string | undefined;
4815
+ } | {
4816
+ t: "prompt-suggestion";
4817
+ suggestion: string;
3718
4818
  };
3719
4819
  turn?: string | undefined;
3720
4820
  subagent?: string | undefined;
3721
4821
  }>, {
3722
- role: "user" | "agent";
3723
4822
  id: string;
4823
+ role: "user" | "agent";
3724
4824
  time: number;
3725
4825
  ev: {
3726
- text: string;
3727
4826
  t: "text";
4827
+ text: string;
3728
4828
  thinking?: boolean | undefined;
3729
4829
  } | {
3730
- text: string;
3731
4830
  t: "service";
4831
+ text: string;
3732
4832
  } | {
3733
4833
  t: "tool-call-start";
3734
4834
  call: string;
@@ -3755,8 +4855,8 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3755
4855
  t: "start";
3756
4856
  title?: string | undefined;
3757
4857
  } | {
3758
- status: "completed" | "failed" | "cancelled";
3759
4858
  t: "turn-end";
4859
+ status: "completed" | "failed" | "cancelled";
3760
4860
  model?: string | undefined;
3761
4861
  usage?: {
3762
4862
  input_tokens: number;
@@ -3777,20 +4877,55 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3777
4877
  };
3778
4878
  model?: string | undefined;
3779
4879
  durationMs?: number | undefined;
4880
+ } | {
4881
+ t: "task-start";
4882
+ description: string;
4883
+ taskId: string;
4884
+ toolUseId?: string | undefined;
4885
+ taskType?: string | undefined;
4886
+ } | {
4887
+ t: "task-progress";
4888
+ description: string;
4889
+ usage: {
4890
+ durationMs: number;
4891
+ totalTokens: number;
4892
+ toolUses: number;
4893
+ };
4894
+ taskId: string;
4895
+ lastToolName?: string | undefined;
4896
+ } | {
4897
+ t: "task-end";
4898
+ status: "completed" | "failed" | "stopped";
4899
+ taskId: string;
4900
+ summary: string;
4901
+ usage?: {
4902
+ durationMs: number;
4903
+ totalTokens: number;
4904
+ toolUses: number;
4905
+ } | undefined;
4906
+ } | {
4907
+ t: "tool-progress";
4908
+ toolUseId: string;
4909
+ toolName: string;
4910
+ elapsedSeconds: number;
4911
+ taskId?: string | undefined;
4912
+ } | {
4913
+ t: "prompt-suggestion";
4914
+ suggestion: string;
3780
4915
  };
3781
4916
  turn?: string | undefined;
3782
4917
  subagent?: string | undefined;
3783
4918
  }, {
3784
- role: "user" | "agent";
3785
4919
  id: string;
4920
+ role: "user" | "agent";
3786
4921
  time: number;
3787
4922
  ev: {
3788
- text: string;
3789
4923
  t: "text";
4924
+ text: string;
3790
4925
  thinking?: boolean | undefined;
3791
4926
  } | {
3792
- text: string;
3793
4927
  t: "service";
4928
+ text: string;
3794
4929
  } | {
3795
4930
  t: "tool-call-start";
3796
4931
  call: string;
@@ -3817,8 +4952,8 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3817
4952
  t: "start";
3818
4953
  title?: string | undefined;
3819
4954
  } | {
3820
- status: "completed" | "failed" | "cancelled";
3821
4955
  t: "turn-end";
4956
+ status: "completed" | "failed" | "cancelled";
3822
4957
  model?: string | undefined;
3823
4958
  usage?: {
3824
4959
  input_tokens: number;
@@ -3839,6 +4974,41 @@ declare const sessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3839
4974
  };
3840
4975
  model?: string | undefined;
3841
4976
  durationMs?: number | undefined;
4977
+ } | {
4978
+ t: "task-start";
4979
+ description: string;
4980
+ taskId: string;
4981
+ toolUseId?: string | undefined;
4982
+ taskType?: string | undefined;
4983
+ } | {
4984
+ t: "task-progress";
4985
+ description: string;
4986
+ usage: {
4987
+ durationMs: number;
4988
+ totalTokens: number;
4989
+ toolUses: number;
4990
+ };
4991
+ taskId: string;
4992
+ lastToolName?: string | undefined;
4993
+ } | {
4994
+ t: "task-end";
4995
+ status: "completed" | "failed" | "stopped";
4996
+ taskId: string;
4997
+ summary: string;
4998
+ usage?: {
4999
+ durationMs: number;
5000
+ totalTokens: number;
5001
+ toolUses: number;
5002
+ } | undefined;
5003
+ } | {
5004
+ t: "tool-progress";
5005
+ toolUseId: string;
5006
+ toolName: string;
5007
+ elapsedSeconds: number;
5008
+ taskId?: string | undefined;
5009
+ } | {
5010
+ t: "prompt-suggestion";
5011
+ suggestion: string;
3842
5012
  };
3843
5013
  turn?: string | undefined;
3844
5014
  subagent?: string | undefined;
@@ -3852,5 +5022,5 @@ type CreateEnvelopeOptions = {
3852
5022
  };
3853
5023
  declare function createEnvelope(role: SessionRole, ev: SessionEvent, opts?: CreateEnvelopeOptions): SessionEnvelope;
3854
5024
 
3855
- export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, LegacyMessageContentSchema, MessageContentSchema, MessageMetaSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, UpdateBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStopEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
5025
+ export { AgentMessageSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, LegacyMessageContentSchema, MessageContentSchema, MessageMetaSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, UpdateBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, createEnvelope, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStopEventSchema, sessionTaskEndEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema };
3856
5026
  export type { AgentMessage, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, LegacyMessageContent, MessageContent, MessageMeta, SessionEnvelope, SessionEvent, SessionMessage, SessionMessageContent, SessionProtocolMessage, SessionRole, SessionTurnEndStatus, Update, UpdateBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue };