@linkshell/host 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/host/src/direct.d.ts +32 -0
  2. package/dist/host/src/direct.js +144 -0
  3. package/dist/host/src/direct.js.map +1 -0
  4. package/dist/host/src/drivers/acp/connection.js +3 -0
  5. package/dist/host/src/drivers/acp/connection.js.map +1 -1
  6. package/dist/host/src/drivers/acp/driver.d.ts +10 -1
  7. package/dist/host/src/drivers/acp/driver.js +48 -0
  8. package/dist/host/src/drivers/acp/driver.js.map +1 -1
  9. package/dist/host/src/drivers/claude/transcript.d.ts +40 -13
  10. package/dist/host/src/drivers/claude/transcript.js +8 -0
  11. package/dist/host/src/drivers/claude/transcript.js.map +1 -1
  12. package/dist/host/src/drivers/codex/app-server.d.ts +4 -0
  13. package/dist/host/src/drivers/codex/app-server.js +28 -2
  14. package/dist/host/src/drivers/codex/app-server.js.map +1 -1
  15. package/dist/host/src/drivers/codex/driver.d.ts +2 -1
  16. package/dist/host/src/drivers/codex/driver.js +17 -4
  17. package/dist/host/src/drivers/codex/driver.js.map +1 -1
  18. package/dist/host/src/drivers/codex/mapper.d.ts +11 -1
  19. package/dist/host/src/drivers/codex/mapper.js +80 -0
  20. package/dist/host/src/drivers/codex/mapper.js.map +1 -1
  21. package/dist/host/src/drivers/codex/settings.d.ts +7 -2
  22. package/dist/host/src/drivers/codex/settings.js +21 -2
  23. package/dist/host/src/drivers/codex/settings.js.map +1 -1
  24. package/dist/host/src/drivers/types.d.ts +3 -1
  25. package/dist/host/src/host.d.ts +8 -1
  26. package/dist/host/src/host.js +14 -0
  27. package/dist/host/src/host.js.map +1 -1
  28. package/dist/host/src/hub.d.ts +3 -1
  29. package/dist/host/src/hub.js +25 -0
  30. package/dist/host/src/hub.js.map +1 -1
  31. package/dist/host/src/input-helper.d.ts +1 -0
  32. package/dist/host/src/input-helper.js +208 -0
  33. package/dist/host/src/input-helper.js.map +1 -0
  34. package/dist/host/src/input.d.ts +121 -0
  35. package/dist/host/src/input.js +159 -0
  36. package/dist/host/src/input.js.map +1 -0
  37. package/dist/host/src/ports.d.ts +11 -2
  38. package/dist/host/src/ports.js +45 -7
  39. package/dist/host/src/ports.js.map +1 -1
  40. package/dist/host/src/questions.d.ts +21 -0
  41. package/dist/host/src/questions.js +102 -0
  42. package/dist/host/src/questions.js.map +1 -0
  43. package/dist/host/src/rpc/server.js +11 -2
  44. package/dist/host/src/rpc/server.js.map +1 -1
  45. package/dist/host/src/screen-viewer.d.ts +1 -0
  46. package/dist/host/src/screen-viewer.js +783 -0
  47. package/dist/host/src/screen-viewer.js.map +1 -0
  48. package/dist/host/src/screen.d.ts +23 -0
  49. package/dist/host/src/screen.js +65 -69
  50. package/dist/host/src/screen.js.map +1 -1
  51. package/dist/host/src/terminals.d.ts +2 -2
  52. package/dist/host/tsconfig.tsbuildinfo +1 -1
  53. package/dist/wire/src/direct.d.ts +22 -0
  54. package/dist/wire/src/direct.js +37 -0
  55. package/dist/wire/src/direct.js.map +1 -0
  56. package/dist/wire/src/index.d.ts +1 -0
  57. package/dist/wire/src/index.js +1 -0
  58. package/dist/wire/src/index.js.map +1 -1
  59. package/dist/wire/src/model.d.ts +385 -104
  60. package/dist/wire/src/model.js +33 -0
  61. package/dist/wire/src/model.js.map +1 -1
  62. package/dist/wire/src/rpc.d.ts +3395 -1700
  63. package/dist/wire/src/rpc.js +27 -3
  64. package/dist/wire/src/rpc.js.map +1 -1
  65. package/dist/wire/src/updates.d.ts +804 -448
  66. package/dist/wire/src/updates.js +11 -1
  67. package/dist/wire/src/updates.js.map +1 -1
  68. package/package.json +3 -2
@@ -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">;
@@ -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,8 +310,8 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
298
310
  name: string;
299
311
  description?: string | undefined;
300
312
  }[];
301
- id: string;
302
313
  name: string;
314
+ id: string;
303
315
  category: "other" | "model" | "mode" | "effort";
304
316
  current: string;
305
317
  }, {
@@ -308,8 +320,8 @@ 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
326
  category?: "other" | "model" | "mode" | "effort" | undefined;
315
327
  }>;
@@ -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
  sessionUpdate: "user_message_chunk";
@@ -370,9 +382,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
370
382
  uri?: string | undefined;
371
383
  } | {
372
384
  type: "resource_link";
373
- name: string;
374
385
  uri: string;
375
- kind?: "agent" | "file" | "skill" | undefined;
386
+ name: string;
387
+ kind?: "file" | "skill" | "agent" | undefined;
376
388
  };
