@linkshell/wire 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/updates.d.ts CHANGED
@@ -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
- name: string;
35
34
  uri: string;
36
- kind?: "agent" | "file" | "skill" | undefined;
35
+ name: string;
36
+ kind?: "file" | "skill" | "agent" | undefined;
37
37
  }, {
38
38
  type: "resource_link";
39
- name: string;
40
39
  uri: string;
41
- kind?: "agent" | "file" | "skill" | undefined;
40
+ name: string;
41
+ kind?: "file" | "skill" | "agent" | 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
- name: string;
81
80
  uri: string;
82
- kind?: "agent" | "file" | "skill" | undefined;
81
+ name: string;
82
+ kind?: "file" | "skill" | "agent" | undefined;
83
83
  }, {
84
84
  type: "resource_link";
85
- name: string;
86
85
  uri: string;
87
- kind?: "agent" | "file" | "skill" | undefined;
86
+ name: string;
87
+ kind?: "file" | "skill" | "agent" | 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
- name: string;
102
101
  uri: string;
103
- kind?: "agent" | "file" | "skill" | undefined;
102
+ name: string;
103
+ kind?: "file" | "skill" | "agent" | 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
- name: string;
118
117
  uri: string;
119
- kind?: "agent" | "file" | "skill" | undefined;
118
+ name: string;
119
+ kind?: "file" | "skill" | "agent" | undefined;
120
120
  };
121
121
  }>, z.ZodObject<{
122
122
  type: z.ZodLiteral<"diff">;
@@ -124,13 +124,13 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
124
124
  oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
125
  newText: z.ZodString;
126
126
  }, "strip", z.ZodTypeAny, {
127
- path: string;
128
127
  type: "diff";
128
+ path: string;
129
129
  newText: string;
130
130
  oldText?: string | null | undefined;
131
131
  }, {
132
- path: string;
133
132
  type: "diff";
133
+ path: string;
134
134
  newText: string;
135
135
  oldText?: string | null | undefined;
136
136
  }>, z.ZodObject<{
@@ -140,16 +140,16 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
140
140
  movePath: z.ZodOptional<z.ZodString>;
141
141
  diff: z.ZodString;
142
142
  }, "strip", z.ZodTypeAny, {
143
- path: string;
144
143
  type: "patch";
144
+ path: string;
145
145
  diff: string;
146
- change: "delete" | "add" | "update";
146
+ change: "add" | "delete" | "update";
147
147
  movePath?: string | undefined;
148
148
  }, {
149
- path: string;
150
149
  type: "patch";
150
+ path: string;
151
151
  diff: string;
152
- change: "delete" | "add" | "update";
152
+ change: "add" | "delete" | "update";
153
153
  movePath?: string | undefined;
154
154
  }>, z.ZodObject<{
155
155
  type: z.ZodLiteral<"terminal">;
@@ -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
- tool: string;
188
187
  server: string;
188
+ tool: string;
189
189
  }, {
190
190
  type: "mcp";
191
- tool: string;
192
191
  server: string;
192
+ tool: 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;
209
210
  task?: string | undefined;
210
211
  agentType?: string | undefined;
211
212
  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;
@@ -255,6 +255,18 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
255
255
  }, {
256
256
  type: "review";
257
257
  phase: "started" | "finished";
258
+ }>, z.ZodObject<{
259
+ type: z.ZodLiteral<"question">;
260
+ text: z.ZodString;
261
+ more: z.ZodOptional<z.ZodNumber>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ type: "question";
264
+ text: string;
265
+ more?: number | undefined;
266
+ }, {
267
+ type: "question";
268
+ text: string;
269
+ more?: number | undefined;
258
270
  }>]>;
259
271
  export type ToolDetail = z.infer<typeof toolDetailSchema>;
260
272
  export declare const planEntrySchema: z.ZodObject<{
@@ -298,9 +310,9 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
298
310
  name: string;
299
311
  description?: string | undefined;
300
312
  }[];
301
- id: string;
302
313
  name: string;
303
- category: "other" | "model" | "mode" | "effort";
314
+ id: string;
315
+ category: "model" | "mode" | "effort" | "other";
304
316
  current: string;
305
317
  }, {
306
318
  values: {
@@ -308,10 +320,10 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
308
320
  name: string;
309
321
  description?: string | undefined;
310
322
  }[];
311
- id: string;
312
323
  name: string;
324
+ id: string;
313
325
  current: string;
314
- category?: "other" | "model" | "mode" | "effort" | undefined;
326
+ category?: "model" | "mode" | "effort" | "other" | undefined;
315
327
  }>;
316
328
  export type SessionConfigOption = z.infer<typeof sessionConfigOptionSchema>;
317
329
  export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate", [z.ZodObject<{
@@ -349,14 +361,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
349
361
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
350
362
  }, "strip", z.ZodTypeAny, {
351
363
  type: "resource_link";
352
- name: string;
353
364
  uri: string;
354
- kind?: "agent" | "file" | "skill" | undefined;
365
+ name: string;
366
+ kind?: "file" | "skill" | "agent" | undefined;
355
367
  }, {
356
368
  type: "resource_link";
357
- name: string;
358
369
  uri: string;
359
- kind?: "agent" | "file" | "skill" | undefined;
370
+ name: string;
371
+ kind?: "file" | "skill" | "agent" | undefined;
360
372
  }>]>;
361
373
  }, "strip", z.ZodTypeAny, {
362
374
  content: {
@@ -369,9 +381,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
369
381
  uri?: string | undefined;
370
382
  } | {
371
383
  type: "resource_link";
372
- name: string;
373
384
  uri: string;
374
- kind?: "agent" | "file" | "skill" | undefined;
385
+ name: string;
386
+ kind?: "file" | "skill" | "agent" | undefined;
375
387
  };
376
388
  sessionUpdate: "user_message_chunk";
377
389
  messageId?: string | undefined;
@@ -386,9 +398,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
386
398
  uri?: string | undefined;
387
399
  } | {
388
400
  type: "resource_link";
389
- name: string;
390
401
  uri: string;
391
- kind?: "agent" | "file" | "skill" | undefined;
402
+ name: string;
403
+ kind?: "file" | "skill" | "agent" | undefined;
392
404
  };
393
405
  sessionUpdate: "user_message_chunk";
394
406
  messageId?: string | undefined;
@@ -428,14 +440,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
428
440
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
429
441
  }, "strip", z.ZodTypeAny, {
430
442
  type: "resource_link";
431
- name: string;
432
443
  uri: string;
433
- kind?: "agent" | "file" | "skill" | undefined;
444
+ name: string;
445
+ kind?: "file" | "skill" | "agent" | undefined;
434
446
  }, {
435
447
  type: "resource_link";
436
- name: string;
437
448
  uri: string;
438
- kind?: "agent" | "file" | "skill" | undefined;
449
+ name: string;
450
+ kind?: "file" | "skill" | "agent" | undefined;
439
451
  }>]>;
440
452
  }, "strip", z.ZodTypeAny, {
441
453
  content: {
@@ -448,9 +460,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
448
460
  uri?: string | undefined;
449
461
  } | {
450
462
  type: "resource_link";
451
- name: string;
452
463
  uri: string;
453
- kind?: "agent" | "file" | "skill" | undefined;
464
+ name: string;
465
+ kind?: "file" | "skill" | "agent" | undefined;
454
466
  };
455
467
  sessionUpdate: "agent_message_chunk";
456
468
  messageId: string;
@@ -466,9 +478,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
466
478
  uri?: string | undefined;
467
479
  } | {
468
480
  type: "resource_link";
469
- name: string;
470
481
  uri: string;
471
- kind?: "agent" | "file" | "skill" | undefined;
482
+ name: string;
483
+ kind?: "file" | "skill" | "agent" | undefined;
472
484
  };
473
485
  sessionUpdate: "agent_message_chunk";
474
486
  messageId: string;
@@ -509,14 +521,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
509
521
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
510
522
  }, "strip", z.ZodTypeAny, {
511
523
  type: "resource_link";
512
- name: string;
513
524
  uri: string;
514
- kind?: "agent" | "file" | "skill" | undefined;
525
+ name: string;
526
+ kind?: "file" | "skill" | "agent" | undefined;
515
527
  }, {
516
528
  type: "resource_link";
517
- name: string;
518
529
  uri: string;
519
- kind?: "agent" | "file" | "skill" | undefined;
530
+ name: string;
531
+ kind?: "file" | "skill" | "agent" | undefined;
520
532
  }>]>;
521
533
  }, "strip", z.ZodTypeAny, {
522
534
  content: {
@@ -529,9 +541,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
529
541
  uri?: string | undefined;
530
542
  } | {
531
543
  type: "resource_link";
532
- name: string;
533
544
  uri: string;
534
- kind?: "agent" | "file" | "skill" | undefined;
545
+ name: string;
546
+ kind?: "file" | "skill" | "agent" | undefined;
535
547
  };
536
548
  sessionUpdate: "agent_thought_chunk";
537
549
  messageId: string;
@@ -547,9 +559,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
547
559
  uri?: string | undefined;
548
560
  } | {
549
561
  type: "resource_link";
550
- name: string;
551
562
  uri: string;
552
- kind?: "agent" | "file" | "skill" | undefined;
563
+ name: string;
564
+ kind?: "file" | "skill" | "agent" | undefined;
553
565
  };
554
566
  sessionUpdate: "agent_thought_chunk";
555
567
  messageId: string;
@@ -597,14 +609,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
597
609
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
598
610
  }, "strip", z.ZodTypeAny, {
599
611
  type: "resource_link";
600
- name: string;
601
612
  uri: string;
602
- kind?: "agent" | "file" | "skill" | undefined;
613
+ name: string;
614
+ kind?: "file" | "skill" | "agent" | undefined;
603
615
  }, {
604
616
  type: "resource_link";
605
- name: string;
606
617
  uri: string;
607
- kind?: "agent" | "file" | "skill" | undefined;
618
+ name: string;
619
+ kind?: "file" | "skill" | "agent" | undefined;
608
620
  }>]>;
609
621
  }, "strip", z.ZodTypeAny, {
610
622
  type: "content";
@@ -618,9 +630,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
618
630
  uri?: string | undefined;
619
631
  } | {
620
632
  type: "resource_link";
621
- name: string;
622
633
  uri: string;
623
- kind?: "agent" | "file" | "skill" | undefined;
634
+ name: string;
635
+ kind?: "file" | "skill" | "agent" | undefined;
624
636
  };
625
637
  }, {
626
638
  type: "content";
@@ -634,9 +646,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
634
646
  uri?: string | undefined;
635
647
  } | {
636
648
  type: "resource_link";
637
- name: string;
638
649
  uri: string;
639
- kind?: "agent" | "file" | "skill" | undefined;
650
+ name: string;
651
+ kind?: "file" | "skill" | "agent" | undefined;
640
652
  };
