@linkshell/host 0.4.0 → 0.4.1

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.
@@ -31,14 +31,14 @@ export declare const contentBlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
31
31
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
32
32
  }, "strip", z.ZodTypeAny, {
33
33
  type: "resource_link";
34
- uri: string;
35
34
  name: string;
36
- kind?: "file" | "skill" | "agent" | undefined;
35
+ uri: string;
36
+ kind?: "agent" | "file" | "skill" | undefined;
37
37
  }, {
38
38
  type: "resource_link";
39
- uri: string;
40
39
  name: string;
41
- kind?: "file" | "skill" | "agent" | undefined;
40
+ uri: string;
41
+ kind?: "agent" | "file" | "skill" | undefined;
42
42
  }>]>;
43
43
  export type ContentBlock = z.infer<typeof contentBlockSchema>;
44
44
  export declare const toolCallStatusSchema: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
@@ -77,14 +77,14 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
77
77
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
78
78
  }, "strip", z.ZodTypeAny, {
79
79
  type: "resource_link";
80
- uri: string;
81
80
  name: string;
82
- kind?: "file" | "skill" | "agent" | undefined;
81
+ uri: string;
82
+ kind?: "agent" | "file" | "skill" | undefined;
83
83
  }, {
84
84
  type: "resource_link";
85
- uri: string;
86
85
  name: string;
87
- kind?: "file" | "skill" | "agent" | undefined;
86
+ uri: string;
87
+ kind?: "agent" | "file" | "skill" | undefined;
88
88
  }>]>;
89
89
  }, "strip", z.ZodTypeAny, {
90
90
  type: "content";
@@ -98,9 +98,9 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
98
98
  uri?: string | undefined;
99
99
  } | {
100
100
  type: "resource_link";
101
- uri: string;
102
101
  name: string;
103
- kind?: "file" | "skill" | "agent" | undefined;
102
+ uri: string;
103
+ kind?: "agent" | "file" | "skill" | undefined;
104
104
  };
105
105
  }, {
106
106
  type: "content";
@@ -114,9 +114,9 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
114
114
  uri?: string | undefined;
115
115
  } | {
116
116
  type: "resource_link";
117
- uri: string;
118
117
  name: string;
119
- kind?: "file" | "skill" | "agent" | undefined;
118
+ uri: string;
119
+ kind?: "agent" | "file" | "skill" | undefined;
120
120
  };
121
121
  }>, z.ZodObject<{
122
122
  type: z.ZodLiteral<"diff">;
@@ -184,12 +184,12 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
184
184
  tool: z.ZodString;
185
185
  }, "strip", z.ZodTypeAny, {
186
186
  type: "mcp";
187
- server: string;
188
187
  tool: string;
188
+ server: string;
189
189
  }, {
190
190
  type: "mcp";
191
- server: string;
192
191
  tool: string;
192
+ server: string;
193
193
  }>, z.ZodObject<{
194
194
  type: z.ZodLiteral<"subagent">;
195
195
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -206,10 +206,10 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
206
206
  model?: string | undefined;
207
207
  }, {
208
208
  type: "subagent";
209
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
210
209
  task?: string | undefined;
211
210
  agentType?: string | undefined;
212
211
  model?: string | undefined;
212
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
213
213
  }>, z.ZodObject<{
214
214
  type: z.ZodLiteral<"skill">;
215
215
  name: z.ZodString;
@@ -310,8 +310,8 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
310
310
  name: string;
311
311
  description?: string | undefined;
312
312
  }[];
313
- name: string;
314
313
  id: string;
314
+ name: string;
315
315
  category: "other" | "model" | "mode" | "effort";
316
316
  current: string;
317
317
  }, {
@@ -320,8 +320,8 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
320
320
  name: string;
321
321
  description?: string | undefined;
322
322
  }[];
323
- name: string;
324
323
  id: string;
324
+ name: string;
325
325
  current: string;
326
326
  category?: "other" | "model" | "mode" | "effort" | undefined;
327
327
  }>;
@@ -361,17 +361,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
361
361
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
362
362
  }, "strip", z.ZodTypeAny, {
363
363
  type: "resource_link";
364
- uri: string;
365
364
  name: string;
366
- kind?: "file" | "skill" | "agent" | undefined;
365
+ uri: string;
366
+ kind?: "agent" | "file" | "skill" | undefined;
367
367
  }, {
368
368
  type: "resource_link";
369
- uri: string;
370
369
  name: string;
371
- kind?: "file" | "skill" | "agent" | undefined;
370
+ uri: string;
371
+ kind?: "agent" | "file" | "skill" | undefined;
372
372
  }>]>;
373
373
  }, "strip", z.ZodTypeAny, {
374
- sessionUpdate: "user_message_chunk";
375
374
  content: {
376
375
  type: "text";
377
376
  text: string;
@@ -382,13 +381,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
382
381
  uri?: string | undefined;
383
382
  } | {
384
383
  type: "resource_link";
385
- uri: string;
386
384
  name: string;
387
- kind?: "file" | "skill" | "agent" | undefined;
385
+ uri: string;
386
+ kind?: "agent" | "file" | "skill" | undefined;
388
387
  };
388
+ sessionUpdate: "user_message_chunk";
389
389
  messageId?: string | undefined;
390
390
  }, {
391
- sessionUpdate: "user_message_chunk";
392
391
  content: {
393
392
  type: "text";
394
393
  text: string;
@@ -399,10 +398,11 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
399
398
  uri?: string | undefined;
400
399
  } | {
401
400
  type: "resource_link";
402
- uri: string;
403
401
  name: string;
404
- kind?: "file" | "skill" | "agent" | undefined;
402
+ uri: string;
403
+ kind?: "agent" | "file" | "skill" | undefined;
405
404
  };
405
+ sessionUpdate: "user_message_chunk";
406
406
  messageId?: string | undefined;
407
407
  }>, z.ZodObject<{
408
408
  sessionUpdate: z.ZodLiteral<"agent_message_chunk">;
@@ -440,18 +440,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
440
440
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
441
441
  }, "strip", z.ZodTypeAny, {
442
442
  type: "resource_link";
443
- uri: string;
444
443
  name: string;
445
- kind?: "file" | "skill" | "agent" | undefined;
444
+ uri: string;
445
+ kind?: "agent" | "file" | "skill" | undefined;
446
446
  }, {
447
447
  type: "resource_link";
448
- uri: string;
449
448
  name: string;
450
- kind?: "file" | "skill" | "agent" | undefined;
449
+ uri: string;
450
+ kind?: "agent" | "file" | "skill" | undefined;
451
451
  }>]>;
452
452
  }, "strip", z.ZodTypeAny, {
453
- sessionUpdate: "agent_message_chunk";
454
- messageId: string;
455
453
  content: {
456
454
  type: "text";
457
455
  text: string;
@@ -462,14 +460,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
462
460
  uri?: string | undefined;
463
461
  } | {
464
462
  type: "resource_link";
465
- uri: string;
466
463
  name: string;
467
- kind?: "file" | "skill" | "agent" | undefined;
464
+ uri: string;
465
+ kind?: "agent" | "file" | "skill" | undefined;
468
466
  };
469
- parentToolCallId?: string | undefined;
470
- }, {
471
467
  sessionUpdate: "agent_message_chunk";
472
468
  messageId: string;
469
+ parentToolCallId?: string | undefined;
470
+ }, {
473
471
  content: {
474
472
  type: "text";
475
473
  text: string;
@@ -480,10 +478,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
480
478
  uri?: string | undefined;
481
479
  } | {
482
480
  type: "resource_link";
483
- uri: string;
484
481
  name: string;
485
- kind?: "file" | "skill" | "agent" | undefined;
482
+ uri: string;
483
+ kind?: "agent" | "file" | "skill" | undefined;
486
484
  };
485
+ sessionUpdate: "agent_message_chunk";
486
+ messageId: string;
487
487
  parentToolCallId?: string | undefined;
488
488
  }>, z.ZodObject<{
489
489
  sessionUpdate: z.ZodLiteral<"agent_thought_chunk">;
@@ -521,18 +521,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
521
521
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
522
522
  }, "strip", z.ZodTypeAny, {
523
523
  type: "resource_link";
524
- uri: string;
525
524
  name: string;
526
- kind?: "file" | "skill" | "agent" | undefined;
525
+ uri: string;
526
+ kind?: "agent" | "file" | "skill" | undefined;
527
527
  }, {
528
528
  type: "resource_link";
529
- uri: string;
530
529
  name: string;
531
- kind?: "file" | "skill" | "agent" | undefined;
530
+ uri: string;
531
+ kind?: "agent" | "file" | "skill" | undefined;
532
532
  }>]>;
533
533
  }, "strip", z.ZodTypeAny, {
534
- sessionUpdate: "agent_thought_chunk";
535
- messageId: string;
536
534
  content: {
537
535
  type: "text";
538
536
  text: string;
@@ -543,14 +541,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
543
541
  uri?: string | undefined;
544
542
  } | {
545
543
  type: "resource_link";
546
- uri: string;
547
544
  name: string;
548
- kind?: "file" | "skill" | "agent" | undefined;
545
+ uri: string;
546
+ kind?: "agent" | "file" | "skill" | undefined;
549
547
  };
550
- parentToolCallId?: string | undefined;
551
- }, {
552
548
  sessionUpdate: "agent_thought_chunk";
553
549
  messageId: string;
550
+ parentToolCallId?: string | undefined;
551
+ }, {
554
552
  content: {
555
553
  type: "text";
556
554
  text: string;
@@ -561,10 +559,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
561
559
  uri?: string | undefined;
562
560
  } | {
563
561
  type: "resource_link";
564
- uri: string;
565
562
  name: string;
566
- kind?: "file" | "skill" | "agent" | undefined;
563
+ uri: string;
564
+ kind?: "agent" | "file" | "skill" | undefined;
567
565
  };
566
+ sessionUpdate: "agent_thought_chunk";
567
+ messageId: string;
568
568
  parentToolCallId?: string | undefined;
569
569
  }>, z.ZodObject<{
570
570
  sessionUpdate: z.ZodLiteral<"tool_call">;
@@ -609,14 +609,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
609
609
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
610
610
  }, "strip", z.ZodTypeAny, {
611
611
  type: "resource_link";
612
- uri: string;
613
612
  name: string;
614
- kind?: "file" | "skill" | "agent" | undefined;
613
+ uri: string;
614
+ kind?: "agent" | "file" | "skill" | undefined;
615
615
  }, {
616
616
  type: "resource_link";
617
- uri: string;
618
617
  name: string;
619
- kind?: "file" | "skill" | "agent" | undefined;
618
+ uri: string;
619
+ kind?: "agent" | "file" | "skill" | undefined;
620
620
  }>]>;
621
621
  }, "strip", z.ZodTypeAny, {
622
622
  type: "content";
@@ -630,9 +630,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
630
630
  uri?: string | undefined;
631
631
  } | {
632
632
  type: "resource_link";
633
- uri: string;
634
633
  name: string;
635
- kind?: "file" | "skill" | "agent" | undefined;
634
+ uri: string;
635
+ kind?: "agent" | "file" | "skill" | undefined;
636
636
  };
637
637
  }, {
638
638
  type: "content";
@@ -646,9 +646,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
646
646
  uri?: string | undefined;
647
647
  } | {
648
648
  type: "resource_link";
649
- uri: string;
650
649
  name: string;
651
- kind?: "file" | "skill" | "agent" | undefined;
650
+ uri: string;
651
+ kind?: "agent" | "file" | "skill" | undefined;
652
652
  };
