@linkshell/host 0.4.17 → 0.4.18

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 (39) hide show
  1. package/README.md +27 -1
  2. package/dist/host/src/drivers/acp/connection.d.ts +1 -0
  3. package/dist/host/src/drivers/acp/connection.js +6 -0
  4. package/dist/host/src/drivers/acp/connection.js.map +1 -1
  5. package/dist/host/src/drivers/acp/driver.d.ts +10 -5
  6. package/dist/host/src/drivers/acp/driver.js +51 -25
  7. package/dist/host/src/drivers/acp/driver.js.map +1 -1
  8. package/dist/host/src/drivers/acp/questions.d.ts +14 -0
  9. package/dist/host/src/drivers/acp/questions.js +114 -0
  10. package/dist/host/src/drivers/acp/questions.js.map +1 -0
  11. package/dist/host/src/drivers/claude/tasks.d.ts +2 -2
  12. package/dist/host/src/drivers/claude/transcript.d.ts +76 -69
  13. package/dist/host/src/drivers/codex/attention.d.ts +7 -0
  14. package/dist/host/src/drivers/codex/attention.js +82 -0
  15. package/dist/host/src/drivers/codex/attention.js.map +1 -0
  16. package/dist/host/src/drivers/codex/driver.d.ts +2 -0
  17. package/dist/host/src/drivers/codex/driver.js +45 -2
  18. package/dist/host/src/drivers/codex/driver.js.map +1 -1
  19. package/dist/host/src/drivers/types.d.ts +2 -1
  20. package/dist/host/src/hub.d.ts +3 -1
  21. package/dist/host/src/hub.js +33 -3
  22. package/dist/host/src/hub.js.map +1 -1
  23. package/dist/host/tsconfig.tsbuildinfo +1 -1
  24. package/dist/wire/src/async-questions.d.ts +40 -0
  25. package/dist/wire/src/async-questions.js +66 -0
  26. package/dist/wire/src/async-questions.js.map +1 -0
  27. package/dist/wire/src/goal.d.ts +2 -2
  28. package/dist/wire/src/index.d.ts +1 -0
  29. package/dist/wire/src/index.js +1 -0
  30. package/dist/wire/src/index.js.map +1 -1
  31. package/dist/wire/src/model.d.ts +108 -84
  32. package/dist/wire/src/model.js +3 -0
  33. package/dist/wire/src/model.js.map +1 -1
  34. package/dist/wire/src/rpc.d.ts +2110 -1722
  35. package/dist/wire/src/updates.d.ts +633 -561
  36. package/dist/wire/src/updates.js +6 -1
  37. package/dist/wire/src/updates.js.map +1 -1
  38. package/dist/wire/src/workflow.d.ts +8 -8
  39. package/package.json +2 -2
@@ -33,12 +33,12 @@ export declare const contentBlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
33
33
  type: "resource_link";
34
34
  name: string;
35
35
  uri: string;
36
- kind?: "agent" | "file" | "skill" | undefined;
36
+ kind?: "file" | "skill" | "agent" | undefined;
37
37
  }, {
38
38
  type: "resource_link";
39
39
  name: string;
40
40
  uri: string;
41
- kind?: "agent" | "file" | "skill" | undefined;
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"]>;
@@ -79,12 +79,12 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
79
79
  type: "resource_link";
80
80
  name: string;
81
81
  uri: string;
82
- kind?: "agent" | "file" | "skill" | undefined;
82
+ kind?: "file" | "skill" | "agent" | undefined;
83
83
  }, {
84
84
  type: "resource_link";
85
85
  name: string;
86
86
  uri: string;
87
- kind?: "agent" | "file" | "skill" | undefined;
87
+ kind?: "file" | "skill" | "agent" | undefined;
88
88
  }>]>;
89
89
  }, "strip", z.ZodTypeAny, {
90
90
  type: "content";
@@ -100,7 +100,7 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
100
100
  type: "resource_link";
101
101
  name: string;
102
102
  uri: string;
103
- kind?: "agent" | "file" | "skill" | undefined;
103
+ kind?: "file" | "skill" | "agent" | undefined;
104
104
  };
105
105
  }, {
106
106
  type: "content";
@@ -116,7 +116,7 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
116
116
  type: "resource_link";
117
117
  name: string;
118
118
  uri: string;
119
- kind?: "agent" | "file" | "skill" | undefined;
119
+ kind?: "file" | "skill" | "agent" | undefined;
120
120
  };
121
121
  }>, z.ZodObject<{
122
122
  type: z.ZodLiteral<"diff">;
@@ -143,13 +143,13 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
143
143
  path: string;
144
144
  type: "patch";
145
145
  diff: string;
146
- change: "delete" | "add" | "update";
146
+ change: "add" | "delete" | "update";
147
147
  movePath?: string | undefined;
148
148
  }, {
149
149
  path: string;
150
150
  type: "patch";
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. */
@@ -242,7 +242,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
242
242
  }, "strip", z.ZodTypeAny, {
243
243
  id: string;
244
244
  title: string;
245
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
245
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
246
246
  toolCallId?: string | undefined;
247
247
  phaseId?: string | undefined;
248
248
  model?: string | undefined;
@@ -255,7 +255,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
255
255
  }, {
256
256
  id: string;
257
257
  title: string;
258
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
258
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
259
259
  toolCallId?: string | undefined;
260
260
  phaseId?: string | undefined;
261
261
  model?: string | undefined;
@@ -268,7 +268,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
268
268
  }>, "many">>;
269
269
  }, "strip", z.ZodTypeAny, {
270
270
  completed?: number | undefined;
271
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
271
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
272
272
  tokens?: number | undefined;
273
273
  durationMs?: number | undefined;
274
274
  startedAt?: number | undefined;
@@ -284,7 +284,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
284
284
  agents?: {
285
285
  id: string;
286
286
  title: string;
287
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
287
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
288
288
  toolCallId?: string | undefined;
289
289
  phaseId?: string | undefined;
290
290
  model?: string | undefined;
@@ -297,7 +297,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
297
297
  }[] | undefined;
298
298
  }, {
299
299
  completed?: number | undefined;
300
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
300
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
301
301
  tokens?: number | undefined;
302
302
  durationMs?: number | undefined;
303
303
  startedAt?: number | undefined;
@@ -313,7 +313,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
313
313
  agents?: {
314
314
  id: string;
315
315
  title: string;
316
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
316
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
317
317
  toolCallId?: string | undefined;
318
318
  phaseId?: string | undefined;
319
319
  model?: string | undefined;
@@ -328,14 +328,14 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
328
328
  }, "strip", z.ZodTypeAny, {
329
329
  type: "subagent";
330
330
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
331
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
331
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
332
332
  model?: string | undefined;
333
333
  name?: string | undefined;
334
334
  task?: string | undefined;
335
335
  agentType?: string | undefined;
336
336
  workflow?: {
337
337
  completed?: number | undefined;
338
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
338
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
339
339
  tokens?: number | undefined;
340
340
  durationMs?: number | undefined;
341
341
  startedAt?: number | undefined;
@@ -351,7 +351,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
351
351
  agents?: {
352
352
  id: string;
353
353
  title: string;
354
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
354
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
355
355
  toolCallId?: string | undefined;
356
356
  phaseId?: string | undefined;
357
357
  model?: string | undefined;
@@ -365,14 +365,15 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
365
365
  } | undefined;
366
366
  }, {
367
367
  type: "subagent";
368
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
368
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
369
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
369
370
  model?: string | undefined;
370
371
  name?: string | undefined;
371
372
  task?: string | undefined;
372
373
  agentType?: string | undefined;
373
374
  workflow?: {
374
375
  completed?: number | undefined;
375
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
376
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
376
377
  tokens?: number | undefined;
377
378
  durationMs?: number | undefined;
378
379
  startedAt?: number | undefined;
@@ -388,7 +389,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
388
389
  agents?: {
389
390
  id: string;
390
391
  title: string;
391
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
392
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
392
393
  toolCallId?: string | undefined;
393
394
  phaseId?: string | undefined;
394
395
  model?: string | undefined;
@@ -400,7 +401,6 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
400
401
  result?: string | undefined;
401
402
  }[] | undefined;
402
403
  } | undefined;
403
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
404
404
  }>, z.ZodObject<{
405
405
  type: z.ZodLiteral<"skill">;
406
406
  name: z.ZodString;
@@ -503,7 +503,7 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
503
503
  }[];
504
504
  id: string;
505
505
  name: string;
506
- category: "model" | "other" | "mode" | "effort";
506
+ category: "model" | "mode" | "effort" | "other";
507
507
  current: string;
508
508
  }, {
509
509
  values: {
@@ -514,7 +514,7 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
514
514
  id: string;
515
515
  name: string;
516
516
  current: string;
517
- category?: "model" | "other" | "mode" | "effort" | undefined;
517
+ category?: "model" | "mode" | "effort" | "other" | undefined;
518
518
  }>;
519
519
  export type SessionConfigOption = z.infer<typeof sessionConfigOptionSchema>;
520
520
  export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate", [z.ZodObject<{
@@ -554,12 +554,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
554
554
  type: "resource_link";
555
555
  name: string;
556
556
  uri: string;
557
- kind?: "agent" | "file" | "skill" | undefined;
557
+ kind?: "file" | "skill" | "agent" | undefined;
558
558
  }, {
559
559
  type: "resource_link";
560
560
  name: string;
561
561
  uri: string;
562
- kind?: "agent" | "file" | "skill" | undefined;
562
+ kind?: "file" | "skill" | "agent" | undefined;
563
563
  }>]>;
564
564
  }, "strip", z.ZodTypeAny, {
565
565
  content: {
@@ -574,7 +574,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
574
574
  type: "resource_link";
575
575
  name: string;
576
576
  uri: string;
577
- kind?: "agent" | "file" | "skill" | undefined;
577
+ kind?: "file" | "skill" | "agent" | undefined;
578
578
  };
579
579
  sessionUpdate: "user_message_chunk";
580
580
  messageId?: string | undefined;
@@ -591,7 +591,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
591
591
  type: "resource_link";
592
592
  name: string;
593
593
  uri: string;
594
- kind?: "agent" | "file" | "skill" | undefined;
594
+ kind?: "file" | "skill" | "agent" | undefined;
595
595
  };
596
596
  sessionUpdate: "user_message_chunk";
597
597
  messageId?: string | undefined;
@@ -633,12 +633,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
633
633
  type: "resource_link";
634
634
  name: string;
635
635
  uri: string;
636
- kind?: "agent" | "file" | "skill" | undefined;
636
+ kind?: "file" | "skill" | "agent" | undefined;
637
637
  }, {
638
638
  type: "resource_link";
639
639
  name: string;
640
640
  uri: string;
641
- kind?: "agent" | "file" | "skill" | undefined;
641
+ kind?: "file" | "skill" | "agent" | undefined;
642
642
  }>]>;
643
643
  }, "strip", z.ZodTypeAny, {
644
644
  content: {
@@ -653,7 +653,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
653
653
  type: "resource_link";
654
654
  name: string;
655
655
  uri: string;
656
- kind?: "agent" | "file" | "skill" | undefined;
656
+ kind?: "file" | "skill" | "agent" | undefined;
657
657
  };
658
658
  sessionUpdate: "agent_message_chunk";
659
659
  messageId: string;
@@ -671,7 +671,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
671
671
  type: "resource_link";
672
672
  name: string;
673
673
  uri: string;
674
- kind?: "agent" | "file" | "skill" | undefined;
674
+ kind?: "file" | "skill" | "agent" | undefined;
675
675
  };
676
676
  sessionUpdate: "agent_message_chunk";
677
677
  messageId: string;
@@ -714,12 +714,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
714
714
  type: "resource_link";
715
715
  name: string;
716
716
  uri: string;
717
- kind?: "agent" | "file" | "skill" | undefined;
717
+ kind?: "file" | "skill" | "agent" | undefined;
718
718
  }, {
719
719
  type: "resource_link";
720
720
  name: string;
721
721
  uri: string;
722
- kind?: "agent" | "file" | "skill" | undefined;
722
+ kind?: "file" | "skill" | "agent" | undefined;
723
723
  }>]>;
724
724
  }, "strip", z.ZodTypeAny, {
725
725
  content: {
@@ -734,7 +734,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
734
734
  type: "resource_link";
735
735
  name: string;
736
736
  uri: string;
737
- kind?: "agent" | "file" | "skill" | undefined;
737
+ kind?: "file" | "skill" | "agent" | undefined;
738
738
  };
739
739
  sessionUpdate: "agent_thought_chunk";
740
740
  messageId: string;
@@ -752,7 +752,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
752
752
  type: "resource_link";
753
753
  name: string;
754
754
  uri: string;
755
- kind?: "agent" | "file" | "skill" | undefined;
755
+ kind?: "file" | "skill" | "agent" | undefined;
756
756
  };
757
757
  sessionUpdate: "agent_thought_chunk";
758
758
  messageId: string;
@@ -802,12 +802,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
802
802
  type: "resource_link";
803
803
  name: string;
804
804
  uri: string;
805
- kind?: "agent" | "file" | "skill" | undefined;
805
+ kind?: "file" | "skill" | "agent" | undefined;
806
806
  }, {
807
807
  type: "resource_link";
808
808
  name: string;
809
809
  uri: string;
810
- kind?: "agent" | "file" | "skill" | undefined;
810
+ kind?: "file" | "skill" | "agent" | undefined;
811
811
  }>]>;
812
812
  }, "strip", z.ZodTypeAny, {
813
813
  type: "content";
@@ -823,7 +823,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
823
823
  type: "resource_link";
824
824
  name: string;
825
825
  uri: string;
826
- kind?: "agent" | "file" | "skill" | undefined;
826
+ kind?: "file" | "skill" | "agent" | undefined;
827
827
  };
828
828
  }, {
829
829
  type: "content";
@@ -839,7 +839,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
839
839
  type: "resource_link";
840
840
  name: string;
841
841
  uri: string;
842
- kind?: "agent" | "file" | "skill" | undefined;
842
+ kind?: "file" | "skill" | "agent" | undefined;
843
843
  };
844
844
  }>, z.ZodObject<{
845
845
  type: z.ZodLiteral<"diff">;
@@ -866,13 +866,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
866
866
  path: string;
867
867
  type: "patch";
868
868
  diff: string;
869
- change: "delete" | "add" | "update";
869
+ change: "add" | "delete" | "update";
870
870
  movePath?: string | undefined;
871
871
  }, {
872
872
  path: string;
873
873
  type: "patch";
874
874
  diff: string;
875
- change: "delete" | "add" | "update";
875
+ change: "add" | "delete" | "update";
876
876
  movePath?: string | undefined;
877
877
  }>, z.ZodObject<{
878
878
  type: z.ZodLiteral<"terminal">;
@@ -900,12 +900,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
900
900
  tool: z.ZodString;
901
901
  }, "strip", z.ZodTypeAny, {
902
902
  type: "mcp";
903
- tool: string;
904
903
  server: string;
904
+ tool: string;
905
905
  }, {
906
906
  type: "mcp";
907
- tool: string;
908
907
  server: string;
908
+ tool: string;
909
909
  }>, z.ZodObject<{
910
910
  type: z.ZodLiteral<"subagent">;
911
911
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -958,7 +958,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
958
958
  }, "strip", z.ZodTypeAny, {
959
959
  id: string;
960
960
  title: string;
961
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
961
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
962
962
  toolCallId?: string | undefined;
963
963
  phaseId?: string | undefined;
964
964
  model?: string | undefined;
@@ -971,7 +971,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
971
971
  }, {
972
972
  id: string;
973
973
  title: string;
974
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
974
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
975
975
  toolCallId?: string | undefined;
976
976
  phaseId?: string | undefined;
977
977
  model?: string | undefined;
@@ -984,7 +984,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
984
984
  }>, "many">>;