641
653
  }>, z.ZodObject<{
642
654
  type: z.ZodLiteral<"diff">;
@@ -644,13 +656,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
644
656
  oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
645
657
  newText: z.ZodString;
646
658
  }, "strip", z.ZodTypeAny, {
647
- path: string;
648
659
  type: "diff";
660
+ path: string;
649
661
  newText: string;
650
662
  oldText?: string | null | undefined;
651
663
  }, {
652
- path: string;
653
664
  type: "diff";
665
+ path: string;
654
666
  newText: string;
655
667
  oldText?: string | null | undefined;
656
668
  }>, z.ZodObject<{
@@ -660,16 +672,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
660
672
  movePath: z.ZodOptional<z.ZodString>;
661
673
  diff: z.ZodString;
662
674
  }, "strip", z.ZodTypeAny, {
663
- path: string;
664
675
  type: "patch";
676
+ path: string;
665
677
  diff: string;
666
- change: "delete" | "add" | "update";
678
+ change: "add" | "delete" | "update";
667
679
  movePath?: string | undefined;
668
680
  }, {
669
- path: string;
670
681
  type: "patch";
682
+ path: string;
671
683
  diff: string;
672
- change: "delete" | "add" | "update";
684
+ change: "add" | "delete" | "update";
673
685
  movePath?: string | undefined;
674
686
  }>, z.ZodObject<{
675
687
  type: z.ZodLiteral<"terminal">;
@@ -697,12 +709,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
697
709
  tool: z.ZodString;
698
710
  }, "strip", z.ZodTypeAny, {
699
711
  type: "mcp";
700
- tool: string;
701
712
  server: string;
713
+ tool: string;
702
714
  }, {
703
715
  type: "mcp";
704
- tool: string;
705
716
  server: string;
717
+ tool: string;
706
718
  }>, z.ZodObject<{
707
719
  type: z.ZodLiteral<"subagent">;
708
720
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -719,10 +731,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
719
731
  model?: string | undefined;
720
732
  }, {
721
733
  type: "subagent";
734
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
722
735
  task?: string | undefined;
723
736
  agentType?: string | undefined;
724
737
  model?: string | undefined;
725
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
726
738
  }>, z.ZodObject<{
727
739
  type: z.ZodLiteral<"skill">;
728
740
  name: z.ZodString;
@@ -768,39 +780,25 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
768
780
  }, {
769
781
  type: "review";
770
782
  phase: "started" | "finished";
783
+ }>, z.ZodObject<{
784
+ type: z.ZodLiteral<"question">;
785
+ text: z.ZodString;
786
+ more: z.ZodOptional<z.ZodNumber>;
787
+ }, "strip", z.ZodTypeAny, {
788
+ type: "question";
789
+ text: string;
790
+ more?: number | undefined;
791
+ }, {
792
+ type: "question";
793
+ text: string;
794
+ more?: number | undefined;
771
795
  }>]>>;
772
796
  }, "strip", z.ZodTypeAny, {
773
- status: "failed" | "pending" | "in_progress" | "completed";
774
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
775
- title: string;
776
- toolCallId: string;
797
+ status: "pending" | "in_progress" | "completed" | "failed";
798
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
777
799
  sessionUpdate: "tool_call";
778
- detail?: {
779
- type: "mcp";
780
- tool: string;
781
- server: string;
782
- } | {
783
- type: "subagent";
784
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
785
- task?: string | undefined;
786
- agentType?: string | undefined;
787
- model?: string | undefined;
788
- } | {
789
- type: "skill";
790
- name: string;
791
- description?: string | undefined;
792
- } | {
793
- type: "web_search";
794
- query?: string | undefined;
795
- } | {
796
- type: "image_generation";
797
- prompt?: string | undefined;
798
- } | {
799
- type: "compaction";
800
- } | {
801
- type: "review";
802
- phase: "started" | "finished";
803
- } | undefined;
800
+ toolCallId: string;
801
+ title: string;
804
802
  content?: ({
805
803
  type: "content";
806
804
  content: {
@@ -813,20 +811,20 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
813
811
  uri?: string | undefined;
814
812
  } | {
815
813
  type: "resource_link";
816
- name: string;
817
814
  uri: string;
818
- kind?: "agent" | "file" | "skill" | undefined;
815
+ name: string;
816
+ kind?: "file" | "skill" | "agent" | undefined;
819
817
  };
820
818
  } | {
821
- path: string;
822
819
  type: "diff";
820
+ path: string;
823
821
  newText: string;
824
822
  oldText?: string | null | undefined;
825
823
  } | {
826
- path: string;
827
824
  type: "patch";
825
+ path: string;
828
826
  diff: string;
829
- change: "delete" | "add" | "update";
827
+ change: "add" | "delete" | "update";
830
828
  movePath?: string | undefined;
831
829
  } | {
832
830
  type: "terminal";
@@ -838,22 +836,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
838
836
  path: string;
839
837
  line?: number | undefined;
840
838
  }[] | undefined;
841
- }, {
842
- status: "failed" | "pending" | "in_progress" | "completed";
843
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
844
- title: string;
845
- toolCallId: string;
846
- sessionUpdate: "tool_call";
847
839
  detail?: {
848
840
  type: "mcp";
849
- tool: string;
850
841
  server: string;
842
+ tool: string;
851
843
  } | {
852
844
  type: "subagent";
845
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
853
846
  task?: string | undefined;
854
847
  agentType?: string | undefined;
855
848
  model?: string | undefined;
856
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
857
849
  } | {
858
850
  type: "skill";
859
851
  name: string;
@@ -869,7 +861,17 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
869
861
  } | {
870
862
  type: "review";
871
863
  phase: "started" | "finished";
864
+ } | {
865
+ type: "question";
866
+ text: string;
867
+ more?: number | undefined;
872
868
  } | undefined;
869
+ }, {
870
+ status: "pending" | "in_progress" | "completed" | "failed";
871
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
872
+ sessionUpdate: "tool_call";
873
+ toolCallId: string;
874
+ title: string;
873
875
  content?: ({
874
876
  type: "content";
875
877
  content: {
@@ -882,20 +884,20 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
882
884
  uri?: string | undefined;
883
885
  } | {
884
886
  type: "resource_link";
885
- name: string;
886
887
  uri: string;
887
- kind?: "agent" | "file" | "skill" | undefined;
888
+ name: string;
889
+ kind?: "file" | "skill" | "agent" | undefined;
888
890
  };
889
891
  } | {
890
- path: string;
891
892
  type: "diff";
893
+ path: string;
892
894
  newText: string;
893
895
  oldText?: string | null | undefined;
894
896
  } | {
895
- path: string;
896
897
  type: "patch";
898
+ path: string;
897
899
  diff: string;
898
- change: "delete" | "add" | "update";
900
+ change: "add" | "delete" | "update";
899
901
  movePath?: string | undefined;
900
902
  } | {
901
903
  type: "terminal";
@@ -907,6 +909,36 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
907
909
  path: string;
908
910
  line?: number | undefined;
909
911
  }[] | 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;
910
942
  }>, z.ZodObject<{
911
943
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
912
944
  toolCallId: z.ZodString;
@@ -919,12 +951,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
919
951
  tool: z.ZodString;
920
952
  }, "strip", z.ZodTypeAny, {
921
953
  type: "mcp";
922
- tool: string;
923
954
  server: string;
955
+ tool: string;
924
956
  }, {
925
957
  type: "mcp";
926
- tool: string;
927
958
  server: string;
959
+ tool: string;
928
960
  }>, z.ZodObject<{
929
961
  type: z.ZodLiteral<"subagent">;
930
962
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -941,10 +973,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
941
973
  model?: string | undefined;
942
974
  }, {
943
975
  type: "subagent";
976
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
944
977
  task?: string | undefined;
945
978
  agentType?: string | undefined;
946
979
  model?: string | undefined;
947
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
948
980
  }>, z.ZodObject<{
949
981
  type: z.ZodLiteral<"skill">;
950
982
  name: z.ZodString;
@@ -990,6 +1022,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
990
1022
  }, {
991
1023
  type: "review";
992
1024
  phase: "started" | "finished";
1025
+ }>, z.ZodObject<{
1026
+ type: z.ZodLiteral<"question">;
1027
+ text: z.ZodString;
1028
+ more: z.ZodOptional<z.ZodNumber>;
1029
+ }, "strip", z.ZodTypeAny, {
1030
+ type: "question";
1031
+ text: string;
1032
+ more?: number | undefined;
1033
+ }, {
1034
+ type: "question";
1035
+ text: string;
1036
+ more?: number | undefined;
993
1037
  }>]>>;
994
1038
  /** Replaces the tool call's content when present. */
995
1039
  content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -1026,14 +1070,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1026
1070
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1027
1071
  }, "strip", z.ZodTypeAny, {
1028
1072
  type: "resource_link";
1029
- name: string;
1030
1073
  uri: string;
1031
- kind?: "agent" | "file" | "skill" | undefined;
1074
+ name: string;
1075
+ kind?: "file" | "skill" | "agent" | undefined;
1032
1076
  }, {
1033
1077
  type: "resource_link";
1034
- name: string;
1035
1078
  uri: string;
1036
- kind?: "agent" | "file" | "skill" | undefined;
1079
+ name: string;
1080
+ kind?: "file" | "skill" | "agent" | undefined;
1037
1081
  }>]>;
1038
1082
  }, "strip", z.ZodTypeAny, {
1039
1083
  type: "content";
@@ -1047,9 +1091,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1047
1091
  uri?: string | undefined;
1048
1092
  } | {
1049
1093
  type: "resource_link";
1050
- name: string;
1051
1094
  uri: string;
1052
- kind?: "agent" | "file" | "skill" | undefined;
1095
+ name: string;
1096
+ kind?: "file" | "skill" | "agent" | undefined;
1053
1097
  };
1054
1098
  }, {
1055
1099
  type: "content";
@@ -1063,9 +1107,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1063
1107
  uri?: string | undefined;
1064
1108
  } | {
1065
1109
  type: "resource_link";
1066
- name: string;
1067
1110
  uri: string;
1068
- kind?: "agent" | "file" | "skill" | undefined;
1111
+ name: string;
1112
+ kind?: "file" | "skill" | "agent" | undefined;
1069
1113
  };
1070
1114
  }>, z.ZodObject<{
1071
1115
  type: z.ZodLiteral<"diff">;
@@ -1073,13 +1117,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1073
1117
  oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1074
1118
  newText: z.ZodString;
1075
1119
  }, "strip", z.ZodTypeAny, {
1076
- path: string;
1077
1120
  type: "diff";
1121
+ path: string;
1078
1122
  newText: string;
1079
1123
  oldText?: string | null | undefined;
1080
1124
  }, {
1081
- path: string;
1082
1125
  type: "diff";
1126
+ path: string;
1083
1127
  newText: string;
1084
1128
  oldText?: string | null | undefined;
1085
1129
  }>, z.ZodObject<{
@@ -1089,16 +1133,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1089
1133
  movePath: z.ZodOptional<z.ZodString>;
1090
1134
  diff: z.ZodString;
1091
1135
  }, "strip", z.ZodTypeAny, {
1092
- path: string;
1093
1136
  type: "patch";
1137
+ path: string;
1094
1138
  diff: string;
1095
- change: "delete" | "add" | "update";
1139
+ change: "add" | "delete" | "update";
1096
1140
  movePath?: string | undefined;
1097
1141
  }, {
1098
- path: string;
1099
1142
  type: "patch";
1143
+ path: string;
1100
1144
  diff: string;
1101
- change: "delete" | "add" | "update";
1145
+ change: "add" | "delete" | "update";
1102
1146
  movePath?: string | undefined;
1103
1147
  }>, z.ZodObject<{
1104
1148
  type: z.ZodLiteral<"terminal">;
@@ -1114,14 +1158,46 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1114
1158
  appendOutput: z.ZodOptional<z.ZodString>;
1115
1159
  rawOutput: z.ZodOptional<z.ZodUnknown>;
1116
1160
  }, "strip", z.ZodTypeAny, {
1117
- toolCallId: string;
1118
1161
  sessionUpdate: "tool_call_update";
1119
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
1162
+ 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
+ type: "diff";
1182
+ path: string;
1183
+ newText: string;
1184
+ oldText?: string | null | undefined;
1185
+ } | {
1186
+ type: "patch";
1187
+ path: string;
1188
+ diff: string;
1189
+ change: "add" | "delete" | "update";
1190
+ movePath?: string | undefined;
1191
+ } | {
1192
+ type: "terminal";
1193
+ terminalId: string;
1194
+ })[] | undefined;
1195
+ parentToolCallId?: string | undefined;
1120
1196
  title?: string | undefined;
1121
1197
  detail?: {
1122
1198
  type: "mcp";
1123
- tool: string;
1124
1199
  server: string;
1200
+ tool: string;
1125
1201
  } | {
1126
1202
  type: "subagent";
1127
1203
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
@@ -1143,7 +1219,17 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1143
1219
  } | {
1144
1220
  type: "review";
1145
1221
  phase: "started" | "finished";
1222
+ } | {
1223
+ type: "question";
1224
+ text: string;
1225
+ more?: number | undefined;
1146
1226
  } | 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;