653
653
  }>, z.ZodObject<{
654
654
  type: z.ZodLiteral<"diff">;
@@ -709,12 +709,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
709
709
  tool: z.ZodString;
710
710
  }, "strip", z.ZodTypeAny, {
711
711
  type: "mcp";
712
- server: string;
713
712
  tool: string;
713
+ server: string;
714
714
  }, {
715
715
  type: "mcp";
716
- server: string;
717
716
  tool: string;
717
+ server: string;
718
718
  }>, z.ZodObject<{
719
719
  type: z.ZodLiteral<"subagent">;
720
720
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -731,10 +731,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
731
731
  model?: string | undefined;
732
732
  }, {
733
733
  type: "subagent";
734
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
735
734
  task?: string | undefined;
736
735
  agentType?: string | undefined;
737
736
  model?: string | undefined;
737
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
738
738
  }>, z.ZodObject<{
739
739
  type: z.ZodLiteral<"skill">;
740
740
  name: z.ZodString;
@@ -794,11 +794,41 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
794
794
  more?: number | undefined;
795
795
  }>]>>;
796
796
  }, "strip", z.ZodTypeAny, {
797
- sessionUpdate: "tool_call";
798
- status: "pending" | "in_progress" | "completed" | "failed";
797
+ status: "failed" | "pending" | "in_progress" | "completed";
799
798
  kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
800
- toolCallId: string;
801
799
  title: string;
800
+ toolCallId: string;
801
+ sessionUpdate: "tool_call";
802
+ detail?: {
803
+ type: "mcp";
804
+ tool: string;
805
+ server: string;
806
+ } | {
807
+ type: "subagent";
808
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
809
+ task?: string | undefined;
810
+ agentType?: string | undefined;
811
+ model?: string | undefined;
812
+ } | {
813
+ type: "skill";
814
+ name: string;
815
+ description?: string | undefined;
816
+ } | {
817
+ type: "web_search";
818
+ query?: string | undefined;
819
+ } | {
820
+ type: "image_generation";
821
+ prompt?: string | undefined;
822
+ } | {
823
+ type: "compaction";
824
+ } | {
825
+ type: "review";
826
+ phase: "started" | "finished";
827
+ } | {
828
+ type: "question";
829
+ text: string;
830
+ more?: number | undefined;
831
+ } | undefined;
802
832
  content?: ({
803
833
  type: "content";
804
834
  content: {
@@ -811,9 +841,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
811
841
  uri?: string | undefined;
812
842
  } | {
813
843
  type: "resource_link";
814
- uri: string;
815
844
  name: string;
816
- kind?: "file" | "skill" | "agent" | undefined;
845
+ uri: string;
846
+ kind?: "agent" | "file" | "skill" | undefined;
817
847
  };
818
848
  } | {
819
849
  path: string;
@@ -836,16 +866,22 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
836
866
  path: string;
837
867
  line?: number | undefined;
838
868
  }[] | undefined;
869
+ }, {
870
+ status: "failed" | "pending" | "in_progress" | "completed";
871
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
872
+ title: string;
873
+ toolCallId: string;
874
+ sessionUpdate: "tool_call";
839
875
  detail?: {
840
876
  type: "mcp";
841
- server: string;
842
877
  tool: string;
878
+ server: string;
843
879
  } | {
844
880
  type: "subagent";
845
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
846
881
  task?: string | undefined;
847
882
  agentType?: string | undefined;
848
883
  model?: string | undefined;
884
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
849
885
  } | {
850
886
  type: "skill";
851
887
  name: string;
@@ -866,12 +902,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
866
902
  text: string;
867
903
  more?: number | undefined;
868
904
  } | undefined;
869
- }, {
870
- sessionUpdate: "tool_call";
871
- status: "pending" | "in_progress" | "completed" | "failed";
872
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
873
- toolCallId: string;
874
- title: string;
875
905
  content?: ({
876
906
  type: "content";
877
907
  content: {
@@ -884,9 +914,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
884
914
  uri?: string | undefined;
885
915
  } | {
886
916
  type: "resource_link";
887
- uri: string;
888
917
  name: string;
889
- kind?: "file" | "skill" | "agent" | undefined;
918
+ uri: string;
919
+ kind?: "agent" | "file" | "skill" | undefined;
890
920
  };
891
921
  } | {
892
922
  path: string;
@@ -909,36 +939,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
909
939
  path: string;
910
940
  line?: number | undefined;
911
941
  }[] | undefined;
912
- detail?: {
913
- type: "mcp";
914
- server: string;
915
- tool: string;
916
- } | {
917
- type: "subagent";
918
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
919
- task?: string | undefined;
920
- agentType?: string | undefined;
921
- model?: string | undefined;
922
- } | {
923
- type: "skill";
924
- name: string;
925
- description?: string | undefined;
926
- } | {
927
- type: "web_search";
928
- query?: string | undefined;
929
- } | {
930
- type: "image_generation";
931
- prompt?: string | undefined;
932
- } | {
933
- type: "compaction";
934
- } | {
935
- type: "review";
936
- phase: "started" | "finished";
937
- } | {
938
- type: "question";
939
- text: string;
940
- more?: number | undefined;
941
- } | undefined;
942
942
  }>, z.ZodObject<{
943
943
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
944
944
  toolCallId: z.ZodString;
@@ -951,12 +951,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
951
951
  tool: z.ZodString;
952
952
  }, "strip", z.ZodTypeAny, {
953
953
  type: "mcp";
954
- server: string;
955
954
  tool: string;
955
+ server: string;
956
956
  }, {
957
957
  type: "mcp";
958
- server: string;
959
958
  tool: string;
959
+ server: string;
960
960
  }>, z.ZodObject<{
961
961
  type: z.ZodLiteral<"subagent">;
962
962
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -973,10 +973,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
973
973
  model?: string | undefined;
974
974
  }, {
975
975
  type: "subagent";
976
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
977
976
  task?: string | undefined;
978
977
  agentType?: string | undefined;
979
978
  model?: string | undefined;
979
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
980
980
  }>, z.ZodObject<{
981
981
  type: z.ZodLiteral<"skill">;
982
982
  name: z.ZodString;
@@ -1070,14 +1070,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1070
1070
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1071
1071
  }, "strip", z.ZodTypeAny, {
1072
1072
  type: "resource_link";
1073
- uri: string;
1074
1073
  name: string;
1075
- kind?: "file" | "skill" | "agent" | undefined;
1074
+ uri: string;
1075
+ kind?: "agent" | "file" | "skill" | undefined;
1076
1076
  }, {
1077
1077
  type: "resource_link";
1078
- uri: string;
1079
1078
  name: string;
1080
- kind?: "file" | "skill" | "agent" | undefined;
1079
+ uri: string;
1080
+ kind?: "agent" | "file" | "skill" | undefined;
1081
1081
  }>]>;
1082
1082
  }, "strip", z.ZodTypeAny, {
1083
1083
  type: "content";
@@ -1091,9 +1091,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1091
1091
  uri?: string | undefined;
1092
1092
  } | {
1093
1093
  type: "resource_link";
1094
- uri: string;
1095
1094
  name: string;
1096
- kind?: "file" | "skill" | "agent" | undefined;
1095
+ uri: string;
1096
+ kind?: "agent" | "file" | "skill" | undefined;
1097
1097
  };
1098
1098
  }, {
1099
1099
  type: "content";
@@ -1107,9 +1107,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1107
1107
  uri?: string | undefined;
1108
1108
  } | {
1109
1109
  type: "resource_link";
1110
- uri: string;
1111
1110
  name: string;
1112
- kind?: "file" | "skill" | "agent" | undefined;
1111
+ uri: string;
1112
+ kind?: "agent" | "file" | "skill" | undefined;
1113
1113
  };