985
985
  }, "strip", z.ZodTypeAny, {
986
986
  completed?: number | undefined;
987
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
987
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
988
988
  tokens?: number | undefined;
989
989
  durationMs?: number | undefined;
990
990
  startedAt?: number | undefined;
@@ -1000,7 +1000,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1000
1000
  agents?: {
1001
1001
  id: string;
1002
1002
  title: string;
1003
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1003
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1004
1004
  toolCallId?: string | undefined;
1005
1005
  phaseId?: string | undefined;
1006
1006
  model?: string | undefined;
@@ -1013,7 +1013,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1013
1013
  }[] | undefined;
1014
1014
  }, {
1015
1015
  completed?: number | undefined;
1016
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1016
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1017
1017
  tokens?: number | undefined;
1018
1018
  durationMs?: number | undefined;
1019
1019
  startedAt?: number | undefined;
@@ -1029,7 +1029,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1029
1029
  agents?: {
1030
1030
  id: string;
1031
1031
  title: string;
1032
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1032
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1033
1033
  toolCallId?: string | undefined;
1034
1034
  phaseId?: string | undefined;
1035
1035
  model?: string | undefined;
@@ -1044,14 +1044,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1044
1044
  }, "strip", z.ZodTypeAny, {
1045
1045
  type: "subagent";
1046
1046
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
1047
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1047
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1048
1048
  model?: string | undefined;
1049
1049
  name?: string | undefined;
1050
1050
  task?: string | undefined;
1051
1051
  agentType?: string | undefined;
1052
1052
  workflow?: {
1053
1053
  completed?: number | undefined;
1054
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1054
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1055
1055
  tokens?: number | undefined;
1056
1056
  durationMs?: number | undefined;
1057
1057
  startedAt?: number | undefined;
@@ -1067,7 +1067,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1067
1067
  agents?: {
1068
1068
  id: string;
1069
1069
  title: string;
1070
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1070
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1071
1071
  toolCallId?: string | undefined;
1072
1072
  phaseId?: string | undefined;
1073
1073
  model?: string | undefined;
@@ -1081,14 +1081,15 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1081
1081
  } | undefined;
1082
1082
  }, {
1083
1083
  type: "subagent";
1084
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1084
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1085
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1085
1086
  model?: string | undefined;
1086
1087
  name?: string | undefined;
1087
1088
  task?: string | undefined;
1088
1089
  agentType?: string | undefined;
1089
1090
  workflow?: {
1090
1091
  completed?: number | undefined;
1091
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1092
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1092
1093
  tokens?: number | undefined;
1093
1094
  durationMs?: number | undefined;
1094
1095
  startedAt?: number | undefined;
@@ -1104,7 +1105,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1104
1105
  agents?: {
1105
1106
  id: string;
1106
1107
  title: string;
1107
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1108
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1108
1109
  toolCallId?: string | undefined;
1109
1110
  phaseId?: string | undefined;
1110
1111
  model?: string | undefined;
@@ -1116,7 +1117,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1116
1117
  result?: string | undefined;
1117
1118
  }[] | undefined;
1118
1119
  } | undefined;
1119
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1120
1120
  }>, z.ZodObject<{
1121
1121
  type: z.ZodLiteral<"skill">;
1122
1122
  name: z.ZodString;
@@ -1179,23 +1179,60 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1179
1179
  status: "completed" | "failed" | "pending" | "in_progress";
1180
1180
  toolCallId: string;
1181
1181
  title: string;
1182
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
1182
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
1183
1183
  sessionUpdate: "tool_call";
1184
+ content?: ({
1185
+ type: "content";
1186
+ content: {
1187
+ type: "text";
1188
+ text: string;
1189
+ } | {
1190
+ type: "image";
1191
+ mimeType: string;
1192
+ data?: string | undefined;
1193
+ uri?: string | undefined;
1194
+ } | {
1195
+ type: "resource_link";
1196
+ name: string;
1197
+ uri: string;
1198
+ kind?: "file" | "skill" | "agent" | undefined;
1199
+ };
1200
+ } | {
1201
+ path: string;
1202
+ type: "diff";
1203
+ newText: string;
1204
+ oldText?: string | null | undefined;
1205
+ } | {
1206
+ path: string;
1207
+ type: "patch";
1208
+ diff: string;
1209
+ change: "add" | "delete" | "update";
1210
+ movePath?: string | undefined;
1211
+ } | {
1212
+ type: "terminal";
1213
+ terminalId: string;
1214
+ })[] | undefined;
1215
+ parentToolCallId?: string | undefined;
1216
+ rawInput?: unknown;
1217
+ locations?: {
1218
+ path: string;
1219
+ line?: number | undefined;
1220
+ }[] | undefined;
1184
1221
  detail?: {
1185
1222
  type: "mcp";
1186
- tool: string;
1187
1223
  server: string;
1224
+ tool: string;
1188
1225
  } | {
1189
1226
  type: "subagent";
1190
1227
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
1191
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1228
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1192
1229
  model?: string | undefined;
1193
1230
  name?: string | undefined;
1194
1231
  task?: string | undefined;
1195
1232
  agentType?: string | undefined;
1196
1233
  workflow?: {
1197
1234
  completed?: number | undefined;
1198
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1235
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1199
1236
  tokens?: number | undefined;
1200
1237
  durationMs?: number | undefined;
1201
1238
  startedAt?: number | undefined;
@@ -1211,7 +1248,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1211
1248
  agents?: {
1212
1249
  id: string;
1213
1250
  title: string;
1214
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1251
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1215
1252
  toolCallId?: string | undefined;
1216
1253
  phaseId?: string | undefined;
1217
1254
  model?: string | undefined;
@@ -1243,7 +1280,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1243
1280
  text: string;
1244
1281
  more?: number | undefined;
1245
1282
  } | undefined;
1246
- parentToolCallId?: string | undefined;
1283
+ }, {
1284
+ status: "completed" | "failed" | "pending" | "in_progress";
1285
+ toolCallId: string;
1286
+ title: string;
1287
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
1288
+ sessionUpdate: "tool_call";
1247
1289
  content?: ({
1248
1290
  type: "content";
1249
1291
  content: {
@@ -1258,7 +1300,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1258
1300
  type: "resource_link";
1259
1301
  name: string;
1260
1302
  uri: string;
1261
- kind?: "agent" | "file" | "skill" | undefined;
1303
+ kind?: "file" | "skill" | "agent" | undefined;
1262
1304
  };
1263
1305
  } | {
1264
1306
  path: string;
@@ -1269,37 +1311,33 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1269
1311
  path: string;
1270
1312
  type: "patch";
1271
1313
  diff: string;
1272
- change: "delete" | "add" | "update";
1314
+ change: "add" | "delete" | "update";
1273
1315
  movePath?: string | undefined;
1274
1316
  } | {
1275
1317
  type: "terminal";
1276
1318
  terminalId: string;
1277
1319
  })[] | undefined;
1320
+ parentToolCallId?: string | undefined;
1278
1321
  rawInput?: unknown;
1279
1322
  locations?: {
1280
1323
  path: string;
1281
1324
  line?: number | undefined;
1282
1325
  }[] | undefined;
1283
- }, {
1284
- status: "completed" | "failed" | "pending" | "in_progress";
1285
- toolCallId: string;
1286
- title: string;
1287
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
1288
- sessionUpdate: "tool_call";
1289
1326
  detail?: {
1290
1327
  type: "mcp";
1291
- tool: string;
1292
1328
  server: string;
1329
+ tool: string;
1293
1330
  } | {
1294
1331
  type: "subagent";
1295
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1332
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1333
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1296
1334
  model?: string | undefined;
1297
1335
  name?: string | undefined;
1298
1336
  task?: string | undefined;
1299
1337
  agentType?: string | undefined;
1300
1338
  workflow?: {
1301
1339
  completed?: number | undefined;
1302
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1340
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1303
1341
  tokens?: number | undefined;
1304
1342
  durationMs?: number | undefined;
1305
1343
  startedAt?: number | undefined;
@@ -1315,7 +1353,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1315
1353
  agents?: {
1316
1354
  id: string;
1317
1355
  title: string;
1318
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1356
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1319
1357
  toolCallId?: string | undefined;
1320
1358
  phaseId?: string | undefined;
1321
1359
  model?: string | undefined;
@@ -1327,7 +1365,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1327
1365
  result?: string | undefined;
1328
1366
  }[] | undefined;
1329
1367
  } | undefined;
1330
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1331
1368
  } | {
1332
1369
  type: "skill";
1333
1370
  name: string;
@@ -1348,43 +1385,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1348
1385
  text: string;
1349
1386
  more?: number | undefined;
1350
1387
  } | undefined;
1351
- parentToolCallId?: string | undefined;
1352
- content?: ({
1353
- type: "content";
1354
- content: {
1355
- type: "text";
1356
- text: string;
1357
- } | {
1358
- type: "image";
1359
- mimeType: string;
1360
- data?: string | undefined;
1361
- uri?: string | undefined;
1362
- } | {
1363
- type: "resource_link";
1364
- name: string;
1365
- uri: string;
1366
- kind?: "agent" | "file" | "skill" | undefined;
1367
- };
1368
- } | {
1369
- path: string;
1370
- type: "diff";
1371
- newText: string;
1372
- oldText?: string | null | undefined;
1373
- } | {
1374
- path: string;
1375
- type: "patch";
1376
- diff: string;
1377
- change: "delete" | "add" | "update";
1378
- movePath?: string | undefined;
1379
- } | {
1380
- type: "terminal";
1381
- terminalId: string;
1382
- })[] | undefined;
1383
- rawInput?: unknown;
1384
- locations?: {
1385
- path: string;
1386
- line?: number | undefined;
1387
- }[] | undefined;
1388
1388
  }>, z.ZodObject<{
1389
1389
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
1390
1390
  toolCallId: z.ZodString;
@@ -1397,12 +1397,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1397
1397
  tool: z.ZodString;
1398
1398
  }, "strip", z.ZodTypeAny, {
1399
1399
  type: "mcp";
1400
- tool: string;
1401
1400
  server: string;
1401
+ tool: string;
1402
1402
  }, {
1403
1403
  type: "mcp";
1404
- tool: string;
1405
1404
  server: string;
1405
+ tool: string;
1406
1406
  }>, z.ZodObject<{
1407
1407
  type: z.ZodLiteral<"subagent">;
1408
1408
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -1455,7 +1455,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1455
1455
  }, "strip", z.ZodTypeAny, {
1456
1456
  id: string;
1457
1457
  title: string;
1458
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1458
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1459
1459
  toolCallId?: string | undefined;
1460
1460
  phaseId?: string | undefined;
1461
1461
  model?: string | undefined;
@@ -1468,7 +1468,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1468
1468
  }, {
1469
1469
  id: string;
1470
1470
  title: string;
1471
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1471
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1472
1472
  toolCallId?: string | undefined;
1473
1473
  phaseId?: string | undefined;
1474
1474
  model?: string | undefined;
@@ -1481,7 +1481,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1481
1481
  }>, "many">>;
1482
1482
  }, "strip", z.ZodTypeAny, {
1483
1483
  completed?: number | undefined;
1484
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1484
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1485
1485
  tokens?: number | undefined;
1486
1486
  durationMs?: number | undefined;
1487
1487
  startedAt?: number | undefined;
@@ -1497,7 +1497,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1497
1497
  agents?: {
1498
1498
  id: string;
1499
1499
  title: string;
1500
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1500
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1501
1501
  toolCallId?: string | undefined;
1502
1502
  phaseId?: string | undefined;
1503
1503
  model?: string | undefined;
@@ -1510,7 +1510,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1510
1510
  }[] | undefined;
1511
1511
  }, {
1512
1512
  completed?: number | undefined;
1513
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1513
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1514
1514
  tokens?: number | undefined;
1515
1515
  durationMs?: number | undefined;
1516
1516
  startedAt?: number | undefined;
@@ -1526,7 +1526,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1526
1526
  agents?: {
1527
1527
  id: string;
1528
1528
  title: string;
1529
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1529
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1530
1530
  toolCallId?: string | undefined;
1531
1531
  phaseId?: string | undefined;
1532
1532
  model?: string | undefined;
@@ -1541,14 +1541,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1541
1541
  }, "strip", z.ZodTypeAny, {
1542
1542
  type: "subagent";
1543
1543
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
1544
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1544
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1545
1545
  model?: string | undefined;
1546
1546
  name?: string | undefined;
1547
1547
  task?: string | undefined;
1548
1548
  agentType?: string | undefined;
1549
1549
  workflow?: {
1550
1550
  completed?: number | undefined;
1551
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1551
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1552
1552
  tokens?: number | undefined;
1553
1553
  durationMs?: number | undefined;
1554
1554
  startedAt?: number | undefined;
@@ -1564,7 +1564,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1564
1564
  agents?: {
1565
1565
  id: string;
1566
1566
  title: string;
1567
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1567
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1568
1568
  toolCallId?: string | undefined;
1569
1569
  phaseId?: string | undefined;
1570
1570
  model?: string | undefined;
@@ -1578,14 +1578,15 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1578
1578
  } | undefined;
1579
1579
  }, {
1580
1580
  type: "subagent";
1581
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1581
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1582
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1582
1583
  model?: string | undefined;
1583
1584
  name?: string | undefined;
1584
1585
  task?: string | undefined;
1585
1586
  agentType?: string | undefined;
1586
1587
  workflow?: {
1587
1588
  completed?: number | undefined;
1588
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1589
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1589
1590
  tokens?: number | undefined;
1590
1591
  durationMs?: number | undefined;
1591
1592
  startedAt?: number | undefined;
@@ -1601,7 +1602,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1601
1602
  agents?: {
1602
1603
  id: string;
1603
1604
  title: string;
1604
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1605
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1605
1606
  toolCallId?: string | undefined;
1606
1607
  phaseId?: string | undefined;
1607
1608
  model?: string | undefined;
@@ -1613,7 +1614,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1613
1614
  result?: string | undefined;
1614
1615
  }[] | undefined;
1615
1616
  } | undefined;
1616
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1617
1617
  }>, z.ZodObject<{
1618
1618
  type: z.ZodLiteral<"skill">;
1619
1619
  name: z.ZodString;
@@ -1709,12 +1709,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1709
1709
  type: "resource_link";
1710
1710
  name: string;
1711
1711
  uri: string;
1712
- kind?: "agent" | "file" | "skill" | undefined;
1712
+ kind?: "file" | "skill" | "agent" | undefined;
1713
1713
  }, {
1714
1714
  type: "resource_link";
1715
1715
  name: string;
1716
1716
  uri: string;
1717
- kind?: "agent" | "file" | "skill" | undefined;
1717
+ kind?: "file" | "skill" | "agent" | undefined;
1718
1718
  }>]>;
1719
1719
  }, "strip", z.ZodTypeAny, {
1720
1720
  type: "content";
@@ -1730,7 +1730,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1730
1730
  type: "resource_link";
1731
1731
  name: string;
1732
1732
  uri: string;
1733
- kind?: "agent" | "file" | "skill" | undefined;
1733
+ kind?: "file" | "skill" | "agent" | undefined;
1734
1734
  };
1735
1735
  }, {
1736
1736
  type: "content";
@@ -1746,7 +1746,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1746
1746
  type: "resource_link";
1747
1747
  name: string;
1748
1748
  uri: string;
1749
- kind?: "agent" | "file" | "skill" | undefined;
1749
+ kind?: "file" | "skill" | "agent" | undefined;
1750
1750
  };
1751
1751
  }>, z.ZodObject<{
1752
1752
  type: z.ZodLiteral<"diff">;
@@ -1773,13 +1773,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1773
1773
  path: string;
1774
1774
  type: "patch";
1775
1775
  diff: string;
1776
- change: "delete" | "add" | "update";
1776
+ change: "add" | "delete" | "update";
1777
1777
  movePath?: string | undefined;
1778
1778
  }, {
1779
1779
  path: string;
1780
1780
  type: "patch";
1781
1781
  diff: string;
1782
- change: "delete" | "add" | "update";
1782
+ change: "add" | "delete" | "update";
1783
1783
  movePath?: string | undefined;
1784
1784
  }>, z.ZodObject<{
1785
1785
  type: z.ZodLiteral<"terminal">;
@@ -1799,21 +1799,53 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1799
1799
  sessionUpdate: "tool_call_update";
1800
1800
  status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
1801
1801
  title?: string | undefined;
1802
+ content?: ({
1803
+ type: "content";
1804
+ content: {
1805
+ type: "text";
1806
+ text: string;
1807
+ } | {
1808
+ type: "image";
1809
+ mimeType: string;
1810
+ data?: string | undefined;
1811
+ uri?: string | undefined;
1812
+ } | {
1813
+ type: "resource_link";
1814
+ name: string;
1815
+ uri: string;
1816
+ kind?: "file" | "skill" | "agent" | undefined;
1817
+ };
1818
+ } | {
1819
+ path: string;
1820
+ type: "diff";
1821
+ newText: string;
1822
+ oldText?: string | null | undefined;
1823
+ } | {
1824
+ path: string;
1825
+ type: "patch";
1826
+ diff: string;
1827
+ change: "add" | "delete" | "update";
1828
+ movePath?: string | undefined;
1829
+ } | {
1830
+ type: "terminal";
1831
+ terminalId: string;
1832
+ })[] | undefined;
1833
+ parentToolCallId?: string | undefined;
1802
1834
  detail?: {
1803
1835
  type: "mcp";
1804
- tool: string;
1805
1836
  server: string;
1837
+ tool: string;
1806
1838
  } | {
1807
1839
  type: "subagent";
1808
1840
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
1809
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1841
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1810
1842
  model?: string | undefined;
1811
1843
  name?: string | undefined;
1812
1844
  task?: string | undefined;
1813
1845
  agentType?: string | undefined;
1814
1846
  workflow?: {
1815
1847
  completed?: number | undefined;
1816
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1848
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1817
1849
  tokens?: number | undefined;
1818
1850
  durationMs?: number | undefined;
1819
1851
  startedAt?: number | undefined;
@@ -1829,7 +1861,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1829
1861
  agents?: {
1830
1862
  id: string;
1831
1863
  title: string;
1832
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1864
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1833
1865
  toolCallId?: string | undefined;
1834
1866
  phaseId?: string | undefined;
1835
1867
  model?: string | undefined;
@@ -1861,7 +1893,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1861
1893
  text: string;
1862
1894
  more?: number | undefined;
1863
1895
  } | undefined;
1864
- parentToolCallId?: string | undefined;
1896
+ appendOutput?: string | undefined;
1897
+ rawOutput?: unknown;
1898
+ }, {
1899
+ toolCallId: string;
1900
+ sessionUpdate: "tool_call_update";
1901
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
1902
+ title?: string | undefined;
1865
1903
  content?: ({
1866
1904
  type: "content";
1867
1905
  content: {
@@ -1876,7 +1914,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1876
1914
  type: "resource_link";
1877
1915
  name: string;
1878
1916
  uri: string;
1879
- kind?: "agent" | "file" | "skill" | undefined;
1917
+ kind?: "file" | "skill" | "agent" | undefined;
1880
1918
  };
1881
1919
  } | {
1882
1920
  path: string;
@@ -1887,33 +1925,28 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1887
1925
  path: string;
1888
1926
  type: "patch";
1889
1927
  diff: string;
1890
- change: "delete" | "add" | "update";
1928
+ change: "add" | "delete" | "update";
1891
1929
  movePath?: string | undefined;
1892
1930
  } | {
1893
1931
  type: "terminal";
1894
1932
  terminalId: string;
1895
1933
  })[] | undefined;
1896
- appendOutput?: string | undefined;
1897
- rawOutput?: unknown;
1898
- }, {
1899
- toolCallId: string;
1900
- sessionUpdate: "tool_call_update";
1901
- status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
1902
- title?: string | undefined;
1934
+ parentToolCallId?: string | undefined;
1903
1935
  detail?: {
1904
1936
  type: "mcp";
1905
- tool: string;
1906
1937
  server: string;
1938
+ tool: string;
1907
1939
  } | {
1908
1940
  type: "subagent";
1909
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1941
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1942
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1910
1943
  model?: string | undefined;
1911
1944
  name?: string | undefined;
1912
1945
  task?: string | undefined;
1913
1946
  agentType?: string | undefined;
1914
1947
  workflow?: {
1915
1948
  completed?: number | undefined;
1916
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1949
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1917
1950
  tokens?: number | undefined;
1918
1951
  durationMs?: number | undefined;
1919
1952
  startedAt?: number | undefined;
@@ -1929,7 +1962,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1929
1962
  agents?: {
1930
1963
  id: string;
1931
1964
  title: string;
1932
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1965
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1933
1966
  toolCallId?: string | undefined;
1934
1967
  phaseId?: string | undefined;
1935
1968
  model?: string | undefined;
@@ -1941,7 +1974,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1941
1974
  result?: string | undefined;
1942
1975
  }[] | undefined;
1943
1976
  } | undefined;
1944
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1945
1977
  } | {
1946
1978
  type: "skill";
1947
1979
  name: string;
@@ -1962,38 +1994,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1962
1994
  text: string;
1963
1995
  more?: number | undefined;
1964
1996
  } | undefined;
1965
- parentToolCallId?: string | undefined;
1966
- content?: ({
1967
- type: "content";
1968
- content: {
1969
- type: "text";
1970
- text: string;
1971
- } | {
1972
- type: "image";
1973
- mimeType: string;
1974
- data?: string | undefined;
1975
- uri?: string | undefined;
1976
- } | {
1977
- type: "resource_link";
1978
- name: string;
1979
- uri: string;
1980
- kind?: "agent" | "file" | "skill" | undefined;
1981
- };
1982
- } | {
1983
- path: string;
1984
- type: "diff";
1985
- newText: string;
1986
- oldText?: string | null | undefined;
1987
- } | {
1988
- path: string;
1989
- type: "patch";
1990
- diff: string;
1991
- change: "delete" | "add" | "update";
1992
- movePath?: string | undefined;
1993
- } | {
1994
- type: "terminal";
1995
- terminalId: string;
1996
- })[] | undefined;
1997
1997
  appendOutput?: string | undefined;
1998
1998
  rawOutput?: unknown;
1999
1999
  }>, z.ZodObject<{
@@ -2036,16 +2036,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2036
2036
  iterations: z.ZodOptional<z.ZodNumber>;
2037
2037
  lastReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2038
2038
  }, "strip", z.ZodTypeAny, {
2039
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2040
2039
  objective: string;
2040
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2041
2041
  tokenBudget?: number | null | undefined;
2042
2042
  tokensUsed?: number | undefined;
2043
2043
  timeUsedSeconds?: number | undefined;
2044
2044
  iterations?: number | undefined;
2045
2045
  lastReason?: string | null | undefined;
2046
2046
  }, {
2047
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2048
2047
  objective: string;
2048
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2049
2049
  tokenBudget?: number | null | undefined;
2050
2050
  tokensUsed?: number | undefined;
2051
2051
  timeUsedSeconds?: number | undefined;
@@ -2055,8 +2055,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2055
2055
  }, "strip", z.ZodTypeAny, {
2056
2056
  sessionUpdate: "ls_goal";
2057
2057
  goal: {
2058
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2059
2058
  objective: string;
2059
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2060
2060
  tokenBudget?: number | null | undefined;
2061
2061
  tokensUsed?: number | undefined;
2062
2062
  timeUsedSeconds?: number | undefined;
@@ -2066,8 +2066,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2066
2066
  }, {
2067
2067
  sessionUpdate: "ls_goal";
2068
2068
  goal: {
2069
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2070
2069
  objective: string;
2070
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2071
2071
  tokenBudget?: number | null | undefined;
2072
2072
  tokensUsed?: number | undefined;
2073
2073
  timeUsedSeconds?: number | undefined;
@@ -2136,6 +2136,35 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2136
2136
  sessionUpdate: "usage_update";
2137
2137
  usedTokens?: number | undefined;
2138
2138
  contextWindow?: number | undefined;
2139
+ }>, z.ZodObject<{
2140
+ sessionUpdate: z.ZodLiteral<"ls_async_questions">;
2141
+ questions: z.ZodArray<z.ZodObject<{
2142
+ id: z.ZodString;
2143
+ title: z.ZodString;
2144
+ options: z.ZodArray<z.ZodString, "many">;
2145
+ }, "strip", z.ZodTypeAny, {
2146
+ options: string[];
2147
+ id: string;
2148
+ title: string;
2149
+ }, {
2150
+ options: string[];
2151
+ id: string;
2152
+ title: string;
2153
+ }>, "many">;
2154
+ }, "strip", z.ZodTypeAny, {
2155
+ sessionUpdate: "ls_async_questions";
2156
+ questions: {
2157
+ options: string[];
2158
+ id: string;
2159
+ title: string;
2160
+ }[];
2161
+ }, {
2162
+ sessionUpdate: "ls_async_questions";
2163
+ questions: {
2164
+ options: string[];
2165
+ id: string;
2166
+ title: string;
2167
+ }[];
2139
2168
  }>, z.ZodObject<{
2140
2169
  sessionUpdate: z.ZodLiteral<"ls_message_done">;
2141
2170
  parentToolCallId: z.ZodOptional<z.ZodString>;
@@ -2163,22 +2192,22 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2163
2192
  sessionUpdate: "ls_message_done";
2164
2193
  messageId: string;
2165
2194
  role: "agent" | "thought" | "user";
2195
+ parentToolCallId?: string | undefined;
2166
2196
  questions?: {
2167
2197
  options: string[];
2168
2198
  id: string;
2169
2199
  title: string;
2170
2200
  }[] | undefined;
2171
- parentToolCallId?: string | undefined;
2172
2201
  }, {
2173
2202
  sessionUpdate: "ls_message_done";
2174
2203
  messageId: string;
2175
2204
  role: "agent" | "thought" | "user";
2205
+ parentToolCallId?: string | undefined;
2176
2206
  questions?: {
2177
2207
  options: string[];
2178
2208
  id: string;
2179
2209
  title: string;
2180
2210
  }[] | undefined;
2181
- parentToolCallId?: string | undefined;
2182
2211
  }>, z.ZodObject<{
2183
2212
  sessionUpdate: z.ZodLiteral<"ls_config">;
2184
2213
  options: z.ZodArray<z.ZodObject<{
@@ -2208,7 +2237,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2208
2237
  }[];
2209
2238
  id: string;
2210
2239
  name: string;
2211
- category: "model" | "other" | "mode" | "effort";
2240
+ category: "model" | "mode" | "effort" | "other";
2212
2241
  current: string;
2213
2242
  }, {
2214
2243
  values: {
@@ -2219,7 +2248,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2219
2248
  id: string;
2220
2249
  name: string;
2221
2250
  current: string;
2222
- category?: "model" | "other" | "mode" | "effort" | undefined;
2251
+ category?: "model" | "mode" | "effort" | "other" | undefined;
2223
2252
  }>, "many">;
2224
2253
  }, "strip", z.ZodTypeAny, {
2225
2254
  options: {
@@ -2230,7 +2259,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2230
2259
  }[];
2231
2260
  id: string;
2232
2261
  name: string;
2233
- category: "model" | "other" | "mode" | "effort";
2262
+ category: "model" | "mode" | "effort" | "other";
2234
2263
  current: string;
2235
2264
  }[];
2236
2265
  sessionUpdate: "ls_config";
@@ -2244,7 +2273,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2244
2273
  id: string;
2245
2274
  name: string;
2246
2275
  current: string;
2247
- category?: "model" | "other" | "mode" | "effort" | undefined;
2276
+ category?: "model" | "mode" | "effort" | "other" | undefined;
2248
2277
  }[];
2249
2278
  sessionUpdate: "ls_config";
2250
2279
  }>, z.ZodObject<{
@@ -2274,13 +2303,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2274
2303
  sessionUpdate: "ls_turn";
2275
2304
  parentToolCallId?: string | undefined;
2276
2305
  turnId?: string | undefined;
2277
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2306
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2278
2307
  }, {
2279
2308
  state: "started" | "ended";
2280
2309
  sessionUpdate: "ls_turn";
2281
2310
  parentToolCallId?: string | undefined;
2282
2311
  turnId?: string | undefined;
2283
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2312
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2284
2313
  }>, z.ZodObject<{
2285
2314
  sessionUpdate: z.ZodLiteral<"ls_permission">;
2286
2315
  requestId: z.ZodString;
@@ -2293,12 +2322,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2293
2322
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
2294
2323
  }, "strip", z.ZodTypeAny, {
2295
2324
  name: string;
2296
- optionId: string;
2297
2325
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2326
+ optionId: string;
2298
2327
  }, {
2299
2328
  name: string;
2300
- optionId: string;
2301
2329
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2330
+ optionId: string;
2302
2331
  }>, "many">;
2303
2332
  /**
2304
2333
  * The agent is asking the user something: answer with `sessions.answer`.
@@ -2328,8 +2357,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2328
2357
  required: z.ZodOptional<z.ZodBoolean>;
2329
2358
  }, "strip", z.ZodTypeAny, {
2330
2359
  id: string;
2331
- kind: "text" | "choice" | "choices";
2332
2360
  text: string;
2361
+ kind: "text" | "choice" | "choices";
2333
2362
  options?: {
2334
2363
  value: string;
2335
2364
  label: string;
@@ -2341,8 +2370,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2341
2370
  required?: boolean | undefined;
2342
2371
  }, {
2343
2372
  id: string;
2344
- kind: "text" | "choice" | "choices";
2345
2373
  text: string;
2374
+ kind: "text" | "choice" | "choices";
2346
2375
  options?: {
2347
2376
  value: string;
2348
2377
  label: string;
@@ -2356,18 +2385,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2356
2385
  }, "strip", z.ZodTypeAny, {
2357
2386
  options: {
2358
2387
  name: string;
2359
- optionId: string;
2360
2388
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2389
+ optionId: string;
2361
2390
  }[];
2362
2391
  title: string;
2363
- requestId: string;
2364
2392
  sessionUpdate: "ls_permission";
2393
+ requestId: string;
2365
2394
  toolCallId?: string | undefined;
2366
2395
  detail?: string | undefined;
2367
2396
  questions?: {
2368
2397
  id: string;
2369
- kind: "text" | "choice" | "choices";
2370
2398
  text: string;
2399
+ kind: "text" | "choice" | "choices";
2371
2400
  options?: {
2372
2401
  value: string;
2373
2402
  label: string;
@@ -2381,18 +2410,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2381
2410
  }, {
2382
2411
  options: {
2383
2412
  name: string;
2384
- optionId: string;
2385
2413
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2414
+ optionId: string;
2386
2415
  }[];
2387
2416
  title: string;
2388
- requestId: string;
2389
2417
  sessionUpdate: "ls_permission";
2418
+ requestId: string;
2390
2419
  toolCallId?: string | undefined;
2391
2420
  detail?: string | undefined;
2392
2421
  questions?: {
2393
2422
  id: string;
2394
- kind: "text" | "choice" | "choices";
2395
2423
  text: string;
2424
+ kind: "text" | "choice" | "choices";
2396
2425
  options?: {
2397
2426
  value: string;
2398
2427
  label: string;
@@ -2422,8 +2451,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2422
2451
  other?: string | undefined;
2423
2452
  }>, "many">>;
2424
2453
  }, "strip", z.ZodTypeAny, {
2425
- requestId: string;
2426
2454
  sessionUpdate: "ls_permission_resolved";
2455
+ requestId: string;
2427
2456
  optionId?: string | undefined;
2428
2457
  answers?: {
2429
2458
  values: string[];
@@ -2431,8 +2460,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2431
2460
  other?: string | undefined;
2432
2461
  }[] | undefined;
2433
2462
  }, {
2434
- requestId: string;
2435
2463
  sessionUpdate: "ls_permission_resolved";
2464
+ requestId: string;
2436
2465
  optionId?: string | undefined;
2437
2466
  answers?: {
2438
2467
  values: string[];
@@ -2444,21 +2473,21 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2444
2473
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
2445
2474
  deviceId: z.ZodOptional<z.ZodString>;
2446
2475
  }, "strip", z.ZodTypeAny, {
2447
- driver: "remote" | "desktop" | "none";
2448
2476
  sessionUpdate: "ls_driver";
2477
+ driver: "desktop" | "remote" | "none";
2449
2478
  deviceId?: string | undefined;
2450
2479
  }, {
2451
- driver: "remote" | "desktop" | "none";
2452
2480
  sessionUpdate: "ls_driver";
2481
+ driver: "desktop" | "remote" | "none";
2453
2482
  deviceId?: string | undefined;
2454
2483
  }>, z.ZodObject<{
2455
2484
  sessionUpdate: z.ZodLiteral<"ls_status">;
2456
2485
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
2457
2486
  }, "strip", z.ZodTypeAny, {
2458
- state: "running" | "idle" | "waiting" | "error" | "offline";
2487
+ state: "running" | "error" | "idle" | "waiting" | "offline";
2459
2488
  sessionUpdate: "ls_status";
2460
2489
  }, {
2461
- state: "running" | "idle" | "waiting" | "error" | "offline";
2490
+ state: "running" | "error" | "idle" | "waiting" | "offline";
2462
2491
  sessionUpdate: "ls_status";
2463
2492
  }>, z.ZodObject<{
2464
2493
  sessionUpdate: z.ZodLiteral<"ls_task">;
@@ -2479,64 +2508,64 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2479
2508
  }, "strip", z.ZodTypeAny, {
2480
2509
  id: string;
2481
2510
  title: string;
2482
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
2511
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
2483
2512
  startedAt: number;
2484
2513
  kind: "shell" | "monitor";
2485
2514
  toolCallId?: string | undefined;
2486
2515
  endedAt?: number | undefined;
2487
- lastSeq?: number | undefined;
2488
2516
  command?: string | undefined;
2489
2517
  summary?: string | undefined;
2490
2518
  exitCode?: number | undefined;
2491
2519
  output?: boolean | undefined;
2492
2520
  canStop?: boolean | undefined;
2521
+ lastSeq?: number | undefined;
2493
2522
  }, {
2494
2523
  id: string;
2495
2524
  title: string;
2496
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
2525
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
2497
2526
  startedAt: number;
2498
2527
  kind: "shell" | "monitor";
2499
2528
  toolCallId?: string | undefined;
2500
2529
  endedAt?: number | undefined;
2501
- lastSeq?: number | undefined;
2502
2530
  command?: string | undefined;
2503
2531
  summary?: string | undefined;
2504
2532
  exitCode?: number | undefined;
2505
2533
  output?: boolean | undefined;
2506
2534
  canStop?: boolean | undefined;
2535
+ lastSeq?: number | undefined;
2507
2536
  }>;
2508
2537
  }, "strip", z.ZodTypeAny, {
2509
2538
  task: {
2510
2539
  id: string;
2511
2540
  title: string;
2512
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
2541
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
2513
2542
  startedAt: number;
2514
2543
  kind: "shell" | "monitor";
2515
2544
  toolCallId?: string | undefined;
2516
2545
  endedAt?: number | undefined;
2517
- lastSeq?: number | undefined;
2518
2546
  command?: string | undefined;
2519
2547
  summary?: string | undefined;
2520
2548
  exitCode?: number | undefined;
2521
2549
  output?: boolean | undefined;
2522
2550
  canStop?: boolean | undefined;
2551
+ lastSeq?: number | undefined;
2523
2552
  };
2524
2553
  sessionUpdate: "ls_task";
2525
2554
  }, {
2526
2555
  task: {
2527
2556
  id: string;
2528
2557
  title: string;
2529
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
2558
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
2530
2559
  startedAt: number;
2531
2560
  kind: "shell" | "monitor";
2532
2561
  toolCallId?: string | undefined;
2533
2562
  endedAt?: number | undefined;
2534
- lastSeq?: number | undefined;
2535
2563
  command?: string | undefined;
2536
2564
  summary?: string | undefined;
2537
2565
  exitCode?: number | undefined;
2538
2566
  output?: boolean | undefined;
2539
2567
  canStop?: boolean | undefined;
2568
+ lastSeq?: number | undefined;
2540
2569
  };
2541
2570
  sessionUpdate: "ls_task";
2542
2571
  }>, z.ZodObject<{
@@ -2599,12 +2628,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2599
2628
  type: "resource_link";
2600
2629
  name: string;
2601
2630
  uri: string;
2602
- kind?: "agent" | "file" | "skill" | undefined;
2631
+ kind?: "file" | "skill" | "agent" | undefined;
2603
2632
  }, {
2604
2633
  type: "resource_link";
2605
2634
  name: string;
2606
2635
  uri: string;
2607
- kind?: "agent" | "file" | "skill" | undefined;
2636
+ kind?: "file" | "skill" | "agent" | undefined;
2608
2637
  }>]>;
2609
2638
  }, "strip", z.ZodTypeAny, {
2610
2639
  content: {
@@ -2619,7 +2648,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2619
2648
  type: "resource_link";
2620
2649
  name: string;
2621
2650
  uri: string;
2622
- kind?: "agent" | "file" | "skill" | undefined;
2651
+ kind?: "file" | "skill" | "agent" | undefined;
2623
2652
  };
2624
2653
  sessionUpdate: "user_message_chunk";
2625
2654
  messageId?: string | undefined;
@@ -2636,7 +2665,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2636
2665
  type: "resource_link";
2637
2666
  name: string;
2638
2667
  uri: string;
2639
- kind?: "agent" | "file" | "skill" | undefined;
2668
+ kind?: "file" | "skill" | "agent" | undefined;
2640
2669
  };
2641
2670
  sessionUpdate: "user_message_chunk";
2642
2671
  messageId?: string | undefined;
@@ -2678,12 +2707,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2678
2707
  type: "resource_link";
2679
2708
  name: string;
2680
2709
  uri: string;
2681
- kind?: "agent" | "file" | "skill" | undefined;
2710
+ kind?: "file" | "skill" | "agent" | undefined;
2682
2711
  }, {
2683
2712
  type: "resource_link";
2684
2713
  name: string;
2685
2714
  uri: string;
2686
- kind?: "agent" | "file" | "skill" | undefined;
2715
+ kind?: "file" | "skill" | "agent" | undefined;
2687
2716
  }>]>;
2688
2717
  }, "strip", z.ZodTypeAny, {
2689
2718
  content: {
@@ -2698,7 +2727,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2698
2727
  type: "resource_link";
2699
2728
  name: string;
2700
2729
  uri: string;
2701
- kind?: "agent" | "file" | "skill" | undefined;
2730
+ kind?: "file" | "skill" | "agent" | undefined;
2702
2731
  };
2703
2732
  sessionUpdate: "agent_message_chunk";
2704
2733
  messageId: string;
@@ -2716,7 +2745,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2716
2745
  type: "resource_link";
2717
2746
  name: string;
2718
2747
  uri: string;
2719
- kind?: "agent" | "file" | "skill" | undefined;
2748
+ kind?: "file" | "skill" | "agent" | undefined;
2720
2749
  };
2721
2750
  sessionUpdate: "agent_message_chunk";
2722
2751
  messageId: string;
@@ -2759,12 +2788,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2759
2788
  type: "resource_link";
2760
2789
  name: string;
2761
2790
  uri: string;
2762
- kind?: "agent" | "file" | "skill" | undefined;
2791
+ kind?: "file" | "skill" | "agent" | undefined;
2763
2792
  }, {
2764
2793
  type: "resource_link";
2765
2794
  name: string;
2766
2795
  uri: string;
2767
- kind?: "agent" | "file" | "skill" | undefined;
2796
+ kind?: "file" | "skill" | "agent" | undefined;
2768
2797
  }>]>;
2769
2798
  }, "strip", z.ZodTypeAny, {
2770
2799
  content: {
@@ -2779,7 +2808,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2779
2808
  type: "resource_link";
2780
2809
  name: string;
2781
2810
  uri: string;
2782
- kind?: "agent" | "file" | "skill" | undefined;
2811
+ kind?: "file" | "skill" | "agent" | undefined;
2783
2812
  };
2784
2813
  sessionUpdate: "agent_thought_chunk";
2785
2814
  messageId: string;
@@ -2797,7 +2826,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2797
2826
  type: "resource_link";
2798
2827
  name: string;
2799
2828
  uri: string;
2800
- kind?: "agent" | "file" | "skill" | undefined;
2829
+ kind?: "file" | "skill" | "agent" | undefined;
2801
2830
  };
2802
2831
  sessionUpdate: "agent_thought_chunk";
2803
2832
  messageId: string;
@@ -2847,12 +2876,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2847
2876
  type: "resource_link";
2848
2877
  name: string;
2849
2878
  uri: string;
2850
- kind?: "agent" | "file" | "skill" | undefined;
2879
+ kind?: "file" | "skill" | "agent" | undefined;
2851
2880
  }, {
2852
2881
  type: "resource_link";
2853
2882
  name: string;
2854
2883
  uri: string;
2855
- kind?: "agent" | "file" | "skill" | undefined;
2884
+ kind?: "file" | "skill" | "agent" | undefined;
2856
2885
  }>]>;
2857
2886
  }, "strip", z.ZodTypeAny, {
2858
2887
  type: "content";
@@ -2868,7 +2897,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2868
2897
  type: "resource_link";
2869
2898
  name: string;
2870
2899
  uri: string;
2871
- kind?: "agent" | "file" | "skill" | undefined;
2900
+ kind?: "file" | "skill" | "agent" | undefined;
2872
2901
  };
2873
2902
  }, {
2874
2903
  type: "content";
@@ -2884,7 +2913,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2884
2913
  type: "resource_link";
2885
2914
  name: string;
2886
2915
  uri: string;
2887
- kind?: "agent" | "file" | "skill" | undefined;
2916
+ kind?: "file" | "skill" | "agent" | undefined;
2888
2917
  };
2889
2918
  }>, z.ZodObject<{
2890
2919
  type: z.ZodLiteral<"diff">;
@@ -2911,13 +2940,13 @@ export declare const sessionEventSchema: z.ZodObject<{
2911
2940
  path: string;
2912
2941
  type: "patch";
2913
2942
  diff: string;
2914
- change: "delete" | "add" | "update";
2943
+ change: "add" | "delete" | "update";
2915
2944
  movePath?: string | undefined;
2916
2945
  }, {
2917
2946
  path: string;
2918
2947
  type: "patch";
2919
2948
  diff: string;
2920
- change: "delete" | "add" | "update";
2949
+ change: "add" | "delete" | "update";
2921
2950
  movePath?: string | undefined;
2922
2951
  }>, z.ZodObject<{
2923
2952
  type: z.ZodLiteral<"terminal">;
@@ -2945,12 +2974,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2945
2974
  tool: z.ZodString;
2946
2975
  }, "strip", z.ZodTypeAny, {
2947
2976
  type: "mcp";
2948
- tool: string;
2949
2977
  server: string;
2978
+ tool: string;
2950
2979
  }, {
2951
2980
  type: "mcp";
2952
- tool: string;
2953
2981
  server: string;
2982
+ tool: string;
2954
2983
  }>, z.ZodObject<{
2955
2984
  type: z.ZodLiteral<"subagent">;
2956
2985
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -3003,7 +3032,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3003
3032
  }, "strip", z.ZodTypeAny, {
3004
3033
  id: string;
3005
3034
  title: string;
3006
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3035
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3007
3036
  toolCallId?: string | undefined;
3008
3037
  phaseId?: string | undefined;
3009
3038
  model?: string | undefined;
@@ -3016,7 +3045,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3016
3045
  }, {
3017
3046
  id: string;
3018
3047
  title: string;
3019
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3048
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3020
3049
  toolCallId?: string | undefined;
3021
3050
  phaseId?: string | undefined;
3022
3051
  model?: string | undefined;
@@ -3029,7 +3058,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3029
3058
  }>, "many">>;
3030
3059
  }, "strip", z.ZodTypeAny, {
3031
3060
  completed?: number | undefined;
3032
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3061
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3033
3062
  tokens?: number | undefined;
3034
3063
  durationMs?: number | undefined;
3035
3064
  startedAt?: number | undefined;
@@ -3045,7 +3074,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3045
3074
  agents?: {
3046
3075
  id: string;
3047
3076
  title: string;
3048
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3077
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3049
3078
  toolCallId?: string | undefined;
3050
3079
  phaseId?: string | undefined;
3051
3080
  model?: string | undefined;
@@ -3058,7 +3087,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3058
3087
  }[] | undefined;
3059
3088
  }, {
3060
3089
  completed?: number | undefined;
3061
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3090
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3062
3091
  tokens?: number | undefined;
3063
3092
  durationMs?: number | undefined;
3064
3093
  startedAt?: number | undefined;
@@ -3074,7 +3103,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3074
3103
  agents?: {
3075
3104
  id: string;
3076
3105
  title: string;
3077
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3106
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3078
3107
  toolCallId?: string | undefined;
3079
3108
  phaseId?: string | undefined;
3080
3109
  model?: string | undefined;
@@ -3089,14 +3118,14 @@ export declare const sessionEventSchema: z.ZodObject<{
3089
3118
  }, "strip", z.ZodTypeAny, {
3090
3119
  type: "subagent";
3091
3120
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
3092
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3121
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3093
3122
  model?: string | undefined;
3094
3123
  name?: string | undefined;
3095
3124
  task?: string | undefined;
3096
3125
  agentType?: string | undefined;
3097
3126
  workflow?: {
3098
3127
  completed?: number | undefined;
3099
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3128
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3100
3129
  tokens?: number | undefined;
3101
3130
  durationMs?: number | undefined;
3102
3131
  startedAt?: number | undefined;
@@ -3112,7 +3141,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3112
3141
  agents?: {
3113
3142
  id: string;
3114
3143
  title: string;
3115
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3144
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3116
3145
  toolCallId?: string | undefined;
3117
3146
  phaseId?: string | undefined;
3118
3147
  model?: string | undefined;
@@ -3126,14 +3155,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3126
3155
  } | undefined;
3127
3156
  }, {
3128
3157
  type: "subagent";
3129
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3158
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3159
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3130
3160
  model?: string | undefined;
3131
3161
  name?: string | undefined;
3132
3162
  task?: string | undefined;
3133
3163
  agentType?: string | undefined;
3134
3164
  workflow?: {
3135
3165
  completed?: number | undefined;
3136
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3166
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3137
3167
  tokens?: number | undefined;
3138
3168
  durationMs?: number | undefined;
3139
3169
  startedAt?: number | undefined;
@@ -3149,7 +3179,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3149
3179
  agents?: {
3150
3180
  id: string;
3151
3181
  title: string;
3152
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3182
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3153
3183
  toolCallId?: string | undefined;
3154
3184
  phaseId?: string | undefined;
3155
3185
  model?: string | undefined;
@@ -3161,7 +3191,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3161
3191
  result?: string | undefined;
3162
3192
  }[] | undefined;
3163
3193
  } | undefined;
3164
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3165
3194
  }>, z.ZodObject<{
3166
3195
  type: z.ZodLiteral<"skill">;
3167
3196
  name: z.ZodString;
@@ -3224,23 +3253,60 @@ export declare const sessionEventSchema: z.ZodObject<{
3224
3253
  status: "completed" | "failed" | "pending" | "in_progress";
3225
3254
  toolCallId: string;
3226
3255
  title: string;
3227
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3256
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
3228
3257
  sessionUpdate: "tool_call";
3229
- detail?: {
3230
- type: "mcp";
3231
- tool: string;
3258
+ content?: ({
3259
+ type: "content";
3260
+ content: {
3261
+ type: "text";
3262
+ text: string;
3263
+ } | {
3264
+ type: "image";
3265
+ mimeType: string;
3266
+ data?: string | undefined;
3267
+ uri?: string | undefined;
3268
+ } | {
3269
+ type: "resource_link";
3270
+ name: string;
3271
+ uri: string;
3272
+ kind?: "file" | "skill" | "agent" | undefined;
3273
+ };
3274
+ } | {
3275
+ path: string;
3276
+ type: "diff";
3277
+ newText: string;
3278
+ oldText?: string | null | undefined;
3279
+ } | {
3280
+ path: string;
3281
+ type: "patch";
3282
+ diff: string;
3283
+ change: "add" | "delete" | "update";
3284
+ movePath?: string | undefined;
3285
+ } | {
3286
+ type: "terminal";
3287
+ terminalId: string;
3288
+ })[] | undefined;
3289
+ parentToolCallId?: string | undefined;
3290
+ rawInput?: unknown;
3291
+ locations?: {
3292
+ path: string;
3293
+ line?: number | undefined;
3294
+ }[] | undefined;
3295
+ detail?: {
3296
+ type: "mcp";
3232
3297
  server: string;
3298
+ tool: string;
3233
3299
  } | {
3234
3300
  type: "subagent";
3235
3301
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
3236
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3302
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3237
3303
  model?: string | undefined;
3238
3304
  name?: string | undefined;
3239
3305
  task?: string | undefined;
3240
3306
  agentType?: string | undefined;
3241
3307
  workflow?: {
3242
3308
  completed?: number | undefined;
3243
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3309
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3244
3310
  tokens?: number | undefined;
3245
3311
  durationMs?: number | undefined;
3246
3312
  startedAt?: number | undefined;
@@ -3256,7 +3322,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3256
3322
  agents?: {
3257
3323
  id: string;
3258
3324
  title: string;
3259
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3325
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3260
3326
  toolCallId?: string | undefined;
3261
3327
  phaseId?: string | undefined;
3262
3328
  model?: string | undefined;
@@ -3288,7 +3354,12 @@ export declare const sessionEventSchema: z.ZodObject<{
3288
3354
  text: string;
3289
3355
  more?: number | undefined;
3290
3356
  } | undefined;
3291
- parentToolCallId?: string | undefined;
3357
+ }, {
3358
+ status: "completed" | "failed" | "pending" | "in_progress";
3359
+ toolCallId: string;
3360
+ title: string;
3361
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
3362
+ sessionUpdate: "tool_call";
3292
3363
  content?: ({
3293
3364
  type: "content";
3294
3365
  content: {
@@ -3303,7 +3374,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3303
3374
  type: "resource_link";
3304
3375
  name: string;
3305
3376
  uri: string;
3306
- kind?: "agent" | "file" | "skill" | undefined;
3377
+ kind?: "file" | "skill" | "agent" | undefined;
3307
3378
  };
3308
3379
  } | {
3309
3380
  path: string;
@@ -3314,37 +3385,33 @@ export declare const sessionEventSchema: z.ZodObject<{
3314
3385
  path: string;
3315
3386
  type: "patch";
3316
3387
  diff: string;
3317
- change: "delete" | "add" | "update";
3388
+ change: "add" | "delete" | "update";
3318
3389
  movePath?: string | undefined;
3319
3390
  } | {
3320
3391
  type: "terminal";
3321
3392
  terminalId: string;
3322
3393
  })[] | undefined;
3394
+ parentToolCallId?: string | undefined;
3323
3395
  rawInput?: unknown;
3324
3396
  locations?: {
3325
3397
  path: string;
3326
3398
  line?: number | undefined;
3327
3399
  }[] | undefined;
3328
- }, {
3329
- status: "completed" | "failed" | "pending" | "in_progress";
3330
- toolCallId: string;
3331
- title: string;
3332
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3333
- sessionUpdate: "tool_call";
3334
3400
  detail?: {
3335
3401
  type: "mcp";
3336
- tool: string;
3337
3402
  server: string;
3403
+ tool: string;
3338
3404
  } | {
3339
3405
  type: "subagent";
3340
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3406
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3407
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3341
3408
  model?: string | undefined;
3342
3409
  name?: string | undefined;
3343
3410
  task?: string | undefined;
3344
3411
  agentType?: string | undefined;
3345
3412
  workflow?: {
3346
3413
  completed?: number | undefined;
3347
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3414
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3348
3415
  tokens?: number | undefined;
3349
3416
  durationMs?: number | undefined;
3350
3417
  startedAt?: number | undefined;
@@ -3360,7 +3427,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3360
3427
  agents?: {
3361
3428
  id: string;
3362
3429
  title: string;
3363
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3430
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3364
3431
  toolCallId?: string | undefined;
3365
3432
  phaseId?: string | undefined;
3366
3433
  model?: string | undefined;
@@ -3372,7 +3439,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3372
3439
  result?: string | undefined;
3373
3440
  }[] | undefined;
3374
3441
  } | undefined;
3375
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3376
3442
  } | {
3377
3443
  type: "skill";
3378
3444
  name: string;
@@ -3393,43 +3459,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3393
3459
  text: string;
3394
3460
  more?: number | undefined;
3395
3461
  } | undefined;
3396
- parentToolCallId?: string | undefined;
3397
- content?: ({
3398
- type: "content";
3399
- content: {
3400
- type: "text";
3401
- text: string;
3402
- } | {
3403
- type: "image";
3404
- mimeType: string;
3405
- data?: string | undefined;
3406
- uri?: string | undefined;
3407
- } | {
3408
- type: "resource_link";
3409
- name: string;
3410
- uri: string;
3411
- kind?: "agent" | "file" | "skill" | undefined;
3412
- };
3413
- } | {
3414
- path: string;
3415
- type: "diff";
3416
- newText: string;
3417
- oldText?: string | null | undefined;
3418
- } | {
3419
- path: string;
3420
- type: "patch";
3421
- diff: string;
3422
- change: "delete" | "add" | "update";
3423
- movePath?: string | undefined;
3424
- } | {
3425
- type: "terminal";
3426
- terminalId: string;
3427
- })[] | undefined;
3428
- rawInput?: unknown;
3429
- locations?: {
3430
- path: string;
3431
- line?: number | undefined;
3432
- }[] | undefined;
3433
3462
  }>, z.ZodObject<{
3434
3463
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
3435
3464
  toolCallId: z.ZodString;
@@ -3442,12 +3471,12 @@ export declare const sessionEventSchema: z.ZodObject<{
3442
3471
  tool: z.ZodString;
3443
3472
  }, "strip", z.ZodTypeAny, {
3444
3473
  type: "mcp";
3445
- tool: string;
3446
3474
  server: string;
3475
+ tool: string;
3447
3476
  }, {
3448
3477
  type: "mcp";
3449
- tool: string;
3450
3478
  server: string;
3479
+ tool: string;
3451
3480
  }>, z.ZodObject<{
3452
3481
  type: z.ZodLiteral<"subagent">;
3453
3482
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -3500,7 +3529,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3500
3529
  }, "strip", z.ZodTypeAny, {
3501
3530
  id: string;
3502
3531
  title: string;
3503
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3532
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3504
3533
  toolCallId?: string | undefined;
3505
3534
  phaseId?: string | undefined;
3506
3535
  model?: string | undefined;
@@ -3513,7 +3542,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3513
3542
  }, {
3514
3543
  id: string;
3515
3544
  title: string;
3516
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3545
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3517
3546
  toolCallId?: string | undefined;
3518
3547
  phaseId?: string | undefined;
3519
3548
  model?: string | undefined;
@@ -3526,7 +3555,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3526
3555
  }>, "many">>;
3527
3556
  }, "strip", z.ZodTypeAny, {
3528
3557
  completed?: number | undefined;
3529
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3558
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3530
3559
  tokens?: number | undefined;
3531
3560
  durationMs?: number | undefined;
3532
3561
  startedAt?: number | undefined;
@@ -3542,7 +3571,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3542
3571
  agents?: {
3543
3572
  id: string;
3544
3573
  title: string;
3545
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3574
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3546
3575
  toolCallId?: string | undefined;
3547
3576
  phaseId?: string | undefined;
3548
3577
  model?: string | undefined;
@@ -3555,7 +3584,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3555
3584
  }[] | undefined;
3556
3585
  }, {
3557
3586
  completed?: number | undefined;
3558
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3587
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3559
3588
  tokens?: number | undefined;
3560
3589
  durationMs?: number | undefined;
3561
3590
  startedAt?: number | undefined;
@@ -3571,7 +3600,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3571
3600
  agents?: {
3572
3601
  id: string;
3573
3602
  title: string;
3574
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3603
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3575
3604
  toolCallId?: string | undefined;
3576
3605
  phaseId?: string | undefined;
3577
3606
  model?: string | undefined;
@@ -3586,14 +3615,14 @@ export declare const sessionEventSchema: z.ZodObject<{
3586
3615
  }, "strip", z.ZodTypeAny, {
3587
3616
  type: "subagent";
3588
3617
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
3589
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3618
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3590
3619
  model?: string | undefined;
3591
3620
  name?: string | undefined;
3592
3621
  task?: string | undefined;
3593
3622
  agentType?: string | undefined;
3594
3623
  workflow?: {
3595
3624
  completed?: number | undefined;
3596
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3625
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3597
3626
  tokens?: number | undefined;
3598
3627
  durationMs?: number | undefined;
3599
3628
  startedAt?: number | undefined;
@@ -3609,7 +3638,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3609
3638
  agents?: {
3610
3639
  id: string;
3611
3640
  title: string;
3612
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3641
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3613
3642
  toolCallId?: string | undefined;
3614
3643
  phaseId?: string | undefined;
3615
3644
  model?: string | undefined;
@@ -3623,14 +3652,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3623
3652
  } | undefined;
3624
3653
  }, {
3625
3654
  type: "subagent";
3626
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3655
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3656
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3627
3657
  model?: string | undefined;
3628
3658
  name?: string | undefined;
3629
3659
  task?: string | undefined;
3630
3660
  agentType?: string | undefined;
3631
3661
  workflow?: {
3632
3662
  completed?: number | undefined;
3633
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3663
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3634
3664
  tokens?: number | undefined;
3635
3665
  durationMs?: number | undefined;
3636
3666
  startedAt?: number | undefined;
@@ -3646,7 +3676,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3646
3676
  agents?: {
3647
3677
  id: string;
3648
3678
  title: string;
3649
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3679
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3650
3680
  toolCallId?: string | undefined;
3651
3681
  phaseId?: string | undefined;
3652
3682
  model?: string | undefined;
@@ -3658,7 +3688,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3658
3688
  result?: string | undefined;
3659
3689
  }[] | undefined;
3660
3690
  } | undefined;
3661
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3662
3691
  }>, z.ZodObject<{
3663
3692
  type: z.ZodLiteral<"skill">;
3664
3693
  name: z.ZodString;
@@ -3754,12 +3783,12 @@ export declare const sessionEventSchema: z.ZodObject<{
3754
3783
  type: "resource_link";
3755
3784
  name: string;
3756
3785
  uri: string;
3757
- kind?: "agent" | "file" | "skill" | undefined;
3786
+ kind?: "file" | "skill" | "agent" | undefined;
3758
3787
  }, {
3759
3788
  type: "resource_link";
3760
3789
  name: string;
3761
3790
  uri: string;
3762
- kind?: "agent" | "file" | "skill" | undefined;
3791
+ kind?: "file" | "skill" | "agent" | undefined;
3763
3792
  }>]>;
3764
3793
  }, "strip", z.ZodTypeAny, {
3765
3794
  type: "content";
@@ -3775,7 +3804,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3775
3804
  type: "resource_link";
3776
3805
  name: string;
3777
3806
  uri: string;
3778
- kind?: "agent" | "file" | "skill" | undefined;
3807
+ kind?: "file" | "skill" | "agent" | undefined;
3779
3808
  };
3780
3809
  }, {
3781
3810
  type: "content";
@@ -3791,7 +3820,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3791
3820
  type: "resource_link";
3792
3821
  name: string;
3793
3822
  uri: string;
3794
- kind?: "agent" | "file" | "skill" | undefined;
3823
+ kind?: "file" | "skill" | "agent" | undefined;
3795
3824
  };
3796
3825
  }>, z.ZodObject<{
3797
3826
  type: z.ZodLiteral<"diff">;
@@ -3818,13 +3847,13 @@ export declare const sessionEventSchema: z.ZodObject<{
3818
3847
  path: string;
3819
3848
  type: "patch";
3820
3849
  diff: string;
3821
- change: "delete" | "add" | "update";
3850
+ change: "add" | "delete" | "update";
3822
3851
  movePath?: string | undefined;
3823
3852
  }, {
3824
3853
  path: string;
3825
3854
  type: "patch";
3826
3855
  diff: string;
3827
- change: "delete" | "add" | "update";
3856
+ change: "add" | "delete" | "update";
3828
3857
  movePath?: string | undefined;
3829
3858
  }>, z.ZodObject<{
3830
3859
  type: z.ZodLiteral<"terminal">;
@@ -3844,21 +3873,53 @@ export declare const sessionEventSchema: z.ZodObject<{
3844
3873
  sessionUpdate: "tool_call_update";
3845
3874
  status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
3846
3875
  title?: string | undefined;
3876
+ content?: ({
3877
+ type: "content";
3878
+ content: {
3879
+ type: "text";
3880
+ text: string;
3881
+ } | {
3882
+ type: "image";
3883
+ mimeType: string;
3884
+ data?: string | undefined;
3885
+ uri?: string | undefined;
3886
+ } | {
3887
+ type: "resource_link";
3888
+ name: string;
3889
+ uri: string;
3890
+ kind?: "file" | "skill" | "agent" | undefined;
3891
+ };
3892
+ } | {
3893
+ path: string;
3894
+ type: "diff";
3895
+ newText: string;
3896
+ oldText?: string | null | undefined;
3897
+ } | {
3898
+ path: string;
3899
+ type: "patch";
3900
+ diff: string;
3901
+ change: "add" | "delete" | "update";
3902
+ movePath?: string | undefined;
3903
+ } | {
3904
+ type: "terminal";
3905
+ terminalId: string;
3906
+ })[] | undefined;
3907
+ parentToolCallId?: string | undefined;
3847
3908
  detail?: {
3848
3909
  type: "mcp";
3849
- tool: string;
3850
3910
  server: string;
3911
+ tool: string;
3851
3912
  } | {
3852
3913
  type: "subagent";
3853
3914
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
3854
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3915
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3855
3916
  model?: string | undefined;
3856
3917
  name?: string | undefined;
3857
3918
  task?: string | undefined;
3858
3919
  agentType?: string | undefined;
3859
3920
  workflow?: {
3860
3921
  completed?: number | undefined;
3861
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3922
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3862
3923
  tokens?: number | undefined;
3863
3924
  durationMs?: number | undefined;
3864
3925
  startedAt?: number | undefined;
@@ -3874,7 +3935,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3874
3935
  agents?: {
3875
3936
  id: string;
3876
3937
  title: string;
3877
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3938
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3878
3939
  toolCallId?: string | undefined;
3879
3940
  phaseId?: string | undefined;
3880
3941
  model?: string | undefined;
@@ -3906,7 +3967,13 @@ export declare const sessionEventSchema: z.ZodObject<{
3906
3967
  text: string;
3907
3968
  more?: number | undefined;
3908
3969
  } | undefined;
3909
- parentToolCallId?: string | undefined;
3970
+ appendOutput?: string | undefined;
3971
+ rawOutput?: unknown;
3972
+ }, {
3973
+ toolCallId: string;
3974
+ sessionUpdate: "tool_call_update";
3975
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
3976
+ title?: string | undefined;
3910
3977
  content?: ({
3911
3978
  type: "content";
3912
3979
  content: {
@@ -3921,7 +3988,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3921
3988
  type: "resource_link";
3922
3989
  name: string;
3923
3990
  uri: string;
3924
- kind?: "agent" | "file" | "skill" | undefined;
3991
+ kind?: "file" | "skill" | "agent" | undefined;
3925
3992
  };
3926
3993
  } | {
3927
3994
  path: string;
@@ -3932,33 +3999,28 @@ export declare const sessionEventSchema: z.ZodObject<{
3932
3999
  path: string;
3933
4000
  type: "patch";
3934
4001
  diff: string;
3935
- change: "delete" | "add" | "update";
4002
+ change: "add" | "delete" | "update";
3936
4003
  movePath?: string | undefined;
3937
4004
  } | {
3938
4005
  type: "terminal";
3939
4006
  terminalId: string;
3940
4007
  })[] | undefined;
3941
- appendOutput?: string | undefined;
3942
- rawOutput?: unknown;
3943
- }, {
3944
- toolCallId: string;
3945
- sessionUpdate: "tool_call_update";
3946
- status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
3947
- title?: string | undefined;
4008
+ parentToolCallId?: string | undefined;
3948
4009
  detail?: {
3949
4010
  type: "mcp";
3950
- tool: string;
3951
4011
  server: string;
4012
+ tool: string;
3952
4013
  } | {
3953
4014
  type: "subagent";
3954
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4015
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
4016
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3955
4017
  model?: string | undefined;
3956
4018
  name?: string | undefined;
3957
4019
  task?: string | undefined;
3958
4020
  agentType?: string | undefined;
3959
4021
  workflow?: {
3960
4022
  completed?: number | undefined;
3961
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4023
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3962
4024
  tokens?: number | undefined;
3963
4025
  durationMs?: number | undefined;
3964
4026
  startedAt?: number | undefined;
@@ -3974,7 +4036,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3974
4036
  agents?: {
3975
4037
  id: string;
3976
4038
  title: string;
3977
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4039
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3978
4040
  toolCallId?: string | undefined;
3979
4041
  phaseId?: string | undefined;
3980
4042
  model?: string | undefined;
@@ -3986,7 +4048,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3986
4048
  result?: string | undefined;
3987
4049
  }[] | undefined;
3988
4050
  } | undefined;
3989
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3990
4051
  } | {
3991
4052
  type: "skill";
3992
4053
  name: string;
@@ -4007,38 +4068,6 @@ export declare const sessionEventSchema: z.ZodObject<{
4007
4068
  text: string;
4008
4069
  more?: number | undefined;
4009
4070
  } | undefined;
4010
- parentToolCallId?: string | undefined;
4011
- content?: ({
4012
- type: "content";
4013
- content: {
4014
- type: "text";
4015
- text: string;
4016
- } | {
4017
- type: "image";
4018
- mimeType: string;
4019
- data?: string | undefined;
4020
- uri?: string | undefined;
4021
- } | {
4022
- type: "resource_link";
4023
- name: string;
4024
- uri: string;
4025
- kind?: "agent" | "file" | "skill" | undefined;
4026
- };
4027
- } | {
4028
- path: string;
4029
- type: "diff";
4030
- newText: string;
4031
- oldText?: string | null | undefined;
4032
- } | {
4033
- path: string;
4034
- type: "patch";
4035
- diff: string;
4036
- change: "delete" | "add" | "update";
4037
- movePath?: string | undefined;
4038
- } | {
4039
- type: "terminal";
4040
- terminalId: string;
4041
- })[] | undefined;
4042
4071
  appendOutput?: string | undefined;
4043
4072
  rawOutput?: unknown;
4044
4073
  }>, z.ZodObject<{
@@ -4081,16 +4110,16 @@ export declare const sessionEventSchema: z.ZodObject<{
4081
4110
  iterations: z.ZodOptional<z.ZodNumber>;
4082
4111
  lastReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4083
4112
  }, "strip", z.ZodTypeAny, {
4084
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4085
4113
  objective: string;
4114
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4086
4115
  tokenBudget?: number | null | undefined;
4087
4116
  tokensUsed?: number | undefined;
4088
4117
  timeUsedSeconds?: number | undefined;
4089
4118
  iterations?: number | undefined;
4090
4119
  lastReason?: string | null | undefined;
4091
4120
  }, {
4092
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4093
4121
  objective: string;
4122
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4094
4123
  tokenBudget?: number | null | undefined;
4095
4124
  tokensUsed?: number | undefined;
4096
4125
  timeUsedSeconds?: number | undefined;
@@ -4100,8 +4129,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4100
4129
  }, "strip", z.ZodTypeAny, {
4101
4130
  sessionUpdate: "ls_goal";
4102
4131
  goal: {
4103
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4104
4132
  objective: string;
4133
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4105
4134
  tokenBudget?: number | null | undefined;
4106
4135
  tokensUsed?: number | undefined;
4107
4136
  timeUsedSeconds?: number | undefined;
@@ -4111,8 +4140,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4111
4140
  }, {
4112
4141
  sessionUpdate: "ls_goal";
4113
4142
  goal: {
4114
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4115
4143
  objective: string;
4144
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4116
4145
  tokenBudget?: number | null | undefined;
4117
4146
  tokensUsed?: number | undefined;
4118
4147
  timeUsedSeconds?: number | undefined;
@@ -4181,6 +4210,35 @@ export declare const sessionEventSchema: z.ZodObject<{
4181
4210
  sessionUpdate: "usage_update";
4182
4211
  usedTokens?: number | undefined;
4183
4212
  contextWindow?: number | undefined;
4213
+ }>, z.ZodObject<{
4214
+ sessionUpdate: z.ZodLiteral<"ls_async_questions">;
4215
+ questions: z.ZodArray<z.ZodObject<{
4216
+ id: z.ZodString;
4217
+ title: z.ZodString;
4218
+ options: z.ZodArray<z.ZodString, "many">;
4219
+ }, "strip", z.ZodTypeAny, {
4220
+ options: string[];
4221
+ id: string;
4222
+ title: string;
4223
+ }, {
4224
+ options: string[];
4225
+ id: string;
4226
+ title: string;
4227
+ }>, "many">;
4228
+ }, "strip", z.ZodTypeAny, {
4229
+ sessionUpdate: "ls_async_questions";
4230
+ questions: {
4231
+ options: string[];
4232
+ id: string;
4233
+ title: string;
4234
+ }[];
4235
+ }, {
4236
+ sessionUpdate: "ls_async_questions";
4237
+ questions: {
4238
+ options: string[];
4239
+ id: string;
4240
+ title: string;
4241
+ }[];
4184
4242
  }>, z.ZodObject<{
4185
4243
  sessionUpdate: z.ZodLiteral<"ls_message_done">;
4186
4244
  parentToolCallId: z.ZodOptional<z.ZodString>;
@@ -4208,22 +4266,22 @@ export declare const sessionEventSchema: z.ZodObject<{
4208
4266
  sessionUpdate: "ls_message_done";
4209
4267
  messageId: string;
4210
4268
  role: "agent" | "thought" | "user";
4269
+ parentToolCallId?: string | undefined;
4211
4270
  questions?: {
4212
4271
  options: string[];
4213
4272
  id: string;
4214
4273
  title: string;
4215
4274
  }[] | undefined;
4216
- parentToolCallId?: string | undefined;
4217
4275
  }, {
4218
4276
  sessionUpdate: "ls_message_done";
4219
4277
  messageId: string;
4220
4278
  role: "agent" | "thought" | "user";
4279
+ parentToolCallId?: string | undefined;
4221
4280
  questions?: {
4222
4281
  options: string[];
4223
4282
  id: string;
4224
4283
  title: string;
4225
4284
  }[] | undefined;
4226
- parentToolCallId?: string | undefined;
4227
4285
  }>, z.ZodObject<{
4228
4286
  sessionUpdate: z.ZodLiteral<"ls_config">;
4229
4287
  options: z.ZodArray<z.ZodObject<{
@@ -4253,7 +4311,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4253
4311
  }[];
4254
4312
  id: string;
4255
4313
  name: string;
4256
- category: "model" | "other" | "mode" | "effort";
4314
+ category: "model" | "mode" | "effort" | "other";
4257
4315
  current: string;
4258
4316
  }, {
4259
4317
  values: {
@@ -4264,7 +4322,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4264
4322
  id: string;
4265
4323
  name: string;
4266
4324
  current: string;
4267
- category?: "model" | "other" | "mode" | "effort" | undefined;
4325
+ category?: "model" | "mode" | "effort" | "other" | undefined;
4268
4326
  }>, "many">;
4269
4327
  }, "strip", z.ZodTypeAny, {
4270
4328
  options: {
@@ -4275,7 +4333,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4275
4333
  }[];
4276
4334
  id: string;
4277
4335
  name: string;
4278
- category: "model" | "other" | "mode" | "effort";
4336
+ category: "model" | "mode" | "effort" | "other";
4279
4337
  current: string;
4280
4338
  }[];
4281
4339
  sessionUpdate: "ls_config";
@@ -4289,7 +4347,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4289
4347
  id: string;
4290
4348
  name: string;
4291
4349
  current: string;
4292
- category?: "model" | "other" | "mode" | "effort" | undefined;
4350
+ category?: "model" | "mode" | "effort" | "other" | undefined;
4293
4351
  }[];
4294
4352
  sessionUpdate: "ls_config";
4295
4353
  }>, z.ZodObject<{
@@ -4319,13 +4377,13 @@ export declare const sessionEventSchema: z.ZodObject<{
4319
4377
  sessionUpdate: "ls_turn";
4320
4378
  parentToolCallId?: string | undefined;
4321
4379
  turnId?: string | undefined;
4322
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
4380
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4323
4381
  }, {
4324
4382
  state: "started" | "ended";
4325
4383
  sessionUpdate: "ls_turn";
4326
4384
  parentToolCallId?: string | undefined;
4327
4385
  turnId?: string | undefined;
4328
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
4386
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4329
4387
  }>, z.ZodObject<{
4330
4388
  sessionUpdate: z.ZodLiteral<"ls_permission">;
4331
4389
  requestId: z.ZodString;
@@ -4338,12 +4396,12 @@ export declare const sessionEventSchema: z.ZodObject<{
4338
4396
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
4339
4397
  }, "strip", z.ZodTypeAny, {
4340
4398
  name: string;
4341
- optionId: string;
4342
4399
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
4400
+ optionId: string;
4343
4401
  }, {
4344
4402
  name: string;
4345
- optionId: string;
4346
4403
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
4404
+ optionId: string;
4347
4405
  }>, "many">;
4348
4406
  /**
4349
4407
  * The agent is asking the user something: answer with `sessions.answer`.
@@ -4373,8 +4431,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4373
4431
  required: z.ZodOptional<z.ZodBoolean>;
4374
4432
  }, "strip", z.ZodTypeAny, {
4375
4433
  id: string;
4376
- kind: "text" | "choice" | "choices";
4377
4434
  text: string;
4435
+ kind: "text" | "choice" | "choices";
4378
4436
  options?: {
4379
4437
  value: string;
4380
4438
  label: string;
@@ -4386,8 +4444,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4386
4444
  required?: boolean | undefined;
4387
4445
  }, {
4388
4446
  id: string;
4389
- kind: "text" | "choice" | "choices";
4390
4447
  text: string;
4448
+ kind: "text" | "choice" | "choices";
4391
4449
  options?: {
4392
4450
  value: string;
4393
4451
  label: string;
@@ -4401,18 +4459,18 @@ export declare const sessionEventSchema: z.ZodObject<{
4401
4459
  }, "strip", z.ZodTypeAny, {
4402
4460
  options: {
4403
4461
  name: string;
4404
- optionId: string;
4405
4462
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
4463
+ optionId: string;
4406
4464
  }[];
4407
4465
  title: string;
4408
- requestId: string;
4409
4466
  sessionUpdate: "ls_permission";
4467
+ requestId: string;
4410
4468
  toolCallId?: string | undefined;
4411
4469
  detail?: string | undefined;
4412
4470
  questions?: {
4413
4471
  id: string;
4414
- kind: "text" | "choice" | "choices";
4415
4472
  text: string;
4473
+ kind: "text" | "choice" | "choices";
4416
4474
  options?: {
4417
4475
  value: string;
4418
4476
  label: string;
@@ -4426,18 +4484,18 @@ export declare const sessionEventSchema: z.ZodObject<{
4426
4484
  }, {
4427
4485
  options: {
4428
4486
  name: string;
4429
- optionId: string;
4430
4487
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
4488
+ optionId: string;
4431
4489
  }[];
4432
4490
  title: string;
4433
- requestId: string;
4434
4491
  sessionUpdate: "ls_permission";
4492
+ requestId: string;
4435
4493
  toolCallId?: string | undefined;
4436
4494
  detail?: string | undefined;
4437
4495
  questions?: {
4438
4496
  id: string;
4439
- kind: "text" | "choice" | "choices";
4440
4497
  text: string;
4498
+ kind: "text" | "choice" | "choices";
4441
4499
  options?: {
4442
4500
  value: string;
4443
4501
  label: string;
@@ -4467,8 +4525,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4467
4525
  other?: string | undefined;
4468
4526
  }>, "many">>;
4469
4527
  }, "strip", z.ZodTypeAny, {
4470
- requestId: string;
4471
4528
  sessionUpdate: "ls_permission_resolved";
4529
+ requestId: string;
4472
4530
  optionId?: string | undefined;
4473
4531
  answers?: {
4474
4532
  values: string[];
@@ -4476,8 +4534,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4476
4534
  other?: string | undefined;
4477
4535
  }[] | undefined;
4478
4536
  }, {
4479
- requestId: string;
4480
4537
  sessionUpdate: "ls_permission_resolved";
4538
+ requestId: string;
4481
4539
  optionId?: string | undefined;
4482
4540
  answers?: {
4483
4541
  values: string[];
@@ -4489,21 +4547,21 @@ export declare const sessionEventSchema: z.ZodObject<{
4489
4547
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
4490
4548
  deviceId: z.ZodOptional<z.ZodString>;
4491
4549
  }, "strip", z.ZodTypeAny, {
4492
- driver: "remote" | "desktop" | "none";
4493
4550
  sessionUpdate: "ls_driver";
4551
+ driver: "desktop" | "remote" | "none";
4494
4552
  deviceId?: string | undefined;
4495
4553
  }, {
4496
- driver: "remote" | "desktop" | "none";
4497
4554
  sessionUpdate: "ls_driver";
4555
+ driver: "desktop" | "remote" | "none";
4498
4556
  deviceId?: string | undefined;
4499
4557
  }>, z.ZodObject<{
4500
4558
  sessionUpdate: z.ZodLiteral<"ls_status">;
4501
4559
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
4502
4560
  }, "strip", z.ZodTypeAny, {
4503
- state: "running" | "idle" | "waiting" | "error" | "offline";
4561
+ state: "running" | "error" | "idle" | "waiting" | "offline";
4504
4562
  sessionUpdate: "ls_status";
4505
4563
  }, {
4506
- state: "running" | "idle" | "waiting" | "error" | "offline";
4564
+ state: "running" | "error" | "idle" | "waiting" | "offline";
4507
4565
  sessionUpdate: "ls_status";
4508
4566
  }>, z.ZodObject<{
4509
4567
  sessionUpdate: z.ZodLiteral<"ls_task">;
@@ -4524,64 +4582,64 @@ export declare const sessionEventSchema: z.ZodObject<{
4524
4582
  }, "strip", z.ZodTypeAny, {
4525
4583
  id: string;
4526
4584
  title: string;
4527
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
4585
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4528
4586
  startedAt: number;
4529
4587
  kind: "shell" | "monitor";
4530
4588
  toolCallId?: string | undefined;
4531
4589
  endedAt?: number | undefined;
4532
- lastSeq?: number | undefined;
4533
4590
  command?: string | undefined;
4534
4591
  summary?: string | undefined;
4535
4592
  exitCode?: number | undefined;
4536
4593
  output?: boolean | undefined;
4537
4594
  canStop?: boolean | undefined;
4595
+ lastSeq?: number | undefined;
4538
4596
  }, {
4539
4597
  id: string;
4540
4598
  title: string;
4541
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
4599
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4542
4600
  startedAt: number;
4543
4601
  kind: "shell" | "monitor";
4544
4602
  toolCallId?: string | undefined;
4545
4603
  endedAt?: number | undefined;
4546
- lastSeq?: number | undefined;
4547
4604
  command?: string | undefined;
4548
4605
  summary?: string | undefined;
4549
4606
  exitCode?: number | undefined;
4550
4607
  output?: boolean | undefined;
4551
4608
  canStop?: boolean | undefined;
4609
+ lastSeq?: number | undefined;
4552
4610
  }>;
4553
4611
  }, "strip", z.ZodTypeAny, {
4554
4612
  task: {
4555
4613
  id: string;
4556
4614
  title: string;
4557
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
4615
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4558
4616
  startedAt: number;
4559
4617
  kind: "shell" | "monitor";
4560
4618
  toolCallId?: string | undefined;
4561
4619
  endedAt?: number | undefined;
4562
- lastSeq?: number | undefined;
4563
4620
  command?: string | undefined;
4564
4621
  summary?: string | undefined;
4565
4622
  exitCode?: number | undefined;
4566
4623
  output?: boolean | undefined;
4567
4624
  canStop?: boolean | undefined;
4625
+ lastSeq?: number | undefined;
4568
4626
  };
4569
4627
  sessionUpdate: "ls_task";
4570
4628
  }, {
4571
4629
  task: {
4572
4630
  id: string;
4573
4631
  title: string;
4574
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
4632
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4575
4633
  startedAt: number;
4576
4634
  kind: "shell" | "monitor";
4577
4635
  toolCallId?: string | undefined;
4578
4636
  endedAt?: number | undefined;
4579
- lastSeq?: number | undefined;
4580
4637
  command?: string | undefined;
4581
4638
  summary?: string | undefined;
4582
4639
  exitCode?: number | undefined;
4583
4640
  output?: boolean | undefined;
4584
4641
  canStop?: boolean | undefined;
4642
+ lastSeq?: number | undefined;
4585
4643
  };
4586
4644
  sessionUpdate: "ls_task";
4587
4645
  }>, z.ZodObject<{
@@ -4614,7 +4672,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4614
4672
  type: "resource_link";
4615
4673
  name: string;
4616
4674
  uri: string;
4617
- kind?: "agent" | "file" | "skill" | undefined;
4675
+ kind?: "file" | "skill" | "agent" | undefined;
4618
4676
  };
4619
4677
  sessionUpdate: "user_message_chunk";
4620
4678
  messageId?: string | undefined;
@@ -4631,7 +4689,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4631
4689
  type: "resource_link";
4632
4690
  name: string;
4633
4691
  uri: string;
4634
- kind?: "agent" | "file" | "skill" | undefined;
4692
+ kind?: "file" | "skill" | "agent" | undefined;
4635
4693
  };
4636
4694
  sessionUpdate: "agent_message_chunk";
4637
4695
  messageId: string;
@@ -4649,7 +4707,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4649
4707
  type: "resource_link";
4650
4708
  name: string;
4651
4709
  uri: string;
4652
- kind?: "agent" | "file" | "skill" | undefined;
4710
+ kind?: "file" | "skill" | "agent" | undefined;
4653
4711
  };
4654
4712
  sessionUpdate: "agent_thought_chunk";
4655
4713
  messageId: string;
@@ -4658,23 +4716,60 @@ export declare const sessionEventSchema: z.ZodObject<{
4658
4716
  status: "completed" | "failed" | "pending" | "in_progress";
4659
4717
  toolCallId: string;
4660
4718
  title: string;
4661
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
4719
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
4662
4720
  sessionUpdate: "tool_call";
4721
+ content?: ({
4722
+ type: "content";
4723
+ content: {
4724
+ type: "text";
4725
+ text: string;
4726
+ } | {
4727
+ type: "image";
4728
+ mimeType: string;
4729
+ data?: string | undefined;
4730
+ uri?: string | undefined;
4731
+ } | {
4732
+ type: "resource_link";
4733
+ name: string;
4734
+ uri: string;
4735
+ kind?: "file" | "skill" | "agent" | undefined;
4736
+ };
4737
+ } | {
4738
+ path: string;
4739
+ type: "diff";
4740
+ newText: string;
4741
+ oldText?: string | null | undefined;
4742
+ } | {
4743
+ path: string;
4744
+ type: "patch";
4745
+ diff: string;
4746
+ change: "add" | "delete" | "update";
4747
+ movePath?: string | undefined;
4748
+ } | {
4749
+ type: "terminal";
4750
+ terminalId: string;
4751
+ })[] | undefined;
4752
+ parentToolCallId?: string | undefined;
4753
+ rawInput?: unknown;
4754
+ locations?: {
4755
+ path: string;
4756
+ line?: number | undefined;
4757
+ }[] | undefined;
4663
4758
  detail?: {
4664
4759
  type: "mcp";
4665
- tool: string;
4666
4760
  server: string;
4761
+ tool: string;
4667
4762
  } | {
4668
4763
  type: "subagent";
4669
4764
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
4670
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4765
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
4671
4766
  model?: string | undefined;
4672
4767
  name?: string | undefined;
4673
4768
  task?: string | undefined;
4674
4769
  agentType?: string | undefined;
4675
4770
  workflow?: {
4676
4771
  completed?: number | undefined;
4677
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4772
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
4678
4773
  tokens?: number | undefined;
4679
4774
  durationMs?: number | undefined;
4680
4775
  startedAt?: number | undefined;
@@ -4690,7 +4785,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4690
4785
  agents?: {
4691
4786
  id: string;
4692
4787
  title: string;
4693
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4788
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
4694
4789
  toolCallId?: string | undefined;
4695
4790
  phaseId?: string | undefined;
4696
4791
  model?: string | undefined;
@@ -4722,7 +4817,11 @@ export declare const sessionEventSchema: z.ZodObject<{
4722
4817
  text: string;
4723
4818
  more?: number | undefined;
4724
4819
  } | undefined;
4725
- parentToolCallId?: string | undefined;
4820
+ } | {
4821
+ toolCallId: string;
4822
+ sessionUpdate: "tool_call_update";
4823
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
4824
+ title?: string | undefined;
4726
4825
  content?: ({
4727
4826
  type: "content";
4728
4827
  content: {
@@ -4737,7 +4836,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4737
4836
  type: "resource_link";
4738
4837
  name: string;
4739
4838
  uri: string;
4740
- kind?: "agent" | "file" | "skill" | undefined;
4839
+ kind?: "file" | "skill" | "agent" | undefined;
4741
4840
  };
4742
4841
  } | {
4743
4842
  path: string;
@@ -4748,37 +4847,28 @@ export declare const sessionEventSchema: z.ZodObject<{
4748
4847
  path: string;
4749
4848
  type: "patch";
4750
4849
  diff: string;
4751
- change: "delete" | "add" | "update";
4850
+ change: "add" | "delete" | "update";
4752
4851
  movePath?: string | undefined;
4753
4852
  } | {
4754
4853
  type: "terminal";
4755
4854
  terminalId: string;
4756
4855
  })[] | undefined;
4757
- rawInput?: unknown;
4758
- locations?: {
4759
- path: string;
4760
- line?: number | undefined;
4761
- }[] | undefined;
4762
- } | {
4763
- toolCallId: string;
4764
- sessionUpdate: "tool_call_update";
4765
- status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
4766
- title?: string | undefined;
4856
+ parentToolCallId?: string | undefined;
4767
4857
  detail?: {
4768
4858
  type: "mcp";
4769
- tool: string;
4770
4859
  server: string;
4860
+ tool: string;
4771
4861
  } | {
4772
4862
  type: "subagent";
4773
4863
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
4774
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4864
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
4775
4865
  model?: string | undefined;
4776
4866
  name?: string | undefined;
4777
4867
  task?: string | undefined;
4778
4868
  agentType?: string | undefined;
4779
4869
  workflow?: {
4780
4870
  completed?: number | undefined;
4781
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4871
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
4782
4872
  tokens?: number | undefined;
4783
4873
  durationMs?: number | undefined;
4784
4874
  startedAt?: number | undefined;
@@ -4794,7 +4884,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4794
4884
  agents?: {
4795
4885
  id: string;
4796
4886
  title: string;
4797
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4887
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
4798
4888
  toolCallId?: string | undefined;
4799
4889
  phaseId?: string | undefined;
4800
4890
  model?: string | undefined;
@@ -4826,38 +4916,6 @@ export declare const sessionEventSchema: z.ZodObject<{
4826
4916
  text: string;
4827
4917
  more?: number | undefined;
4828
4918
  } | undefined;
4829
- parentToolCallId?: string | undefined;
4830
- content?: ({
4831
- type: "content";
4832
- content: {
4833
- type: "text";
4834
- text: string;
4835
- } | {
4836
- type: "image";
4837
- mimeType: string;
4838
- data?: string | undefined;
4839
- uri?: string | undefined;
4840
- } | {
4841
- type: "resource_link";
4842
- name: string;
4843
- uri: string;
4844
- kind?: "agent" | "file" | "skill" | undefined;
4845
- };
4846
- } | {
4847
- path: string;
4848
- type: "diff";
4849
- newText: string;
4850
- oldText?: string | null | undefined;
4851
- } | {
4852
- path: string;
4853
- type: "patch";
4854
- diff: string;
4855
- change: "delete" | "add" | "update";
4856
- movePath?: string | undefined;
4857
- } | {
4858
- type: "terminal";
4859
- terminalId: string;
4860
- })[] | undefined;
4861
4919
  appendOutput?: string | undefined;
4862
4920
  rawOutput?: unknown;
4863
4921
  } | {
@@ -4870,8 +4928,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4870
4928
  } | {
4871
4929
  sessionUpdate: "ls_goal";
4872
4930
  goal: {
4873
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4874
4931
  objective: string;
4932
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4875
4933
  tokenBudget?: number | null | undefined;
4876
4934
  tokensUsed?: number | undefined;
4877
4935
  timeUsedSeconds?: number | undefined;
@@ -4896,16 +4954,23 @@ export declare const sessionEventSchema: z.ZodObject<{
4896
4954
  sessionUpdate: "usage_update";
4897
4955
  usedTokens?: number | undefined;
4898
4956
  contextWindow?: number | undefined;
4957
+ } | {
4958
+ sessionUpdate: "ls_async_questions";
4959
+ questions: {
4960
+ options: string[];
4961
+ id: string;
4962
+ title: string;
4963
+ }[];
4899
4964
  } | {
4900
4965
  sessionUpdate: "ls_message_done";
4901
4966
  messageId: string;
4902
4967
  role: "agent" | "thought" | "user";
4968
+ parentToolCallId?: string | undefined;
4903
4969
  questions?: {
4904
4970
  options: string[];
4905
4971
  id: string;
4906
4972
  title: string;
4907
4973
  }[] | undefined;
4908
- parentToolCallId?: string | undefined;
4909
4974
  } | {
4910
4975
  options: {
4911
4976
  values: {
@@ -4915,7 +4980,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4915
4980
  }[];
4916
4981
  id: string;
4917
4982
  name: string;
4918
- category: "model" | "other" | "mode" | "effort";
4983
+ category: "model" | "mode" | "effort" | "other";
4919
4984
  current: string;
4920
4985
  }[];
4921
4986
  sessionUpdate: "ls_config";
@@ -4929,22 +4994,22 @@ export declare const sessionEventSchema: z.ZodObject<{
4929
4994
  sessionUpdate: "ls_turn";
4930
4995
  parentToolCallId?: string | undefined;
4931
4996
  turnId?: string | undefined;
4932
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
4997
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4933
4998
  } | {
4934
4999
  options: {
4935
5000
  name: string;
4936
- optionId: string;
4937
5001
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
5002
+ optionId: string;
4938
5003
  }[];
4939
5004
  title: string;
4940
- requestId: string;
4941
5005
  sessionUpdate: "ls_permission";
5006
+ requestId: string;
4942
5007
  toolCallId?: string | undefined;
4943
5008
  detail?: string | undefined;
4944
5009
  questions?: {
4945
5010
  id: string;
4946
- kind: "text" | "choice" | "choices";
4947
5011
  text: string;
5012
+ kind: "text" | "choice" | "choices";
4948
5013
  options?: {
4949
5014
  value: string;
4950
5015
  label: string;
@@ -4956,8 +5021,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4956
5021
  required?: boolean | undefined;
4957
5022
  }[] | undefined;
4958
5023
  } | {
4959
- requestId: string;
4960
5024
  sessionUpdate: "ls_permission_resolved";
5025
+ requestId: string;
4961
5026
  optionId?: string | undefined;
4962
5027
  answers?: {
4963
5028
  values: string[];
@@ -4965,27 +5030,27 @@ export declare const sessionEventSchema: z.ZodObject<{
4965
5030
  other?: string | undefined;
4966
5031
  }[] | undefined;
4967
5032
  } | {
4968
- driver: "remote" | "desktop" | "none";
4969
5033
  sessionUpdate: "ls_driver";
5034
+ driver: "desktop" | "remote" | "none";
4970
5035
  deviceId?: string | undefined;
4971
5036
  } | {
4972
- state: "running" | "idle" | "waiting" | "error" | "offline";
5037
+ state: "running" | "error" | "idle" | "waiting" | "offline";
4973
5038
  sessionUpdate: "ls_status";
4974
5039
  } | {
4975
5040
  task: {
4976
5041
  id: string;
4977
5042
  title: string;
4978
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
5043
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4979
5044
  startedAt: number;
4980
5045
  kind: "shell" | "monitor";
4981
5046
  toolCallId?: string | undefined;
4982
5047
  endedAt?: number | undefined;
4983
- lastSeq?: number | undefined;
4984
5048
  command?: string | undefined;
4985
5049
  summary?: string | undefined;
4986
5050
  exitCode?: number | undefined;
4987
5051
  output?: boolean | undefined;
4988
5052
  canStop?: boolean | undefined;
5053
+ lastSeq?: number | undefined;
4989
5054
  };
4990
5055
  sessionUpdate: "ls_task";
4991
5056
  } | {
@@ -5011,7 +5076,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5011
5076
  type: "resource_link";
5012
5077
  name: string;
5013
5078
  uri: string;
5014
- kind?: "agent" | "file" | "skill" | undefined;
5079
+ kind?: "file" | "skill" | "agent" | undefined;
5015
5080
  };
5016
5081
  sessionUpdate: "user_message_chunk";
5017
5082
  messageId?: string | undefined;
@@ -5028,7 +5093,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5028
5093
  type: "resource_link";
5029
5094
  name: string;
5030
5095
  uri: string;
5031
- kind?: "agent" | "file" | "skill" | undefined;
5096
+ kind?: "file" | "skill" | "agent" | undefined;
5032
5097
  };
5033
5098
  sessionUpdate: "agent_message_chunk";
5034
5099
  messageId: string;
@@ -5046,7 +5111,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5046
5111
  type: "resource_link";
5047
5112
  name: string;
5048
5113
  uri: string;
5049
- kind?: "agent" | "file" | "skill" | undefined;
5114
+ kind?: "file" | "skill" | "agent" | undefined;
5050
5115
  };
5051
5116
  sessionUpdate: "agent_thought_chunk";
5052
5117
  messageId: string;
@@ -5055,22 +5120,60 @@ export declare const sessionEventSchema: z.ZodObject<{
5055
5120
  status: "completed" | "failed" | "pending" | "in_progress";
5056
5121
  toolCallId: string;
5057
5122
  title: string;
5058
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
5123
+ kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
5059
5124
  sessionUpdate: "tool_call";
5125
+ content?: ({
5126
+ type: "content";
5127
+ content: {
5128
+ type: "text";
5129
+ text: string;
5130
+ } | {
5131
+ type: "image";
5132
+ mimeType: string;
5133
+ data?: string | undefined;
5134
+ uri?: string | undefined;
5135
+ } | {
5136
+ type: "resource_link";
5137
+ name: string;
5138
+ uri: string;
5139
+ kind?: "file" | "skill" | "agent" | undefined;
5140
+ };
5141
+ } | {
5142
+ path: string;
5143
+ type: "diff";
5144
+ newText: string;
5145
+ oldText?: string | null | undefined;
5146
+ } | {
5147
+ path: string;
5148
+ type: "patch";
5149
+ diff: string;
5150
+ change: "add" | "delete" | "update";
5151
+ movePath?: string | undefined;
5152
+ } | {
5153
+ type: "terminal";
5154
+ terminalId: string;
5155
+ })[] | undefined;
5156
+ parentToolCallId?: string | undefined;
5157
+ rawInput?: unknown;
5158
+ locations?: {
5159
+ path: string;
5160
+ line?: number | undefined;
5161
+ }[] | undefined;
5060
5162
  detail?: {
5061
5163
  type: "mcp";
5062
- tool: string;
5063
5164
  server: string;
5165
+ tool: string;
5064
5166
  } | {
5065
5167
  type: "subagent";
5066
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
5168
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
5169
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
5067
5170
  model?: string | undefined;
5068
5171
  name?: string | undefined;
5069
5172
  task?: string | undefined;
5070
5173
  agentType?: string | undefined;
5071
5174
  workflow?: {
5072
5175
  completed?: number | undefined;
5073
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
5176
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
5074
5177
  tokens?: number | undefined;
5075
5178
  durationMs?: number | undefined;
5076
5179
  startedAt?: number | undefined;
@@ -5086,7 +5189,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5086
5189
  agents?: {
5087
5190
  id: string;
5088
5191
  title: string;
5089
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
5192
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
5090
5193
  toolCallId?: string | undefined;
5091
5194
  phaseId?: string | undefined;
5092
5195
  model?: string | undefined;
@@ -5098,7 +5201,6 @@ export declare const sessionEventSchema: z.ZodObject<{
5098
5201
  result?: string | undefined;
5099
5202
  }[] | undefined;
5100
5203
  } | undefined;
5101
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
5102
5204
  } | {
5103
5205
  type: "skill";
5104
5206
  name: string;
@@ -5119,7 +5221,11 @@ export declare const sessionEventSchema: z.ZodObject<{
5119
5221
  text: string;
5120
5222
  more?: number | undefined;
5121
5223
  } | undefined;
5122
- parentToolCallId?: string | undefined;
5224
+ } | {
5225
+ toolCallId: string;
5226
+ sessionUpdate: "tool_call_update";
5227
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
5228
+ title?: string | undefined;
5123
5229
  content?: ({
5124
5230
  type: "content";
5125
5231
  content: {
@@ -5134,7 +5240,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5134
5240
  type: "resource_link";
5135
5241
  name: string;
5136
5242
  uri: string;
5137
- kind?: "agent" | "file" | "skill" | undefined;
5243
+ kind?: "file" | "skill" | "agent" | undefined;
5138
5244
  };
5139
5245
  } | {
5140
5246
  path: string;
@@ -5145,36 +5251,28 @@ export declare const sessionEventSchema: z.ZodObject<{
5145
5251
  path: string;
5146
5252
  type: "patch";
5147
5253
  diff: string;
5148
- change: "delete" | "add" | "update";
5254
+ change: "add" | "delete" | "update";
5149
5255
  movePath?: string | undefined;
5150
5256
  } | {
5151
5257
  type: "terminal";
5152
5258
  terminalId: string;
5153
5259
  })[] | undefined;
5154
- rawInput?: unknown;
5155
- locations?: {
5156
- path: string;
5157
- line?: number | undefined;
5158
- }[] | undefined;
5159
- } | {
5160
- toolCallId: string;
5161
- sessionUpdate: "tool_call_update";
5162
- status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
5163
- title?: string | undefined;
5260
+ parentToolCallId?: string | undefined;
5164
5261
  detail?: {
5165
5262
  type: "mcp";
5166
- tool: string;
5167
5263
  server: string;
5264
+ tool: string;
5168
5265
  } | {
5169
5266
  type: "subagent";
5170
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
5267
+ action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
5268
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
5171
5269
  model?: string | undefined;
5172
5270
  name?: string | undefined;
5173
5271
  task?: string | undefined;
5174
5272
  agentType?: string | undefined;
5175
5273
  workflow?: {
5176
5274
  completed?: number | undefined;
5177
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
5275
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
5178
5276
  tokens?: number | undefined;
5179
5277
  durationMs?: number | undefined;
5180
5278
  startedAt?: number | undefined;
@@ -5190,7 +5288,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5190
5288
  agents?: {
5191
5289
  id: string;
5192
5290
  title: string;
5193
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
5291
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
5194
5292
  toolCallId?: string | undefined;
5195
5293
  phaseId?: string | undefined;
5196
5294
  model?: string | undefined;
@@ -5202,7 +5300,6 @@ export declare const sessionEventSchema: z.ZodObject<{
5202
5300
  result?: string | undefined;
5203
5301
  }[] | undefined;
5204
5302
  } | undefined;
5205
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
5206
5303
  } | {
5207
5304
  type: "skill";
5208
5305
  name: string;
@@ -5223,38 +5320,6 @@ export declare const sessionEventSchema: z.ZodObject<{
5223
5320
  text: string;
5224
5321
  more?: number | undefined;
5225
5322
  } | undefined;
5226
- parentToolCallId?: string | undefined;
5227
- content?: ({
5228
- type: "content";
5229
- content: {
5230
- type: "text";
5231
- text: string;
5232
- } | {
5233
- type: "image";
5234
- mimeType: string;
5235
- data?: string | undefined;
5236
- uri?: string | undefined;
5237
- } | {
5238
- type: "resource_link";
5239
- name: string;
5240
- uri: string;
5241
- kind?: "agent" | "file" | "skill" | undefined;
5242
- };
5243
- } | {
5244
- path: string;
5245
- type: "diff";
5246
- newText: string;
5247
- oldText?: string | null | undefined;
5248
- } | {
5249
- path: string;
5250
- type: "patch";
5251
- diff: string;
5252
- change: "delete" | "add" | "update";
5253
- movePath?: string | undefined;
5254
- } | {
5255
- type: "terminal";
5256
- terminalId: string;
5257
- })[] | undefined;
5258
5323
  appendOutput?: string | undefined;
5259
5324
  rawOutput?: unknown;
5260
5325
  } | {
@@ -5267,8 +5332,8 @@ export declare const sessionEventSchema: z.ZodObject<{
5267
5332
  } | {
5268
5333
  sessionUpdate: "ls_goal";
5269
5334
  goal: {
5270
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
5271
5335
  objective: string;
5336
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
5272
5337
  tokenBudget?: number | null | undefined;
5273
5338
  tokensUsed?: number | undefined;
5274
5339
  timeUsedSeconds?: number | undefined;
@@ -5293,16 +5358,23 @@ export declare const sessionEventSchema: z.ZodObject<{
5293
5358
  sessionUpdate: "usage_update";
5294
5359
  usedTokens?: number | undefined;
5295
5360
  contextWindow?: number | undefined;
5361
+ } | {
5362
+ sessionUpdate: "ls_async_questions";
5363
+ questions: {
5364
+ options: string[];
5365
+ id: string;
5366
+ title: string;
5367
+ }[];
5296
5368
  } | {
5297
5369
  sessionUpdate: "ls_message_done";
5298
5370
  messageId: string;
5299
5371
  role: "agent" | "thought" | "user";
5372
+ parentToolCallId?: string | undefined;
5300
5373
  questions?: {
5301
5374
  options: string[];
5302
5375
  id: string;
5303
5376
  title: string;
5304
5377
  }[] | undefined;
5305
- parentToolCallId?: string | undefined;
5306
5378
  } | {
5307
5379
  options: {
5308
5380
  values: {
@@ -5313,7 +5385,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5313
5385
  id: string;
5314
5386
  name: string;
5315
5387
  current: string;
5316
- category?: "model" | "other" | "mode" | "effort" | undefined;
5388
+ category?: "model" | "mode" | "effort" | "other" | undefined;
5317
5389
  }[];
5318
5390
  sessionUpdate: "ls_config";
5319
5391
  } | {
@@ -5326,22 +5398,22 @@ export declare const sessionEventSchema: z.ZodObject<{
5326
5398
  sessionUpdate: "ls_turn";
5327
5399
  parentToolCallId?: string | undefined;
5328
5400
  turnId?: string | undefined;
5329
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
5401
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
5330
5402
  } | {
5331
5403
  options: {
5332
5404
  name: string;
5333
- optionId: string;
5334
5405
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
5406
+ optionId: string;
5335
5407
  }[];
5336
5408
  title: string;
5337
- requestId: string;
5338
5409
  sessionUpdate: "ls_permission";
5410
+ requestId: string;
5339
5411
  toolCallId?: string | undefined;
5340
5412
  detail?: string | undefined;
5341
5413
  questions?: {
5342
5414
  id: string;
5343
- kind: "text" | "choice" | "choices";
5344
5415
  text: string;
5416
+ kind: "text" | "choice" | "choices";
5345
5417
  options?: {
5346
5418
  value: string;
5347
5419
  label: string;
@@ -5353,8 +5425,8 @@ export declare const sessionEventSchema: z.ZodObject<{
5353
5425
  required?: boolean | undefined;
5354
5426
  }[] | undefined;
5355
5427
  } | {
5356
- requestId: string;
5357
5428
  sessionUpdate: "ls_permission_resolved";
5429
+ requestId: string;
5358
5430
  optionId?: string | undefined;
5359
5431
  answers?: {
5360
5432
  values: string[];
@@ -5362,27 +5434,27 @@ export declare const sessionEventSchema: z.ZodObject<{
5362
5434
  other?: string | undefined;
5363
5435
  }[] | undefined;
5364
5436
  } | {
5365
- driver: "remote" | "desktop" | "none";
5366
5437
  sessionUpdate: "ls_driver";
5438
+ driver: "desktop" | "remote" | "none";
5367
5439
  deviceId?: string | undefined;
5368
5440
  } | {
5369
- state: "running" | "idle" | "waiting" | "error" | "offline";
5441
+ state: "running" | "error" | "idle" | "waiting" | "offline";
5370
5442
  sessionUpdate: "ls_status";
5371
5443
  } | {
5372
5444
  task: {
5373
5445
  id: string;
5374
5446
  title: string;
5375
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
5447
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
5376
5448
  startedAt: number;
5377
5449
  kind: "shell" | "monitor";
5378
5450
  toolCallId?: string | undefined;
5379
5451
  endedAt?: number | undefined;
5380
- lastSeq?: number | undefined;
5381
5452
  command?: string | undefined;
5382
5453
  summary?: string | undefined;
5383
5454
  exitCode?: number | undefined;
5384
5455
  output?: boolean | undefined;
5385
5456
  canStop?: boolean | undefined;
5457
+ lastSeq?: number | undefined;
5386
5458
  };
5387
5459
  sessionUpdate: "ls_task";
5388
5460
  } | {