1147
1233
  content?: ({
1148
1234
  type: "content";
1149
1235
  content: {
@@ -1156,43 +1242,37 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1156
1242
  uri?: string | undefined;
1157
1243
  } | {
1158
1244
  type: "resource_link";
1159
- name: string;
1160
1245
  uri: string;
1161
- kind?: "agent" | "file" | "skill" | undefined;
1246
+ name: string;
1247
+ kind?: "file" | "skill" | "agent" | undefined;
1162
1248
  };
1163
1249
  } | {
1164
- path: string;
1165
1250
  type: "diff";
1251
+ path: string;
1166
1252
  newText: string;
1167
1253
  oldText?: string | null | undefined;
1168
1254
  } | {
1169
- path: string;
1170
1255
  type: "patch";
1256
+ path: string;
1171
1257
  diff: string;
1172
- change: "delete" | "add" | "update";
1258
+ change: "add" | "delete" | "update";
1173
1259
  movePath?: string | undefined;
1174
1260
  } | {
1175
1261
  type: "terminal";
1176
1262
  terminalId: string;
1177
1263
  })[] | undefined;
1178
1264
  parentToolCallId?: string | undefined;
1179
- appendOutput?: string | undefined;
1180
- rawOutput?: unknown;
1181
- }, {
1182
- toolCallId: string;
1183
- sessionUpdate: "tool_call_update";
1184
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
1185
1265
  title?: string | undefined;
1186
1266
  detail?: {
1187
1267
  type: "mcp";
1188
- tool: string;
1189
1268
  server: string;
1269
+ tool: string;
1190
1270
  } | {
1191
1271
  type: "subagent";
1272
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1192
1273
  task?: string | undefined;
1193
1274
  agentType?: string | undefined;
1194
1275
  model?: string | undefined;
1195
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1196
1276
  } | {
1197
1277
  type: "skill";
1198
1278
  name: string;
@@ -1208,39 +1288,11 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1208
1288
  } | {
1209
1289
  type: "review";
1210
1290
  phase: "started" | "finished";
1211
- } | undefined;
1212
- content?: ({
1213
- type: "content";
1214
- content: {
1215
- type: "text";
1216
- text: string;
1217
- } | {
1218
- type: "image";
1219
- mimeType: string;
1220
- data?: string | undefined;
1221
- uri?: string | undefined;
1222
- } | {
1223
- type: "resource_link";
1224
- name: string;
1225
- uri: string;
1226
- kind?: "agent" | "file" | "skill" | undefined;
1227
- };
1228
1291
  } | {
1229
- path: string;
1230
- type: "diff";
1231
- newText: string;
1232
- oldText?: string | null | undefined;
1233
- } | {
1234
- path: string;
1235
- type: "patch";
1236
- diff: string;
1237
- change: "delete" | "add" | "update";
1238
- movePath?: string | undefined;
1239
- } | {
1240
- type: "terminal";
1241
- terminalId: string;
1242
- })[] | undefined;
1243
- parentToolCallId?: string | undefined;
1292
+ type: "question";
1293
+ text: string;
1294
+ more?: number | undefined;
1295
+ } | undefined;
1244
1296
  appendOutput?: string | undefined;
1245
1297
  rawOutput?: unknown;
1246
1298
  }>, z.ZodObject<{
@@ -1316,12 +1368,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1316
1368
  model: z.ZodOptional<z.ZodString>;
1317
1369
  }, "strip", z.ZodTypeAny, {
1318
1370
  sessionUpdate: "session_info_update";
1319
- title?: string | undefined;
1320
1371
  model?: string | undefined;
1372
+ title?: string | undefined;
1321
1373
  }, {
1322
1374
  sessionUpdate: "session_info_update";
1323
- title?: string | undefined;
1324
1375
  model?: string | undefined;
1376
+ title?: string | undefined;
1325
1377
  }>, z.ZodObject<{
1326
1378
  sessionUpdate: z.ZodLiteral<"usage_update">;
1327
1379
  usedTokens: z.ZodOptional<z.ZodNumber>;
@@ -1376,9 +1428,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1376
1428
  name: string;
1377
1429
  description?: string | undefined;
1378
1430
  }[];
1379
- id: string;
1380
1431
  name: string;
1381
- category: "other" | "model" | "mode" | "effort";
1432
+ id: string;
1433
+ category: "model" | "mode" | "effort" | "other";
1382
1434
  current: string;
1383
1435
  }, {
1384
1436
  values: {
@@ -1386,10 +1438,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1386
1438
  name: string;
1387
1439
  description?: string | undefined;
1388
1440
  }[];
1389
- id: string;
1390
1441
  name: string;
1442
+ id: string;
1391
1443
  current: string;
1392
- category?: "other" | "model" | "mode" | "effort" | undefined;
1444
+ category?: "model" | "mode" | "effort" | "other" | undefined;
1393
1445
  }>, "many">;
1394
1446
  }, "strip", z.ZodTypeAny, {
1395
1447
  options: {
@@ -1398,9 +1450,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1398
1450
  name: string;
1399
1451
  description?: string | undefined;
1400
1452
  }[];
1401
- id: string;
1402
1453
  name: string;
1403
- category: "other" | "model" | "mode" | "effort";
1454
+ id: string;
1455
+ category: "model" | "mode" | "effort" | "other";
1404
1456
  current: string;
1405
1457
  }[];
1406
1458
  sessionUpdate: "ls_config";
@@ -1411,10 +1463,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1411
1463
  name: string;
1412
1464
  description?: string | undefined;
1413
1465
  }[];
1414
- id: string;
1415
1466
  name: string;
1467
+ id: string;
1416
1468
  current: string;
1417
- category?: "other" | "model" | "mode" | "effort" | undefined;
1469
+ category?: "model" | "mode" | "effort" | "other" | undefined;
1418
1470
  }[];
1419
1471
  sessionUpdate: "ls_config";
1420
1472
  }>, z.ZodObject<{
@@ -1423,13 +1475,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1423
1475
  title: z.ZodString;
1424
1476
  detail: z.ZodOptional<z.ZodString>;
1425
1477
  }, "strip", z.ZodTypeAny, {
1426
- title: string;
1427
1478
  sessionUpdate: "ls_notice";
1479
+ title: string;
1428
1480
  level: "info" | "warning";
1429
1481
  detail?: string | undefined;
1430
1482
  }, {
1431
- title: string;
1432
1483
  sessionUpdate: "ls_notice";
1484
+ title: string;
1433
1485
  level: "info" | "warning";
1434
1486
  detail?: string | undefined;
1435
1487
  }>, z.ZodObject<{
@@ -1440,17 +1492,17 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1440
1492
  turnId: z.ZodOptional<z.ZodString>;
1441
1493
  stopReason: z.ZodOptional<z.ZodEnum<["end_turn", "cancelled", "error", "max_tokens", "refusal"]>>;
1442
1494
  }, "strip", z.ZodTypeAny, {
1443
- state: "started" | "ended";
1444
1495
  sessionUpdate: "ls_turn";
1496
+ state: "started" | "ended";
1445
1497
  parentToolCallId?: string | undefined;
1446
1498
  turnId?: string | undefined;
1447
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
1499
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
1448
1500
  }, {
1449
- state: "started" | "ended";
1450
1501
  sessionUpdate: "ls_turn";
1502
+ state: "started" | "ended";
1451
1503
  parentToolCallId?: string | undefined;
1452
1504
  turnId?: string | undefined;
1453
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
1505
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
1454
1506
  }>, z.ZodObject<{
1455
1507
  sessionUpdate: z.ZodLiteral<"ls_permission">;
1456
1508
  requestId: z.ZodString;
@@ -1462,69 +1514,174 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1462
1514
  name: z.ZodString;
1463
1515
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
1464
1516
  }, "strip", z.ZodTypeAny, {
1465
- optionId: string;
1466
1517
  name: string;
1467
1518
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1468
- }, {
1469
1519
  optionId: string;
1520
+ }, {
1470
1521
  name: string;
1471
1522
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1523
+ optionId: string;
1472
1524
  }>, "many">;
1525
+ /**
1526
+ * The agent is asking the user something: answer with `sessions.answer`.
1527
+ * `options` then hold what else can be done (skip the questions, stop),
1528
+ * which is also all an app that predates questions can offer.
1529
+ */
1530
+ questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1531
+ id: z.ZodString;
1532
+ header: z.ZodOptional<z.ZodString>;
1533
+ text: z.ZodString;
1534
+ kind: z.ZodEnum<["choice", "choices", "text"]>;
1535
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1536
+ value: z.ZodString;
1537
+ label: z.ZodString;
1538
+ description: z.ZodOptional<z.ZodString>;
1539
+ }, "strip", z.ZodTypeAny, {
1540
+ value: string;
1541
+ label: string;
1542
+ description?: string | undefined;
1543
+ }, {
1544
+ value: string;
1545
+ label: string;
1546
+ description?: string | undefined;
1547
+ }>, "many">>;
1548
+ other: z.ZodOptional<z.ZodBoolean>;
1549
+ secret: z.ZodOptional<z.ZodBoolean>;
1550
+ required: z.ZodOptional<z.ZodBoolean>;
1551
+ }, "strip", z.ZodTypeAny, {
1552
+ text: string;
1553
+ kind: "text" | "choice" | "choices";
1554
+ id: string;
1555
+ options?: {
1556
+ value: string;
1557
+ label: string;
1558
+ description?: string | undefined;
1559
+ }[] | undefined;
1560
+ other?: boolean | undefined;
1561
+ header?: string | undefined;
1562
+ secret?: boolean | undefined;
1563
+ required?: boolean | undefined;
1564
+ }, {
1565
+ text: string;
1566
+ kind: "text" | "choice" | "choices";
1567
+ id: string;
1568
+ options?: {
1569
+ value: string;
1570
+ label: string;
1571
+ description?: string | undefined;
1572
+ }[] | undefined;
1573
+ other?: boolean | undefined;
1574
+ header?: string | undefined;
1575
+ secret?: boolean | undefined;
1576
+ required?: boolean | undefined;
1577
+ }>, "many">>;
1473
1578
  }, "strip", z.ZodTypeAny, {
1474
1579
  options: {
1475
- optionId: string;
1476
1580
  name: string;
1477
1581
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1582
+ optionId: string;
1478
1583
  }[];
1584
+ sessionUpdate: "ls_permission";
1479
1585
  title: string;
1480
1586
  requestId: string;
1481
- sessionUpdate: "ls_permission";
1482
1587
  toolCallId?: string | undefined;
1483
1588
  detail?: string | undefined;
1589
+ questions?: {
1590
+ text: string;
1591
+ kind: "text" | "choice" | "choices";
1592
+ id: string;
1593
+ options?: {
1594
+ value: string;
1595
+ label: string;
1596
+ description?: string | undefined;
1597
+ }[] | undefined;
1598
+ other?: boolean | undefined;
1599
+ header?: string | undefined;
1600
+ secret?: boolean | undefined;
1601
+ required?: boolean | undefined;
1602
+ }[] | undefined;
1484
1603
  }, {
1485
1604
  options: {
1486
- optionId: string;
1487
1605
  name: string;
1488
1606
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1607
+ optionId: string;
1489
1608
  }[];
1609
+ sessionUpdate: "ls_permission";
1490
1610
  title: string;
1491
1611
  requestId: string;
1492
- sessionUpdate: "ls_permission";
1493
1612
  toolCallId?: string | undefined;
1494
1613
  detail?: string | undefined;
1614
+ questions?: {
1615
+ text: string;
1616
+ kind: "text" | "choice" | "choices";
1617
+ id: string;
1618
+ options?: {
1619
+ value: string;
1620
+ label: string;
1621
+ description?: string | undefined;
1622
+ }[] | undefined;
1623
+ other?: boolean | undefined;
1624
+ header?: string | undefined;
1625
+ secret?: boolean | undefined;
1626
+ required?: boolean | undefined;
1627
+ }[] | undefined;
1495
1628
  }>, z.ZodObject<{
1496
1629
  sessionUpdate: z.ZodLiteral<"ls_permission_resolved">;
1497
1630
  requestId: z.ZodString;
1498
1631
  optionId: z.ZodOptional<z.ZodString>;
1632
+ /** How questions were answered, for the record. */
1633
+ answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1634
+ id: z.ZodString;
1635
+ values: z.ZodArray<z.ZodString, "many">;
1636
+ other: z.ZodOptional<z.ZodString>;
1637
+ }, "strip", z.ZodTypeAny, {
1638
+ values: string[];
1639
+ id: string;
1640
+ other?: string | undefined;
1641
+ }, {
1642
+ values: string[];
1643
+ id: string;
1644
+ other?: string | undefined;
1645
+ }>, "many">>;
1499
1646
  }, "strip", z.ZodTypeAny, {
1500
- requestId: string;
1501
1647
  sessionUpdate: "ls_permission_resolved";
1648
+ requestId: string;
1502
1649
  optionId?: string | undefined;
1650
+ answers?: {
1651
+ values: string[];
1652
+ id: string;
1653
+ other?: string | undefined;
1654
+ }[] | undefined;
1503
1655
  }, {
1504
- requestId: string;
1505
1656
  sessionUpdate: "ls_permission_resolved";
1657
+ requestId: string;
1506
1658
  optionId?: string | undefined;
1659
+ answers?: {
1660
+ values: string[];
1661
+ id: string;
1662
+ other?: string | undefined;
1663
+ }[] | undefined;
1507
1664
  }>, z.ZodObject<{
1508
1665
  sessionUpdate: z.ZodLiteral<"ls_driver">;
1509
1666
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
1510
1667
  deviceId: z.ZodOptional<z.ZodString>;
1511
1668
  }, "strip", z.ZodTypeAny, {
1512
- driver: "remote" | "desktop" | "none";
1513
1669
  sessionUpdate: "ls_driver";
1670
+ driver: "desktop" | "remote" | "none";
1514
1671
  deviceId?: string | undefined;
1515
1672
  }, {
1516
- driver: "remote" | "desktop" | "none";
1517
1673
  sessionUpdate: "ls_driver";
1674
+ driver: "desktop" | "remote" | "none";
1518
1675
  deviceId?: string | undefined;
1519
1676
  }>, z.ZodObject<{
1520
1677
  sessionUpdate: z.ZodLiteral<"ls_status">;
1521
1678
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
1522
1679
  }, "strip", z.ZodTypeAny, {
1523
- state: "idle" | "running" | "waiting" | "error" | "offline";
1524
1680
  sessionUpdate: "ls_status";
1681
+ state: "error" | "idle" | "running" | "waiting" | "offline";
1525
1682
  }, {
1526
- state: "idle" | "running" | "waiting" | "error" | "offline";
1527
1683
  sessionUpdate: "ls_status";
1684
+ state: "error" | "idle" | "running" | "waiting" | "offline";
1528
1685
  }>, z.ZodObject<{
1529
1686
  sessionUpdate: z.ZodLiteral<"ls_error">;
1530
1687
  code: z.ZodString;
@@ -1583,14 +1740,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1583
1740
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1584
1741
  }, "strip", z.ZodTypeAny, {
1585
1742
  type: "resource_link";
1586
- name: string;
1587
1743
  uri: string;
1588
- kind?: "agent" | "file" | "skill" | undefined;
1744
+ name: string;
1745
+ kind?: "file" | "skill" | "agent" | undefined;
1589
1746
  }, {
1590
1747
  type: "resource_link";
1591
- name: string;
1592
1748
  uri: string;
1593
- kind?: "agent" | "file" | "skill" | undefined;
1749
+ name: string;
1750
+ kind?: "file" | "skill" | "agent" | undefined;
1594
1751
  }>]>;