377
389
  messageId?: string | undefined;
378
390
  }, {
@@ -387,9 +399,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
387
399
  uri?: string | undefined;
388
400
  } | {
389
401
  type: "resource_link";
390
- name: string;
391
402
  uri: string;
392
- kind?: "agent" | "file" | "skill" | undefined;
403
+ name: string;
404
+ kind?: "file" | "skill" | "agent" | undefined;
393
405
  };
394
406
  messageId?: string | undefined;
395
407
  }>, z.ZodObject<{
@@ -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
  sessionUpdate: "agent_message_chunk";
@@ -450,9 +462,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
450
462
  uri?: string | undefined;
451
463
  } | {
452
464
  type: "resource_link";
453
- name: string;
454
465
  uri: string;
455
- kind?: "agent" | "file" | "skill" | undefined;
466
+ name: string;
467
+ kind?: "file" | "skill" | "agent" | undefined;
456
468
  };
457
469
  parentToolCallId?: string | undefined;
458
470
  }, {
@@ -468,9 +480,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
468
480
  uri?: string | undefined;
469
481
  } | {
470
482
  type: "resource_link";
471
- name: string;
472
483
  uri: string;
473
- kind?: "agent" | "file" | "skill" | undefined;
484
+ name: string;
485
+ kind?: "file" | "skill" | "agent" | undefined;
474
486
  };
475
487
  parentToolCallId?: string | undefined;
476
488
  }>, z.ZodObject<{
@@ -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
  sessionUpdate: "agent_thought_chunk";
@@ -531,9 +543,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
531
543
  uri?: string | undefined;
532
544
  } | {
533
545
  type: "resource_link";
534
- name: string;
535
546
  uri: string;
536
- kind?: "agent" | "file" | "skill" | undefined;
547
+ name: string;
548
+ kind?: "file" | "skill" | "agent" | undefined;
537
549
  };
538
550
  parentToolCallId?: string | undefined;
539
551
  }, {
@@ -549,9 +561,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
549
561
  uri?: string | undefined;
550
562
  } | {
551
563
  type: "resource_link";
552
- name: string;
553
564
  uri: string;
554
- kind?: "agent" | "file" | "skill" | undefined;
565
+ name: string;
566
+ kind?: "file" | "skill" | "agent" | undefined;
555
567
  };
556
568
  parentToolCallId?: string | undefined;