1114
1114
  }>, z.ZodObject<{
1115
1115
  type: z.ZodLiteral<"diff">;
@@ -1158,46 +1158,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1158
1158
  appendOutput: z.ZodOptional<z.ZodString>;
1159
1159
  rawOutput: z.ZodOptional<z.ZodUnknown>;
1160
1160
  }, "strip", z.ZodTypeAny, {
1161
- sessionUpdate: "tool_call_update";
1162
1161
  toolCallId: string;
1163
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
1164
- content?: ({
1165
- type: "content";
1166
- content: {
1167
- type: "text";
1168
- text: string;
1169
- } | {
1170
- type: "image";
1171
- mimeType: string;
1172
- data?: string | undefined;
1173
- uri?: string | undefined;
1174
- } | {
1175
- type: "resource_link";
1176
- uri: string;
1177
- name: string;
1178
- kind?: "file" | "skill" | "agent" | undefined;
1179
- };
1180
- } | {
1181
- path: string;
1182
- type: "diff";
1183
- newText: string;
1184
- oldText?: string | null | undefined;
1185
- } | {
1186
- path: string;
1187
- type: "patch";
1188
- diff: string;
1189
- change: "delete" | "add" | "update";
1190
- movePath?: string | undefined;
1191
- } | {
1192
- type: "terminal";
1193
- terminalId: string;
1194
- })[] | undefined;
1195
- parentToolCallId?: string | undefined;
1162
+ sessionUpdate: "tool_call_update";
1163
+ status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
1196
1164
  title?: string | undefined;
1197
1165
  detail?: {
1198
1166
  type: "mcp";
1199
- server: string;
1200
1167
  tool: string;
1168
+ server: string;
1201
1169
  } | {
1202
1170
  type: "subagent";
1203
1171
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
@@ -1224,12 +1192,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1224
1192
  text: string;
1225
1193
  more?: number | undefined;
1226
1194
  } | undefined;
1227
- appendOutput?: string | undefined;
1228
- rawOutput?: unknown;
1229
- }, {
1230
- sessionUpdate: "tool_call_update";
1231
- toolCallId: string;
1232
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
1233
1195
  content?: ({
1234
1196
  type: "content";
1235
1197
  content: {
@@ -1242,9 +1204,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1242
1204
  uri?: string | undefined;
1243
1205
  } | {
1244
1206
  type: "resource_link";
1245
- uri: string;
1246
1207
  name: string;
1247
- kind?: "file" | "skill" | "agent" | undefined;
1208
+ uri: string;
1209
+ kind?: "agent" | "file" | "skill" | undefined;
1248
1210
  };
1249
1211
  } | {
1250
1212
  path: string;
@@ -1262,17 +1224,23 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1262
1224
  terminalId: string;
1263
1225
  })[] | undefined;
1264
1226
  parentToolCallId?: string | undefined;
1227
+ appendOutput?: string | undefined;
1228
+ rawOutput?: unknown;
1229
+ }, {
1230
+ toolCallId: string;
1231
+ sessionUpdate: "tool_call_update";
1232
+ status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
1265
1233
  title?: string | undefined;
1266
1234
  detail?: {
1267
1235
  type: "mcp";
1268
- server: string;
1269
1236
  tool: string;
1237
+ server: string;
1270
1238
  } | {
1271
1239
  type: "subagent";
1272
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1273
1240
  task?: string | undefined;
1274
1241
  agentType?: string | undefined;
1275
1242
  model?: string | undefined;
1243
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1276
1244
  } | {
1277
1245
  type: "skill";
1278
1246
  name: string;
@@ -1293,37 +1261,69 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1293
1261
  text: string;
1294
1262
  more?: number | undefined;
1295
1263
  } | undefined;
1296
- appendOutput?: string | undefined;
1297
- rawOutput?: unknown;
1298
- }>, z.ZodObject<{
1299
- sessionUpdate: z.ZodLiteral<"plan">;
1300
- entries: z.ZodArray<z.ZodObject<{
1301
- content: z.ZodString;
1302
- priority: z.ZodDefault<z.ZodEnum<["high", "medium", "low"]>>;
1303
- status: z.ZodEnum<["pending", "in_progress", "completed"]>;
1304
- }, "strip", z.ZodTypeAny, {
1305
- status: "pending" | "in_progress" | "completed";
1306
- content: string;
1307
- priority: "high" | "medium" | "low";
1308
- }, {
1309
- status: "pending" | "in_progress" | "completed";
1310
- content: string;
1311
- priority?: "high" | "medium" | "low" | undefined;
1312
- }>, "many">;
1313
- }, "strip", z.ZodTypeAny, {
1314
- sessionUpdate: "plan";
1315
- entries: {
1316
- status: "pending" | "in_progress" | "completed";
1317
- content: string;
1318
- priority: "high" | "medium" | "low";
1319
- }[];
1320
- }, {
1321
- sessionUpdate: "plan";
1322
- entries: {
1323
- status: "pending" | "in_progress" | "completed";
1324
- content: string;
1264
+ content?: ({
1265
+ type: "content";
1266
+ content: {
1267
+ type: "text";
1268
+ text: string;
1269
+ } | {
1270
+ type: "image";
1271
+ mimeType: string;
1272
+ data?: string | undefined;
1273
+ uri?: string | undefined;
1274
+ } | {
1275
+ type: "resource_link";
1276
+ name: string;
1277
+ uri: string;
1278
+ kind?: "agent" | "file" | "skill" | undefined;
1279
+ };
1280
+ } | {
1281
+ path: string;
1282
+ type: "diff";
1283
+ newText: string;
1284
+ oldText?: string | null | undefined;
1285
+ } | {
1286
+ path: string;
1287
+ type: "patch";
1288
+ diff: string;
1289
+ change: "delete" | "add" | "update";
1290
+ movePath?: string | undefined;
1291
+ } | {
1292
+ type: "terminal";
1293
+ terminalId: string;
1294
+ })[] | undefined;
1295
+ parentToolCallId?: string | undefined;
1296
+ appendOutput?: string | undefined;
1297
+ rawOutput?: unknown;
1298
+ }>, z.ZodObject<{
1299
+ sessionUpdate: z.ZodLiteral<"plan">;
1300
+ entries: z.ZodArray<z.ZodObject<{
1301
+ content: z.ZodString;
1302
+ priority: z.ZodDefault<z.ZodEnum<["high", "medium", "low"]>>;
1303
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
1304
+ }, "strip", z.ZodTypeAny, {
1305
+ status: "pending" | "in_progress" | "completed";
1306
+ content: string;
1307
+ priority: "high" | "medium" | "low";
1308
+ }, {
1309
+ status: "pending" | "in_progress" | "completed";
1310
+ content: string;
1311
+ priority?: "high" | "medium" | "low" | undefined;
1312
+ }>, "many">;
1313
+ }, "strip", z.ZodTypeAny, {
1314
+ entries: {
1315
+ status: "pending" | "in_progress" | "completed";
1316
+ content: string;
1317
+ priority: "high" | "medium" | "low";
1318
+ }[];
1319
+ sessionUpdate: "plan";
1320
+ }, {
1321
+ entries: {
1322
+ status: "pending" | "in_progress" | "completed";
1323
+ content: string;
1325
1324
  priority?: "high" | "medium" | "low" | undefined;
1326
1325
  }[];
1326
+ sessionUpdate: "plan";
1327
1327
  }>, z.ZodObject<{
1328
1328
  sessionUpdate: z.ZodLiteral<"available_commands_update">;
1329
1329
  availableCommands: z.ZodArray<z.ZodObject<{
@@ -1428,8 +1428,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1428
1428
  name: string;
1429
1429
  description?: string | undefined;
1430
1430
  }[];
1431
- name: string;
1432
1431
  id: string;
1432
+ name: string;
1433
1433
  category: "other" | "model" | "mode" | "effort";
1434
1434
  current: string;
1435
1435
  }, {
@@ -1438,50 +1438,50 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1438
1438
  name: string;
1439
1439
  description?: string | undefined;
1440
1440
  }[];
1441
- name: string;
1442
1441
  id: string;
1442
+ name: string;
1443
1443
  current: string;
1444
1444
  category?: "other" | "model" | "mode" | "effort" | undefined;
1445
1445
  }>, "many">;
1446
1446
  }, "strip", z.ZodTypeAny, {
1447
- sessionUpdate: "ls_config";
1448
1447
  options: {
1449
1448
  values: {
1450
1449
  value: string;
1451
1450
  name: string;
1452
1451
  description?: string | undefined;
1453
1452
  }[];
1454
- name: string;
1455
1453
  id: string;
1454
+ name: string;
1456
1455
  category: "other" | "model" | "mode" | "effort";
1457
1456
  current: string;
1458
1457
  }[];
1459
- }, {
1460
1458
  sessionUpdate: "ls_config";
1459
+ }, {
1461
1460
  options: {
1462
1461
  values: {
1463
1462
  value: string;
1464
1463
  name: string;
1465
1464
  description?: string | undefined;
1466
1465
  }[];
1467
- name: string;
1468
1466
  id: string;
1467
+ name: string;
1469
1468
  current: string;
1470
1469
  category?: "other" | "model" | "mode" | "effort" | undefined;
1471
1470
  }[];
1471
+ sessionUpdate: "ls_config";
1472
1472
  }>, z.ZodObject<{
1473
1473
  sessionUpdate: z.ZodLiteral<"ls_notice">;
1474
1474
  level: z.ZodEnum<["info", "warning"]>;
1475
1475
  title: z.ZodString;
1476
1476
  detail: z.ZodOptional<z.ZodString>;
1477
1477
  }, "strip", z.ZodTypeAny, {
1478
- sessionUpdate: "ls_notice";
1479
1478
  title: string;
1479
+ sessionUpdate: "ls_notice";
1480
1480
  level: "info" | "warning";
1481
1481
  detail?: string | undefined;
1482
1482
  }, {
1483
- sessionUpdate: "ls_notice";
1484
1483
  title: string;
1484
+ sessionUpdate: "ls_notice";
1485
1485
  level: "info" | "warning";
1486
1486
  detail?: string | undefined;
1487
1487
  }>, z.ZodObject<{
@@ -1492,17 +1492,17 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1492
1492
  turnId: z.ZodOptional<z.ZodString>;
1493
1493
  stopReason: z.ZodOptional<z.ZodEnum<["end_turn", "cancelled", "error", "max_tokens", "refusal"]>>;
1494
1494
  }, "strip", z.ZodTypeAny, {
1495
- sessionUpdate: "ls_turn";
1496
1495
  state: "started" | "ended";
1496
+ sessionUpdate: "ls_turn";
1497
1497
  parentToolCallId?: string | undefined;
1498
1498
  turnId?: string | undefined;
1499
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
1499
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
1500
1500
  }, {
1501
- sessionUpdate: "ls_turn";
1502
1501
  state: "started" | "ended";
1502
+ sessionUpdate: "ls_turn";
1503
1503
  parentToolCallId?: string | undefined;
1504
1504
  turnId?: string | undefined;
1505
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
1505
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
1506
1506
  }>, z.ZodObject<{
1507
1507
  sessionUpdate: z.ZodLiteral<"ls_permission">;
1508
1508
  requestId: z.ZodString;
@@ -1514,13 +1514,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1514
1514
  name: z.ZodString;
1515
1515
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
1516
1516
  }, "strip", z.ZodTypeAny, {
1517
+ optionId: string;
1517
1518
  name: string;
1518
1519
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1519
- optionId: string;
1520
1520
  }, {
1521
+ optionId: string;
1521
1522
  name: string;
1522
1523
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1523
- optionId: string;
1524
1524
  }>, "many">;