1595
1752
  }, "strip", z.ZodTypeAny, {
1596
1753
  content: {
@@ -1603,9 +1760,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1603
1760
  uri?: string | undefined;
1604
1761
  } | {
1605
1762
  type: "resource_link";
1606
- name: string;
1607
1763
  uri: string;
1608
- kind?: "agent" | "file" | "skill" | undefined;
1764
+ name: string;
1765
+ kind?: "file" | "skill" | "agent" | undefined;
1609
1766
  };
1610
1767
  sessionUpdate: "user_message_chunk";
1611
1768
  messageId?: string | undefined;
@@ -1620,9 +1777,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1620
1777
  uri?: string | undefined;
1621
1778
  } | {
1622
1779
  type: "resource_link";
1623
- name: string;
1624
1780
  uri: string;
1625
- kind?: "agent" | "file" | "skill" | undefined;
1781
+ name: string;
1782
+ kind?: "file" | "skill" | "agent" | undefined;
1626
1783
  };
1627
1784
  sessionUpdate: "user_message_chunk";
1628
1785
  messageId?: string | undefined;
@@ -1662,14 +1819,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1662
1819
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1663
1820
  }, "strip", z.ZodTypeAny, {
1664
1821
  type: "resource_link";
1665
- name: string;
1666
1822
  uri: string;
1667
- kind?: "agent" | "file" | "skill" | undefined;
1823
+ name: string;
1824
+ kind?: "file" | "skill" | "agent" | undefined;
1668
1825
  }, {
1669
1826
  type: "resource_link";
1670
- name: string;
1671
1827
  uri: string;
1672
- kind?: "agent" | "file" | "skill" | undefined;
1828
+ name: string;
1829
+ kind?: "file" | "skill" | "agent" | undefined;
1673
1830
  }>]>;
1674
1831
  }, "strip", z.ZodTypeAny, {
1675
1832
  content: {
@@ -1682,9 +1839,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1682
1839
  uri?: string | undefined;
1683
1840
  } | {
1684
1841
  type: "resource_link";
1685
- name: string;
1686
1842
  uri: string;
1687
- kind?: "agent" | "file" | "skill" | undefined;
1843
+ name: string;
1844
+ kind?: "file" | "skill" | "agent" | undefined;
1688
1845
  };
1689
1846
  sessionUpdate: "agent_message_chunk";
1690
1847
  messageId: string;
@@ -1700,9 +1857,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1700
1857
  uri?: string | undefined;
1701
1858
  } | {
1702
1859
  type: "resource_link";
1703
- name: string;
1704
1860
  uri: string;
1705
- kind?: "agent" | "file" | "skill" | undefined;
1861
+ name: string;
1862
+ kind?: "file" | "skill" | "agent" | undefined;
1706
1863
  };
1707
1864
  sessionUpdate: "agent_message_chunk";
1708
1865
  messageId: string;
@@ -1743,14 +1900,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1743
1900
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1744
1901
  }, "strip", z.ZodTypeAny, {
1745
1902
  type: "resource_link";
1746
- name: string;
1747
1903
  uri: string;
1748
- kind?: "agent" | "file" | "skill" | undefined;
1904
+ name: string;
1905
+ kind?: "file" | "skill" | "agent" | undefined;
1749
1906
  }, {
1750
1907
  type: "resource_link";
1751
- name: string;
1752
1908
  uri: string;
1753
- kind?: "agent" | "file" | "skill" | undefined;
1909
+ name: string;
1910
+ kind?: "file" | "skill" | "agent" | undefined;
1754
1911
  }>]>;
1755
1912
  }, "strip", z.ZodTypeAny, {
1756
1913
  content: {
@@ -1763,9 +1920,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1763
1920
  uri?: string | undefined;
1764
1921
  } | {
1765
1922
  type: "resource_link";
1766
- name: string;
1767
1923
  uri: string;
1768
- kind?: "agent" | "file" | "skill" | undefined;
1924
+ name: string;
1925
+ kind?: "file" | "skill" | "agent" | undefined;
1769
1926
  };
1770
1927
  sessionUpdate: "agent_thought_chunk";
1771
1928
  messageId: string;
@@ -1781,9 +1938,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1781
1938
  uri?: string | undefined;
1782
1939
  } | {
1783
1940
  type: "resource_link";
1784
- name: string;
1785
1941
  uri: string;
1786
- kind?: "agent" | "file" | "skill" | undefined;
1942
+ name: string;
1943
+ kind?: "file" | "skill" | "agent" | undefined;
1787
1944
  };
1788
1945
  sessionUpdate: "agent_thought_chunk";
1789
1946
  messageId: string;
@@ -1831,14 +1988,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1831
1988
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1832
1989
  }, "strip", z.ZodTypeAny, {
1833
1990
  type: "resource_link";
1834
- name: string;
1835
1991
  uri: string;
1836
- kind?: "agent" | "file" | "skill" | undefined;
1992
+ name: string;
1993
+ kind?: "file" | "skill" | "agent" | undefined;
1837
1994
  }, {
1838
1995
  type: "resource_link";
1839
- name: string;
1840
1996
  uri: string;
1841
- kind?: "agent" | "file" | "skill" | undefined;
1997
+ name: string;
1998
+ kind?: "file" | "skill" | "agent" | undefined;
1842
1999
  }>]>;
1843
2000
  }, "strip", z.ZodTypeAny, {
1844
2001
  type: "content";
@@ -1852,9 +2009,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1852
2009
  uri?: string | undefined;
1853
2010
  } | {
1854
2011
  type: "resource_link";
1855
- name: string;
1856
2012
  uri: string;
1857
- kind?: "agent" | "file" | "skill" | undefined;
2013
+ name: string;
2014
+ kind?: "file" | "skill" | "agent" | undefined;
1858
2015
  };
1859
2016
  }, {
1860
2017
  type: "content";
@@ -1868,9 +2025,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1868
2025
  uri?: string | undefined;
1869
2026
  } | {
1870
2027
  type: "resource_link";
1871
- name: string;
1872
2028
  uri: string;
1873
- kind?: "agent" | "file" | "skill" | undefined;
2029
+ name: string;
2030
+ kind?: "file" | "skill" | "agent" | undefined;
1874
2031
  };