557
569
  }>, z.ZodObject<{
@@ -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">;
@@ -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";
797
+ sessionUpdate: "tool_call";
798
+ status: "pending" | "in_progress" | "completed" | "failed";
774
799
  kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
775
- title: string;
776
800
  toolCallId: string;
777
- 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;
801
+ title: string;
804
802
  content?: ({
805
803
  type: "content";
806
804
  content: {
@@ -813,9 +811,9 @@ 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
819
  path: string;
@@ -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
+ sessionUpdate: "tool_call";
871
+ status: "pending" | "in_progress" | "completed" | "failed";
872
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
873
+ toolCallId: string;
874
+ title: string;
873
875
  content?: ({
874
876
  type: "content";
875
877
  content: {
@@ -882,9 +884,9 @@ 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
892
  path: string;
@@ -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">;
@@ -1114,36 +1158,9 @@ 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;
1120
- title?: string | undefined;
1121
- detail?: {
1122
- type: "mcp";
1123
- tool: string;
1124
- server: string;
1125
- } | {
1126
- type: "subagent";
1127
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1128
- task?: string | undefined;
1129
- agentType?: string | undefined;
1130
- model?: string | undefined;
1131
- } | {
1132
- type: "skill";
1133
- name: string;
1134
- description?: string | undefined;
1135
- } | {
1136
- type: "web_search";
1137
- query?: string | undefined;
1138
- } | {
1139
- type: "image_generation";
1140
- prompt?: string | undefined;
1141
- } | {
1142
- type: "compaction";
1143
- } | {
1144
- type: "review";
1145
- phase: "started" | "finished";
1146
- } | undefined;
1162
+ toolCallId: string;
1163
+ status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
1147
1164
  content?: ({
1148
1165
  type: "content";
1149
1166
  content: {
@@ -1156,9 +1173,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1156
1173
  uri?: string | undefined;
1157
1174
  } | {
1158
1175
  type: "resource_link";
1159
- name: string;
1160
1176
  uri: string;
1161
- kind?: "agent" | "file" | "skill" | undefined;
1177
+ name: string;
1178
+ kind?: "file" | "skill" | "agent" | undefined;
1162
1179
  };
1163
1180
  } | {
1164
1181
  path: string;
@@ -1176,23 +1193,17 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1176
1193
  terminalId: string;
1177
1194
  })[] | undefined;
1178
1195
  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
1196
  title?: string | undefined;
1186
1197
  detail?: {
1187
1198
  type: "mcp";
1188
- tool: string;
1189
1199
  server: string;
1200
+ tool: string;
1190
1201
  } | {
1191
1202
  type: "subagent";
1203
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1192
1204
  task?: string | undefined;
1193
1205
  agentType?: string | undefined;
1194
1206
  model?: string | undefined;
1195
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1196
1207
  } | {
1197
1208
  type: "skill";
1198
1209
  name: string;
@@ -1208,7 +1219,17 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1208
1219
  } | {
1209
1220
  type: "review";
1210
1221
  phase: "started" | "finished";
1222
+ } | {
1223
+ type: "question";
1224
+ text: string;
1225
+ more?: number | undefined;
1211
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;
1212
1233
  content?: ({
1213
1234
  type: "content";
1214
1235
  content: {
@@ -1221,9 +1242,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1221
1242
  uri?: string | undefined;
1222
1243
  } | {
1223
1244
  type: "resource_link";
1224
- name: string;
1225
1245
  uri: string;
1226
- kind?: "agent" | "file" | "skill" | undefined;
1246
+ name: string;
1247
+ kind?: "file" | "skill" | "agent" | undefined;
1227
1248
  };
1228
1249
  } | {
1229
1250
  path: string;
@@ -1241,6 +1262,37 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1241
1262
  terminalId: string;
1242
1263
  })[] | undefined;
1243
1264
  parentToolCallId?: string | undefined;
1265
+ title?: string | undefined;
1266
+ detail?: {
1267
+ type: "mcp";
1268
+ server: string;
1269
+ tool: string;
1270
+ } | {
1271
+ type: "subagent";
1272
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1273
+ task?: string | undefined;
1274
+ agentType?: string | undefined;
1275
+ model?: string | undefined;
1276
+ } | {
1277
+ type: "skill";
1278
+ name: string;
1279
+ description?: string | undefined;
1280
+ } | {
1281
+ type: "web_search";
1282
+ query?: string | undefined;
1283
+ } | {
1284
+ type: "image_generation";
1285
+ prompt?: string | undefined;
1286
+ } | {
1287
+ type: "compaction";
1288
+ } | {
1289
+ type: "review";
1290
+ phase: "started" | "finished";
1291
+ } | {
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<{
@@ -1259,19 +1311,19 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1259
1311
  priority?: "high" | "medium" | "low" | undefined;
1260
1312
  }>, "many">;
1261
1313
  }, "strip", z.ZodTypeAny, {
1314
+ sessionUpdate: "plan";
1262
1315
  entries: {
1263
1316
  status: "pending" | "in_progress" | "completed";
1264
1317
  content: string;
1265
1318
  priority: "high" | "medium" | "low";
1266
1319
  }[];
1267
- sessionUpdate: "plan";
1268
1320
  }, {
1321
+ sessionUpdate: "plan";
1269
1322
  entries: {
1270
1323
  status: "pending" | "in_progress" | "completed";
1271
1324
  content: string;
1272
1325
  priority?: "high" | "medium" | "low" | undefined;
1273
1326
  }[];
1274
- sessionUpdate: "plan";
1275
1327
  }>, z.ZodObject<{
1276
1328
  sessionUpdate: z.ZodLiteral<"available_commands_update">;
1277
1329
  availableCommands: z.ZodArray<z.ZodObject<{
@@ -1376,8 +1428,8 @@ 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;
1432
+ id: string;
1381
1433
  category: "other" | "model" | "mode" | "effort";
1382
1434
  current: string;
1383
1435
  }, {
@@ -1386,50 +1438,50 @@ 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
1444
  category?: "other" | "model" | "mode" | "effort" | undefined;
1393
1445
  }>, "many">;
1394
1446
  }, "strip", z.ZodTypeAny, {
1447
+ sessionUpdate: "ls_config";
1395
1448
  options: {
1396
1449
  values: {
1397
1450
  value: string;
1398
1451
  name: string;
1399
1452
  description?: string | undefined;
1400
1453
  }[];
1401
- id: string;
1402
1454
  name: string;
1455
+ id: string;
1403
1456
  category: "other" | "model" | "mode" | "effort";
1404
1457
  current: string;
1405
1458
  }[];
1406
- sessionUpdate: "ls_config";
1407
1459
  }, {
1460
+ sessionUpdate: "ls_config";
1408
1461
  options: {
1409
1462
  values: {
1410
1463
  value: string;
1411
1464
  name: string;
1412
1465
  description?: string | undefined;
1413
1466
  }[];
1414
- id: string;
1415
1467
  name: string;
1468
+ id: string;
1416
1469
  current: string;
1417
1470
  category?: "other" | "model" | "mode" | "effort" | undefined;
1418
1471
  }[];
1419
- sessionUpdate: "ls_config";
1420
1472
  }>, z.ZodObject<{
1421
1473
  sessionUpdate: z.ZodLiteral<"ls_notice">;
1422
1474
  level: z.ZodEnum<["info", "warning"]>;
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,83 +1514,188 @@ 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, {
1579
+ sessionUpdate: "ls_permission";
1474
1580
  options: {
1475
- optionId: string;
1476
1581
  name: string;
1477
1582
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1583
+ optionId: string;
1478
1584
  }[];
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
  }, {
1604
+ sessionUpdate: "ls_permission";
1485
1605
  options: {
1486
- optionId: string;
1487
1606
  name: string;
1488
1607
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1608
+ optionId: string;
1489
1609
  }[];
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;
1531
1688
  message: z.ZodString;
1532
1689
  hint: z.ZodOptional<z.ZodString>;
1533
1690
  }, "strip", z.ZodTypeAny, {
1691
+ sessionUpdate: "ls_error";
1534
1692
  code: string;
1535
1693
  message: string;
1536
- sessionUpdate: "ls_error";
1537
1694
  hint?: string | undefined;
1538
1695
  }, {
1696
+ sessionUpdate: "ls_error";
1539
1697
  code: string;
1540
1698
  message: string;
1541
- sessionUpdate: "ls_error";
1542
1699
  hint?: string | undefined;
1543
1700
  }>]>;
1544
1701
  export type SessionUpdate = z.infer<typeof sessionUpdateSchema>;
@@ -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
  sessionUpdate: "user_message_chunk";
@@ -1604,9 +1761,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1604
1761
  uri?: string | undefined;
1605
1762
  } | {
1606
1763
  type: "resource_link";
1607
- name: string;
1608
1764
  uri: string;
1609
- kind?: "agent" | "file" | "skill" | undefined;
1765
+ name: string;
1766
+ kind?: "file" | "skill" | "agent" | undefined;
1610
1767
  };
1611
1768
  messageId?: string | undefined;
1612
1769
  }, {
@@ -1621,9 +1778,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1621
1778
  uri?: string | undefined;
1622
1779
  } | {
1623
1780
  type: "resource_link";
1624
- name: string;
1625
1781
  uri: string;
1626
- kind?: "agent" | "file" | "skill" | undefined;
1782
+ name: string;
1783
+ kind?: "file" | "skill" | "agent" | undefined;
1627
1784
  };
1628
1785
  messageId?: string | undefined;
1629
1786
  }>, z.ZodObject<{
@@ -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
  sessionUpdate: "agent_message_chunk";
@@ -1684,9 +1841,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1684
1841
  uri?: string | undefined;
1685
1842
  } | {
1686
1843
  type: "resource_link";
1687
- name: string;
1688
1844
  uri: string;
1689
- kind?: "agent" | "file" | "skill" | undefined;
1845
+ name: string;
1846
+ kind?: "file" | "skill" | "agent" | undefined;
1690
1847
  };
1691
1848
  parentToolCallId?: string | undefined;
1692
1849
  }, {
@@ -1702,9 +1859,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1702
1859
  uri?: string | undefined;
1703
1860
  } | {
1704
1861
  type: "resource_link";
1705
- name: string;
1706
1862
  uri: string;
1707
- kind?: "agent" | "file" | "skill" | undefined;
1863
+ name: string;
1864
+ kind?: "file" | "skill" | "agent" | undefined;
1708
1865
  };
1709
1866
  parentToolCallId?: string | undefined;
1710
1867
  }>, z.ZodObject<{
@@ -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
  sessionUpdate: "agent_thought_chunk";
@@ -1765,9 +1922,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1765
1922
  uri?: string | undefined;
1766
1923
  } | {
1767
1924
  type: "resource_link";
1768
- name: string;
1769
1925
  uri: string;
1770
- kind?: "agent" | "file" | "skill" | undefined;
1926
+ name: string;
1927
+ kind?: "file" | "skill" | "agent" | undefined;
1771
1928
  };
1772
1929
  parentToolCallId?: string | undefined;
1773
1930
  }, {
@@ -1783,9 +1940,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1783
1940
  uri?: string | undefined;
1784
1941
  } | {
1785
1942
  type: "resource_link";
1786
- name: string;
1787
1943
  uri: string;
1788
- kind?: "agent" | "file" | "skill" | undefined;
1944
+ name: string;
1945
+ kind?: "file" | "skill" | "agent" | undefined;
1789
1946
  };
1790
1947
  parentToolCallId?: string | undefined;
1791
1948
  }>, z.ZodObject<{
@@ -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">;
@@ -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";
2176
+ sessionUpdate: "tool_call";
2177
+ status: "pending" | "in_progress" | "completed" | "failed";
2008
2178
  kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2009
- title: string;
2010
2179
  toolCallId: string;
2011
- 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;
2180
+ title: string;
2038
2181
  content?: ({
2039
2182
  type: "content";
2040
2183
  content: {
@@ -2047,9 +2190,9 @@ 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
2198
  path: string;
@@ -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
+ sessionUpdate: "tool_call";
2250
+ status: "pending" | "in_progress" | "completed" | "failed";
2251
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2252
+ toolCallId: string;
2253
+ title: string;
2107
2254
  content?: ({
2108
2255
  type: "content";
2109
2256
  content: {
@@ -2116,9 +2263,9 @@ 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
2271
  path: string;
@@ -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">;
@@ -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,9 +2552,9 @@ 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
2560
  path: string;
@@ -2410,23 +2572,17 @@ export declare const sessionEventSchema: z.ZodObject<{
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,9 +2621,9 @@ 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
2629
  path: string;
@@ -2475,6 +2641,37 @@ export declare const sessionEventSchema: z.ZodObject<{
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<{
@@ -2493,19 +2690,19 @@ export declare const sessionEventSchema: z.ZodObject<{
2493
2690
  priority?: "high" | "medium" | "low" | undefined;
2494
2691
  }>, "many">;
2495
2692
  }, "strip", z.ZodTypeAny, {
2693
+ sessionUpdate: "plan";
2496
2694
  entries: {
2497
2695
  status: "pending" | "in_progress" | "completed";
2498
2696
  content: string;
2499
2697
  priority: "high" | "medium" | "low";
2500
2698
  }[];
2501
- sessionUpdate: "plan";
2502
2699
  }, {
2700
+ sessionUpdate: "plan";
2503
2701
  entries: {
2504
2702
  status: "pending" | "in_progress" | "completed";
2505
2703
  content: string;
2506
2704
  priority?: "high" | "medium" | "low" | undefined;
2507
2705
  }[];
2508
- sessionUpdate: "plan";
2509
2706
  }>, z.ZodObject<{
2510
2707
  sessionUpdate: z.ZodLiteral<"available_commands_update">;
2511
2708
  availableCommands: z.ZodArray<z.ZodObject<{
@@ -2610,8 +2807,8 @@ export declare const sessionEventSchema: z.ZodObject<{
2610
2807
  name: string;
2611
2808
  description?: string | undefined;
2612
2809
  }[];
2613
- id: string;
2614
2810
  name: string;
2811
+ id: string;
2615
2812
  category: "other" | "model" | "mode" | "effort";
2616
2813
  current: string;
2617
2814
  }, {
@@ -2620,50 +2817,50 @@ 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
2823
  category?: "other" | "model" | "mode" | "effort" | undefined;
2627
2824
  }>, "many">;
2628
2825
  }, "strip", z.ZodTypeAny, {
2826
+ sessionUpdate: "ls_config";
2629
2827
  options: {
2630
2828
  values: {
2631
2829
  value: string;
2632
2830
  name: string;
2633
2831
  description?: string | undefined;
2634
2832
  }[];
2635
- id: string;
2636
2833
  name: string;
2834
+ id: string;
2637
2835
  category: "other" | "model" | "mode" | "effort";
2638
2836
  current: string;
2639
2837
  }[];
2640
- sessionUpdate: "ls_config";
2641
2838
  }, {
2839
+ sessionUpdate: "ls_config";
2642
2840
  options: {
2643
2841
  values: {
2644
2842
  value: string;
2645
2843
  name: string;
2646
2844
  description?: string | undefined;
2647
2845
  }[];
2648
- id: string;
2649
2846
  name: string;
2847
+ id: string;
2650
2848
  current: string;
2651
2849
  category?: "other" | "model" | "mode" | "effort" | undefined;
2652
2850
  }[];
2653
- sessionUpdate: "ls_config";
2654
2851
  }>, z.ZodObject<{
2655
2852
  sessionUpdate: z.ZodLiteral<"ls_notice">;
2656
2853
  level: z.ZodEnum<["info", "warning"]>;
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,89 +2893,191 @@ 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, {
2958
+ sessionUpdate: "ls_permission";
2708
2959
  options: {
2709
- optionId: string;
2710
2960
  name: string;
2711
2961
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2962
+ optionId: string;
2712
2963
  }[];
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
  }, {
2983
+ sessionUpdate: "ls_permission";
2719
2984
  options: {
2720
- optionId: string;
2721
2985
  name: string;
2722
2986
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2987
+ optionId: string;
2723
2988
  }[];
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;
2765
3067
  message: z.ZodString;
2766
3068
  hint: z.ZodOptional<z.ZodString>;
2767
3069
  }, "strip", z.ZodTypeAny, {
3070
+ sessionUpdate: "ls_error";
2768
3071
  code: string;
2769
3072
  message: string;
2770
- sessionUpdate: "ls_error";
2771
3073
  hint?: string | undefined;
2772
3074
  }, {
3075
+ sessionUpdate: "ls_error";
2773
3076
  code: string;
2774
3077
  message: string;
2775
- sessionUpdate: "ls_error";
2776
3078
  hint?: string | undefined;
2777
3079
  }>]>;
2778
3080
  }, "strip", z.ZodTypeAny, {
2779
- sessionId: string;
2780
- seq: number;
2781
- ts: number;
2782
3081
  update: {
2783
3082
  sessionUpdate: "user_message_chunk";
2784
3083
  content: {
@@ -2791,9 +3090,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2791
3090
  uri?: string | undefined;
2792
3091
  } | {
2793
3092
  type: "resource_link";
2794
- name: string;
2795
3093
  uri: string;
2796
- kind?: "agent" | "file" | "skill" | undefined;
3094
+ name: string;
3095
+ kind?: "file" | "skill" | "agent" | undefined;
2797
3096
  };
2798
3097
  messageId?: string | undefined;
2799
3098
  } | {
@@ -2809,9 +3108,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2809
3108
  uri?: string | undefined;
2810
3109
  } | {
2811
3110
  type: "resource_link";
2812
- name: string;
2813
3111
  uri: string;
2814
- kind?: "agent" | "file" | "skill" | undefined;
3112
+ name: string;
3113
+ kind?: "file" | "skill" | "agent" | undefined;
2815
3114
  };
2816
3115
  parentToolCallId?: string | undefined;
2817
3116
  } | {
@@ -2827,43 +3126,17 @@ export declare const sessionEventSchema: z.ZodObject<{
2827
3126
  uri?: string | undefined;
2828
3127
  } | {
2829
3128
  type: "resource_link";
2830
- name: string;
2831
3129
  uri: string;
2832
- kind?: "agent" | "file" | "skill" | undefined;
3130
+ name: string;
3131
+ kind?: "file" | "skill" | "agent" | undefined;
2833
3132
  };
2834
3133
  parentToolCallId?: string | undefined;
2835
3134
  } | {
2836
- status: "failed" | "pending" | "in_progress" | "completed";
3135
+ sessionUpdate: "tool_call";
3136
+ status: "pending" | "in_progress" | "completed" | "failed";
2837
3137
  kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2838
- title: string;
2839
3138
  toolCallId: string;
2840
- sessionUpdate: "tool_call";
2841
- detail?: {
2842
- type: "mcp";
2843
- tool: string;
2844
- server: string;
2845
- } | {
2846
- type: "subagent";
2847
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2848
- task?: string | undefined;
2849
- agentType?: string | undefined;
2850
- model?: string | undefined;
2851
- } | {
2852
- type: "skill";
2853
- name: string;
2854
- description?: string | undefined;
2855
- } | {
2856
- type: "web_search";
2857
- query?: string | undefined;
2858
- } | {
2859
- type: "image_generation";
2860
- prompt?: string | undefined;
2861
- } | {
2862
- type: "compaction";
2863
- } | {
2864
- type: "review";
2865
- phase: "started" | "finished";
2866
- } | undefined;
3139
+ title: string;
2867
3140
  content?: ({
2868
3141
  type: "content";
2869
3142
  content: {
@@ -2876,9 +3149,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2876
3149
  uri?: string | undefined;
2877
3150
  } | {
2878
3151
  type: "resource_link";
2879
- name: string;
2880
3152
  uri: string;
2881
- kind?: "agent" | "file" | "skill" | undefined;
3153
+ name: string;
3154
+ kind?: "file" | "skill" | "agent" | undefined;
2882
3155
  };
2883
3156
  } | {
2884
3157
  path: string;
@@ -2901,15 +3174,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2901
3174
  path: string;
2902
3175
  line?: number | undefined;
2903
3176
  }[] | undefined;
2904
- } | {
2905
- toolCallId: string;
2906
- sessionUpdate: "tool_call_update";
2907
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
2908
- title?: string | undefined;
2909
3177
  detail?: {
2910
3178
  type: "mcp";
2911
- tool: string;
2912
3179
  server: string;
3180
+ tool: string;
2913
3181
  } | {
2914
3182
  type: "subagent";
2915
3183
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
@@ -2931,7 +3199,15 @@ export declare const sessionEventSchema: z.ZodObject<{
2931
3199
  } | {
2932
3200
  type: "review";
2933
3201
  phase: "started" | "finished";
3202
+ } | {
3203
+ type: "question";
3204
+ text: string;
3205
+ more?: number | undefined;
2934
3206
  } | undefined;
3207
+ } | {
3208
+ sessionUpdate: "tool_call_update";
3209
+ toolCallId: string;
3210
+ status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
2935
3211
  content?: ({
2936
3212
  type: "content";
2937
3213
  content: {
@@ -2944,9 +3220,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2944
3220
  uri?: string | undefined;
2945
3221
  } | {
2946
3222
  type: "resource_link";
2947
- name: string;
2948
3223
  uri: string;
2949
- kind?: "agent" | "file" | "skill" | undefined;
3224
+ name: string;
3225
+ kind?: "file" | "skill" | "agent" | undefined;
2950
3226
  };
2951
3227
  } | {
2952
3228
  path: string;
@@ -2964,15 +3240,46 @@ export declare const sessionEventSchema: z.ZodObject<{
2964
3240
  terminalId: string;
2965
3241
  })[] | undefined;
2966
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;
2967
3274
  appendOutput?: string | undefined;
2968
3275
  rawOutput?: unknown;
2969
3276
  } | {
3277
+ sessionUpdate: "plan";
2970
3278
  entries: {
2971
3279
  status: "pending" | "in_progress" | "completed";
2972
3280
  content: string;
2973
3281
  priority: "high" | "medium" | "low";
2974
3282
  }[];
2975
- sessionUpdate: "plan";
2976
3283
  } | {
2977
3284
  sessionUpdate: "available_commands_update";
2978
3285
  availableCommands: {
@@ -2997,61 +3304,80 @@ export declare const sessionEventSchema: z.ZodObject<{
2997
3304
  role: "agent" | "thought" | "user";
2998
3305
  parentToolCallId?: string | undefined;
2999
3306
  } | {
3307
+ sessionUpdate: "ls_config";
3000
3308
  options: {
3001
3309
  values: {
3002
3310
  value: string;
3003
3311
  name: string;
3004
3312
  description?: string | undefined;
3005
3313
  }[];
3006
- id: string;
3007
3314
  name: string;
3315
+ id: string;
3008
3316
  category: "other" | "model" | "mode" | "effort";
3009
3317
  current: string;
3010
3318
  }[];
3011
- sessionUpdate: "ls_config";
3012
3319
  } | {
3013
- title: string;
3014
3320
  sessionUpdate: "ls_notice";
3321
+ title: string;
3015
3322
  level: "info" | "warning";
3016
3323
  detail?: string | undefined;
3017
3324
  } | {
3018
- state: "started" | "ended";
3019
3325
  sessionUpdate: "ls_turn";
3326
+ state: "started" | "ended";
3020
3327
  parentToolCallId?: string | undefined;
3021
3328
  turnId?: string | undefined;
3022
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3329
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
3023
3330
  } | {
3331
+ sessionUpdate: "ls_permission";
3024
3332
  options: {
3025
- optionId: string;
3026
3333
  name: string;
3027
3334
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3335
+ optionId: string;
3028
3336
  }[];
3029
3337
  title: string;
3030
3338
  requestId: string;
3031
- sessionUpdate: "ls_permission";
3032
3339
  toolCallId?: string | undefined;
3033
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;
3034
3355
  } | {
3035
- requestId: string;
3036
3356
  sessionUpdate: "ls_permission_resolved";
3357
+ requestId: string;
3037
3358
  optionId?: string | undefined;
3359
+ answers?: {
3360
+ values: string[];
3361
+ id: string;
3362
+ other?: string | undefined;
3363
+ }[] | undefined;
3038
3364
  } | {
3039
- driver: "remote" | "desktop" | "none";
3040
3365
  sessionUpdate: "ls_driver";
3366
+ driver: "desktop" | "remote" | "none";
3041
3367
  deviceId?: string | undefined;
3042
3368
  } | {
3043
- state: "idle" | "running" | "waiting" | "error" | "offline";
3044
3369
  sessionUpdate: "ls_status";
3370
+ state: "error" | "idle" | "running" | "waiting" | "offline";
3045
3371
  } | {
3372
+ sessionUpdate: "ls_error";
3046
3373
  code: string;
3047
3374
  message: string;
3048
- sessionUpdate: "ls_error";
3049
3375
  hint?: string | undefined;
3050
3376
  };
3051
- }, {
3052
3377
  sessionId: string;
3053
3378
  seq: number;
3054
3379
  ts: number;
3380
+ }, {
3055
3381
  update: {
3056
3382
  sessionUpdate: "user_message_chunk";
3057
3383
  content: {
@@ -3064,9 +3390,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3064
3390
  uri?: string | undefined;
3065
3391
  } | {
3066
3392
  type: "resource_link";
3067
- name: string;
3068
3393
  uri: string;
3069
- kind?: "agent" | "file" | "skill" | undefined;
3394
+ name: string;
3395
+ kind?: "file" | "skill" | "agent" | undefined;
3070
3396
  };
3071
3397
  messageId?: string | undefined;
3072
3398
  } | {
@@ -3082,9 +3408,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3082
3408
  uri?: string | undefined;
3083
3409
  } | {
3084
3410
  type: "resource_link";
3085
- name: string;
3086
3411
  uri: string;
3087
- kind?: "agent" | "file" | "skill" | undefined;
3412
+ name: string;
3413
+ kind?: "file" | "skill" | "agent" | undefined;
3088
3414
  };
3089
3415
  parentToolCallId?: string | undefined;
3090
3416
  } | {
@@ -3100,43 +3426,17 @@ export declare const sessionEventSchema: z.ZodObject<{
3100
3426
  uri?: string | undefined;
3101
3427
  } | {
3102
3428
  type: "resource_link";
3103
- name: string;
3104
3429
  uri: string;
3105
- kind?: "agent" | "file" | "skill" | undefined;
3430
+ name: string;
3431
+ kind?: "file" | "skill" | "agent" | undefined;
3106
3432
  };
3107
3433
  parentToolCallId?: string | undefined;
3108
3434
  } | {
3109
- status: "failed" | "pending" | "in_progress" | "completed";
3435
+ sessionUpdate: "tool_call";
3436
+ status: "pending" | "in_progress" | "completed" | "failed";
3110
3437
  kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3111
- title: string;
3112
3438
  toolCallId: string;
3113
- sessionUpdate: "tool_call";
3114
- detail?: {
3115
- type: "mcp";
3116
- tool: string;
3117
- server: string;
3118
- } | {
3119
- type: "subagent";
3120
- task?: string | undefined;
3121
- agentType?: string | undefined;
3122
- model?: string | undefined;
3123
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3124
- } | {
3125
- type: "skill";
3126
- name: string;
3127
- description?: string | undefined;
3128
- } | {
3129
- type: "web_search";
3130
- query?: string | undefined;
3131
- } | {
3132
- type: "image_generation";
3133
- prompt?: string | undefined;
3134
- } | {
3135
- type: "compaction";
3136
- } | {
3137
- type: "review";
3138
- phase: "started" | "finished";
3139
- } | undefined;
3439
+ title: string;
3140
3440
  content?: ({
3141
3441
  type: "content";
3142
3442
  content: {
@@ -3149,9 +3449,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3149
3449
  uri?: string | undefined;
3150
3450
  } | {
3151
3451
  type: "resource_link";
3152
- name: string;
3153
3452
  uri: string;
3154
- kind?: "agent" | "file" | "skill" | undefined;
3453
+ name: string;
3454
+ kind?: "file" | "skill" | "agent" | undefined;
3155
3455
  };
3156
3456
  } | {
3157
3457
  path: string;
@@ -3174,21 +3474,16 @@ export declare const sessionEventSchema: z.ZodObject<{
3174
3474
  path: string;
3175
3475
  line?: number | undefined;
3176
3476
  }[] | undefined;
3177
- } | {
3178
- toolCallId: string;
3179
- sessionUpdate: "tool_call_update";
3180
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
3181
- title?: string | undefined;
3182
3477
  detail?: {
3183
3478
  type: "mcp";
3184
- tool: string;
3185
3479
  server: string;
3480
+ tool: string;
3186
3481
  } | {
3187
3482
  type: "subagent";
3483
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3188
3484
  task?: string | undefined;
3189
3485
  agentType?: string | undefined;
3190
3486
  model?: string | undefined;
3191
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3192
3487
  } | {
3193
3488
  type: "skill";
3194
3489
  name: string;
@@ -3204,7 +3499,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3204
3499
  } | {
3205
3500
  type: "review";
3206
3501
  phase: "started" | "finished";
3502
+ } | {
3503
+ type: "question";
3504
+ text: string;
3505
+ more?: number | undefined;
3207
3506
  } | undefined;
3507
+ } | {
3508
+ sessionUpdate: "tool_call_update";
3509
+ toolCallId: string;
3510
+ status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
3208
3511
  content?: ({
3209
3512
  type: "content";
3210
3513
  content: {
@@ -3217,9 +3520,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3217
3520
  uri?: string | undefined;
3218
3521
  } | {
3219
3522
  type: "resource_link";
3220
- name: string;
3221
3523
  uri: string;
3222
- kind?: "agent" | "file" | "skill" | undefined;
3524
+ name: string;
3525
+ kind?: "file" | "skill" | "agent" | undefined;
3223
3526
  };
3224
3527
  } | {
3225
3528
  path: string;
@@ -3237,15 +3540,46 @@ export declare const sessionEventSchema: z.ZodObject<{
3237
3540
  terminalId: string;
3238
3541
  })[] | undefined;
3239
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;
3240
3574
  appendOutput?: string | undefined;
3241
3575
  rawOutput?: unknown;
3242
3576
  } | {
3577
+ sessionUpdate: "plan";
3243
3578
  entries: {
3244
3579
  status: "pending" | "in_progress" | "completed";
3245
3580
  content: string;
3246
3581
  priority?: "high" | "medium" | "low" | undefined;
3247
3582
  }[];
3248
- sessionUpdate: "plan";
3249
3583
  } | {
3250
3584
  sessionUpdate: "available_commands_update";
3251
3585
  availableCommands: {
@@ -3270,56 +3604,78 @@ export declare const sessionEventSchema: z.ZodObject<{
3270
3604
  role: "agent" | "thought" | "user";
3271
3605
  parentToolCallId?: string | undefined;
3272
3606
  } | {
3607
+ sessionUpdate: "ls_config";
3273
3608
  options: {
3274
3609
  values: {
3275
3610
  value: string;
3276
3611
  name: string;
3277
3612
  description?: string | undefined;
3278
3613
  }[];
3279
- id: string;
3280
3614
  name: string;
3615
+ id: string;
3281
3616
  current: string;
3282
3617
  category?: "other" | "model" | "mode" | "effort" | undefined;
3283
3618
  }[];
3284
- sessionUpdate: "ls_config";
3285
3619
  } | {
3286
- title: string;
3287
3620
  sessionUpdate: "ls_notice";
3621
+ title: string;
3288
3622
  level: "info" | "warning";
3289
3623
  detail?: string | undefined;
3290
3624
  } | {
3291
- state: "started" | "ended";
3292
3625
  sessionUpdate: "ls_turn";
3626
+ state: "started" | "ended";
3293
3627
  parentToolCallId?: string | undefined;
3294
3628
  turnId?: string | undefined;
3295
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3629
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
3296
3630
  } | {
3631
+ sessionUpdate: "ls_permission";
3297
3632
  options: {
3298
- optionId: string;
3299
3633
  name: string;
3300
3634
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3635
+ optionId: string;
3301
3636
  }[];
3302
3637
  title: string;
3303
3638
  requestId: string;
3304
- sessionUpdate: "ls_permission";
3305
3639
  toolCallId?: string | undefined;
3306
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;
3307
3655
  } | {
3308
- requestId: string;
3309
3656
  sessionUpdate: "ls_permission_resolved";
3657
+ requestId: string;
3310
3658
  optionId?: string | undefined;
3659
+ answers?: {
3660
+ values: string[];
3661
+ id: string;
3662
+ other?: string | undefined;
3663
+ }[] | undefined;
3311
3664
  } | {
3312
- driver: "remote" | "desktop" | "none";
3313
3665
  sessionUpdate: "ls_driver";
3666
+ driver: "desktop" | "remote" | "none";
3314
3667
  deviceId?: string | undefined;
3315
3668
  } | {
3316
- state: "idle" | "running" | "waiting" | "error" | "offline";
3317
3669
  sessionUpdate: "ls_status";
3670
+ state: "error" | "idle" | "running" | "waiting" | "offline";
3318
3671
  } | {
3672
+ sessionUpdate: "ls_error";
3319
3673
  code: string;
3320
3674
  message: string;
3321
- sessionUpdate: "ls_error";
3322
3675
  hint?: string | undefined;
3323
3676
  };
3677
+ sessionId: string;
3678
+ seq: number;
3679
+ ts: number;
3324
3680
  }>;
3325
3681
  export type SessionEvent = z.infer<typeof sessionEventSchema>;