1525
1525
  /**
1526
1526
  * The agent is asking the user something: answer with `sessions.answer`.
@@ -1549,9 +1549,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1549
1549
  secret: z.ZodOptional<z.ZodBoolean>;
1550
1550
  required: z.ZodOptional<z.ZodBoolean>;
1551
1551
  }, "strip", z.ZodTypeAny, {
1552
- text: string;
1553
- kind: "text" | "choice" | "choices";
1554
1552
  id: string;
1553
+ kind: "text" | "choice" | "choices";
1554
+ text: string;
1555
1555
  options?: {
1556
1556
  value: string;
1557
1557
  label: string;
@@ -1562,9 +1562,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1562
1562
  secret?: boolean | undefined;
1563
1563
  required?: boolean | undefined;
1564
1564
  }, {
1565
- text: string;
1566
- kind: "text" | "choice" | "choices";
1567
1565
  id: string;
1566
+ kind: "text" | "choice" | "choices";
1567
+ text: string;
1568
1568
  options?: {
1569
1569
  value: string;
1570
1570
  label: string;
@@ -1576,20 +1576,20 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1576
1576
  required?: boolean | undefined;
1577
1577
  }>, "many">>;
1578
1578
  }, "strip", z.ZodTypeAny, {
1579
- sessionUpdate: "ls_permission";
1580
1579
  options: {
1580
+ optionId: string;
1581
1581
  name: string;
1582
1582
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1583
- optionId: string;
1584
1583
  }[];
1585
1584
  title: string;
1586
1585
  requestId: string;
1586
+ sessionUpdate: "ls_permission";
1587
1587
  toolCallId?: string | undefined;
1588
1588
  detail?: string | undefined;
1589
1589
  questions?: {
1590
- text: string;
1591
- kind: "text" | "choice" | "choices";
1592
1590
  id: string;
1591
+ kind: "text" | "choice" | "choices";
1592
+ text: string;
1593
1593
  options?: {
1594
1594
  value: string;
1595
1595
  label: string;
@@ -1601,20 +1601,20 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1601
1601
  required?: boolean | undefined;
1602
1602
  }[] | undefined;
1603
1603
  }, {
1604
- sessionUpdate: "ls_permission";
1605
1604
  options: {
1605
+ optionId: string;
1606
1606
  name: string;
1607
1607
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1608
- optionId: string;
1609
1608
  }[];
1610
1609
  title: string;
1611
1610
  requestId: string;
1611
+ sessionUpdate: "ls_permission";
1612
1612
  toolCallId?: string | undefined;
1613
1613
  detail?: string | undefined;
1614
1614
  questions?: {
1615
- text: string;
1616
- kind: "text" | "choice" | "choices";
1617
1615
  id: string;
1616
+ kind: "text" | "choice" | "choices";
1617
+ text: string;
1618
1618
  options?: {
1619
1619
  value: string;
1620
1620
  label: string;
@@ -1644,8 +1644,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1644
1644
  other?: string | undefined;
1645
1645
  }>, "many">>;
1646
1646
  }, "strip", z.ZodTypeAny, {
1647
- sessionUpdate: "ls_permission_resolved";
1648
1647
  requestId: string;
1648
+ sessionUpdate: "ls_permission_resolved";
1649
1649
  optionId?: string | undefined;
1650
1650
  answers?: {
1651
1651
  values: string[];
@@ -1653,8 +1653,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1653
1653
  other?: string | undefined;
1654
1654
  }[] | undefined;
1655
1655
  }, {
1656
- sessionUpdate: "ls_permission_resolved";
1657
1656
  requestId: string;
1657
+ sessionUpdate: "ls_permission_resolved";
1658
1658
  optionId?: string | undefined;
1659
1659
  answers?: {
1660
1660
  values: string[];
@@ -1666,36 +1666,36 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1666
1666
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
1667
1667
  deviceId: z.ZodOptional<z.ZodString>;
1668
1668
  }, "strip", z.ZodTypeAny, {
1669
+ driver: "remote" | "desktop" | "none";
1669
1670
  sessionUpdate: "ls_driver";
1670
- driver: "desktop" | "remote" | "none";
1671
1671
  deviceId?: string | undefined;
1672
1672
  }, {
1673
+ driver: "remote" | "desktop" | "none";
1673
1674
  sessionUpdate: "ls_driver";
1674
- driver: "desktop" | "remote" | "none";
1675
1675
  deviceId?: string | undefined;
1676
1676
  }>, z.ZodObject<{
1677
1677
  sessionUpdate: z.ZodLiteral<"ls_status">;
1678
1678
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
1679
1679
  }, "strip", z.ZodTypeAny, {
1680
+ state: "idle" | "running" | "waiting" | "error" | "offline";
1680
1681
  sessionUpdate: "ls_status";
1681
- state: "error" | "idle" | "running" | "waiting" | "offline";
1682
1682
  }, {
1683
+ state: "idle" | "running" | "waiting" | "error" | "offline";
1683
1684
  sessionUpdate: "ls_status";
1684
- state: "error" | "idle" | "running" | "waiting" | "offline";
1685
1685
  }>, z.ZodObject<{
1686
1686
  sessionUpdate: z.ZodLiteral<"ls_error">;
1687
1687
  code: z.ZodString;
1688
1688
  message: z.ZodString;
1689
1689
  hint: z.ZodOptional<z.ZodString>;
1690
1690
  }, "strip", z.ZodTypeAny, {
1691
- sessionUpdate: "ls_error";
1692
1691
  code: string;
1693
1692
  message: string;
1693
+ sessionUpdate: "ls_error";
1694
1694
  hint?: string | undefined;
1695
1695
  }, {
1696
- sessionUpdate: "ls_error";
1697
1696
  code: string;
1698
1697
  message: string;
1698
+ sessionUpdate: "ls_error";
1699
1699
  hint?: string | undefined;
1700
1700
  }>]>;
1701
1701
  export type SessionUpdate = z.infer<typeof sessionUpdateSchema>;
@@ -1740,17 +1740,16 @@ export declare const sessionEventSchema: z.ZodObject<{
1740
1740
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1741
1741
  }, "strip", z.ZodTypeAny, {
1742
1742
  type: "resource_link";
1743
- uri: string;
1744
1743
  name: string;
1745
- kind?: "file" | "skill" | "agent" | undefined;
1744
+ uri: string;
1745
+ kind?: "agent" | "file" | "skill" | undefined;
1746
1746
  }, {
1747
1747
  type: "resource_link";
1748
- uri: string;
1749
1748
  name: string;
1750
- kind?: "file" | "skill" | "agent" | undefined;
1749
+ uri: string;
1750
+ kind?: "agent" | "file" | "skill" | undefined;
1751
1751
  }>]>;
1752
1752
  }, "strip", z.ZodTypeAny, {
1753
- sessionUpdate: "user_message_chunk";
1754
1753
  content: {
1755
1754
  type: "text";
1756
1755
  text: string;
@@ -1761,13 +1760,13 @@ export declare const sessionEventSchema: z.ZodObject<{
1761
1760
  uri?: string | undefined;
1762
1761
  } | {
1763
1762
  type: "resource_link";
1764
- uri: string;
1765
1763
  name: string;
1766
- kind?: "file" | "skill" | "agent" | undefined;
1764
+ uri: string;
1765
+ kind?: "agent" | "file" | "skill" | undefined;
1767
1766
  };
1767
+ sessionUpdate: "user_message_chunk";
1768
1768
  messageId?: string | undefined;
1769
1769
  }, {
1770
- sessionUpdate: "user_message_chunk";
1771
1770
  content: {
1772
1771
  type: "text";
1773
1772
  text: string;
@@ -1778,10 +1777,11 @@ export declare const sessionEventSchema: z.ZodObject<{
1778
1777
  uri?: string | undefined;
1779
1778
  } | {
1780
1779
  type: "resource_link";
1781
- uri: string;
1782
1780
  name: string;
1783
- kind?: "file" | "skill" | "agent" | undefined;
1781
+ uri: string;
1782
+ kind?: "agent" | "file" | "skill" | undefined;
1784
1783
  };
1784
+ sessionUpdate: "user_message_chunk";
1785
1785
  messageId?: string | undefined;
1786
1786
  }>, z.ZodObject<{
1787
1787
  sessionUpdate: z.ZodLiteral<"agent_message_chunk">;
@@ -1819,18 +1819,16 @@ export declare const sessionEventSchema: z.ZodObject<{
1819
1819
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1820
1820
  }, "strip", z.ZodTypeAny, {
1821
1821
  type: "resource_link";
1822
- uri: string;
1823
1822
  name: string;
1824
- kind?: "file" | "skill" | "agent" | undefined;
1823
+ uri: string;
1824
+ kind?: "agent" | "file" | "skill" | undefined;
1825
1825
  }, {
1826
1826
  type: "resource_link";
1827
- uri: string;
1828
1827
  name: string;
1829
- kind?: "file" | "skill" | "agent" | undefined;
1828
+ uri: string;
1829
+ kind?: "agent" | "file" | "skill" | undefined;
1830
1830
  }>]>;
1831
1831
  }, "strip", z.ZodTypeAny, {
1832
- sessionUpdate: "agent_message_chunk";
1833
- messageId: string;
1834
1832
  content: {
1835
1833
  type: "text";
1836
1834
  text: string;
@@ -1841,14 +1839,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1841
1839
  uri?: string | undefined;
1842
1840
  } | {
1843
1841
  type: "resource_link";
1844
- uri: string;
1845
1842
  name: string;
1846
- kind?: "file" | "skill" | "agent" | undefined;
1843
+ uri: string;
1844
+ kind?: "agent" | "file" | "skill" | undefined;
1847
1845
  };
1848
- parentToolCallId?: string | undefined;
1849
- }, {
1850
1846
  sessionUpdate: "agent_message_chunk";
1851
1847
  messageId: string;
1848
+ parentToolCallId?: string | undefined;
1849
+ }, {
1852
1850
  content: {
1853
1851
  type: "text";
1854
1852
  text: string;
@@ -1859,10 +1857,12 @@ export declare const sessionEventSchema: z.ZodObject<{
1859
1857
  uri?: string | undefined;
1860
1858
  } | {
1861
1859
  type: "resource_link";
1862
- uri: string;
1863
1860
  name: string;
1864
- kind?: "file" | "skill" | "agent" | undefined;
1861
+ uri: string;
1862
+ kind?: "agent" | "file" | "skill" | undefined;
1865
1863
  };
1864
+ sessionUpdate: "agent_message_chunk";
1865
+ messageId: string;
1866
1866
  parentToolCallId?: string | undefined;
1867
1867
  }>, z.ZodObject<{
1868
1868
  sessionUpdate: z.ZodLiteral<"agent_thought_chunk">;
@@ -1900,18 +1900,16 @@ export declare const sessionEventSchema: z.ZodObject<{
1900
1900
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1901
1901
  }, "strip", z.ZodTypeAny, {
1902
1902
  type: "resource_link";
1903
- uri: string;
1904
1903
  name: string;
1905
- kind?: "file" | "skill" | "agent" | undefined;
1904
+ uri: string;
1905
+ kind?: "agent" | "file" | "skill" | undefined;
1906
1906
  }, {
1907
1907
  type: "resource_link";
1908
- uri: string;
1909
1908
  name: string;
1910
- kind?: "file" | "skill" | "agent" | undefined;
1909
+ uri: string;
1910
+ kind?: "agent" | "file" | "skill" | undefined;
1911
1911
  }>]>;
1912
1912
  }, "strip", z.ZodTypeAny, {
1913
- sessionUpdate: "agent_thought_chunk";
1914
- messageId: string;
1915
1913
  content: {
1916
1914
  type: "text";
1917
1915
  text: string;
@@ -1922,14 +1920,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1922
1920
  uri?: string | undefined;
1923
1921
  } | {
1924
1922
  type: "resource_link";
1925
- uri: string;
1926
1923
  name: string;
1927
- kind?: "file" | "skill" | "agent" | undefined;
1924
+ uri: string;
1925
+ kind?: "agent" | "file" | "skill" | undefined;
1928
1926
  };
1929
- parentToolCallId?: string | undefined;
1930
- }, {
1931
1927
  sessionUpdate: "agent_thought_chunk";
1932
1928
  messageId: string;
1929
+ parentToolCallId?: string | undefined;
1930
+ }, {
1933
1931
  content: {
1934
1932
  type: "text";
1935
1933
  text: string;
@@ -1940,10 +1938,12 @@ export declare const sessionEventSchema: z.ZodObject<{
1940
1938
  uri?: string | undefined;
1941
1939
  } | {
1942
1940
  type: "resource_link";
1943
- uri: string;
1944
1941
  name: string;
1945
- kind?: "file" | "skill" | "agent" | undefined;
1942
+ uri: string;
1943
+ kind?: "agent" | "file" | "skill" | undefined;
1946
1944
  };
1945
+ sessionUpdate: "agent_thought_chunk";
1946
+ messageId: string;
1947
1947
  parentToolCallId?: string | undefined;
1948
1948
  }>, z.ZodObject<{
1949
1949
  sessionUpdate: z.ZodLiteral<"tool_call">;
@@ -1988,14 +1988,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1988
1988
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1989
1989
  }, "strip", z.ZodTypeAny, {
1990
1990
  type: "resource_link";
1991
- uri: string;
1992
1991
  name: string;
1993
- kind?: "file" | "skill" | "agent" | undefined;
1992
+ uri: string;
1993
+ kind?: "agent" | "file" | "skill" | undefined;
1994
1994
  }, {
1995
1995
  type: "resource_link";
1996
- uri: string;
1997
1996
  name: string;
1998
- kind?: "file" | "skill" | "agent" | undefined;
1997
+ uri: string;
1998
+ kind?: "agent" | "file" | "skill" | undefined;
1999
1999
  }>]>;
2000
2000
  }, "strip", z.ZodTypeAny, {
2001
2001
  type: "content";
@@ -2009,9 +2009,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2009
2009
  uri?: string | undefined;
2010
2010
  } | {
2011
2011
  type: "resource_link";
2012
- uri: string;
2013
2012
  name: string;
2014
- kind?: "file" | "skill" | "agent" | undefined;
2013
+ uri: string;
2014
+ kind?: "agent" | "file" | "skill" | undefined;
2015
2015
  };
2016
2016
  }, {
2017
2017
  type: "content";
@@ -2025,9 +2025,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2025
2025
  uri?: string | undefined;
2026
2026
  } | {
2027
2027
  type: "resource_link";
2028
- uri: string;
2029
2028
  name: string;
2030
- kind?: "file" | "skill" | "agent" | undefined;
2029
+ uri: string;
2030
+ kind?: "agent" | "file" | "skill" | undefined;
2031
2031
  };
2032
2032
  }>, z.ZodObject<{
2033
2033
  type: z.ZodLiteral<"diff">;
@@ -2088,12 +2088,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2088
2088
  tool: z.ZodString;
2089
2089
  }, "strip", z.ZodTypeAny, {
2090
2090
  type: "mcp";
2091
- server: string;
2092
2091
  tool: string;
2092
+ server: string;
2093
2093
  }, {
2094
2094
  type: "mcp";
2095
- server: string;
2096
2095
  tool: string;
2096
+ server: string;
2097
2097
  }>, z.ZodObject<{
2098
2098
  type: z.ZodLiteral<"subagent">;
2099
2099
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -2110,10 +2110,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2110
2110
  model?: string | undefined;
2111
2111
  }, {
2112
2112
  type: "subagent";
2113
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2114
2113
  task?: string | undefined;
2115
2114
  agentType?: string | undefined;
2116
2115
  model?: string | undefined;
2116
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2117
2117
  }>, z.ZodObject<{
2118
2118
  type: z.ZodLiteral<"skill">;
2119
2119
  name: z.ZodString;
@@ -2173,11 +2173,41 @@ export declare const sessionEventSchema: z.ZodObject<{
2173
2173
  more?: number | undefined;
2174
2174
  }>]>>;
2175
2175
  }, "strip", z.ZodTypeAny, {
2176
- sessionUpdate: "tool_call";
2177
- status: "pending" | "in_progress" | "completed" | "failed";
2176
+ status: "failed" | "pending" | "in_progress" | "completed";
2178
2177
  kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2179
- toolCallId: string;
2180
2178
  title: string;
2179
+ toolCallId: string;
2180
+ sessionUpdate: "tool_call";
2181
+ detail?: {
2182
+ type: "mcp";
2183
+ tool: string;
2184
+ server: string;
2185
+ } | {
2186
+ type: "subagent";
2187
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2188
+ task?: string | undefined;
2189
+ agentType?: string | undefined;
2190
+ model?: string | undefined;
2191
+ } | {
2192
+ type: "skill";
2193
+ name: string;
2194
+ description?: string | undefined;
2195
+ } | {
2196
+ type: "web_search";
2197
+ query?: string | undefined;
2198
+ } | {
2199
+ type: "image_generation";
2200
+ prompt?: string | undefined;
2201
+ } | {
2202
+ type: "compaction";
2203
+ } | {
2204
+ type: "review";
2205
+ phase: "started" | "finished";
2206
+ } | {
2207
+ type: "question";
2208
+ text: string;
2209
+ more?: number | undefined;
2210
+ } | undefined;
2181
2211
  content?: ({
2182
2212
  type: "content";
2183
2213
  content: {
@@ -2190,9 +2220,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2190
2220
  uri?: string | undefined;
2191
2221
  } | {
2192
2222
  type: "resource_link";
2193
- uri: string;
2194
2223
  name: string;
2195
- kind?: "file" | "skill" | "agent" | undefined;
2224
+ uri: string;
2225
+ kind?: "agent" | "file" | "skill" | undefined;
2196
2226
  };
2197
2227
  } | {
2198
2228
  path: string;
@@ -2215,16 +2245,22 @@ export declare const sessionEventSchema: z.ZodObject<{
2215
2245
  path: string;
2216
2246
  line?: number | undefined;
2217
2247
  }[] | undefined;
2248
+ }, {
2249
+ status: "failed" | "pending" | "in_progress" | "completed";
2250
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2251
+ title: string;
2252
+ toolCallId: string;
2253
+ sessionUpdate: "tool_call";
2218
2254
  detail?: {
2219
2255
  type: "mcp";
2220
- server: string;
2221
2256
  tool: string;
2257
+ server: string;
2222
2258
  } | {
2223
2259
  type: "subagent";
2224
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2225
2260
  task?: string | undefined;
2226
2261
  agentType?: string | undefined;
2227
2262
  model?: string | undefined;
2263
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2228
2264
  } | {
2229
2265
  type: "skill";
2230
2266
  name: string;
@@ -2245,12 +2281,6 @@ export declare const sessionEventSchema: z.ZodObject<{
2245
2281
  text: string;
2246
2282
  more?: number | undefined;
2247
2283
  } | undefined;
2248
- }, {
2249
- sessionUpdate: "tool_call";
2250
- status: "pending" | "in_progress" | "completed" | "failed";
2251
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2252
- toolCallId: string;
2253
- title: string;
2254
2284
  content?: ({
2255
2285
  type: "content";
2256
2286
  content: {
@@ -2263,9 +2293,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2263
2293
  uri?: string | undefined;
2264
2294
  } | {
2265
2295
  type: "resource_link";
2266
- uri: string;
2267
2296
  name: string;
2268
- kind?: "file" | "skill" | "agent" | undefined;
2297
+ uri: string;
2298
+ kind?: "agent" | "file" | "skill" | undefined;
2269
2299
  };
2270
2300
  } | {
2271
2301
  path: string;
@@ -2288,36 +2318,6 @@ export declare const sessionEventSchema: z.ZodObject<{
2288
2318
  path: string;
2289
2319
  line?: number | undefined;
2290
2320
  }[] | undefined;
2291
- detail?: {
2292
- type: "mcp";
2293
- server: string;
2294
- tool: string;
2295
- } | {
2296
- type: "subagent";
2297
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2298
- task?: string | undefined;
2299
- agentType?: string | undefined;
2300
- model?: string | undefined;
2301
- } | {
2302
- type: "skill";
2303
- name: string;
2304
- description?: string | undefined;
2305
- } | {
2306
- type: "web_search";
2307
- query?: string | undefined;
2308
- } | {
2309
- type: "image_generation";
2310
- prompt?: string | undefined;
2311
- } | {
2312
- type: "compaction";
2313
- } | {
2314
- type: "review";
2315
- phase: "started" | "finished";
2316
- } | {
2317
- type: "question";
2318
- text: string;
2319
- more?: number | undefined;
2320
- } | undefined;
2321
2321
  }>, z.ZodObject<{
2322
2322
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
2323
2323
  toolCallId: z.ZodString;
@@ -2330,12 +2330,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2330
2330
  tool: z.ZodString;
2331
2331
  }, "strip", z.ZodTypeAny, {
2332
2332
  type: "mcp";
2333
- server: string;
2334
2333
  tool: string;
2334
+ server: string;
2335
2335
  }, {
2336
2336
  type: "mcp";
2337
- server: string;
2338
2337
  tool: string;
2338
+ server: string;
2339
2339
  }>, z.ZodObject<{
2340
2340
  type: z.ZodLiteral<"subagent">;
2341
2341
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -2352,10 +2352,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2352
2352
  model?: string | undefined;
2353
2353
  }, {
2354
2354
  type: "subagent";
2355
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2356
2355
  task?: string | undefined;
2357
2356
  agentType?: string | undefined;
2358
2357
  model?: string | undefined;
2358
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2359
2359
  }>, z.ZodObject<{
2360
2360
  type: z.ZodLiteral<"skill">;
2361
2361
  name: z.ZodString;
@@ -2449,14 +2449,14 @@ export declare const sessionEventSchema: z.ZodObject<{
2449
2449
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
2450
2450
  }, "strip", z.ZodTypeAny, {
2451
2451
  type: "resource_link";
2452
- uri: string;
2453
2452
  name: string;
2454
- kind?: "file" | "skill" | "agent" | undefined;
2453
+ uri: string;
2454
+ kind?: "agent" | "file" | "skill" | undefined;
2455
2455
  }, {
2456
2456
  type: "resource_link";
2457
- uri: string;
2458
2457
  name: string;
2459
- kind?: "file" | "skill" | "agent" | undefined;
2458
+ uri: string;
2459
+ kind?: "agent" | "file" | "skill" | undefined;
2460
2460
  }>]>;
2461
2461
  }, "strip", z.ZodTypeAny, {
2462
2462
  type: "content";
@@ -2470,9 +2470,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2470
2470
  uri?: string | undefined;
2471
2471
  } | {
2472
2472
  type: "resource_link";
2473
- uri: string;
2474
2473
  name: string;
2475
- kind?: "file" | "skill" | "agent" | undefined;
2474
+ uri: string;
2475
+ kind?: "agent" | "file" | "skill" | undefined;
2476
2476
  };
2477
2477
  }, {
2478
2478
  type: "content";
@@ -2486,9 +2486,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2486
2486
  uri?: string | undefined;
2487
2487
  } | {
2488
2488
  type: "resource_link";
2489
- uri: string;
2490
2489
  name: string;
2491
- kind?: "file" | "skill" | "agent" | undefined;
2490
+ uri: string;
2491
+ kind?: "agent" | "file" | "skill" | undefined;
2492
2492
  };
2493
2493
  }>, z.ZodObject<{
2494
2494
  type: z.ZodLiteral<"diff">;
@@ -2537,46 +2537,14 @@ export declare const sessionEventSchema: z.ZodObject<{
2537
2537
  appendOutput: z.ZodOptional<z.ZodString>;
2538
2538
  rawOutput: z.ZodOptional<z.ZodUnknown>;
2539
2539
  }, "strip", z.ZodTypeAny, {
2540
- sessionUpdate: "tool_call_update";
2541
2540
  toolCallId: string;
2542
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
2543
- content?: ({
2544
- type: "content";
2545
- content: {
2546
- type: "text";
2547
- text: string;
2548
- } | {
2549
- type: "image";
2550
- mimeType: string;
2551
- data?: string | undefined;
2552
- uri?: string | undefined;
2553
- } | {
2554
- type: "resource_link";
2555
- uri: string;
2556
- name: string;
2557
- kind?: "file" | "skill" | "agent" | undefined;
2558
- };
2559
- } | {
2560
- path: string;
2561
- type: "diff";
2562
- newText: string;
2563
- oldText?: string | null | undefined;
2564
- } | {
2565
- path: string;
2566
- type: "patch";
2567
- diff: string;
2568
- change: "delete" | "add" | "update";
2569
- movePath?: string | undefined;
2570
- } | {
2571
- type: "terminal";
2572
- terminalId: string;
2573
- })[] | undefined;
2574
- parentToolCallId?: string | undefined;
2541
+ sessionUpdate: "tool_call_update";
2542
+ status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
2575
2543
  title?: string | undefined;
2576
2544
  detail?: {
2577
2545
  type: "mcp";
2578
- server: string;
2579
2546
  tool: string;
2547
+ server: string;
2580
2548
  } | {
2581
2549
  type: "subagent";
2582
2550
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
@@ -2603,12 +2571,6 @@ export declare const sessionEventSchema: z.ZodObject<{
2603
2571
  text: string;
2604
2572
  more?: number | undefined;
2605
2573
  } | undefined;
2606
- appendOutput?: string | undefined;
2607
- rawOutput?: unknown;
2608
- }, {
2609
- sessionUpdate: "tool_call_update";
2610
- toolCallId: string;
2611
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
2612
2574
  content?: ({
2613
2575
  type: "content";
2614
2576
  content: {
@@ -2621,9 +2583,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2621
2583
  uri?: string | undefined;
2622
2584
  } | {
2623
2585
  type: "resource_link";
2624
- uri: string;
2625
2586
  name: string;
2626
- kind?: "file" | "skill" | "agent" | undefined;
2587
+ uri: string;
2588
+ kind?: "agent" | "file" | "skill" | undefined;
2627
2589
  };
2628
2590
  } | {
2629
2591
  path: string;
@@ -2641,17 +2603,23 @@ export declare const sessionEventSchema: z.ZodObject<{
2641
2603
  terminalId: string;
2642
2604
  })[] | undefined;
2643
2605
  parentToolCallId?: string | undefined;
2606
+ appendOutput?: string | undefined;
2607
+ rawOutput?: unknown;
2608
+ }, {
2609
+ toolCallId: string;
2610
+ sessionUpdate: "tool_call_update";
2611
+ status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
2644
2612
  title?: string | undefined;
2645
2613
  detail?: {
2646
2614
  type: "mcp";
2647
- server: string;
2648
2615
  tool: string;
2616
+ server: string;
2649
2617
  } | {
2650
2618
  type: "subagent";
2651
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2652
2619
  task?: string | undefined;
2653
2620
  agentType?: string | undefined;
2654
2621
  model?: string | undefined;
2622
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2655
2623
  } | {
2656
2624
  type: "skill";
2657
2625
  name: string;
@@ -2672,6 +2640,38 @@ export declare const sessionEventSchema: z.ZodObject<{
2672
2640
  text: string;
2673
2641
  more?: number | undefined;
2674
2642
  } | undefined;
2643
+ content?: ({
2644
+ type: "content";
2645
+ content: {
2646
+ type: "text";
2647
+ text: string;
2648
+ } | {
2649
+ type: "image";
2650
+ mimeType: string;
2651
+ data?: string | undefined;
2652
+ uri?: string | undefined;
2653
+ } | {
2654
+ type: "resource_link";
2655
+ name: string;
2656
+ uri: string;
2657
+ kind?: "agent" | "file" | "skill" | undefined;
2658
+ };
2659
+ } | {
2660
+ path: string;
2661
+ type: "diff";
2662
+ newText: string;
2663
+ oldText?: string | null | undefined;
2664
+ } | {
2665
+ path: string;
2666
+ type: "patch";
2667
+ diff: string;
2668
+ change: "delete" | "add" | "update";
2669
+ movePath?: string | undefined;
2670
+ } | {
2671
+ type: "terminal";
2672
+ terminalId: string;
2673
+ })[] | undefined;
2674
+ parentToolCallId?: string | undefined;
2675
2675
  appendOutput?: string | undefined;
2676
2676
  rawOutput?: unknown;
2677
2677
  }>, z.ZodObject<{
@@ -2690,19 +2690,19 @@ export declare const sessionEventSchema: z.ZodObject<{
2690
2690
  priority?: "high" | "medium" | "low" | undefined;
2691
2691
  }>, "many">;
2692
2692
  }, "strip", z.ZodTypeAny, {
2693
- sessionUpdate: "plan";
2694
2693
  entries: {
2695
2694
  status: "pending" | "in_progress" | "completed";
2696
2695
  content: string;
2697
2696
  priority: "high" | "medium" | "low";
2698
2697
  }[];
2699
- }, {
2700
2698
  sessionUpdate: "plan";
2699
+ }, {
2701
2700
  entries: {
2702
2701
  status: "pending" | "in_progress" | "completed";
2703
2702
  content: string;
2704
2703
  priority?: "high" | "medium" | "low" | undefined;
2705
2704
  }[];
2705
+ sessionUpdate: "plan";
2706
2706
  }>, z.ZodObject<{
2707
2707
  sessionUpdate: z.ZodLiteral<"available_commands_update">;
2708
2708
  availableCommands: z.ZodArray<z.ZodObject<{
@@ -2807,8 +2807,8 @@ export declare const sessionEventSchema: z.ZodObject<{
2807
2807
  name: string;
2808
2808
  description?: string | undefined;
2809
2809
  }[];
2810
- name: string;
2811
2810
  id: string;
2811
+ name: string;
2812
2812
  category: "other" | "model" | "mode" | "effort";
2813
2813
  current: string;
2814
2814
  }, {
@@ -2817,50 +2817,50 @@ export declare const sessionEventSchema: z.ZodObject<{
2817
2817
  name: string;
2818
2818
  description?: string | undefined;
2819
2819
  }[];
2820
- name: string;
2821
2820
  id: string;
2821
+ name: string;
2822
2822
  current: string;
2823
2823
  category?: "other" | "model" | "mode" | "effort" | undefined;
2824
2824
  }>, "many">;
2825
2825
  }, "strip", z.ZodTypeAny, {
2826
- sessionUpdate: "ls_config";
2827
2826
  options: {
2828
2827
  values: {
2829
2828
  value: string;
2830
2829
  name: string;
2831
2830
  description?: string | undefined;
2832
2831
  }[];
2833
- name: string;
2834
2832
  id: string;
2833
+ name: string;
2835
2834
  category: "other" | "model" | "mode" | "effort";
2836
2835
  current: string;
2837
2836
  }[];
2838
- }, {
2839
2837
  sessionUpdate: "ls_config";
2838
+ }, {
2840
2839
  options: {
2841
2840
  values: {
2842
2841
  value: string;
2843
2842
  name: string;
2844
2843
  description?: string | undefined;
2845
2844
  }[];
2846
- name: string;
2847
2845
  id: string;
2846
+ name: string;
2848
2847
  current: string;
2849
2848
  category?: "other" | "model" | "mode" | "effort" | undefined;
2850
2849
  }[];
2850
+ sessionUpdate: "ls_config";
2851
2851
  }>, z.ZodObject<{
2852
2852
  sessionUpdate: z.ZodLiteral<"ls_notice">;
2853
2853
  level: z.ZodEnum<["info", "warning"]>;
2854
2854
  title: z.ZodString;
2855
2855
  detail: z.ZodOptional<z.ZodString>;
2856
2856
  }, "strip", z.ZodTypeAny, {
2857
- sessionUpdate: "ls_notice";
2858
2857
  title: string;
2858
+ sessionUpdate: "ls_notice";
2859
2859
  level: "info" | "warning";
2860
2860
  detail?: string | undefined;
2861
2861
  }, {
2862
- sessionUpdate: "ls_notice";
2863
2862
  title: string;
2863
+ sessionUpdate: "ls_notice";
2864
2864
  level: "info" | "warning";
2865
2865
  detail?: string | undefined;
2866
2866
  }>, z.ZodObject<{
@@ -2871,17 +2871,17 @@ export declare const sessionEventSchema: z.ZodObject<{
2871
2871
  turnId: z.ZodOptional<z.ZodString>;
2872
2872
  stopReason: z.ZodOptional<z.ZodEnum<["end_turn", "cancelled", "error", "max_tokens", "refusal"]>>;
2873
2873
  }, "strip", z.ZodTypeAny, {
2874
- sessionUpdate: "ls_turn";
2875
2874
  state: "started" | "ended";
2875
+ sessionUpdate: "ls_turn";
2876
2876
  parentToolCallId?: string | undefined;
2877
2877
  turnId?: string | undefined;
2878
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2878
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2879
2879
  }, {
2880
- sessionUpdate: "ls_turn";
2881
2880
  state: "started" | "ended";
2881
+ sessionUpdate: "ls_turn";
2882
2882
  parentToolCallId?: string | undefined;
2883
2883
  turnId?: string | undefined;
2884
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2884
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2885
2885
  }>, z.ZodObject<{
2886
2886
  sessionUpdate: z.ZodLiteral<"ls_permission">;
2887
2887
  requestId: z.ZodString;
@@ -2893,13 +2893,13 @@ export declare const sessionEventSchema: z.ZodObject<{
2893
2893
  name: z.ZodString;
2894
2894
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
2895
2895
  }, "strip", z.ZodTypeAny, {
2896
+ optionId: string;
2896
2897
  name: string;
2897
2898
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2898
- optionId: string;
2899
2899
  }, {
2900
+ optionId: string;
2900
2901
  name: string;
2901
2902
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2902
- optionId: string;
2903
2903
  }>, "many">;
2904
2904
  /**
2905
2905
  * The agent is asking the user something: answer with `sessions.answer`.
@@ -2928,9 +2928,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2928
2928
  secret: z.ZodOptional<z.ZodBoolean>;
2929
2929
  required: z.ZodOptional<z.ZodBoolean>;
2930
2930
  }, "strip", z.ZodTypeAny, {
2931
- text: string;
2932
- kind: "text" | "choice" | "choices";
2933
2931
  id: string;
2932
+ kind: "text" | "choice" | "choices";
2933
+ text: string;
2934
2934
  options?: {
2935
2935
  value: string;
2936
2936
  label: string;
@@ -2941,9 +2941,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2941
2941
  secret?: boolean | undefined;
2942
2942
  required?: boolean | undefined;
2943
2943
  }, {
2944
- text: string;
2945
- kind: "text" | "choice" | "choices";
2946
2944
  id: string;
2945
+ kind: "text" | "choice" | "choices";
2946
+ text: string;
2947
2947
  options?: {
2948
2948
  value: string;
2949
2949
  label: string;
@@ -2955,20 +2955,20 @@ export declare const sessionEventSchema: z.ZodObject<{
2955
2955
  required?: boolean | undefined;
2956
2956
  }>, "many">>;
2957
2957
  }, "strip", z.ZodTypeAny, {
2958
- sessionUpdate: "ls_permission";
2959
2958
  options: {
2959
+ optionId: string;
2960
2960
  name: string;
2961
2961
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2962
- optionId: string;
2963
2962
  }[];
2964
2963
  title: string;
2965
2964
  requestId: string;
2965
+ sessionUpdate: "ls_permission";
2966
2966
  toolCallId?: string | undefined;
2967
2967
  detail?: string | undefined;
2968
2968
  questions?: {
2969
- text: string;
2970
- kind: "text" | "choice" | "choices";
2971
2969
  id: string;
2970
+ kind: "text" | "choice" | "choices";
2971
+ text: string;
2972
2972
  options?: {
2973
2973
  value: string;
2974
2974
  label: string;
@@ -2980,20 +2980,20 @@ export declare const sessionEventSchema: z.ZodObject<{
2980
2980
  required?: boolean | undefined;
2981
2981
  }[] | undefined;
2982
2982
  }, {
2983
- sessionUpdate: "ls_permission";
2984
2983
  options: {
2984
+ optionId: string;
2985
2985
  name: string;
2986
2986
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2987
- optionId: string;
2988
2987
  }[];
2989
2988
  title: string;
2990
2989
  requestId: string;
2990
+ sessionUpdate: "ls_permission";
2991
2991
  toolCallId?: string | undefined;
2992
2992
  detail?: string | undefined;
2993
2993
  questions?: {
2994
- text: string;
2995
- kind: "text" | "choice" | "choices";
2996
2994
  id: string;
2995
+ kind: "text" | "choice" | "choices";
2996
+ text: string;
2997
2997
  options?: {
2998
2998
  value: string;
2999
2999
  label: string;
@@ -3023,8 +3023,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3023
3023
  other?: string | undefined;
3024
3024
  }>, "many">>;
3025
3025
  }, "strip", z.ZodTypeAny, {
3026
- sessionUpdate: "ls_permission_resolved";
3027
3026
  requestId: string;
3027
+ sessionUpdate: "ls_permission_resolved";
3028
3028
  optionId?: string | undefined;
3029
3029
  answers?: {
3030
3030
  values: string[];
@@ -3032,8 +3032,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3032
3032
  other?: string | undefined;
3033
3033
  }[] | undefined;
3034
3034
  }, {
3035
- sessionUpdate: "ls_permission_resolved";
3036
3035
  requestId: string;
3036
+ sessionUpdate: "ls_permission_resolved";
3037
3037
  optionId?: string | undefined;
3038
3038
  answers?: {
3039
3039
  values: string[];
@@ -3045,41 +3045,40 @@ export declare const sessionEventSchema: z.ZodObject<{
3045
3045
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
3046
3046
  deviceId: z.ZodOptional<z.ZodString>;
3047
3047
  }, "strip", z.ZodTypeAny, {
3048
+ driver: "remote" | "desktop" | "none";
3048
3049
  sessionUpdate: "ls_driver";
3049
- driver: "desktop" | "remote" | "none";
3050
3050
  deviceId?: string | undefined;
3051
3051
  }, {
3052
+ driver: "remote" | "desktop" | "none";
3052
3053
  sessionUpdate: "ls_driver";
3053
- driver: "desktop" | "remote" | "none";
3054
3054
  deviceId?: string | undefined;
3055
3055
  }>, z.ZodObject<{
3056
3056
  sessionUpdate: z.ZodLiteral<"ls_status">;
3057
3057
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
3058
3058
  }, "strip", z.ZodTypeAny, {
3059
+ state: "idle" | "running" | "waiting" | "error" | "offline";
3059
3060
  sessionUpdate: "ls_status";
3060
- state: "error" | "idle" | "running" | "waiting" | "offline";
3061
3061
  }, {
3062
+ state: "idle" | "running" | "waiting" | "error" | "offline";
3062
3063
  sessionUpdate: "ls_status";
3063
- state: "error" | "idle" | "running" | "waiting" | "offline";
3064
3064
  }>, z.ZodObject<{
3065
3065
  sessionUpdate: z.ZodLiteral<"ls_error">;
3066
3066
  code: z.ZodString;
3067
3067
  message: z.ZodString;
3068
3068
  hint: z.ZodOptional<z.ZodString>;
3069
3069
  }, "strip", z.ZodTypeAny, {
3070
- sessionUpdate: "ls_error";
3071
3070
  code: string;
3072
3071
  message: string;
3072
+ sessionUpdate: "ls_error";
3073
3073
  hint?: string | undefined;
3074
3074
  }, {
3075
- sessionUpdate: "ls_error";
3076
3075
  code: string;
3077
3076
  message: string;
3077
+ sessionUpdate: "ls_error";
3078
3078
  hint?: string | undefined;
3079
3079
  }>]>;
3080
3080
  }, "strip", z.ZodTypeAny, {
3081
3081
  update: {
3082
- sessionUpdate: "user_message_chunk";
3083
3082
  content: {
3084
3083
  type: "text";
3085
3084
  text: string;
@@ -3090,14 +3089,13 @@ export declare const sessionEventSchema: z.ZodObject<{
3090
3089
  uri?: string | undefined;
3091
3090
  } | {
3092
3091
  type: "resource_link";
3093
- uri: string;
3094
3092
  name: string;
3095
- kind?: "file" | "skill" | "agent" | undefined;
3093
+ uri: string;
3094
+ kind?: "agent" | "file" | "skill" | undefined;
3096
3095
  };
3096
+ sessionUpdate: "user_message_chunk";
3097
3097
  messageId?: string | undefined;
3098
3098
  } | {
3099
- sessionUpdate: "agent_message_chunk";
3100
- messageId: string;
3101
3099
  content: {
3102
3100
  type: "text";
3103
3101
  text: string;
@@ -3108,14 +3106,14 @@ export declare const sessionEventSchema: z.ZodObject<{
3108
3106
  uri?: string | undefined;
3109
3107
  } | {
3110
3108
  type: "resource_link";
3111
- uri: string;
3112
3109
  name: string;
3113
- kind?: "file" | "skill" | "agent" | undefined;
3110
+ uri: string;
3111
+ kind?: "agent" | "file" | "skill" | undefined;
3114
3112
  };
3113
+ sessionUpdate: "agent_message_chunk";
3114
+ messageId: string;
3115
3115
  parentToolCallId?: string | undefined;
3116
3116
  } | {
3117
- sessionUpdate: "agent_thought_chunk";
3118
- messageId: string;
3119
3117
  content: {
3120
3118
  type: "text";
3121
3119
  text: string;
@@ -3126,17 +3124,49 @@ export declare const sessionEventSchema: z.ZodObject<{
3126
3124
  uri?: string | undefined;
3127
3125
  } | {
3128
3126
  type: "resource_link";
3129
- uri: string;
3130
3127
  name: string;
3131
- kind?: "file" | "skill" | "agent" | undefined;
3128
+ uri: string;
3129
+ kind?: "agent" | "file" | "skill" | undefined;
3132
3130
  };
3131
+ sessionUpdate: "agent_thought_chunk";
3132
+ messageId: string;
3133
3133
  parentToolCallId?: string | undefined;
3134
3134
  } | {
3135
- sessionUpdate: "tool_call";
3136
- status: "pending" | "in_progress" | "completed" | "failed";
3135
+ status: "failed" | "pending" | "in_progress" | "completed";
3137
3136
  kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3138
- toolCallId: string;
3139
3137
  title: string;
3138
+ toolCallId: string;
3139
+ sessionUpdate: "tool_call";
3140
+ detail?: {
3141
+ type: "mcp";
3142
+ tool: string;
3143
+ server: string;
3144
+ } | {
3145
+ type: "subagent";
3146
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3147
+ task?: string | undefined;
3148
+ agentType?: string | undefined;
3149
+ model?: string | undefined;
3150
+ } | {
3151
+ type: "skill";
3152
+ name: string;
3153
+ description?: string | undefined;
3154
+ } | {
3155
+ type: "web_search";
3156
+ query?: string | undefined;
3157
+ } | {
3158
+ type: "image_generation";
3159
+ prompt?: string | undefined;
3160
+ } | {
3161
+ type: "compaction";
3162
+ } | {
3163
+ type: "review";
3164
+ phase: "started" | "finished";
3165
+ } | {
3166
+ type: "question";
3167
+ text: string;
3168
+ more?: number | undefined;
3169
+ } | undefined;
3140
3170
  content?: ({
3141
3171
  type: "content";
3142
3172
  content: {
@@ -3149,9 +3179,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3149
3179
  uri?: string | undefined;
3150
3180
  } | {
3151
3181
  type: "resource_link";
3152
- uri: string;
3153
3182
  name: string;
3154
- kind?: "file" | "skill" | "agent" | undefined;
3183
+ uri: string;
3184
+ kind?: "agent" | "file" | "skill" | undefined;
3155
3185
  };
3156
3186
  } | {
3157
3187
  path: string;
@@ -3174,10 +3204,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3174
3204
  path: string;
3175
3205
  line?: number | undefined;
3176
3206
  }[] | undefined;
3207
+ } | {
3208
+ toolCallId: string;
3209
+ sessionUpdate: "tool_call_update";
3210
+ status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
3211
+ title?: string | undefined;
3177
3212
  detail?: {
3178
3213
  type: "mcp";
3179
- server: string;
3180
3214
  tool: string;
3215
+ server: string;
3181
3216
  } | {
3182
3217
  type: "subagent";
3183
3218
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
@@ -3204,10 +3239,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3204
3239
  text: string;
3205
3240
  more?: number | undefined;
3206
3241
  } | undefined;
3207
- } | {
3208
- sessionUpdate: "tool_call_update";
3209
- toolCallId: string;
3210
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
3211
3242
  content?: ({
3212
3243
  type: "content";
3213
3244
  content: {
@@ -3220,9 +3251,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3220
3251
  uri?: string | undefined;
3221
3252
  } | {
3222
3253
  type: "resource_link";
3223
- uri: string;
3224
3254
  name: string;
3225
- kind?: "file" | "skill" | "agent" | undefined;
3255
+ uri: string;
3256
+ kind?: "agent" | "file" | "skill" | undefined;
3226
3257
  };
3227
3258
  } | {
3228
3259
  path: string;
@@ -3240,46 +3271,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3240
3271
  terminalId: string;
3241
3272
  })[] | undefined;
3242
3273
  parentToolCallId?: string | undefined;
3243
- title?: string | undefined;
3244
- detail?: {
3245
- type: "mcp";
3246
- server: string;
3247
- tool: string;
3248
- } | {
3249
- type: "subagent";
3250
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3251
- task?: string | undefined;
3252
- agentType?: string | undefined;
3253
- model?: string | undefined;
3254
- } | {
3255
- type: "skill";
3256
- name: string;
3257
- description?: string | undefined;
3258
- } | {
3259
- type: "web_search";
3260
- query?: string | undefined;
3261
- } | {
3262
- type: "image_generation";
3263
- prompt?: string | undefined;
3264
- } | {
3265
- type: "compaction";
3266
- } | {
3267
- type: "review";
3268
- phase: "started" | "finished";
3269
- } | {
3270
- type: "question";
3271
- text: string;
3272
- more?: number | undefined;
3273
- } | undefined;
3274
3274
  appendOutput?: string | undefined;
3275
3275
  rawOutput?: unknown;
3276
3276
  } | {
3277
- sessionUpdate: "plan";
3278
3277
  entries: {
3279
3278
  status: "pending" | "in_progress" | "completed";
3280
3279
  content: string;
3281
3280
  priority: "high" | "medium" | "low";
3282
3281
  }[];
3282
+ sessionUpdate: "plan";
3283
3283
  } | {
3284
3284
  sessionUpdate: "available_commands_update";
3285
3285
  availableCommands: {
@@ -3304,44 +3304,44 @@ export declare const sessionEventSchema: z.ZodObject<{
3304
3304
  role: "agent" | "thought" | "user";
3305
3305
  parentToolCallId?: string | undefined;
3306
3306
  } | {
3307
- sessionUpdate: "ls_config";
3308
3307
  options: {
3309
3308
  values: {
3310
3309
  value: string;
3311
3310
  name: string;
3312
3311
  description?: string | undefined;
3313
3312
  }[];
3314
- name: string;
3315
3313
  id: string;
3314
+ name: string;
3316
3315
  category: "other" | "model" | "mode" | "effort";
3317
3316
  current: string;
3318
3317
  }[];
3318
+ sessionUpdate: "ls_config";
3319
3319
  } | {
3320
- sessionUpdate: "ls_notice";
3321
3320
  title: string;
3321
+ sessionUpdate: "ls_notice";
3322
3322
  level: "info" | "warning";
3323
3323
  detail?: string | undefined;
3324
3324
  } | {
3325
- sessionUpdate: "ls_turn";
3326
3325
  state: "started" | "ended";
3326
+ sessionUpdate: "ls_turn";
3327
3327
  parentToolCallId?: string | undefined;
3328
3328
  turnId?: string | undefined;
3329
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
3329
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3330
3330
  } | {
3331
- sessionUpdate: "ls_permission";
3332
3331
  options: {
3332
+ optionId: string;
3333
3333
  name: string;
3334
3334
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3335
- optionId: string;
3336
3335
  }[];
3337
3336
  title: string;
3338
3337
  requestId: string;
3338
+ sessionUpdate: "ls_permission";
3339
3339
  toolCallId?: string | undefined;
3340
3340
  detail?: string | undefined;
3341
3341
  questions?: {
3342
- text: string;
3343
- kind: "text" | "choice" | "choices";
3344
3342
  id: string;
3343
+ kind: "text" | "choice" | "choices";
3344
+ text: string;
3345
3345
  options?: {
3346
3346
  value: string;
3347
3347
  label: string;
@@ -3353,8 +3353,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3353
3353
  required?: boolean | undefined;
3354
3354
  }[] | undefined;
3355
3355
  } | {
3356
- sessionUpdate: "ls_permission_resolved";
3357
3356
  requestId: string;
3357
+ sessionUpdate: "ls_permission_resolved";
3358
3358
  optionId?: string | undefined;
3359
3359
  answers?: {
3360
3360
  values: string[];
@@ -3362,16 +3362,16 @@ export declare const sessionEventSchema: z.ZodObject<{
3362
3362
  other?: string | undefined;
3363
3363
  }[] | undefined;
3364
3364
  } | {
3365
+ driver: "remote" | "desktop" | "none";
3365
3366
  sessionUpdate: "ls_driver";
3366
- driver: "desktop" | "remote" | "none";
3367
3367
  deviceId?: string | undefined;
3368
3368
  } | {
3369
+ state: "idle" | "running" | "waiting" | "error" | "offline";
3369
3370
  sessionUpdate: "ls_status";
3370
- state: "error" | "idle" | "running" | "waiting" | "offline";
3371
3371
  } | {
3372
- sessionUpdate: "ls_error";
3373
3372
  code: string;
3374
3373
  message: string;
3374
+ sessionUpdate: "ls_error";
3375
3375
  hint?: string | undefined;
3376
3376
  };
3377
3377
  sessionId: string;
@@ -3379,7 +3379,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3379
3379
  ts: number;
3380
3380
  }, {
3381
3381
  update: {
3382
- sessionUpdate: "user_message_chunk";
3383
3382
  content: {
3384
3383
  type: "text";
3385
3384
  text: string;
@@ -3390,14 +3389,13 @@ export declare const sessionEventSchema: z.ZodObject<{
3390
3389
  uri?: string | undefined;
3391
3390
  } | {
3392
3391
  type: "resource_link";
3393
- uri: string;
3394
3392
  name: string;
3395
- kind?: "file" | "skill" | "agent" | undefined;
3393
+ uri: string;
3394
+ kind?: "agent" | "file" | "skill" | undefined;
3396
3395
  };
3396
+ sessionUpdate: "user_message_chunk";
3397
3397
  messageId?: string | undefined;
3398
3398
  } | {
3399
- sessionUpdate: "agent_message_chunk";
3400
- messageId: string;
3401
3399
  content: {
3402
3400
  type: "text";
3403
3401
  text: string;
@@ -3408,14 +3406,14 @@ export declare const sessionEventSchema: z.ZodObject<{
3408
3406
  uri?: string | undefined;
3409
3407
  } | {
3410
3408
  type: "resource_link";
3411
- uri: string;
3412
3409
  name: string;
3413
- kind?: "file" | "skill" | "agent" | undefined;
3410
+ uri: string;
3411
+ kind?: "agent" | "file" | "skill" | undefined;
3414
3412
  };
3413
+ sessionUpdate: "agent_message_chunk";
3414
+ messageId: string;
3415
3415
  parentToolCallId?: string | undefined;
3416
3416
  } | {
3417
- sessionUpdate: "agent_thought_chunk";
3418
- messageId: string;
3419
3417
  content: {
3420
3418
  type: "text";
3421
3419
  text: string;
@@ -3426,17 +3424,49 @@ export declare const sessionEventSchema: z.ZodObject<{
3426
3424
  uri?: string | undefined;
3427
3425
  } | {
3428
3426
  type: "resource_link";
3429
- uri: string;
3430
3427
  name: string;
3431
- kind?: "file" | "skill" | "agent" | undefined;
3428
+ uri: string;
3429
+ kind?: "agent" | "file" | "skill" | undefined;
3432
3430
  };
3431
+ sessionUpdate: "agent_thought_chunk";
3432
+ messageId: string;
3433
3433
  parentToolCallId?: string | undefined;
3434
3434
  } | {
3435
- sessionUpdate: "tool_call";
3436
- status: "pending" | "in_progress" | "completed" | "failed";
3435
+ status: "failed" | "pending" | "in_progress" | "completed";
3437
3436
  kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3438
- toolCallId: string;
3439
3437
  title: string;
3438
+ toolCallId: string;
3439
+ sessionUpdate: "tool_call";
3440
+ detail?: {
3441
+ type: "mcp";
3442
+ tool: string;
3443
+ server: string;
3444
+ } | {
3445
+ type: "subagent";
3446
+ task?: string | undefined;
3447
+ agentType?: string | undefined;
3448
+ model?: string | undefined;
3449
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3450
+ } | {
3451
+ type: "skill";
3452
+ name: string;
3453
+ description?: string | undefined;
3454
+ } | {
3455
+ type: "web_search";
3456
+ query?: string | undefined;
3457
+ } | {
3458
+ type: "image_generation";
3459
+ prompt?: string | undefined;
3460
+ } | {
3461
+ type: "compaction";
3462
+ } | {
3463
+ type: "review";
3464
+ phase: "started" | "finished";
3465
+ } | {
3466
+ type: "question";
3467
+ text: string;
3468
+ more?: number | undefined;
3469
+ } | undefined;
3440
3470
  content?: ({
3441
3471
  type: "content";
3442
3472
  content: {
@@ -3449,9 +3479,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3449
3479
  uri?: string | undefined;
3450
3480
  } | {
3451
3481
  type: "resource_link";
3452
- uri: string;
3453
3482
  name: string;
3454
- kind?: "file" | "skill" | "agent" | undefined;
3483
+ uri: string;
3484
+ kind?: "agent" | "file" | "skill" | undefined;
3455
3485
  };
3456
3486
  } | {
3457
3487
  path: string;
@@ -3474,16 +3504,21 @@ export declare const sessionEventSchema: z.ZodObject<{
3474
3504
  path: string;
3475
3505
  line?: number | undefined;
3476
3506
  }[] | undefined;
3507
+ } | {
3508
+ toolCallId: string;
3509
+ sessionUpdate: "tool_call_update";
3510
+ status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
3511
+ title?: string | undefined;
3477
3512
  detail?: {
3478
3513
  type: "mcp";
3479
- server: string;
3480
3514
  tool: string;
3515
+ server: string;
3481
3516
  } | {
3482
3517
  type: "subagent";
3483
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3484
3518
  task?: string | undefined;
3485
3519
  agentType?: string | undefined;
3486
3520
  model?: string | undefined;
3521
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3487
3522
  } | {
3488
3523
  type: "skill";
3489
3524
  name: string;
@@ -3504,10 +3539,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3504
3539
  text: string;
3505
3540
  more?: number | undefined;
3506
3541
  } | undefined;
3507
- } | {
3508
- sessionUpdate: "tool_call_update";
3509
- toolCallId: string;
3510
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
3511
3542
  content?: ({
3512
3543
  type: "content";
3513
3544
  content: {
@@ -3520,9 +3551,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3520
3551
  uri?: string | undefined;
3521
3552
  } | {
3522
3553
  type: "resource_link";
3523
- uri: string;
3524
3554
  name: string;
3525
- kind?: "file" | "skill" | "agent" | undefined;
3555
+ uri: string;
3556
+ kind?: "agent" | "file" | "skill" | undefined;
3526
3557
  };
3527
3558
  } | {
3528
3559
  path: string;
@@ -3540,46 +3571,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3540
3571
  terminalId: string;
3541
3572
  })[] | undefined;
3542
3573
  parentToolCallId?: string | undefined;
3543
- title?: string | undefined;
3544
- detail?: {
3545
- type: "mcp";
3546
- server: string;
3547
- tool: string;
3548
- } | {
3549
- type: "subagent";
3550
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3551
- task?: string | undefined;
3552
- agentType?: string | undefined;
3553
- model?: string | undefined;
3554
- } | {
3555
- type: "skill";
3556
- name: string;
3557
- description?: string | undefined;
3558
- } | {
3559
- type: "web_search";
3560
- query?: string | undefined;
3561
- } | {
3562
- type: "image_generation";
3563
- prompt?: string | undefined;
3564
- } | {
3565
- type: "compaction";
3566
- } | {
3567
- type: "review";
3568
- phase: "started" | "finished";
3569
- } | {
3570
- type: "question";
3571
- text: string;
3572
- more?: number | undefined;
3573
- } | undefined;
3574
3574
  appendOutput?: string | undefined;
3575
3575
  rawOutput?: unknown;
3576
3576
  } | {
3577
- sessionUpdate: "plan";
3578
3577
  entries: {
3579
3578
  status: "pending" | "in_progress" | "completed";
3580
3579
  content: string;
3581
3580
  priority?: "high" | "medium" | "low" | undefined;
3582
3581
  }[];
3582
+ sessionUpdate: "plan";
3583
3583
  } | {
3584
3584
  sessionUpdate: "available_commands_update";
3585
3585
  availableCommands: {
@@ -3604,44 +3604,44 @@ export declare const sessionEventSchema: z.ZodObject<{
3604
3604
  role: "agent" | "thought" | "user";
3605
3605
  parentToolCallId?: string | undefined;
3606
3606
  } | {
3607
- sessionUpdate: "ls_config";
3608
3607
  options: {
3609
3608
  values: {
3610
3609
  value: string;
3611
3610
  name: string;
3612
3611
  description?: string | undefined;
3613
3612
  }[];
3614
- name: string;
3615
3613
  id: string;
3614
+ name: string;
3616
3615
  current: string;
3617
3616
  category?: "other" | "model" | "mode" | "effort" | undefined;
3618
3617
  }[];
3618
+ sessionUpdate: "ls_config";
3619
3619
  } | {
3620
- sessionUpdate: "ls_notice";
3621
3620
  title: string;
3621
+ sessionUpdate: "ls_notice";
3622
3622
  level: "info" | "warning";
3623
3623
  detail?: string | undefined;
3624
3624
  } | {
3625
- sessionUpdate: "ls_turn";
3626
3625
  state: "started" | "ended";
3626
+ sessionUpdate: "ls_turn";
3627
3627
  parentToolCallId?: string | undefined;
3628
3628
  turnId?: string | undefined;
3629
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
3629
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3630
3630
  } | {
3631
- sessionUpdate: "ls_permission";
3632
3631
  options: {
3632
+ optionId: string;
3633
3633
  name: string;
3634
3634
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3635
- optionId: string;
3636
3635
  }[];
3637
3636
  title: string;
3638
3637
  requestId: string;
3638
+ sessionUpdate: "ls_permission";
3639
3639
  toolCallId?: string | undefined;
3640
3640
  detail?: string | undefined;
3641
3641
  questions?: {
3642
- text: string;
3643
- kind: "text" | "choice" | "choices";
3644
3642
  id: string;
3643
+ kind: "text" | "choice" | "choices";
3644
+ text: string;
3645
3645
  options?: {
3646
3646
  value: string;
3647
3647
  label: string;
@@ -3653,8 +3653,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3653
3653
  required?: boolean | undefined;
3654
3654
  }[] | undefined;
3655
3655
  } | {
3656
- sessionUpdate: "ls_permission_resolved";
3657
3656
  requestId: string;
3657
+ sessionUpdate: "ls_permission_resolved";
3658
3658
  optionId?: string | undefined;
3659
3659
  answers?: {
3660
3660
  values: string[];
@@ -3662,16 +3662,16 @@ export declare const sessionEventSchema: z.ZodObject<{
3662
3662
  other?: string | undefined;
3663
3663
  }[] | undefined;
3664
3664
  } | {
3665
+ driver: "remote" | "desktop" | "none";
3665
3666
  sessionUpdate: "ls_driver";
3666
- driver: "desktop" | "remote" | "none";
3667
3667
  deviceId?: string | undefined;
3668
3668
  } | {
3669
+ state: "idle" | "running" | "waiting" | "error" | "offline";
3669
3670
  sessionUpdate: "ls_status";
3670
- state: "error" | "idle" | "running" | "waiting" | "offline";
3671
3671
  } | {
3672
- sessionUpdate: "ls_error";
3673
3672
  code: string;
3674
3673
  message: string;
3674
+ sessionUpdate: "ls_error";
3675
3675
  hint?: string | undefined;
3676
3676
  };
3677
3677
  sessionId: string;