1875
2032
  }>, z.ZodObject<{
1876
2033
  type: z.ZodLiteral<"diff">;
@@ -1878,13 +2035,13 @@ export declare const sessionEventSchema: z.ZodObject<{
1878
2035
  oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1879
2036
  newText: z.ZodString;
1880
2037
  }, "strip", z.ZodTypeAny, {
1881
- path: string;
1882
2038
  type: "diff";
2039
+ path: string;
1883
2040
  newText: string;
1884
2041
  oldText?: string | null | undefined;
1885
2042
  }, {
1886
- path: string;
1887
2043
  type: "diff";
2044
+ path: string;
1888
2045
  newText: string;
1889
2046
  oldText?: string | null | undefined;
1890
2047
  }>, z.ZodObject<{
@@ -1894,16 +2051,16 @@ export declare const sessionEventSchema: z.ZodObject<{
1894
2051
  movePath: z.ZodOptional<z.ZodString>;
1895
2052
  diff: z.ZodString;
1896
2053
  }, "strip", z.ZodTypeAny, {
1897
- path: string;
1898
2054
  type: "patch";
2055
+ path: string;
1899
2056
  diff: string;
1900
- change: "delete" | "add" | "update";
2057
+ change: "add" | "delete" | "update";
1901
2058
  movePath?: string | undefined;
1902
2059
  }, {
1903
- path: string;
1904
2060
  type: "patch";
2061
+ path: string;
1905
2062
  diff: string;
1906
- change: "delete" | "add" | "update";
2063
+ change: "add" | "delete" | "update";
1907
2064
  movePath?: string | undefined;
1908
2065
  }>, z.ZodObject<{
1909
2066
  type: z.ZodLiteral<"terminal">;
@@ -1931,12 +2088,12 @@ export declare const sessionEventSchema: z.ZodObject<{
1931
2088
  tool: z.ZodString;
1932
2089
  }, "strip", z.ZodTypeAny, {
1933
2090
  type: "mcp";
1934
- tool: string;
1935
2091
  server: string;
2092
+ tool: string;
1936
2093
  }, {
1937
2094
  type: "mcp";
1938
- tool: string;
1939
2095
  server: string;
2096
+ tool: string;
1940
2097
  }>, z.ZodObject<{
1941
2098
  type: z.ZodLiteral<"subagent">;
1942
2099
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -1953,10 +2110,10 @@ export declare const sessionEventSchema: z.ZodObject<{
1953
2110
  model?: string | undefined;
1954
2111
  }, {
1955
2112
  type: "subagent";
2113
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1956
2114
  task?: string | undefined;
1957
2115
  agentType?: string | undefined;
1958
2116
  model?: string | undefined;
1959
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1960
2117
  }>, z.ZodObject<{
1961
2118
  type: z.ZodLiteral<"skill">;
1962
2119
  name: z.ZodString;
@@ -2002,39 +2159,25 @@ export declare const sessionEventSchema: z.ZodObject<{
2002
2159
  }, {
2003
2160
  type: "review";
2004
2161
  phase: "started" | "finished";
2162
+ }>, z.ZodObject<{
2163
+ type: z.ZodLiteral<"question">;
2164
+ text: z.ZodString;
2165
+ more: z.ZodOptional<z.ZodNumber>;
2166
+ }, "strip", z.ZodTypeAny, {
2167
+ type: "question";
2168
+ text: string;
2169
+ more?: number | undefined;
2170
+ }, {
2171
+ type: "question";
2172
+ text: string;
2173
+ more?: number | undefined;
2005
2174
  }>]>>;
2006
2175
  }, "strip", z.ZodTypeAny, {
2007
- status: "failed" | "pending" | "in_progress" | "completed";
2008
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2009
- title: string;
2010
- toolCallId: string;
2176
+ status: "pending" | "in_progress" | "completed" | "failed";
2177
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
2011
2178
  sessionUpdate: "tool_call";
2012
- detail?: {
2013
- type: "mcp";
2014
- tool: string;
2015
- server: string;
2016
- } | {
2017
- type: "subagent";
2018
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2019
- task?: string | undefined;
2020
- agentType?: string | undefined;
2021
- model?: string | undefined;
2022
- } | {
2023
- type: "skill";
2024
- name: string;
2025
- description?: string | undefined;
2026
- } | {
2027
- type: "web_search";
2028
- query?: string | undefined;
2029
- } | {
2030
- type: "image_generation";
2031
- prompt?: string | undefined;
2032
- } | {
2033
- type: "compaction";
2034
- } | {
2035
- type: "review";
2036
- phase: "started" | "finished";
2037
- } | undefined;
2179
+ toolCallId: string;
2180
+ title: string;
2038
2181
  content?: ({
2039
2182
  type: "content";
2040
2183
  content: {
@@ -2047,20 +2190,20 @@ export declare const sessionEventSchema: z.ZodObject<{
2047
2190
  uri?: string | undefined;
2048
2191
  } | {
2049
2192
  type: "resource_link";
2050
- name: string;
2051
2193
  uri: string;
2052
- kind?: "agent" | "file" | "skill" | undefined;
2194
+ name: string;
2195
+ kind?: "file" | "skill" | "agent" | undefined;
2053
2196
  };
2054
2197
  } | {
2055
- path: string;
2056
2198
  type: "diff";
2199
+ path: string;
2057
2200
  newText: string;
2058
2201
  oldText?: string | null | undefined;
2059
2202
  } | {
2060
- path: string;
2061
2203
  type: "patch";
2204
+ path: string;
2062
2205
  diff: string;
2063
- change: "delete" | "add" | "update";
2206
+ change: "add" | "delete" | "update";
2064
2207
  movePath?: string | undefined;
2065
2208
  } | {
2066
2209
  type: "terminal";
@@ -2072,22 +2215,16 @@ export declare const sessionEventSchema: z.ZodObject<{
2072
2215
  path: string;
2073
2216
  line?: number | undefined;
2074
2217
  }[] | undefined;
2075
- }, {
2076
- status: "failed" | "pending" | "in_progress" | "completed";
2077
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2078
- title: string;
2079
- toolCallId: string;
2080
- sessionUpdate: "tool_call";
2081
2218
  detail?: {
2082
2219
  type: "mcp";
2083
- tool: string;
2084
2220
  server: string;
2221
+ tool: string;
2085
2222
  } | {
2086
2223
  type: "subagent";
2224
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2087
2225
  task?: string | undefined;
2088
2226
  agentType?: string | undefined;
2089
2227
  model?: string | undefined;
2090
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2091
2228
  } | {
2092
2229
  type: "skill";
2093
2230
  name: string;
@@ -2103,7 +2240,17 @@ export declare const sessionEventSchema: z.ZodObject<{
2103
2240
  } | {
2104
2241
  type: "review";
2105
2242
  phase: "started" | "finished";
2243
+ } | {
2244
+ type: "question";
2245
+ text: string;
2246
+ more?: number | undefined;
2106
2247
  } | undefined;
2248
+ }, {
2249
+ status: "pending" | "in_progress" | "completed" | "failed";
2250
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
2251
+ sessionUpdate: "tool_call";
2252
+ toolCallId: string;
2253
+ title: string;
2107
2254
  content?: ({
2108
2255
  type: "content";
2109
2256
  content: {
@@ -2116,20 +2263,20 @@ export declare const sessionEventSchema: z.ZodObject<{
2116
2263
  uri?: string | undefined;
2117
2264
  } | {
2118
2265
  type: "resource_link";
2119
- name: string;
2120
2266
  uri: string;
2121
- kind?: "agent" | "file" | "skill" | undefined;
2267
+ name: string;
2268
+ kind?: "file" | "skill" | "agent" | undefined;
2122
2269
  };
2123
2270
  } | {
2124
- path: string;
2125
2271
  type: "diff";
2272
+ path: string;
2126
2273
  newText: string;
2127
2274
  oldText?: string | null | undefined;
2128
2275
  } | {
2129
- path: string;
2130
2276
  type: "patch";
2277
+ path: string;
2131
2278
  diff: string;
2132
- change: "delete" | "add" | "update";
2279
+ change: "add" | "delete" | "update";
2133
2280
  movePath?: string | undefined;
2134
2281
  } | {
2135
2282
  type: "terminal";
@@ -2141,6 +2288,36 @@ export declare const sessionEventSchema: z.ZodObject<{
2141
2288
  path: string;
2142
2289
  line?: number | undefined;
2143
2290
  }[] | 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;
2144
2321
  }>, z.ZodObject<{
2145
2322
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
2146
2323
  toolCallId: z.ZodString;
@@ -2153,12 +2330,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2153
2330
  tool: z.ZodString;
2154
2331
  }, "strip", z.ZodTypeAny, {
2155
2332
  type: "mcp";
2156
- tool: string;
2157
2333
  server: string;
2334
+ tool: string;
2158
2335
  }, {
2159
2336
  type: "mcp";
2160
- tool: string;
2161
2337
  server: string;
2338
+ tool: string;
2162
2339
  }>, z.ZodObject<{
2163
2340
  type: z.ZodLiteral<"subagent">;
2164
2341
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -2175,10 +2352,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2175
2352
  model?: string | undefined;
2176
2353
  }, {
2177
2354
  type: "subagent";
2355
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2178
2356
  task?: string | undefined;
2179
2357
  agentType?: string | undefined;
2180
2358
  model?: string | undefined;
2181
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2182
2359
  }>, z.ZodObject<{
2183
2360
  type: z.ZodLiteral<"skill">;
2184
2361
  name: z.ZodString;
@@ -2224,6 +2401,18 @@ export declare const sessionEventSchema: z.ZodObject<{
2224
2401
  }, {
2225
2402
  type: "review";
2226
2403
  phase: "started" | "finished";
2404
+ }>, z.ZodObject<{
2405
+ type: z.ZodLiteral<"question">;
2406
+ text: z.ZodString;
2407
+ more: z.ZodOptional<z.ZodNumber>;
2408
+ }, "strip", z.ZodTypeAny, {
2409
+ type: "question";
2410
+ text: string;
2411
+ more?: number | undefined;
2412
+ }, {
2413
+ type: "question";
2414
+ text: string;
2415
+ more?: number | undefined;
2227
2416
  }>]>>;
2228
2417
  /** Replaces the tool call's content when present. */
2229
2418
  content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2260,14 +2449,14 @@ export declare const sessionEventSchema: z.ZodObject<{
2260
2449
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
2261
2450
  }, "strip", z.ZodTypeAny, {
2262
2451
  type: "resource_link";
2263
- name: string;
2264
2452
  uri: string;
2265
- kind?: "agent" | "file" | "skill" | undefined;
2453
+ name: string;
2454
+ kind?: "file" | "skill" | "agent" | undefined;
2266
2455
  }, {
2267
2456
  type: "resource_link";
2268
- name: string;
2269
2457
  uri: string;
2270
- kind?: "agent" | "file" | "skill" | undefined;
2458
+ name: string;
2459
+ kind?: "file" | "skill" | "agent" | undefined;
2271
2460
  }>]>;
2272
2461
  }, "strip", z.ZodTypeAny, {
2273
2462
  type: "content";
@@ -2281,9 +2470,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2281
2470
  uri?: string | undefined;
2282
2471
  } | {
2283
2472
  type: "resource_link";
2284
- name: string;
2285
2473
  uri: string;
2286
- kind?: "agent" | "file" | "skill" | undefined;
2474
+ name: string;
2475
+ kind?: "file" | "skill" | "agent" | undefined;
2287
2476
  };
2288
2477
  }, {
2289
2478
  type: "content";
@@ -2297,9 +2486,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2297
2486
  uri?: string | undefined;
2298
2487
  } | {
2299
2488
  type: "resource_link";
2300
- name: string;
2301
2489
  uri: string;
2302
- kind?: "agent" | "file" | "skill" | undefined;
2490
+ name: string;
2491
+ kind?: "file" | "skill" | "agent" | undefined;
2303
2492
  };
2304
2493
  }>, z.ZodObject<{
2305
2494
  type: z.ZodLiteral<"diff">;
@@ -2307,13 +2496,13 @@ export declare const sessionEventSchema: z.ZodObject<{
2307
2496
  oldText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2308
2497
  newText: z.ZodString;
2309
2498
  }, "strip", z.ZodTypeAny, {
2310
- path: string;
2311
2499
  type: "diff";
2500
+ path: string;
2312
2501
  newText: string;
2313
2502
  oldText?: string | null | undefined;
2314
2503
  }, {
2315
- path: string;
2316
2504
  type: "diff";
2505
+ path: string;
2317
2506
  newText: string;
2318
2507
  oldText?: string | null | undefined;
2319
2508
  }>, z.ZodObject<{
@@ -2323,16 +2512,16 @@ export declare const sessionEventSchema: z.ZodObject<{
2323
2512
  movePath: z.ZodOptional<z.ZodString>;
2324
2513
  diff: z.ZodString;
2325
2514
  }, "strip", z.ZodTypeAny, {
2326
- path: string;
2327
2515
  type: "patch";
2516
+ path: string;
2328
2517
  diff: string;
2329
- change: "delete" | "add" | "update";
2518
+ change: "add" | "delete" | "update";
2330
2519
  movePath?: string | undefined;
2331
2520
  }, {
2332
- path: string;
2333
2521
  type: "patch";
2522
+ path: string;
2334
2523
  diff: string;
2335
- change: "delete" | "add" | "update";
2524
+ change: "add" | "delete" | "update";
2336
2525
  movePath?: string | undefined;
2337
2526
  }>, z.ZodObject<{
2338
2527
  type: z.ZodLiteral<"terminal">;
@@ -2348,36 +2537,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2348
2537
  appendOutput: z.ZodOptional<z.ZodString>;
2349
2538
  rawOutput: z.ZodOptional<z.ZodUnknown>;
2350
2539
  }, "strip", z.ZodTypeAny, {
2351
- toolCallId: string;
2352
2540
  sessionUpdate: "tool_call_update";
2353
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
2354
- title?: string | undefined;
2355
- detail?: {
2356
- type: "mcp";
2357
- tool: string;
2358
- server: string;
2359
- } | {
2360
- type: "subagent";
2361
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2362
- task?: string | undefined;
2363
- agentType?: string | undefined;
2364
- model?: string | undefined;
2365
- } | {
2366
- type: "skill";
2367
- name: string;
2368
- description?: string | undefined;
2369
- } | {
2370
- type: "web_search";
2371
- query?: string | undefined;
2372
- } | {
2373
- type: "image_generation";
2374
- prompt?: string | undefined;
2375
- } | {
2376
- type: "compaction";
2377
- } | {
2378
- type: "review";
2379
- phase: "started" | "finished";
2380
- } | undefined;
2541
+ toolCallId: string;
2542
+ status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
2381
2543
  content?: ({
2382
2544
  type: "content";
2383
2545
  content: {
@@ -2390,43 +2552,37 @@ export declare const sessionEventSchema: z.ZodObject<{
2390
2552
  uri?: string | undefined;
2391
2553
  } | {
2392
2554
  type: "resource_link";
2393
- name: string;
2394
2555
  uri: string;
2395
- kind?: "agent" | "file" | "skill" | undefined;
2556
+ name: string;
2557
+ kind?: "file" | "skill" | "agent" | undefined;
2396
2558
  };
2397
2559
  } | {
2398
- path: string;
2399
2560
  type: "diff";
2561
+ path: string;
2400
2562
  newText: string;
2401
2563
  oldText?: string | null | undefined;
2402
2564
  } | {
2403
- path: string;
2404
2565
  type: "patch";
2566
+ path: string;
2405
2567
  diff: string;
2406
- change: "delete" | "add" | "update";
2568
+ change: "add" | "delete" | "update";
2407
2569
  movePath?: string | undefined;
2408
2570
  } | {
2409
2571
  type: "terminal";
2410
2572
  terminalId: string;
2411
2573
  })[] | undefined;
2412
2574
  parentToolCallId?: string | undefined;
2413
- appendOutput?: string | undefined;
2414
- rawOutput?: unknown;
2415
- }, {
2416
- toolCallId: string;
2417
- sessionUpdate: "tool_call_update";
2418
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
2419
2575
  title?: string | undefined;
2420
2576
  detail?: {
2421
2577
  type: "mcp";
2422
- tool: string;
2423
2578
  server: string;
2579
+ tool: string;
2424
2580
  } | {
2425
2581
  type: "subagent";
2582
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2426
2583
  task?: string | undefined;
2427
2584
  agentType?: string | undefined;
2428
2585
  model?: string | undefined;
2429
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2430
2586
  } | {
2431
2587
  type: "skill";
2432
2588
  name: string;
@@ -2442,7 +2598,17 @@ export declare const sessionEventSchema: z.ZodObject<{
2442
2598
  } | {
2443
2599
  type: "review";
2444
2600
  phase: "started" | "finished";
2601
+ } | {
2602
+ type: "question";
2603
+ text: string;
2604
+ more?: number | undefined;
2445
2605
  } | 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;
2446
2612
  content?: ({
2447
2613
  type: "content";
2448
2614
  content: {
@@ -2455,26 +2621,57 @@ export declare const sessionEventSchema: z.ZodObject<{
2455
2621
  uri?: string | undefined;
2456
2622
  } | {
2457
2623
  type: "resource_link";
2458
- name: string;
2459
2624
  uri: string;
2460
- kind?: "agent" | "file" | "skill" | undefined;
2625
+ name: string;
2626
+ kind?: "file" | "skill" | "agent" | undefined;
2461
2627
  };
2462
2628
  } | {
2463
- path: string;
2464
2629
  type: "diff";
2630
+ path: string;
2465
2631
  newText: string;
2466
2632
  oldText?: string | null | undefined;
2467
2633
  } | {
2468
- path: string;
2469
2634
  type: "patch";
2635
+ path: string;
2470
2636
  diff: string;
2471
- change: "delete" | "add" | "update";
2637
+ change: "add" | "delete" | "update";
2472
2638
  movePath?: string | undefined;
2473
2639
  } | {
2474
2640
  type: "terminal";
2475
2641
  terminalId: string;
2476
2642
  })[] | undefined;
2477
2643
  parentToolCallId?: string | undefined;
2644
+ title?: string | undefined;
2645
+ detail?: {
2646
+ type: "mcp";
2647
+ server: string;
2648
+ tool: string;
2649
+ } | {
2650
+ type: "subagent";
2651
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2652
+ task?: string | undefined;
2653
+ agentType?: string | undefined;
2654
+ model?: string | undefined;
2655
+ } | {
2656
+ type: "skill";
2657
+ name: string;
2658
+ description?: string | undefined;
2659
+ } | {
2660
+ type: "web_search";
2661
+ query?: string | undefined;
2662
+ } | {
2663
+ type: "image_generation";
2664
+ prompt?: string | undefined;
2665
+ } | {
2666
+ type: "compaction";
2667
+ } | {
2668
+ type: "review";
2669
+ phase: "started" | "finished";
2670
+ } | {
2671
+ type: "question";
2672
+ text: string;
2673
+ more?: number | undefined;
2674
+ } | undefined;
2478
2675
  appendOutput?: string | undefined;
2479
2676
  rawOutput?: unknown;
2480
2677
  }>, z.ZodObject<{
@@ -2550,12 +2747,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2550
2747
  model: z.ZodOptional<z.ZodString>;
2551
2748
  }, "strip", z.ZodTypeAny, {
2552
2749
  sessionUpdate: "session_info_update";
2553
- title?: string | undefined;
2554
2750
  model?: string | undefined;
2751
+ title?: string | undefined;
2555
2752
  }, {
2556
2753
  sessionUpdate: "session_info_update";
2557
- title?: string | undefined;
2558
2754
  model?: string | undefined;
2755
+ title?: string | undefined;
2559
2756
  }>, z.ZodObject<{
2560
2757
  sessionUpdate: z.ZodLiteral<"usage_update">;
2561
2758
  usedTokens: z.ZodOptional<z.ZodNumber>;
@@ -2610,9 +2807,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2610
2807
  name: string;
2611
2808
  description?: string | undefined;
2612
2809
  }[];
2613
- id: string;
2614
2810
  name: string;
2615
- category: "other" | "model" | "mode" | "effort";
2811
+ id: string;
2812
+ category: "model" | "mode" | "effort" | "other";
2616
2813
  current: string;
2617
2814
  }, {
2618
2815
  values: {
@@ -2620,10 +2817,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2620
2817
  name: string;
2621
2818
  description?: string | undefined;
2622
2819
  }[];
2623
- id: string;
2624
2820
  name: string;
2821
+ id: string;
2625
2822
  current: string;
2626
- category?: "other" | "model" | "mode" | "effort" | undefined;
2823
+ category?: "model" | "mode" | "effort" | "other" | undefined;
2627
2824
  }>, "many">;
2628
2825
  }, "strip", z.ZodTypeAny, {
2629
2826
  options: {
@@ -2632,9 +2829,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2632
2829
  name: string;
2633
2830
  description?: string | undefined;
2634
2831
  }[];
2635
- id: string;
2636
2832
  name: string;
2637
- category: "other" | "model" | "mode" | "effort";
2833
+ id: string;
2834
+ category: "model" | "mode" | "effort" | "other";
2638
2835
  current: string;
2639
2836
  }[];
2640
2837
  sessionUpdate: "ls_config";
@@ -2645,10 +2842,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2645
2842
  name: string;
2646
2843
  description?: string | undefined;
2647
2844
  }[];
2648
- id: string;
2649
2845
  name: string;
2846
+ id: string;
2650
2847
  current: string;
2651
- category?: "other" | "model" | "mode" | "effort" | undefined;
2848
+ category?: "model" | "mode" | "effort" | "other" | undefined;
2652
2849
  }[];
2653
2850
  sessionUpdate: "ls_config";
2654
2851
  }>, z.ZodObject<{
@@ -2657,13 +2854,13 @@ export declare const sessionEventSchema: z.ZodObject<{
2657
2854
  title: z.ZodString;
2658
2855
  detail: z.ZodOptional<z.ZodString>;
2659
2856
  }, "strip", z.ZodTypeAny, {
2660
- title: string;
2661
2857
  sessionUpdate: "ls_notice";
2858
+ title: string;
2662
2859
  level: "info" | "warning";
2663
2860
  detail?: string | undefined;
2664
2861
  }, {
2665
- title: string;
2666
2862
  sessionUpdate: "ls_notice";
2863
+ title: string;
2667
2864
  level: "info" | "warning";
2668
2865
  detail?: string | undefined;
2669
2866
  }>, z.ZodObject<{
@@ -2674,17 +2871,17 @@ export declare const sessionEventSchema: z.ZodObject<{
2674
2871
  turnId: z.ZodOptional<z.ZodString>;
2675
2872
  stopReason: z.ZodOptional<z.ZodEnum<["end_turn", "cancelled", "error", "max_tokens", "refusal"]>>;
2676
2873
  }, "strip", z.ZodTypeAny, {
2677
- state: "started" | "ended";
2678
2874
  sessionUpdate: "ls_turn";
2875
+ state: "started" | "ended";
2679
2876
  parentToolCallId?: string | undefined;
2680
2877
  turnId?: string | undefined;
2681
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2878
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2682
2879
  }, {
2683
- state: "started" | "ended";
2684
2880
  sessionUpdate: "ls_turn";
2881
+ state: "started" | "ended";
2685
2882
  parentToolCallId?: string | undefined;
2686
2883
  turnId?: string | undefined;
2687
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2884
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2688
2885
  }>, z.ZodObject<{
2689
2886
  sessionUpdate: z.ZodLiteral<"ls_permission">;
2690
2887
  requestId: z.ZodString;
@@ -2696,69 +2893,174 @@ export declare const sessionEventSchema: z.ZodObject<{
2696
2893
  name: z.ZodString;
2697
2894
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
2698
2895
  }, "strip", z.ZodTypeAny, {
2699
- optionId: string;
2700
2896
  name: string;
2701
2897
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2702
- }, {
2703
2898
  optionId: string;
2899
+ }, {
2704
2900
  name: string;
2705
2901
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2902
+ optionId: string;
2706
2903
  }>, "many">;
2904
+ /**
2905
+ * The agent is asking the user something: answer with `sessions.answer`.
2906
+ * `options` then hold what else can be done (skip the questions, stop),
2907
+ * which is also all an app that predates questions can offer.
2908
+ */
2909
+ questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2910
+ id: z.ZodString;
2911
+ header: z.ZodOptional<z.ZodString>;
2912
+ text: z.ZodString;
2913
+ kind: z.ZodEnum<["choice", "choices", "text"]>;
2914
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2915
+ value: z.ZodString;
2916
+ label: z.ZodString;
2917
+ description: z.ZodOptional<z.ZodString>;
2918
+ }, "strip", z.ZodTypeAny, {
2919
+ value: string;
2920
+ label: string;
2921
+ description?: string | undefined;
2922
+ }, {
2923
+ value: string;
2924
+ label: string;
2925
+ description?: string | undefined;
2926
+ }>, "many">>;
2927
+ other: z.ZodOptional<z.ZodBoolean>;
2928
+ secret: z.ZodOptional<z.ZodBoolean>;
2929
+ required: z.ZodOptional<z.ZodBoolean>;
2930
+ }, "strip", z.ZodTypeAny, {
2931
+ text: string;
2932
+ kind: "text" | "choice" | "choices";
2933
+ id: string;
2934
+ options?: {
2935
+ value: string;
2936
+ label: string;
2937
+ description?: string | undefined;
2938
+ }[] | undefined;
2939
+ other?: boolean | undefined;
2940
+ header?: string | undefined;
2941
+ secret?: boolean | undefined;
2942
+ required?: boolean | undefined;
2943
+ }, {
2944
+ text: string;
2945
+ kind: "text" | "choice" | "choices";
2946
+ id: string;
2947
+ options?: {
2948
+ value: string;
2949
+ label: string;
2950
+ description?: string | undefined;
2951
+ }[] | undefined;
2952
+ other?: boolean | undefined;
2953
+ header?: string | undefined;
2954
+ secret?: boolean | undefined;
2955
+ required?: boolean | undefined;
2956
+ }>, "many">>;
2707
2957
  }, "strip", z.ZodTypeAny, {
2708
2958
  options: {
2709
- optionId: string;
2710
2959
  name: string;
2711
2960
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2961
+ optionId: string;
2712
2962
  }[];
2963
+ sessionUpdate: "ls_permission";
2713
2964
  title: string;
2714
2965
  requestId: string;
2715
- sessionUpdate: "ls_permission";
2716
2966
  toolCallId?: string | undefined;
2717
2967
  detail?: string | undefined;
2968
+ questions?: {
2969
+ text: string;
2970
+ kind: "text" | "choice" | "choices";
2971
+ id: string;
2972
+ options?: {
2973
+ value: string;
2974
+ label: string;
2975
+ description?: string | undefined;
2976
+ }[] | undefined;
2977
+ other?: boolean | undefined;
2978
+ header?: string | undefined;
2979
+ secret?: boolean | undefined;
2980
+ required?: boolean | undefined;
2981
+ }[] | undefined;
2718
2982
  }, {
2719
2983
  options: {
2720
- optionId: string;
2721
2984
  name: string;
2722
2985
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2986
+ optionId: string;
2723
2987
  }[];
2988
+ sessionUpdate: "ls_permission";
2724
2989
  title: string;
2725
2990
  requestId: string;
2726
- sessionUpdate: "ls_permission";
2727
2991
  toolCallId?: string | undefined;
2728
2992
  detail?: string | undefined;
2993
+ questions?: {
2994
+ text: string;
2995
+ kind: "text" | "choice" | "choices";
2996
+ id: string;
2997
+ options?: {
2998
+ value: string;
2999
+ label: string;
3000
+ description?: string | undefined;
3001
+ }[] | undefined;
3002
+ other?: boolean | undefined;
3003
+ header?: string | undefined;
3004
+ secret?: boolean | undefined;
3005
+ required?: boolean | undefined;
3006
+ }[] | undefined;
2729
3007
  }>, z.ZodObject<{
2730
3008
  sessionUpdate: z.ZodLiteral<"ls_permission_resolved">;
2731
3009
  requestId: z.ZodString;
2732
3010
  optionId: z.ZodOptional<z.ZodString>;
3011
+ /** How questions were answered, for the record. */
3012
+ answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
3013
+ id: z.ZodString;
3014
+ values: z.ZodArray<z.ZodString, "many">;
3015
+ other: z.ZodOptional<z.ZodString>;
3016
+ }, "strip", z.ZodTypeAny, {
3017
+ values: string[];
3018
+ id: string;
3019
+ other?: string | undefined;
3020
+ }, {
3021
+ values: string[];
3022
+ id: string;
3023
+ other?: string | undefined;
3024
+ }>, "many">>;
2733
3025
  }, "strip", z.ZodTypeAny, {
2734
- requestId: string;
2735
3026
  sessionUpdate: "ls_permission_resolved";
3027
+ requestId: string;
2736
3028
  optionId?: string | undefined;
3029
+ answers?: {
3030
+ values: string[];
3031
+ id: string;
3032
+ other?: string | undefined;
3033
+ }[] | undefined;
2737
3034
  }, {
2738
- requestId: string;
2739
3035
  sessionUpdate: "ls_permission_resolved";
3036
+ requestId: string;
2740
3037
  optionId?: string | undefined;
3038
+ answers?: {
3039
+ values: string[];
3040
+ id: string;
3041
+ other?: string | undefined;
3042
+ }[] | undefined;
2741
3043
  }>, z.ZodObject<{
2742
3044
  sessionUpdate: z.ZodLiteral<"ls_driver">;
2743
3045
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
2744
3046
  deviceId: z.ZodOptional<z.ZodString>;
2745
3047
  }, "strip", z.ZodTypeAny, {
2746
- driver: "remote" | "desktop" | "none";
2747
3048
  sessionUpdate: "ls_driver";
3049
+ driver: "desktop" | "remote" | "none";
2748
3050
  deviceId?: string | undefined;
2749
3051
  }, {
2750
- driver: "remote" | "desktop" | "none";
2751
3052
  sessionUpdate: "ls_driver";
3053
+ driver: "desktop" | "remote" | "none";
2752
3054
  deviceId?: string | undefined;
2753
3055
  }>, z.ZodObject<{
2754
3056
  sessionUpdate: z.ZodLiteral<"ls_status">;
2755
3057
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
2756
3058
  }, "strip", z.ZodTypeAny, {
2757
- state: "idle" | "running" | "waiting" | "error" | "offline";
2758
3059
  sessionUpdate: "ls_status";
3060
+ state: "error" | "idle" | "running" | "waiting" | "offline";
2759
3061
  }, {
2760
- state: "idle" | "running" | "waiting" | "error" | "offline";
2761
3062
  sessionUpdate: "ls_status";
3063
+ state: "error" | "idle" | "running" | "waiting" | "offline";
2762
3064
  }>, z.ZodObject<{
2763
3065
  sessionUpdate: z.ZodLiteral<"ls_error">;
2764
3066
  code: z.ZodString;
@@ -2787,9 +3089,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2787
3089
  uri?: string | undefined;
2788
3090
  } | {
2789
3091
  type: "resource_link";
2790
- name: string;
2791
3092
  uri: string;
2792
- kind?: "agent" | "file" | "skill" | undefined;
3093
+ name: string;
3094
+ kind?: "file" | "skill" | "agent" | undefined;
2793
3095
  };
2794
3096
  sessionUpdate: "user_message_chunk";
2795
3097
  messageId?: string | undefined;
@@ -2804,9 +3106,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2804
3106
  uri?: string | undefined;
2805
3107
  } | {
2806
3108
  type: "resource_link";
2807
- name: string;
2808
3109
  uri: string;
2809
- kind?: "agent" | "file" | "skill" | undefined;
3110
+ name: string;
3111
+ kind?: "file" | "skill" | "agent" | undefined;
2810
3112
  };
2811
3113
  sessionUpdate: "agent_message_chunk";
2812
3114
  messageId: string;
@@ -2822,45 +3124,19 @@ export declare const sessionEventSchema: z.ZodObject<{
2822
3124
  uri?: string | undefined;
2823
3125
  } | {
2824
3126
  type: "resource_link";
2825
- name: string;
2826
3127
  uri: string;
2827
- kind?: "agent" | "file" | "skill" | undefined;
3128
+ name: string;
3129
+ kind?: "file" | "skill" | "agent" | undefined;
2828
3130
  };
2829
3131
  sessionUpdate: "agent_thought_chunk";
2830
3132
  messageId: string;
2831
3133
  parentToolCallId?: string | undefined;
2832
3134
  } | {
2833
- status: "failed" | "pending" | "in_progress" | "completed";
2834
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2835
- title: string;
2836
- toolCallId: string;
3135
+ status: "pending" | "in_progress" | "completed" | "failed";
3136
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
2837
3137
  sessionUpdate: "tool_call";
2838
- detail?: {
2839
- type: "mcp";
2840
- tool: string;
2841
- server: string;
2842
- } | {
2843
- type: "subagent";
2844
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2845
- task?: string | undefined;
2846
- agentType?: string | undefined;
2847
- model?: string | undefined;
2848
- } | {
2849
- type: "skill";
2850
- name: string;
2851
- description?: string | undefined;
2852
- } | {
2853
- type: "web_search";
2854
- query?: string | undefined;
2855
- } | {
2856
- type: "image_generation";
2857
- prompt?: string | undefined;
2858
- } | {
2859
- type: "compaction";
2860
- } | {
2861
- type: "review";
2862
- phase: "started" | "finished";
2863
- } | undefined;
3138
+ toolCallId: string;
3139
+ title: string;
2864
3140
  content?: ({
2865
3141
  type: "content";
2866
3142
  content: {
@@ -2873,20 +3149,20 @@ export declare const sessionEventSchema: z.ZodObject<{
2873
3149
  uri?: string | undefined;
2874
3150
  } | {
2875
3151
  type: "resource_link";
2876
- name: string;
2877
3152
  uri: string;
2878
- kind?: "agent" | "file" | "skill" | undefined;
3153
+ name: string;
3154
+ kind?: "file" | "skill" | "agent" | undefined;
2879
3155
  };
2880
3156
  } | {
2881
- path: string;
2882
3157
  type: "diff";
3158
+ path: string;
2883
3159
  newText: string;
2884
3160
  oldText?: string | null | undefined;
2885
3161
  } | {
2886
- path: string;
2887
3162
  type: "patch";
3163
+ path: string;
2888
3164
  diff: string;
2889
- change: "delete" | "add" | "update";
3165
+ change: "add" | "delete" | "update";
2890
3166
  movePath?: string | undefined;
2891
3167
  } | {
2892
3168
  type: "terminal";
@@ -2898,15 +3174,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2898
3174
  path: string;
2899
3175
  line?: number | undefined;
2900
3176
  }[] | undefined;
2901
- } | {
2902
- toolCallId: string;
2903
- sessionUpdate: "tool_call_update";
2904
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
2905
- title?: string | undefined;
2906
3177
  detail?: {
2907
3178
  type: "mcp";
2908
- tool: string;
2909
3179
  server: string;
3180
+ tool: string;
2910
3181
  } | {
2911
3182
  type: "subagent";
2912
3183
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
@@ -2928,7 +3199,15 @@ export declare const sessionEventSchema: z.ZodObject<{
2928
3199
  } | {
2929
3200
  type: "review";
2930
3201
  phase: "started" | "finished";
3202
+ } | {
3203
+ type: "question";
3204
+ text: string;
3205
+ more?: number | undefined;
2931
3206
  } | undefined;
3207
+ } | {
3208
+ sessionUpdate: "tool_call_update";
3209
+ toolCallId: string;
3210
+ status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
2932
3211
  content?: ({
2933
3212
  type: "content";
2934
3213
  content: {
@@ -2941,26 +3220,57 @@ export declare const sessionEventSchema: z.ZodObject<{
2941
3220
  uri?: string | undefined;
2942
3221
  } | {
2943
3222
  type: "resource_link";
2944
- name: string;
2945
3223
  uri: string;
2946
- kind?: "agent" | "file" | "skill" | undefined;
3224
+ name: string;
3225
+ kind?: "file" | "skill" | "agent" | undefined;
2947
3226
  };
2948
3227
  } | {
2949
- path: string;
2950
3228
  type: "diff";
3229
+ path: string;
2951
3230
  newText: string;
2952
3231
  oldText?: string | null | undefined;
2953
3232
  } | {
2954
- path: string;
2955
3233
  type: "patch";
3234
+ path: string;
2956
3235
  diff: string;
2957
- change: "delete" | "add" | "update";
3236
+ change: "add" | "delete" | "update";
2958
3237
  movePath?: string | undefined;
2959
3238
  } | {
2960
3239
  type: "terminal";
2961
3240
  terminalId: string;
2962
3241
  })[] | undefined;
2963
3242
  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;
2964
3274
  appendOutput?: string | undefined;
2965
3275
  rawOutput?: unknown;
2966
3276
  } | {
@@ -2982,8 +3292,8 @@ export declare const sessionEventSchema: z.ZodObject<{
2982
3292
  currentModeId: string;
2983
3293
  } | {
2984
3294
  sessionUpdate: "session_info_update";
2985
- title?: string | undefined;
2986
3295
  model?: string | undefined;
3296
+ title?: string | undefined;
2987
3297
  } | {
2988
3298
  sessionUpdate: "usage_update";
2989
3299
  usedTokens?: number | undefined;
@@ -3000,45 +3310,64 @@ export declare const sessionEventSchema: z.ZodObject<{
3000
3310
  name: string;
3001
3311
  description?: string | undefined;
3002
3312
  }[];
3003
- id: string;
3004
3313
  name: string;
3005
- category: "other" | "model" | "mode" | "effort";
3314
+ id: string;
3315
+ category: "model" | "mode" | "effort" | "other";
3006
3316
  current: string;
3007
3317
  }[];
3008
3318
  sessionUpdate: "ls_config";
3009
3319
  } | {
3010
- title: string;
3011
3320
  sessionUpdate: "ls_notice";
3321
+ title: string;
3012
3322
  level: "info" | "warning";
3013
3323
  detail?: string | undefined;
3014
3324
  } | {
3015
- state: "started" | "ended";
3016
3325
  sessionUpdate: "ls_turn";
3326
+ state: "started" | "ended";
3017
3327
  parentToolCallId?: string | undefined;
3018
3328
  turnId?: string | undefined;
3019
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3329
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
3020
3330
  } | {
3021
3331
  options: {
3022
- optionId: string;
3023
3332
  name: string;
3024
3333
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3334
+ optionId: string;
3025
3335
  }[];
3336
+ sessionUpdate: "ls_permission";
3026
3337
  title: string;
3027
3338
  requestId: string;
3028
- sessionUpdate: "ls_permission";
3029
3339
  toolCallId?: string | undefined;
3030
3340
  detail?: string | undefined;
3341
+ questions?: {
3342
+ text: string;
3343
+ kind: "text" | "choice" | "choices";
3344
+ id: string;
3345
+ options?: {
3346
+ value: string;
3347
+ label: string;
3348
+ description?: string | undefined;
3349
+ }[] | undefined;
3350
+ other?: boolean | undefined;
3351
+ header?: string | undefined;
3352
+ secret?: boolean | undefined;
3353
+ required?: boolean | undefined;
3354
+ }[] | undefined;
3031
3355
  } | {
3032
- requestId: string;
3033
3356
  sessionUpdate: "ls_permission_resolved";
3357
+ requestId: string;
3034
3358
  optionId?: string | undefined;
3359
+ answers?: {
3360
+ values: string[];
3361
+ id: string;
3362
+ other?: string | undefined;
3363
+ }[] | undefined;
3035
3364
  } | {
3036
- driver: "remote" | "desktop" | "none";
3037
3365
  sessionUpdate: "ls_driver";
3366
+ driver: "desktop" | "remote" | "none";
3038
3367
  deviceId?: string | undefined;
3039
3368
  } | {
3040
- state: "idle" | "running" | "waiting" | "error" | "offline";
3041
3369
  sessionUpdate: "ls_status";
3370
+ state: "error" | "idle" | "running" | "waiting" | "offline";
3042
3371
  } | {
3043
3372
  code: string;
3044
3373
  message: string;
@@ -3060,9 +3389,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3060
3389
  uri?: string | undefined;
3061
3390
  } | {
3062
3391
  type: "resource_link";
3063
- name: string;
3064
3392
  uri: string;
3065
- kind?: "agent" | "file" | "skill" | undefined;
3393
+ name: string;
3394
+ kind?: "file" | "skill" | "agent" | undefined;
3066
3395
  };
3067
3396
  sessionUpdate: "user_message_chunk";
3068
3397
  messageId?: string | undefined;
@@ -3077,9 +3406,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3077
3406
  uri?: string | undefined;
3078
3407
  } | {
3079
3408
  type: "resource_link";
3080
- name: string;
3081
3409
  uri: string;
3082
- kind?: "agent" | "file" | "skill" | undefined;
3410
+ name: string;
3411
+ kind?: "file" | "skill" | "agent" | undefined;
3083
3412
  };
3084
3413
  sessionUpdate: "agent_message_chunk";
3085
3414
  messageId: string;
@@ -3095,45 +3424,19 @@ export declare const sessionEventSchema: z.ZodObject<{
3095
3424
  uri?: string | undefined;
3096
3425
  } | {
3097
3426
  type: "resource_link";
3098
- name: string;
3099
3427
  uri: string;
3100
- kind?: "agent" | "file" | "skill" | undefined;
3428
+ name: string;
3429
+ kind?: "file" | "skill" | "agent" | undefined;
3101
3430
  };
3102
3431
  sessionUpdate: "agent_thought_chunk";
3103
3432
  messageId: string;
3104
3433
  parentToolCallId?: string | undefined;
3105
3434
  } | {
3106
- status: "failed" | "pending" | "in_progress" | "completed";
3107
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3108
- title: string;
3109
- toolCallId: string;
3435
+ status: "pending" | "in_progress" | "completed" | "failed";
3436
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
3110
3437
  sessionUpdate: "tool_call";
3111
- detail?: {
3112
- type: "mcp";
3113
- tool: string;
3114
- server: string;
3115
- } | {
3116
- type: "subagent";
3117
- task?: string | undefined;
3118
- agentType?: string | undefined;
3119
- model?: string | undefined;
3120
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3121
- } | {
3122
- type: "skill";
3123
- name: string;
3124
- description?: string | undefined;
3125
- } | {
3126
- type: "web_search";
3127
- query?: string | undefined;
3128
- } | {
3129
- type: "image_generation";
3130
- prompt?: string | undefined;
3131
- } | {
3132
- type: "compaction";
3133
- } | {
3134
- type: "review";
3135
- phase: "started" | "finished";
3136
- } | undefined;
3438
+ toolCallId: string;
3439
+ title: string;
3137
3440
  content?: ({
3138
3441
  type: "content";
3139
3442
  content: {
@@ -3146,20 +3449,20 @@ export declare const sessionEventSchema: z.ZodObject<{
3146
3449
  uri?: string | undefined;
3147
3450
  } | {
3148
3451
  type: "resource_link";
3149
- name: string;
3150
3452
  uri: string;
3151
- kind?: "agent" | "file" | "skill" | undefined;
3453
+ name: string;
3454
+ kind?: "file" | "skill" | "agent" | undefined;
3152
3455
  };
3153
3456
  } | {
3154
- path: string;
3155
3457
  type: "diff";
3458
+ path: string;
3156
3459
  newText: string;
3157
3460
  oldText?: string | null | undefined;
3158
3461
  } | {
3159
- path: string;
3160
3462
  type: "patch";
3463
+ path: string;
3161
3464
  diff: string;
3162
- change: "delete" | "add" | "update";
3465
+ change: "add" | "delete" | "update";
3163
3466
  movePath?: string | undefined;
3164
3467
  } | {
3165
3468
  type: "terminal";
@@ -3171,21 +3474,16 @@ export declare const sessionEventSchema: z.ZodObject<{
3171
3474
  path: string;
3172
3475
  line?: number | undefined;
3173
3476
  }[] | undefined;
3174
- } | {
3175
- toolCallId: string;
3176
- sessionUpdate: "tool_call_update";
3177
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
3178
- title?: string | undefined;
3179
3477
  detail?: {
3180
3478
  type: "mcp";
3181
- tool: string;
3182
3479
  server: string;
3480
+ tool: string;
3183
3481
  } | {
3184
3482
  type: "subagent";
3483
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3185
3484
  task?: string | undefined;
3186
3485
  agentType?: string | undefined;
3187
3486
  model?: string | undefined;
3188
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3189
3487
  } | {
3190
3488
  type: "skill";
3191
3489
  name: string;
@@ -3201,7 +3499,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3201
3499
  } | {
3202
3500
  type: "review";
3203
3501
  phase: "started" | "finished";
3502
+ } | {
3503
+ type: "question";
3504
+ text: string;
3505
+ more?: number | undefined;
3204
3506
  } | undefined;
3507
+ } | {
3508
+ sessionUpdate: "tool_call_update";
3509
+ toolCallId: string;
3510
+ status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
3205
3511
  content?: ({
3206
3512
  type: "content";
3207
3513
  content: {
@@ -3214,26 +3520,57 @@ export declare const sessionEventSchema: z.ZodObject<{
3214
3520
  uri?: string | undefined;
3215
3521
  } | {
3216
3522
  type: "resource_link";
3217
- name: string;
3218
3523
  uri: string;
3219
- kind?: "agent" | "file" | "skill" | undefined;
3524
+ name: string;
3525
+ kind?: "file" | "skill" | "agent" | undefined;
3220
3526
  };
3221
3527
  } | {
3222
- path: string;
3223
3528
  type: "diff";
3529
+ path: string;
3224
3530
  newText: string;
3225
3531
  oldText?: string | null | undefined;
3226
3532
  } | {
3227
- path: string;
3228
3533
  type: "patch";
3534
+ path: string;
3229
3535
  diff: string;
3230
- change: "delete" | "add" | "update";
3536
+ change: "add" | "delete" | "update";
3231
3537
  movePath?: string | undefined;
3232
3538
  } | {
3233
3539
  type: "terminal";
3234
3540
  terminalId: string;
3235
3541
  })[] | undefined;
3236
3542
  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;
3237
3574
  appendOutput?: string | undefined;
3238
3575
  rawOutput?: unknown;
3239
3576
  } | {
@@ -3255,8 +3592,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3255
3592
  currentModeId: string;
3256
3593
  } | {
3257
3594
  sessionUpdate: "session_info_update";
3258
- title?: string | undefined;
3259
3595
  model?: string | undefined;
3596
+ title?: string | undefined;
3260
3597
  } | {
3261
3598
  sessionUpdate: "usage_update";
3262
3599
  usedTokens?: number | undefined;
@@ -3273,45 +3610,64 @@ export declare const sessionEventSchema: z.ZodObject<{
3273
3610
  name: string;
3274
3611
  description?: string | undefined;
3275
3612
  }[];
3276
- id: string;
3277
3613
  name: string;
3614
+ id: string;
3278
3615
  current: string;
3279
- category?: "other" | "model" | "mode" | "effort" | undefined;
3616
+ category?: "model" | "mode" | "effort" | "other" | undefined;
3280
3617
  }[];
3281
3618
  sessionUpdate: "ls_config";
3282
3619
  } | {
3283
- title: string;
3284
3620
  sessionUpdate: "ls_notice";
3621
+ title: string;
3285
3622
  level: "info" | "warning";
3286
3623
  detail?: string | undefined;
3287
3624
  } | {
3288
- state: "started" | "ended";
3289
3625
  sessionUpdate: "ls_turn";
3626
+ state: "started" | "ended";
3290
3627
  parentToolCallId?: string | undefined;
3291
3628
  turnId?: string | undefined;
3292
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3629
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
3293
3630
  } | {
3294
3631
  options: {
3295
- optionId: string;
3296
3632
  name: string;
3297
3633
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3634
+ optionId: string;
3298
3635
  }[];
3636
+ sessionUpdate: "ls_permission";
3299
3637
  title: string;
3300
3638
  requestId: string;
3301
- sessionUpdate: "ls_permission";
3302
3639
  toolCallId?: string | undefined;
3303
3640
  detail?: string | undefined;
3641
+ questions?: {
3642
+ text: string;
3643
+ kind: "text" | "choice" | "choices";
3644
+ id: string;
3645
+ options?: {
3646
+ value: string;
3647
+ label: string;
3648
+ description?: string | undefined;
3649
+ }[] | undefined;
3650
+ other?: boolean | undefined;
3651
+ header?: string | undefined;
3652
+ secret?: boolean | undefined;
3653
+ required?: boolean | undefined;
3654
+ }[] | undefined;
3304
3655
  } | {
3305
- requestId: string;
3306
3656
  sessionUpdate: "ls_permission_resolved";
3657
+ requestId: string;
3307
3658
  optionId?: string | undefined;
3659
+ answers?: {
3660
+ values: string[];
3661
+ id: string;
3662
+ other?: string | undefined;
3663
+ }[] | undefined;
3308
3664
  } | {
3309
- driver: "remote" | "desktop" | "none";
3310
3665
  sessionUpdate: "ls_driver";
3666
+ driver: "desktop" | "remote" | "none";
3311
3667
  deviceId?: string | undefined;
3312
3668
  } | {
3313
- state: "idle" | "running" | "waiting" | "error" | "offline";
3314
3669
  sessionUpdate: "ls_status";
3670
+ state: "error" | "idle" | "running" | "waiting" | "offline";
3315
3671
  } | {
3316
3672
  code: string;
3317
3673
  message: string;