linkshell-cli 0.10.16 → 0.10.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 (51) hide show
  1. package/README.md +14 -0
  2. package/dist/cli/tsconfig.tsbuildinfo +1 -1
  3. package/dist/host/src/drivers/acp/connection.d.ts +1 -0
  4. package/dist/host/src/drivers/acp/connection.js +6 -0
  5. package/dist/host/src/drivers/acp/connection.js.map +1 -1
  6. package/dist/host/src/drivers/acp/driver.d.ts +10 -5
  7. package/dist/host/src/drivers/acp/driver.js +51 -25
  8. package/dist/host/src/drivers/acp/driver.js.map +1 -1
  9. package/dist/host/src/drivers/acp/questions.d.ts +14 -0
  10. package/dist/host/src/drivers/acp/questions.js +114 -0
  11. package/dist/host/src/drivers/acp/questions.js.map +1 -0
  12. package/dist/host/src/drivers/claude/activity.d.ts +5 -0
  13. package/dist/host/src/drivers/claude/activity.js +80 -25
  14. package/dist/host/src/drivers/claude/activity.js.map +1 -1
  15. package/dist/host/src/drivers/claude/children.d.ts +18 -0
  16. package/dist/host/src/drivers/claude/children.js +60 -0
  17. package/dist/host/src/drivers/claude/children.js.map +1 -0
  18. package/dist/host/src/drivers/claude/driver.js +7 -2
  19. package/dist/host/src/drivers/claude/driver.js.map +1 -1
  20. package/dist/host/src/drivers/claude/tasks.d.ts +2 -2
  21. package/dist/host/src/drivers/claude/transcript.d.ts +83 -72
  22. package/dist/host/src/drivers/claude/transcript.js +27 -13
  23. package/dist/host/src/drivers/claude/transcript.js.map +1 -1
  24. package/dist/host/src/drivers/codex/attention.d.ts +7 -0
  25. package/dist/host/src/drivers/codex/attention.js +82 -0
  26. package/dist/host/src/drivers/codex/attention.js.map +1 -0
  27. package/dist/host/src/drivers/codex/driver.d.ts +2 -0
  28. package/dist/host/src/drivers/codex/driver.js +45 -2
  29. package/dist/host/src/drivers/codex/driver.js.map +1 -1
  30. package/dist/host/src/drivers/types.d.ts +2 -1
  31. package/dist/host/src/hub.d.ts +3 -1
  32. package/dist/host/src/hub.js +42 -6
  33. package/dist/host/src/hub.js.map +1 -1
  34. package/dist/host/src/screen-viewer.js +0 -5
  35. package/dist/host/src/screen-viewer.js.map +1 -1
  36. package/dist/wire/src/async-questions.d.ts +40 -0
  37. package/dist/wire/src/async-questions.js +66 -0
  38. package/dist/wire/src/async-questions.js.map +1 -0
  39. package/dist/wire/src/goal.d.ts +2 -2
  40. package/dist/wire/src/index.d.ts +1 -0
  41. package/dist/wire/src/index.js +1 -0
  42. package/dist/wire/src/index.js.map +1 -1
  43. package/dist/wire/src/model.d.ts +99 -72
  44. package/dist/wire/src/model.js +4 -0
  45. package/dist/wire/src/model.js.map +1 -1
  46. package/dist/wire/src/rpc.d.ts +2163 -1720
  47. package/dist/wire/src/updates.d.ts +663 -559
  48. package/dist/wire/src/updates.js +8 -1
  49. package/dist/wire/src/updates.js.map +1 -1
  50. package/dist/wire/src/workflow.d.ts +8 -8
  51. package/package.json +4 -4
@@ -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. */
@@ -197,6 +197,8 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
197
197
  task: z.ZodOptional<z.ZodString>;
198
198
  /** The sub-agent's role or type, e.g. "Explore". */
199
199
  agentType: z.ZodOptional<z.ZodString>;
200
+ /** A named agent's address, distinct from its role. */
201
+ name: z.ZodOptional<z.ZodString>;
200
202
  model: z.ZodOptional<z.ZodString>;
201
203
  /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
202
204
  state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
@@ -240,7 +242,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
240
242
  }, "strip", z.ZodTypeAny, {
241
243
  id: string;
242
244
  title: string;
243
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
245
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
244
246
  toolCallId?: string | undefined;
245
247
  phaseId?: string | undefined;
246
248
  model?: string | undefined;
@@ -253,7 +255,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
253
255
  }, {
254
256
  id: string;
255
257
  title: string;
256
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
258
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
257
259
  toolCallId?: string | undefined;
258
260
  phaseId?: string | undefined;
259
261
  model?: string | undefined;
@@ -266,7 +268,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
266
268
  }>, "many">>;
267
269
  }, "strip", z.ZodTypeAny, {
268
270
  completed?: number | undefined;
269
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
271
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
270
272
  tokens?: number | undefined;
271
273
  durationMs?: number | undefined;
272
274
  startedAt?: number | undefined;
@@ -282,7 +284,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
282
284
  agents?: {
283
285
  id: string;
284
286
  title: string;
285
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
287
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
286
288
  toolCallId?: string | undefined;
287
289
  phaseId?: string | undefined;
288
290
  model?: string | undefined;
@@ -295,7 +297,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
295
297
  }[] | undefined;
296
298
  }, {
297
299
  completed?: number | undefined;
298
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
300
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
299
301
  tokens?: number | undefined;
300
302
  durationMs?: number | undefined;
301
303
  startedAt?: number | undefined;
@@ -311,7 +313,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
311
313
  agents?: {
312
314
  id: string;
313
315
  title: string;
314
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
316
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
315
317
  toolCallId?: string | undefined;
316
318
  phaseId?: string | undefined;
317
319
  model?: string | undefined;
@@ -326,13 +328,14 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
326
328
  }, "strip", z.ZodTypeAny, {
327
329
  type: "subagent";
328
330
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
329
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
331
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
330
332
  model?: string | undefined;
333
+ name?: string | undefined;
331
334
  task?: string | undefined;
332
335
  agentType?: string | undefined;
333
336
  workflow?: {
334
337
  completed?: number | undefined;
335
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
338
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
336
339
  tokens?: number | undefined;
337
340
  durationMs?: number | undefined;
338
341
  startedAt?: number | undefined;
@@ -348,7 +351,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
348
351
  agents?: {
349
352
  id: string;
350
353
  title: string;
351
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
354
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
352
355
  toolCallId?: string | undefined;
353
356
  phaseId?: string | undefined;
354
357
  model?: string | undefined;
@@ -362,13 +365,15 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
362
365
  } | undefined;
363
366
  }, {
364
367
  type: "subagent";
365
- 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;
366
370
  model?: string | undefined;
371
+ name?: string | undefined;
367
372
  task?: string | undefined;
368
373
  agentType?: string | undefined;
369
374
  workflow?: {
370
375
  completed?: number | undefined;
371
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
376
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
372
377
  tokens?: number | undefined;
373
378
  durationMs?: number | undefined;
374
379
  startedAt?: number | undefined;
@@ -384,7 +389,7 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
384
389
  agents?: {
385
390
  id: string;
386
391
  title: string;
387
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
392
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
388
393
  toolCallId?: string | undefined;
389
394
  phaseId?: string | undefined;
390
395
  model?: string | undefined;
@@ -396,7 +401,6 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
396
401
  result?: string | undefined;
397
402
  }[] | undefined;
398
403
  } | undefined;
399
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
400
404
  }>, z.ZodObject<{
401
405
  type: z.ZodLiteral<"skill">;
402
406
  name: z.ZodString;
@@ -499,7 +503,7 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
499
503
  }[];
500
504
  id: string;
501
505
  name: string;
502
- category: "mode" | "model" | "other" | "effort";
506
+ category: "mode" | "model" | "effort" | "other";
503
507
  current: string;
504
508
  }, {
505
509
  values: {
@@ -510,7 +514,7 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
510
514
  id: string;
511
515
  name: string;
512
516
  current: string;
513
- category?: "mode" | "model" | "other" | "effort" | undefined;
517
+ category?: "mode" | "model" | "effort" | "other" | undefined;
514
518
  }>;
515
519
  export type SessionConfigOption = z.infer<typeof sessionConfigOptionSchema>;
516
520
  export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate", [z.ZodObject<{
@@ -550,12 +554,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
550
554
  type: "resource_link";
551
555
  name: string;
552
556
  uri: string;
553
- kind?: "agent" | "file" | "skill" | undefined;
557
+ kind?: "file" | "skill" | "agent" | undefined;
554
558
  }, {
555
559
  type: "resource_link";
556
560
  name: string;
557
561
  uri: string;
558
- kind?: "agent" | "file" | "skill" | undefined;
562
+ kind?: "file" | "skill" | "agent" | undefined;
559
563
  }>]>;
560
564
  }, "strip", z.ZodTypeAny, {
561
565
  content: {
@@ -570,7 +574,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
570
574
  type: "resource_link";
571
575
  name: string;
572
576
  uri: string;
573
- kind?: "agent" | "file" | "skill" | undefined;
577
+ kind?: "file" | "skill" | "agent" | undefined;
574
578
  };
575
579
  sessionUpdate: "user_message_chunk";
576
580
  messageId?: string | undefined;
@@ -587,7 +591,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
587
591
  type: "resource_link";
588
592
  name: string;
589
593
  uri: string;
590
- kind?: "agent" | "file" | "skill" | undefined;
594
+ kind?: "file" | "skill" | "agent" | undefined;
591
595
  };
592
596
  sessionUpdate: "user_message_chunk";
593
597
  messageId?: string | undefined;
@@ -629,12 +633,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
629
633
  type: "resource_link";
630
634
  name: string;
631
635
  uri: string;
632
- kind?: "agent" | "file" | "skill" | undefined;
636
+ kind?: "file" | "skill" | "agent" | undefined;
633
637
  }, {
634
638
  type: "resource_link";
635
639
  name: string;
636
640
  uri: string;
637
- kind?: "agent" | "file" | "skill" | undefined;
641
+ kind?: "file" | "skill" | "agent" | undefined;
638
642
  }>]>;
639
643
  }, "strip", z.ZodTypeAny, {
640
644
  content: {
@@ -649,7 +653,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
649
653
  type: "resource_link";
650
654
  name: string;
651
655
  uri: string;
652
- kind?: "agent" | "file" | "skill" | undefined;
656
+ kind?: "file" | "skill" | "agent" | undefined;
653
657
  };
654
658
  sessionUpdate: "agent_message_chunk";
655
659
  messageId: string;
@@ -667,7 +671,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
667
671
  type: "resource_link";
668
672
  name: string;
669
673
  uri: string;
670
- kind?: "agent" | "file" | "skill" | undefined;
674
+ kind?: "file" | "skill" | "agent" | undefined;
671
675
  };
672
676
  sessionUpdate: "agent_message_chunk";
673
677
  messageId: string;
@@ -710,12 +714,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
710
714
  type: "resource_link";
711
715
  name: string;
712
716
  uri: string;
713
- kind?: "agent" | "file" | "skill" | undefined;
717
+ kind?: "file" | "skill" | "agent" | undefined;
714
718
  }, {
715
719
  type: "resource_link";
716
720
  name: string;
717
721
  uri: string;
718
- kind?: "agent" | "file" | "skill" | undefined;
722
+ kind?: "file" | "skill" | "agent" | undefined;
719
723
  }>]>;
720
724
  }, "strip", z.ZodTypeAny, {
721
725
  content: {
@@ -730,7 +734,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
730
734
  type: "resource_link";
731
735
  name: string;
732
736
  uri: string;
733
- kind?: "agent" | "file" | "skill" | undefined;
737
+ kind?: "file" | "skill" | "agent" | undefined;
734
738
  };
735
739
  sessionUpdate: "agent_thought_chunk";
736
740
  messageId: string;
@@ -748,7 +752,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
748
752
  type: "resource_link";
749
753
  name: string;
750
754
  uri: string;
751
- kind?: "agent" | "file" | "skill" | undefined;
755
+ kind?: "file" | "skill" | "agent" | undefined;
752
756
  };
753
757
  sessionUpdate: "agent_thought_chunk";
754
758
  messageId: string;
@@ -798,12 +802,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
798
802
  type: "resource_link";
799
803
  name: string;
800
804
  uri: string;
801
- kind?: "agent" | "file" | "skill" | undefined;
805
+ kind?: "file" | "skill" | "agent" | undefined;
802
806
  }, {
803
807
  type: "resource_link";
804
808
  name: string;
805
809
  uri: string;
806
- kind?: "agent" | "file" | "skill" | undefined;
810
+ kind?: "file" | "skill" | "agent" | undefined;
807
811
  }>]>;
808
812
  }, "strip", z.ZodTypeAny, {
809
813
  type: "content";
@@ -819,7 +823,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
819
823
  type: "resource_link";
820
824
  name: string;
821
825
  uri: string;
822
- kind?: "agent" | "file" | "skill" | undefined;
826
+ kind?: "file" | "skill" | "agent" | undefined;
823
827
  };
824
828
  }, {
825
829
  type: "content";
@@ -835,7 +839,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
835
839
  type: "resource_link";
836
840
  name: string;
837
841
  uri: string;
838
- kind?: "agent" | "file" | "skill" | undefined;
842
+ kind?: "file" | "skill" | "agent" | undefined;
839
843
  };
840
844
  }>, z.ZodObject<{
841
845
  type: z.ZodLiteral<"diff">;
@@ -862,13 +866,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
862
866
  path: string;
863
867
  type: "patch";
864
868
  diff: string;
865
- change: "delete" | "add" | "update";
869
+ change: "add" | "delete" | "update";
866
870
  movePath?: string | undefined;
867
871
  }, {
868
872
  path: string;
869
873
  type: "patch";
870
874
  diff: string;
871
- change: "delete" | "add" | "update";
875
+ change: "add" | "delete" | "update";
872
876
  movePath?: string | undefined;
873
877
  }>, z.ZodObject<{
874
878
  type: z.ZodLiteral<"terminal">;
@@ -896,12 +900,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
896
900
  tool: z.ZodString;
897
901
  }, "strip", z.ZodTypeAny, {
898
902
  type: "mcp";
899
- tool: string;
900
903
  server: string;
904
+ tool: string;
901
905
  }, {
902
906
  type: "mcp";
903
- tool: string;
904
907
  server: string;
908
+ tool: string;
905
909
  }>, z.ZodObject<{
906
910
  type: z.ZodLiteral<"subagent">;
907
911
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -909,6 +913,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
909
913
  task: z.ZodOptional<z.ZodString>;
910
914
  /** The sub-agent's role or type, e.g. "Explore". */
911
915
  agentType: z.ZodOptional<z.ZodString>;
916
+ /** A named agent's address, distinct from its role. */
917
+ name: z.ZodOptional<z.ZodString>;
912
918
  model: z.ZodOptional<z.ZodString>;
913
919
  /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
914
920
  state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
@@ -952,7 +958,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
952
958
  }, "strip", z.ZodTypeAny, {
953
959
  id: string;
954
960
  title: string;
955
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
961
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
956
962
  toolCallId?: string | undefined;
957
963
  phaseId?: string | undefined;
958
964
  model?: string | undefined;
@@ -965,7 +971,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
965
971
  }, {
966
972
  id: string;
967
973
  title: string;
968
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
974
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
969
975
  toolCallId?: string | undefined;
970
976
  phaseId?: string | undefined;
971
977
  model?: string | undefined;
@@ -978,7 +984,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
978
984
  }>, "many">>;
979
985
  }, "strip", z.ZodTypeAny, {
980
986
  completed?: number | undefined;
981
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
987
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
982
988
  tokens?: number | undefined;
983
989
  durationMs?: number | undefined;
984
990
  startedAt?: number | undefined;
@@ -994,7 +1000,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
994
1000
  agents?: {
995
1001
  id: string;
996
1002
  title: string;
997
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1003
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
998
1004
  toolCallId?: string | undefined;
999
1005
  phaseId?: string | undefined;
1000
1006
  model?: string | undefined;
@@ -1007,7 +1013,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1007
1013
  }[] | undefined;
1008
1014
  }, {
1009
1015
  completed?: number | undefined;
1010
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1016
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1011
1017
  tokens?: number | undefined;
1012
1018
  durationMs?: number | undefined;
1013
1019
  startedAt?: number | undefined;
@@ -1023,7 +1029,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1023
1029
  agents?: {
1024
1030
  id: string;
1025
1031
  title: string;
1026
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1032
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1027
1033
  toolCallId?: string | undefined;
1028
1034
  phaseId?: string | undefined;
1029
1035
  model?: string | undefined;
@@ -1038,13 +1044,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1038
1044
  }, "strip", z.ZodTypeAny, {
1039
1045
  type: "subagent";
1040
1046
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
1041
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1047
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1042
1048
  model?: string | undefined;
1049
+ name?: string | undefined;
1043
1050
  task?: string | undefined;
1044
1051
  agentType?: string | undefined;
1045
1052
  workflow?: {
1046
1053
  completed?: number | undefined;
1047
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1054
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1048
1055
  tokens?: number | undefined;
1049
1056
  durationMs?: number | undefined;
1050
1057
  startedAt?: number | undefined;
@@ -1060,7 +1067,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1060
1067
  agents?: {
1061
1068
  id: string;
1062
1069
  title: string;
1063
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1070
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1064
1071
  toolCallId?: string | undefined;
1065
1072
  phaseId?: string | undefined;
1066
1073
  model?: string | undefined;
@@ -1074,13 +1081,15 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1074
1081
  } | undefined;
1075
1082
  }, {
1076
1083
  type: "subagent";
1077
- 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;
1078
1086
  model?: string | undefined;
1087
+ name?: string | undefined;
1079
1088
  task?: string | undefined;
1080
1089
  agentType?: string | undefined;
1081
1090
  workflow?: {
1082
1091
  completed?: number | undefined;
1083
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1092
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1084
1093
  tokens?: number | undefined;
1085
1094
  durationMs?: number | undefined;
1086
1095
  startedAt?: number | undefined;
@@ -1096,7 +1105,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1096
1105
  agents?: {
1097
1106
  id: string;
1098
1107
  title: string;
1099
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1108
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1100
1109
  toolCallId?: string | undefined;
1101
1110
  phaseId?: string | undefined;
1102
1111
  model?: string | undefined;
@@ -1108,7 +1117,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1108
1117
  result?: string | undefined;
1109
1118
  }[] | undefined;
1110
1119
  } | undefined;
1111
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1112
1120
  }>, z.ZodObject<{
1113
1121
  type: z.ZodLiteral<"skill">;
1114
1122
  name: z.ZodString;
@@ -1171,22 +1179,60 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1171
1179
  status: "completed" | "failed" | "pending" | "in_progress";
1172
1180
  toolCallId: string;
1173
1181
  title: string;
1174
- kind: "search" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | "other";
1182
+ kind: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch";
1175
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;
1176
1221
  detail?: {
1177
1222
  type: "mcp";
1178
- tool: string;
1179
1223
  server: string;
1224
+ tool: string;
1180
1225
  } | {
1181
1226
  type: "subagent";
1182
1227
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
1183
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1228
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1184
1229
  model?: string | undefined;
1230
+ name?: string | undefined;
1185
1231
  task?: string | undefined;
1186
1232
  agentType?: string | undefined;
1187
1233
  workflow?: {
1188
1234
  completed?: number | undefined;
1189
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1235
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1190
1236
  tokens?: number | undefined;
1191
1237
  durationMs?: number | undefined;
1192
1238
  startedAt?: number | undefined;
@@ -1202,7 +1248,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1202
1248
  agents?: {
1203
1249
  id: string;
1204
1250
  title: string;
1205
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1251
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1206
1252
  toolCallId?: string | undefined;
1207
1253
  phaseId?: string | undefined;
1208
1254
  model?: string | undefined;
@@ -1234,7 +1280,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1234
1280
  text: string;
1235
1281
  more?: number | undefined;
1236
1282
  } | undefined;
1237
- parentToolCallId?: string | undefined;
1283
+ }, {
1284
+ status: "completed" | "failed" | "pending" | "in_progress";
1285
+ toolCallId: string;
1286
+ title: string;
1287
+ kind: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch";
1288
+ sessionUpdate: "tool_call";
1238
1289
  content?: ({
1239
1290
  type: "content";
1240
1291
  content: {
@@ -1249,7 +1300,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1249
1300
  type: "resource_link";
1250
1301
  name: string;
1251
1302
  uri: string;
1252
- kind?: "agent" | "file" | "skill" | undefined;
1303
+ kind?: "file" | "skill" | "agent" | undefined;
1253
1304
  };
1254
1305
  } | {
1255
1306
  path: string;
@@ -1260,36 +1311,33 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1260
1311
  path: string;
1261
1312
  type: "patch";
1262
1313
  diff: string;
1263
- change: "delete" | "add" | "update";
1314
+ change: "add" | "delete" | "update";
1264
1315
  movePath?: string | undefined;
1265
1316
  } | {
1266
1317
  type: "terminal";
1267
1318
  terminalId: string;
1268
1319
  })[] | undefined;
1320
+ parentToolCallId?: string | undefined;
1269
1321
  rawInput?: unknown;
1270
1322
  locations?: {
1271
1323
  path: string;
1272
1324
  line?: number | undefined;
1273
1325
  }[] | undefined;
1274
- }, {
1275
- status: "completed" | "failed" | "pending" | "in_progress";
1276
- toolCallId: string;
1277
- title: string;
1278
- kind: "search" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | "other";
1279
- sessionUpdate: "tool_call";
1280
1326
  detail?: {
1281
1327
  type: "mcp";
1282
- tool: string;
1283
1328
  server: string;
1329
+ tool: string;
1284
1330
  } | {
1285
1331
  type: "subagent";
1286
- 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;
1287
1334
  model?: string | undefined;
1335
+ name?: string | undefined;
1288
1336
  task?: string | undefined;
1289
1337
  agentType?: string | undefined;
1290
1338
  workflow?: {
1291
1339
  completed?: number | undefined;
1292
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1340
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1293
1341
  tokens?: number | undefined;
1294
1342
  durationMs?: number | undefined;
1295
1343
  startedAt?: number | undefined;
@@ -1305,7 +1353,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1305
1353
  agents?: {
1306
1354
  id: string;
1307
1355
  title: string;
1308
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1356
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1309
1357
  toolCallId?: string | undefined;
1310
1358
  phaseId?: string | undefined;
1311
1359
  model?: string | undefined;
@@ -1317,7 +1365,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1317
1365
  result?: string | undefined;
1318
1366
  }[] | undefined;
1319
1367
  } | undefined;
1320
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1321
1368
  } | {
1322
1369
  type: "skill";
1323
1370
  name: string;
@@ -1338,43 +1385,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1338
1385
  text: string;
1339
1386
  more?: number | undefined;
1340
1387
  } | undefined;
1341
- parentToolCallId?: string | undefined;
1342
- content?: ({
1343
- type: "content";
1344
- content: {
1345
- type: "text";
1346
- text: string;
1347
- } | {
1348
- type: "image";
1349
- mimeType: string;
1350
- data?: string | undefined;
1351
- uri?: string | undefined;
1352
- } | {
1353
- type: "resource_link";
1354
- name: string;
1355
- uri: string;
1356
- kind?: "agent" | "file" | "skill" | undefined;
1357
- };
1358
- } | {
1359
- path: string;
1360
- type: "diff";
1361
- newText: string;
1362
- oldText?: string | null | undefined;
1363
- } | {
1364
- path: string;
1365
- type: "patch";
1366
- diff: string;
1367
- change: "delete" | "add" | "update";
1368
- movePath?: string | undefined;
1369
- } | {
1370
- type: "terminal";
1371
- terminalId: string;
1372
- })[] | undefined;
1373
- rawInput?: unknown;
1374
- locations?: {
1375
- path: string;
1376
- line?: number | undefined;
1377
- }[] | undefined;
1378
1388
  }>, z.ZodObject<{
1379
1389
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
1380
1390
  toolCallId: z.ZodString;
@@ -1387,12 +1397,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1387
1397
  tool: z.ZodString;
1388
1398
  }, "strip", z.ZodTypeAny, {
1389
1399
  type: "mcp";
1390
- tool: string;
1391
1400
  server: string;
1401
+ tool: string;
1392
1402
  }, {
1393
1403
  type: "mcp";
1394
- tool: string;
1395
1404
  server: string;
1405
+ tool: string;
1396
1406
  }>, z.ZodObject<{
1397
1407
  type: z.ZodLiteral<"subagent">;
1398
1408
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -1400,6 +1410,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1400
1410
  task: z.ZodOptional<z.ZodString>;
1401
1411
  /** The sub-agent's role or type, e.g. "Explore". */
1402
1412
  agentType: z.ZodOptional<z.ZodString>;
1413
+ /** A named agent's address, distinct from its role. */
1414
+ name: z.ZodOptional<z.ZodString>;
1403
1415
  model: z.ZodOptional<z.ZodString>;
1404
1416
  /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
1405
1417
  state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
@@ -1443,7 +1455,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1443
1455
  }, "strip", z.ZodTypeAny, {
1444
1456
  id: string;
1445
1457
  title: string;
1446
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1458
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1447
1459
  toolCallId?: string | undefined;
1448
1460
  phaseId?: string | undefined;
1449
1461
  model?: string | undefined;
@@ -1456,7 +1468,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1456
1468
  }, {
1457
1469
  id: string;
1458
1470
  title: string;
1459
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1471
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1460
1472
  toolCallId?: string | undefined;
1461
1473
  phaseId?: string | undefined;
1462
1474
  model?: string | undefined;
@@ -1469,7 +1481,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1469
1481
  }>, "many">>;
1470
1482
  }, "strip", z.ZodTypeAny, {
1471
1483
  completed?: number | undefined;
1472
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1484
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1473
1485
  tokens?: number | undefined;
1474
1486
  durationMs?: number | undefined;
1475
1487
  startedAt?: number | undefined;
@@ -1485,7 +1497,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1485
1497
  agents?: {
1486
1498
  id: string;
1487
1499
  title: string;
1488
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1500
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1489
1501
  toolCallId?: string | undefined;
1490
1502
  phaseId?: string | undefined;
1491
1503
  model?: string | undefined;
@@ -1498,7 +1510,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1498
1510
  }[] | undefined;
1499
1511
  }, {
1500
1512
  completed?: number | undefined;
1501
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1513
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1502
1514
  tokens?: number | undefined;
1503
1515
  durationMs?: number | undefined;
1504
1516
  startedAt?: number | undefined;
@@ -1514,7 +1526,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1514
1526
  agents?: {
1515
1527
  id: string;
1516
1528
  title: string;
1517
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1529
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1518
1530
  toolCallId?: string | undefined;
1519
1531
  phaseId?: string | undefined;
1520
1532
  model?: string | undefined;
@@ -1529,13 +1541,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1529
1541
  }, "strip", z.ZodTypeAny, {
1530
1542
  type: "subagent";
1531
1543
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
1532
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1544
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1533
1545
  model?: string | undefined;
1546
+ name?: string | undefined;
1534
1547
  task?: string | undefined;
1535
1548
  agentType?: string | undefined;
1536
1549
  workflow?: {
1537
1550
  completed?: number | undefined;
1538
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1551
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1539
1552
  tokens?: number | undefined;
1540
1553
  durationMs?: number | undefined;
1541
1554
  startedAt?: number | undefined;
@@ -1551,7 +1564,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1551
1564
  agents?: {
1552
1565
  id: string;
1553
1566
  title: string;
1554
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1567
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1555
1568
  toolCallId?: string | undefined;
1556
1569
  phaseId?: string | undefined;
1557
1570
  model?: string | undefined;
@@ -1565,13 +1578,15 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1565
1578
  } | undefined;
1566
1579
  }, {
1567
1580
  type: "subagent";
1568
- 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;
1569
1583
  model?: string | undefined;
1584
+ name?: string | undefined;
1570
1585
  task?: string | undefined;
1571
1586
  agentType?: string | undefined;
1572
1587
  workflow?: {
1573
1588
  completed?: number | undefined;
1574
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1589
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1575
1590
  tokens?: number | undefined;
1576
1591
  durationMs?: number | undefined;
1577
1592
  startedAt?: number | undefined;
@@ -1587,7 +1602,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1587
1602
  agents?: {
1588
1603
  id: string;
1589
1604
  title: string;
1590
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1605
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1591
1606
  toolCallId?: string | undefined;
1592
1607
  phaseId?: string | undefined;
1593
1608
  model?: string | undefined;
@@ -1599,7 +1614,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1599
1614
  result?: string | undefined;
1600
1615
  }[] | undefined;
1601
1616
  } | undefined;
1602
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1603
1617
  }>, z.ZodObject<{
1604
1618
  type: z.ZodLiteral<"skill">;
1605
1619
  name: z.ZodString;
@@ -1695,12 +1709,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1695
1709
  type: "resource_link";
1696
1710
  name: string;
1697
1711
  uri: string;
1698
- kind?: "agent" | "file" | "skill" | undefined;
1712
+ kind?: "file" | "skill" | "agent" | undefined;
1699
1713
  }, {
1700
1714
  type: "resource_link";
1701
1715
  name: string;
1702
1716
  uri: string;
1703
- kind?: "agent" | "file" | "skill" | undefined;
1717
+ kind?: "file" | "skill" | "agent" | undefined;
1704
1718
  }>]>;
1705
1719
  }, "strip", z.ZodTypeAny, {
1706
1720
  type: "content";
@@ -1716,7 +1730,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1716
1730
  type: "resource_link";
1717
1731
  name: string;
1718
1732
  uri: string;
1719
- kind?: "agent" | "file" | "skill" | undefined;
1733
+ kind?: "file" | "skill" | "agent" | undefined;
1720
1734
  };
1721
1735
  }, {
1722
1736
  type: "content";
@@ -1732,7 +1746,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1732
1746
  type: "resource_link";
1733
1747
  name: string;
1734
1748
  uri: string;
1735
- kind?: "agent" | "file" | "skill" | undefined;
1749
+ kind?: "file" | "skill" | "agent" | undefined;
1736
1750
  };
1737
1751
  }>, z.ZodObject<{
1738
1752
  type: z.ZodLiteral<"diff">;
@@ -1759,13 +1773,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1759
1773
  path: string;
1760
1774
  type: "patch";
1761
1775
  diff: string;
1762
- change: "delete" | "add" | "update";
1776
+ change: "add" | "delete" | "update";
1763
1777
  movePath?: string | undefined;
1764
1778
  }, {
1765
1779
  path: string;
1766
1780
  type: "patch";
1767
1781
  diff: string;
1768
- change: "delete" | "add" | "update";
1782
+ change: "add" | "delete" | "update";
1769
1783
  movePath?: string | undefined;
1770
1784
  }>, z.ZodObject<{
1771
1785
  type: z.ZodLiteral<"terminal">;
@@ -1785,20 +1799,53 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1785
1799
  sessionUpdate: "tool_call_update";
1786
1800
  status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
1787
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;
1788
1834
  detail?: {
1789
1835
  type: "mcp";
1790
- tool: string;
1791
1836
  server: string;
1837
+ tool: string;
1792
1838
  } | {
1793
1839
  type: "subagent";
1794
1840
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
1795
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1841
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
1796
1842
  model?: string | undefined;
1843
+ name?: string | undefined;
1797
1844
  task?: string | undefined;
1798
1845
  agentType?: string | undefined;
1799
1846
  workflow?: {
1800
1847
  completed?: number | undefined;
1801
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1848
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1802
1849
  tokens?: number | undefined;
1803
1850
  durationMs?: number | undefined;
1804
1851
  startedAt?: number | undefined;
@@ -1814,7 +1861,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1814
1861
  agents?: {
1815
1862
  id: string;
1816
1863
  title: string;
1817
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1864
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1818
1865
  toolCallId?: string | undefined;
1819
1866
  phaseId?: string | undefined;
1820
1867
  model?: string | undefined;
@@ -1846,7 +1893,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1846
1893
  text: string;
1847
1894
  more?: number | undefined;
1848
1895
  } | undefined;
1849
- 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;
1850
1903
  content?: ({
1851
1904
  type: "content";
1852
1905
  content: {
@@ -1861,7 +1914,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1861
1914
  type: "resource_link";
1862
1915
  name: string;
1863
1916
  uri: string;
1864
- kind?: "agent" | "file" | "skill" | undefined;
1917
+ kind?: "file" | "skill" | "agent" | undefined;
1865
1918
  };
1866
1919
  } | {
1867
1920
  path: string;
@@ -1872,32 +1925,28 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1872
1925
  path: string;
1873
1926
  type: "patch";
1874
1927
  diff: string;
1875
- change: "delete" | "add" | "update";
1928
+ change: "add" | "delete" | "update";
1876
1929
  movePath?: string | undefined;
1877
1930
  } | {
1878
1931
  type: "terminal";
1879
1932
  terminalId: string;
1880
1933
  })[] | undefined;
1881
- appendOutput?: string | undefined;
1882
- rawOutput?: unknown;
1883
- }, {
1884
- toolCallId: string;
1885
- sessionUpdate: "tool_call_update";
1886
- status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
1887
- title?: string | undefined;
1934
+ parentToolCallId?: string | undefined;
1888
1935
  detail?: {
1889
1936
  type: "mcp";
1890
- tool: string;
1891
1937
  server: string;
1938
+ tool: string;
1892
1939
  } | {
1893
1940
  type: "subagent";
1894
- 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;
1895
1943
  model?: string | undefined;
1944
+ name?: string | undefined;
1896
1945
  task?: string | undefined;
1897
1946
  agentType?: string | undefined;
1898
1947
  workflow?: {
1899
1948
  completed?: number | undefined;
1900
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1949
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
1901
1950
  tokens?: number | undefined;
1902
1951
  durationMs?: number | undefined;
1903
1952
  startedAt?: number | undefined;
@@ -1913,7 +1962,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1913
1962
  agents?: {
1914
1963
  id: string;
1915
1964
  title: string;
1916
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1965
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
1917
1966
  toolCallId?: string | undefined;
1918
1967
  phaseId?: string | undefined;
1919
1968
  model?: string | undefined;
@@ -1925,7 +1974,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1925
1974
  result?: string | undefined;
1926
1975
  }[] | undefined;
1927
1976
  } | undefined;
1928
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
1929
1977
  } | {
1930
1978
  type: "skill";
1931
1979
  name: string;
@@ -1946,38 +1994,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1946
1994
  text: string;
1947
1995
  more?: number | undefined;
1948
1996
  } | undefined;
1949
- parentToolCallId?: string | undefined;
1950
- content?: ({
1951
- type: "content";
1952
- content: {
1953
- type: "text";
1954
- text: string;
1955
- } | {
1956
- type: "image";
1957
- mimeType: string;
1958
- data?: string | undefined;
1959
- uri?: string | undefined;
1960
- } | {
1961
- type: "resource_link";
1962
- name: string;
1963
- uri: string;
1964
- kind?: "agent" | "file" | "skill" | undefined;
1965
- };
1966
- } | {
1967
- path: string;
1968
- type: "diff";
1969
- newText: string;
1970
- oldText?: string | null | undefined;
1971
- } | {
1972
- path: string;
1973
- type: "patch";
1974
- diff: string;
1975
- change: "delete" | "add" | "update";
1976
- movePath?: string | undefined;
1977
- } | {
1978
- type: "terminal";
1979
- terminalId: string;
1980
- })[] | undefined;
1981
1997
  appendOutput?: string | undefined;
1982
1998
  rawOutput?: unknown;
1983
1999
  }>, z.ZodObject<{
@@ -2020,16 +2036,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2020
2036
  iterations: z.ZodOptional<z.ZodNumber>;
2021
2037
  lastReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2022
2038
  }, "strip", z.ZodTypeAny, {
2023
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2024
2039
  objective: string;
2040
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2025
2041
  tokenBudget?: number | null | undefined;
2026
2042
  tokensUsed?: number | undefined;
2027
2043
  timeUsedSeconds?: number | undefined;
2028
2044
  iterations?: number | undefined;
2029
2045
  lastReason?: string | null | undefined;
2030
2046
  }, {
2031
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2032
2047
  objective: string;
2048
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2033
2049
  tokenBudget?: number | null | undefined;
2034
2050
  tokensUsed?: number | undefined;
2035
2051
  timeUsedSeconds?: number | undefined;
@@ -2039,8 +2055,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2039
2055
  }, "strip", z.ZodTypeAny, {
2040
2056
  sessionUpdate: "ls_goal";
2041
2057
  goal: {
2042
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2043
2058
  objective: string;
2059
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2044
2060
  tokenBudget?: number | null | undefined;
2045
2061
  tokensUsed?: number | undefined;
2046
2062
  timeUsedSeconds?: number | undefined;
@@ -2050,8 +2066,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2050
2066
  }, {
2051
2067
  sessionUpdate: "ls_goal";
2052
2068
  goal: {
2053
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2054
2069
  objective: string;
2070
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
2055
2071
  tokenBudget?: number | null | undefined;
2056
2072
  tokensUsed?: number | undefined;
2057
2073
  timeUsedSeconds?: number | undefined;
@@ -2120,6 +2136,35 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2120
2136
  sessionUpdate: "usage_update";
2121
2137
  usedTokens?: number | undefined;
2122
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
+ }[];
2123
2168
  }>, z.ZodObject<{
2124
2169
  sessionUpdate: z.ZodLiteral<"ls_message_done">;
2125
2170
  parentToolCallId: z.ZodOptional<z.ZodString>;
@@ -2147,22 +2192,22 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2147
2192
  sessionUpdate: "ls_message_done";
2148
2193
  messageId: string;
2149
2194
  role: "agent" | "thought" | "user";
2195
+ parentToolCallId?: string | undefined;
2150
2196
  questions?: {
2151
2197
  options: string[];
2152
2198
  id: string;
2153
2199
  title: string;
2154
2200
  }[] | undefined;
2155
- parentToolCallId?: string | undefined;
2156
2201
  }, {
2157
2202
  sessionUpdate: "ls_message_done";
2158
2203
  messageId: string;
2159
2204
  role: "agent" | "thought" | "user";
2205
+ parentToolCallId?: string | undefined;
2160
2206
  questions?: {
2161
2207
  options: string[];
2162
2208
  id: string;
2163
2209
  title: string;
2164
2210
  }[] | undefined;
2165
- parentToolCallId?: string | undefined;
2166
2211
  }>, z.ZodObject<{
2167
2212
  sessionUpdate: z.ZodLiteral<"ls_config">;
2168
2213
  options: z.ZodArray<z.ZodObject<{
@@ -2192,7 +2237,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2192
2237
  }[];
2193
2238
  id: string;
2194
2239
  name: string;
2195
- category: "mode" | "model" | "other" | "effort";
2240
+ category: "mode" | "model" | "effort" | "other";
2196
2241
  current: string;
2197
2242
  }, {
2198
2243
  values: {
@@ -2203,7 +2248,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2203
2248
  id: string;
2204
2249
  name: string;
2205
2250
  current: string;
2206
- category?: "mode" | "model" | "other" | "effort" | undefined;
2251
+ category?: "mode" | "model" | "effort" | "other" | undefined;
2207
2252
  }>, "many">;
2208
2253
  }, "strip", z.ZodTypeAny, {
2209
2254
  options: {
@@ -2214,7 +2259,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2214
2259
  }[];
2215
2260
  id: string;
2216
2261
  name: string;
2217
- category: "mode" | "model" | "other" | "effort";
2262
+ category: "mode" | "model" | "effort" | "other";
2218
2263
  current: string;
2219
2264
  }[];
2220
2265
  sessionUpdate: "ls_config";
@@ -2228,7 +2273,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2228
2273
  id: string;
2229
2274
  name: string;
2230
2275
  current: string;
2231
- category?: "mode" | "model" | "other" | "effort" | undefined;
2276
+ category?: "mode" | "model" | "effort" | "other" | undefined;
2232
2277
  }[];
2233
2278
  sessionUpdate: "ls_config";
2234
2279
  }>, z.ZodObject<{
@@ -2258,13 +2303,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2258
2303
  sessionUpdate: "ls_turn";
2259
2304
  parentToolCallId?: string | undefined;
2260
2305
  turnId?: string | undefined;
2261
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2306
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2262
2307
  }, {
2263
2308
  state: "started" | "ended";
2264
2309
  sessionUpdate: "ls_turn";
2265
2310
  parentToolCallId?: string | undefined;
2266
2311
  turnId?: string | undefined;
2267
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2312
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2268
2313
  }>, z.ZodObject<{
2269
2314
  sessionUpdate: z.ZodLiteral<"ls_permission">;
2270
2315
  requestId: z.ZodString;
@@ -2277,12 +2322,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2277
2322
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
2278
2323
  }, "strip", z.ZodTypeAny, {
2279
2324
  name: string;
2280
- optionId: string;
2281
2325
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2326
+ optionId: string;
2282
2327
  }, {
2283
2328
  name: string;
2284
- optionId: string;
2285
2329
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2330
+ optionId: string;
2286
2331
  }>, "many">;
2287
2332
  /**
2288
2333
  * The agent is asking the user something: answer with `sessions.answer`.
@@ -2312,8 +2357,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2312
2357
  required: z.ZodOptional<z.ZodBoolean>;
2313
2358
  }, "strip", z.ZodTypeAny, {
2314
2359
  id: string;
2315
- kind: "text" | "choice" | "choices";
2316
2360
  text: string;
2361
+ kind: "text" | "choice" | "choices";
2317
2362
  options?: {
2318
2363
  value: string;
2319
2364
  label: string;
@@ -2325,8 +2370,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2325
2370
  required?: boolean | undefined;
2326
2371
  }, {
2327
2372
  id: string;
2328
- kind: "text" | "choice" | "choices";
2329
2373
  text: string;
2374
+ kind: "text" | "choice" | "choices";
2330
2375
  options?: {
2331
2376
  value: string;
2332
2377
  label: string;
@@ -2340,18 +2385,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2340
2385
  }, "strip", z.ZodTypeAny, {
2341
2386
  options: {
2342
2387
  name: string;
2343
- optionId: string;
2344
2388
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2389
+ optionId: string;
2345
2390
  }[];
2346
2391
  title: string;
2347
- requestId: string;
2348
2392
  sessionUpdate: "ls_permission";
2393
+ requestId: string;
2349
2394
  toolCallId?: string | undefined;
2350
2395
  detail?: string | undefined;
2351
2396
  questions?: {
2352
2397
  id: string;
2353
- kind: "text" | "choice" | "choices";
2354
2398
  text: string;
2399
+ kind: "text" | "choice" | "choices";
2355
2400
  options?: {
2356
2401
  value: string;
2357
2402
  label: string;
@@ -2365,18 +2410,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2365
2410
  }, {
2366
2411
  options: {
2367
2412
  name: string;
2368
- optionId: string;
2369
2413
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2414
+ optionId: string;
2370
2415
  }[];
2371
2416
  title: string;
2372
- requestId: string;
2373
2417
  sessionUpdate: "ls_permission";
2418
+ requestId: string;
2374
2419
  toolCallId?: string | undefined;
2375
2420
  detail?: string | undefined;
2376
2421
  questions?: {
2377
2422
  id: string;
2378
- kind: "text" | "choice" | "choices";
2379
2423
  text: string;
2424
+ kind: "text" | "choice" | "choices";
2380
2425
  options?: {
2381
2426
  value: string;
2382
2427
  label: string;
@@ -2406,8 +2451,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2406
2451
  other?: string | undefined;
2407
2452
  }>, "many">>;
2408
2453
  }, "strip", z.ZodTypeAny, {
2409
- requestId: string;
2410
2454
  sessionUpdate: "ls_permission_resolved";
2455
+ requestId: string;
2411
2456
  optionId?: string | undefined;
2412
2457
  answers?: {
2413
2458
  values: string[];
@@ -2415,8 +2460,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2415
2460
  other?: string | undefined;
2416
2461
  }[] | undefined;
2417
2462
  }, {
2418
- requestId: string;
2419
2463
  sessionUpdate: "ls_permission_resolved";
2464
+ requestId: string;
2420
2465
  optionId?: string | undefined;
2421
2466
  answers?: {
2422
2467
  values: string[];
@@ -2428,21 +2473,21 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2428
2473
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
2429
2474
  deviceId: z.ZodOptional<z.ZodString>;
2430
2475
  }, "strip", z.ZodTypeAny, {
2431
- driver: "remote" | "desktop" | "none";
2432
2476
  sessionUpdate: "ls_driver";
2477
+ driver: "desktop" | "remote" | "none";
2433
2478
  deviceId?: string | undefined;
2434
2479
  }, {
2435
- driver: "remote" | "desktop" | "none";
2436
2480
  sessionUpdate: "ls_driver";
2481
+ driver: "desktop" | "remote" | "none";
2437
2482
  deviceId?: string | undefined;
2438
2483
  }>, z.ZodObject<{
2439
2484
  sessionUpdate: z.ZodLiteral<"ls_status">;
2440
2485
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
2441
2486
  }, "strip", z.ZodTypeAny, {
2442
- state: "running" | "idle" | "waiting" | "error" | "offline";
2487
+ state: "running" | "error" | "idle" | "waiting" | "offline";
2443
2488
  sessionUpdate: "ls_status";
2444
2489
  }, {
2445
- state: "running" | "idle" | "waiting" | "error" | "offline";
2490
+ state: "running" | "error" | "idle" | "waiting" | "offline";
2446
2491
  sessionUpdate: "ls_status";
2447
2492
  }>, z.ZodObject<{
2448
2493
  sessionUpdate: z.ZodLiteral<"ls_task">;
@@ -2463,64 +2508,64 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
2463
2508
  }, "strip", z.ZodTypeAny, {
2464
2509
  id: string;
2465
2510
  title: string;
2466
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
2511
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
2467
2512
  startedAt: number;
2468
2513
  kind: "shell" | "monitor";
2469
2514
  toolCallId?: string | undefined;
2470
2515
  endedAt?: number | undefined;
2471
- lastSeq?: number | undefined;
2472
2516
  command?: string | undefined;
2473
2517
  summary?: string | undefined;
2474
2518
  exitCode?: number | undefined;
2475
2519
  output?: boolean | undefined;
2476
2520
  canStop?: boolean | undefined;
2521
+ lastSeq?: number | undefined;
2477
2522
  }, {
2478
2523
  id: string;
2479
2524
  title: string;
2480
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
2525
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
2481
2526
  startedAt: number;
2482
2527
  kind: "shell" | "monitor";
2483
2528
  toolCallId?: string | undefined;
2484
2529
  endedAt?: number | undefined;
2485
- lastSeq?: number | undefined;
2486
2530
  command?: string | undefined;
2487
2531
  summary?: string | undefined;
2488
2532
  exitCode?: number | undefined;
2489
2533
  output?: boolean | undefined;
2490
2534
  canStop?: boolean | undefined;
2535
+ lastSeq?: number | undefined;
2491
2536
  }>;
2492
2537
  }, "strip", z.ZodTypeAny, {
2493
2538
  task: {
2494
2539
  id: string;
2495
2540
  title: string;
2496
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
2541
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
2497
2542
  startedAt: number;
2498
2543
  kind: "shell" | "monitor";
2499
2544
  toolCallId?: string | undefined;
2500
2545
  endedAt?: number | undefined;
2501
- lastSeq?: number | undefined;
2502
2546
  command?: string | undefined;
2503
2547
  summary?: string | undefined;
2504
2548
  exitCode?: number | undefined;
2505
2549
  output?: boolean | undefined;
2506
2550
  canStop?: boolean | undefined;
2551
+ lastSeq?: number | undefined;
2507
2552
  };
2508
2553
  sessionUpdate: "ls_task";
2509
2554
  }, {
2510
2555
  task: {
2511
2556
  id: string;
2512
2557
  title: string;
2513
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
2558
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
2514
2559
  startedAt: number;
2515
2560
  kind: "shell" | "monitor";
2516
2561
  toolCallId?: string | undefined;
2517
2562
  endedAt?: number | undefined;
2518
- lastSeq?: number | undefined;
2519
2563
  command?: string | undefined;
2520
2564
  summary?: string | undefined;
2521
2565
  exitCode?: number | undefined;
2522
2566
  output?: boolean | undefined;
2523
2567
  canStop?: boolean | undefined;
2568
+ lastSeq?: number | undefined;
2524
2569
  };
2525
2570
  sessionUpdate: "ls_task";
2526
2571
  }>, z.ZodObject<{
@@ -2583,12 +2628,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2583
2628
  type: "resource_link";
2584
2629
  name: string;
2585
2630
  uri: string;
2586
- kind?: "agent" | "file" | "skill" | undefined;
2631
+ kind?: "file" | "skill" | "agent" | undefined;
2587
2632
  }, {
2588
2633
  type: "resource_link";
2589
2634
  name: string;
2590
2635
  uri: string;
2591
- kind?: "agent" | "file" | "skill" | undefined;
2636
+ kind?: "file" | "skill" | "agent" | undefined;
2592
2637
  }>]>;
2593
2638
  }, "strip", z.ZodTypeAny, {
2594
2639
  content: {
@@ -2603,7 +2648,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2603
2648
  type: "resource_link";
2604
2649
  name: string;
2605
2650
  uri: string;
2606
- kind?: "agent" | "file" | "skill" | undefined;
2651
+ kind?: "file" | "skill" | "agent" | undefined;
2607
2652
  };
2608
2653
  sessionUpdate: "user_message_chunk";
2609
2654
  messageId?: string | undefined;
@@ -2620,7 +2665,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2620
2665
  type: "resource_link";
2621
2666
  name: string;
2622
2667
  uri: string;
2623
- kind?: "agent" | "file" | "skill" | undefined;
2668
+ kind?: "file" | "skill" | "agent" | undefined;
2624
2669
  };
2625
2670
  sessionUpdate: "user_message_chunk";
2626
2671
  messageId?: string | undefined;
@@ -2662,12 +2707,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2662
2707
  type: "resource_link";
2663
2708
  name: string;
2664
2709
  uri: string;
2665
- kind?: "agent" | "file" | "skill" | undefined;
2710
+ kind?: "file" | "skill" | "agent" | undefined;
2666
2711
  }, {
2667
2712
  type: "resource_link";
2668
2713
  name: string;
2669
2714
  uri: string;
2670
- kind?: "agent" | "file" | "skill" | undefined;
2715
+ kind?: "file" | "skill" | "agent" | undefined;
2671
2716
  }>]>;
2672
2717
  }, "strip", z.ZodTypeAny, {
2673
2718
  content: {
@@ -2682,7 +2727,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2682
2727
  type: "resource_link";
2683
2728
  name: string;
2684
2729
  uri: string;
2685
- kind?: "agent" | "file" | "skill" | undefined;
2730
+ kind?: "file" | "skill" | "agent" | undefined;
2686
2731
  };
2687
2732
  sessionUpdate: "agent_message_chunk";
2688
2733
  messageId: string;
@@ -2700,7 +2745,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2700
2745
  type: "resource_link";
2701
2746
  name: string;
2702
2747
  uri: string;
2703
- kind?: "agent" | "file" | "skill" | undefined;
2748
+ kind?: "file" | "skill" | "agent" | undefined;
2704
2749
  };
2705
2750
  sessionUpdate: "agent_message_chunk";
2706
2751
  messageId: string;
@@ -2743,12 +2788,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2743
2788
  type: "resource_link";
2744
2789
  name: string;
2745
2790
  uri: string;
2746
- kind?: "agent" | "file" | "skill" | undefined;
2791
+ kind?: "file" | "skill" | "agent" | undefined;
2747
2792
  }, {
2748
2793
  type: "resource_link";
2749
2794
  name: string;
2750
2795
  uri: string;
2751
- kind?: "agent" | "file" | "skill" | undefined;
2796
+ kind?: "file" | "skill" | "agent" | undefined;
2752
2797
  }>]>;
2753
2798
  }, "strip", z.ZodTypeAny, {
2754
2799
  content: {
@@ -2763,7 +2808,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2763
2808
  type: "resource_link";
2764
2809
  name: string;
2765
2810
  uri: string;
2766
- kind?: "agent" | "file" | "skill" | undefined;
2811
+ kind?: "file" | "skill" | "agent" | undefined;
2767
2812
  };
2768
2813
  sessionUpdate: "agent_thought_chunk";
2769
2814
  messageId: string;
@@ -2781,7 +2826,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2781
2826
  type: "resource_link";
2782
2827
  name: string;
2783
2828
  uri: string;
2784
- kind?: "agent" | "file" | "skill" | undefined;
2829
+ kind?: "file" | "skill" | "agent" | undefined;
2785
2830
  };
2786
2831
  sessionUpdate: "agent_thought_chunk";
2787
2832
  messageId: string;
@@ -2831,12 +2876,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2831
2876
  type: "resource_link";
2832
2877
  name: string;
2833
2878
  uri: string;
2834
- kind?: "agent" | "file" | "skill" | undefined;
2879
+ kind?: "file" | "skill" | "agent" | undefined;
2835
2880
  }, {
2836
2881
  type: "resource_link";
2837
2882
  name: string;
2838
2883
  uri: string;
2839
- kind?: "agent" | "file" | "skill" | undefined;
2884
+ kind?: "file" | "skill" | "agent" | undefined;
2840
2885
  }>]>;
2841
2886
  }, "strip", z.ZodTypeAny, {
2842
2887
  type: "content";
@@ -2852,7 +2897,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2852
2897
  type: "resource_link";
2853
2898
  name: string;
2854
2899
  uri: string;
2855
- kind?: "agent" | "file" | "skill" | undefined;
2900
+ kind?: "file" | "skill" | "agent" | undefined;
2856
2901
  };
2857
2902
  }, {
2858
2903
  type: "content";
@@ -2868,7 +2913,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2868
2913
  type: "resource_link";
2869
2914
  name: string;
2870
2915
  uri: string;
2871
- kind?: "agent" | "file" | "skill" | undefined;
2916
+ kind?: "file" | "skill" | "agent" | undefined;
2872
2917
  };
2873
2918
  }>, z.ZodObject<{
2874
2919
  type: z.ZodLiteral<"diff">;
@@ -2895,13 +2940,13 @@ export declare const sessionEventSchema: z.ZodObject<{
2895
2940
  path: string;
2896
2941
  type: "patch";
2897
2942
  diff: string;
2898
- change: "delete" | "add" | "update";
2943
+ change: "add" | "delete" | "update";
2899
2944
  movePath?: string | undefined;
2900
2945
  }, {
2901
2946
  path: string;
2902
2947
  type: "patch";
2903
2948
  diff: string;
2904
- change: "delete" | "add" | "update";
2949
+ change: "add" | "delete" | "update";
2905
2950
  movePath?: string | undefined;
2906
2951
  }>, z.ZodObject<{
2907
2952
  type: z.ZodLiteral<"terminal">;
@@ -2929,12 +2974,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2929
2974
  tool: z.ZodString;
2930
2975
  }, "strip", z.ZodTypeAny, {
2931
2976
  type: "mcp";
2932
- tool: string;
2933
2977
  server: string;
2978
+ tool: string;
2934
2979
  }, {
2935
2980
  type: "mcp";
2936
- tool: string;
2937
2981
  server: string;
2982
+ tool: string;
2938
2983
  }>, z.ZodObject<{
2939
2984
  type: z.ZodLiteral<"subagent">;
2940
2985
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -2942,6 +2987,8 @@ export declare const sessionEventSchema: z.ZodObject<{
2942
2987
  task: z.ZodOptional<z.ZodString>;
2943
2988
  /** The sub-agent's role or type, e.g. "Explore". */
2944
2989
  agentType: z.ZodOptional<z.ZodString>;
2990
+ /** A named agent's address, distinct from its role. */
2991
+ name: z.ZodOptional<z.ZodString>;
2945
2992
  model: z.ZodOptional<z.ZodString>;
2946
2993
  /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
2947
2994
  state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
@@ -2985,7 +3032,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2985
3032
  }, "strip", z.ZodTypeAny, {
2986
3033
  id: string;
2987
3034
  title: string;
2988
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3035
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
2989
3036
  toolCallId?: string | undefined;
2990
3037
  phaseId?: string | undefined;
2991
3038
  model?: string | undefined;
@@ -2998,7 +3045,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2998
3045
  }, {
2999
3046
  id: string;
3000
3047
  title: string;
3001
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3048
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3002
3049
  toolCallId?: string | undefined;
3003
3050
  phaseId?: string | undefined;
3004
3051
  model?: string | undefined;
@@ -3011,7 +3058,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3011
3058
  }>, "many">>;
3012
3059
  }, "strip", z.ZodTypeAny, {
3013
3060
  completed?: number | undefined;
3014
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3061
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3015
3062
  tokens?: number | undefined;
3016
3063
  durationMs?: number | undefined;
3017
3064
  startedAt?: number | undefined;
@@ -3027,7 +3074,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3027
3074
  agents?: {
3028
3075
  id: string;
3029
3076
  title: string;
3030
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3077
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3031
3078
  toolCallId?: string | undefined;
3032
3079
  phaseId?: string | undefined;
3033
3080
  model?: string | undefined;
@@ -3040,7 +3087,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3040
3087
  }[] | undefined;
3041
3088
  }, {
3042
3089
  completed?: number | undefined;
3043
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3090
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3044
3091
  tokens?: number | undefined;
3045
3092
  durationMs?: number | undefined;
3046
3093
  startedAt?: number | undefined;
@@ -3056,7 +3103,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3056
3103
  agents?: {
3057
3104
  id: string;
3058
3105
  title: string;
3059
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3106
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3060
3107
  toolCallId?: string | undefined;
3061
3108
  phaseId?: string | undefined;
3062
3109
  model?: string | undefined;
@@ -3071,13 +3118,14 @@ export declare const sessionEventSchema: z.ZodObject<{
3071
3118
  }, "strip", z.ZodTypeAny, {
3072
3119
  type: "subagent";
3073
3120
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
3074
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3121
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3075
3122
  model?: string | undefined;
3123
+ name?: string | undefined;
3076
3124
  task?: string | undefined;
3077
3125
  agentType?: string | undefined;
3078
3126
  workflow?: {
3079
3127
  completed?: number | undefined;
3080
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3128
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3081
3129
  tokens?: number | undefined;
3082
3130
  durationMs?: number | undefined;
3083
3131
  startedAt?: number | undefined;
@@ -3093,7 +3141,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3093
3141
  agents?: {
3094
3142
  id: string;
3095
3143
  title: string;
3096
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3144
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3097
3145
  toolCallId?: string | undefined;
3098
3146
  phaseId?: string | undefined;
3099
3147
  model?: string | undefined;
@@ -3107,13 +3155,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3107
3155
  } | undefined;
3108
3156
  }, {
3109
3157
  type: "subagent";
3110
- 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;
3111
3160
  model?: string | undefined;
3161
+ name?: string | undefined;
3112
3162
  task?: string | undefined;
3113
3163
  agentType?: string | undefined;
3114
3164
  workflow?: {
3115
3165
  completed?: number | undefined;
3116
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3166
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3117
3167
  tokens?: number | undefined;
3118
3168
  durationMs?: number | undefined;
3119
3169
  startedAt?: number | undefined;
@@ -3129,7 +3179,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3129
3179
  agents?: {
3130
3180
  id: string;
3131
3181
  title: string;
3132
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3182
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3133
3183
  toolCallId?: string | undefined;
3134
3184
  phaseId?: string | undefined;
3135
3185
  model?: string | undefined;
@@ -3141,7 +3191,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3141
3191
  result?: string | undefined;
3142
3192
  }[] | undefined;
3143
3193
  } | undefined;
3144
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3145
3194
  }>, z.ZodObject<{
3146
3195
  type: z.ZodLiteral<"skill">;
3147
3196
  name: z.ZodString;
@@ -3204,22 +3253,60 @@ export declare const sessionEventSchema: z.ZodObject<{
3204
3253
  status: "completed" | "failed" | "pending" | "in_progress";
3205
3254
  toolCallId: string;
3206
3255
  title: string;
3207
- kind: "search" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | "other";
3256
+ kind: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch";
3208
3257
  sessionUpdate: "tool_call";
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;
3209
3295
  detail?: {
3210
3296
  type: "mcp";
3211
- tool: string;
3212
3297
  server: string;
3298
+ tool: string;
3213
3299
  } | {
3214
3300
  type: "subagent";
3215
3301
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
3216
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3302
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3217
3303
  model?: string | undefined;
3304
+ name?: string | undefined;
3218
3305
  task?: string | undefined;
3219
3306
  agentType?: string | undefined;
3220
3307
  workflow?: {
3221
3308
  completed?: number | undefined;
3222
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3309
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3223
3310
  tokens?: number | undefined;
3224
3311
  durationMs?: number | undefined;
3225
3312
  startedAt?: number | undefined;
@@ -3235,7 +3322,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3235
3322
  agents?: {
3236
3323
  id: string;
3237
3324
  title: string;
3238
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3325
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3239
3326
  toolCallId?: string | undefined;
3240
3327
  phaseId?: string | undefined;
3241
3328
  model?: string | undefined;
@@ -3267,7 +3354,12 @@ export declare const sessionEventSchema: z.ZodObject<{
3267
3354
  text: string;
3268
3355
  more?: number | undefined;
3269
3356
  } | undefined;
3270
- parentToolCallId?: string | undefined;
3357
+ }, {
3358
+ status: "completed" | "failed" | "pending" | "in_progress";
3359
+ toolCallId: string;
3360
+ title: string;
3361
+ kind: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch";
3362
+ sessionUpdate: "tool_call";
3271
3363
  content?: ({
3272
3364
  type: "content";
3273
3365
  content: {
@@ -3282,7 +3374,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3282
3374
  type: "resource_link";
3283
3375
  name: string;
3284
3376
  uri: string;
3285
- kind?: "agent" | "file" | "skill" | undefined;
3377
+ kind?: "file" | "skill" | "agent" | undefined;
3286
3378
  };
3287
3379
  } | {
3288
3380
  path: string;
@@ -3293,36 +3385,33 @@ export declare const sessionEventSchema: z.ZodObject<{
3293
3385
  path: string;
3294
3386
  type: "patch";
3295
3387
  diff: string;
3296
- change: "delete" | "add" | "update";
3388
+ change: "add" | "delete" | "update";
3297
3389
  movePath?: string | undefined;
3298
3390
  } | {
3299
3391
  type: "terminal";
3300
3392
  terminalId: string;
3301
3393
  })[] | undefined;
3394
+ parentToolCallId?: string | undefined;
3302
3395
  rawInput?: unknown;
3303
3396
  locations?: {
3304
3397
  path: string;
3305
3398
  line?: number | undefined;
3306
3399
  }[] | undefined;
3307
- }, {
3308
- status: "completed" | "failed" | "pending" | "in_progress";
3309
- toolCallId: string;
3310
- title: string;
3311
- kind: "search" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | "other";
3312
- sessionUpdate: "tool_call";
3313
3400
  detail?: {
3314
3401
  type: "mcp";
3315
- tool: string;
3316
3402
  server: string;
3403
+ tool: string;
3317
3404
  } | {
3318
3405
  type: "subagent";
3319
- 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;
3320
3408
  model?: string | undefined;
3409
+ name?: string | undefined;
3321
3410
  task?: string | undefined;
3322
3411
  agentType?: string | undefined;
3323
3412
  workflow?: {
3324
3413
  completed?: number | undefined;
3325
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3414
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3326
3415
  tokens?: number | undefined;
3327
3416
  durationMs?: number | undefined;
3328
3417
  startedAt?: number | undefined;
@@ -3338,7 +3427,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3338
3427
  agents?: {
3339
3428
  id: string;
3340
3429
  title: string;
3341
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3430
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3342
3431
  toolCallId?: string | undefined;
3343
3432
  phaseId?: string | undefined;
3344
3433
  model?: string | undefined;
@@ -3350,7 +3439,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3350
3439
  result?: string | undefined;
3351
3440
  }[] | undefined;
3352
3441
  } | undefined;
3353
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3354
3442
  } | {
3355
3443
  type: "skill";
3356
3444
  name: string;
@@ -3371,43 +3459,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3371
3459
  text: string;
3372
3460
  more?: number | undefined;
3373
3461
  } | undefined;
3374
- parentToolCallId?: string | undefined;
3375
- content?: ({
3376
- type: "content";
3377
- content: {
3378
- type: "text";
3379
- text: string;
3380
- } | {
3381
- type: "image";
3382
- mimeType: string;
3383
- data?: string | undefined;
3384
- uri?: string | undefined;
3385
- } | {
3386
- type: "resource_link";
3387
- name: string;
3388
- uri: string;
3389
- kind?: "agent" | "file" | "skill" | undefined;
3390
- };
3391
- } | {
3392
- path: string;
3393
- type: "diff";
3394
- newText: string;
3395
- oldText?: string | null | undefined;
3396
- } | {
3397
- path: string;
3398
- type: "patch";
3399
- diff: string;
3400
- change: "delete" | "add" | "update";
3401
- movePath?: string | undefined;
3402
- } | {
3403
- type: "terminal";
3404
- terminalId: string;
3405
- })[] | undefined;
3406
- rawInput?: unknown;
3407
- locations?: {
3408
- path: string;
3409
- line?: number | undefined;
3410
- }[] | undefined;
3411
3462
  }>, z.ZodObject<{
3412
3463
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
3413
3464
  toolCallId: z.ZodString;
@@ -3420,12 +3471,12 @@ export declare const sessionEventSchema: z.ZodObject<{
3420
3471
  tool: z.ZodString;
3421
3472
  }, "strip", z.ZodTypeAny, {
3422
3473
  type: "mcp";
3423
- tool: string;
3424
3474
  server: string;
3475
+ tool: string;
3425
3476
  }, {
3426
3477
  type: "mcp";
3427
- tool: string;
3428
3478
  server: string;
3479
+ tool: string;
3429
3480
  }>, z.ZodObject<{
3430
3481
  type: z.ZodLiteral<"subagent">;
3431
3482
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -3433,6 +3484,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3433
3484
  task: z.ZodOptional<z.ZodString>;
3434
3485
  /** The sub-agent's role or type, e.g. "Explore". */
3435
3486
  agentType: z.ZodOptional<z.ZodString>;
3487
+ /** A named agent's address, distinct from its role. */
3488
+ name: z.ZodOptional<z.ZodString>;
3436
3489
  model: z.ZodOptional<z.ZodString>;
3437
3490
  /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
3438
3491
  state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
@@ -3476,7 +3529,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3476
3529
  }, "strip", z.ZodTypeAny, {
3477
3530
  id: string;
3478
3531
  title: string;
3479
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3532
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3480
3533
  toolCallId?: string | undefined;
3481
3534
  phaseId?: string | undefined;
3482
3535
  model?: string | undefined;
@@ -3489,7 +3542,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3489
3542
  }, {
3490
3543
  id: string;
3491
3544
  title: string;
3492
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3545
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3493
3546
  toolCallId?: string | undefined;
3494
3547
  phaseId?: string | undefined;
3495
3548
  model?: string | undefined;
@@ -3502,7 +3555,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3502
3555
  }>, "many">>;
3503
3556
  }, "strip", z.ZodTypeAny, {
3504
3557
  completed?: number | undefined;
3505
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3558
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3506
3559
  tokens?: number | undefined;
3507
3560
  durationMs?: number | undefined;
3508
3561
  startedAt?: number | undefined;
@@ -3518,7 +3571,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3518
3571
  agents?: {
3519
3572
  id: string;
3520
3573
  title: string;
3521
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3574
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3522
3575
  toolCallId?: string | undefined;
3523
3576
  phaseId?: string | undefined;
3524
3577
  model?: string | undefined;
@@ -3531,7 +3584,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3531
3584
  }[] | undefined;
3532
3585
  }, {
3533
3586
  completed?: number | undefined;
3534
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3587
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3535
3588
  tokens?: number | undefined;
3536
3589
  durationMs?: number | undefined;
3537
3590
  startedAt?: number | undefined;
@@ -3547,7 +3600,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3547
3600
  agents?: {
3548
3601
  id: string;
3549
3602
  title: string;
3550
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3603
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3551
3604
  toolCallId?: string | undefined;
3552
3605
  phaseId?: string | undefined;
3553
3606
  model?: string | undefined;
@@ -3562,13 +3615,14 @@ export declare const sessionEventSchema: z.ZodObject<{
3562
3615
  }, "strip", z.ZodTypeAny, {
3563
3616
  type: "subagent";
3564
3617
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
3565
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3618
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3566
3619
  model?: string | undefined;
3620
+ name?: string | undefined;
3567
3621
  task?: string | undefined;
3568
3622
  agentType?: string | undefined;
3569
3623
  workflow?: {
3570
3624
  completed?: number | undefined;
3571
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3625
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3572
3626
  tokens?: number | undefined;
3573
3627
  durationMs?: number | undefined;
3574
3628
  startedAt?: number | undefined;
@@ -3584,7 +3638,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3584
3638
  agents?: {
3585
3639
  id: string;
3586
3640
  title: string;
3587
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3641
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3588
3642
  toolCallId?: string | undefined;
3589
3643
  phaseId?: string | undefined;
3590
3644
  model?: string | undefined;
@@ -3598,13 +3652,15 @@ export declare const sessionEventSchema: z.ZodObject<{
3598
3652
  } | undefined;
3599
3653
  }, {
3600
3654
  type: "subagent";
3601
- 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;
3602
3657
  model?: string | undefined;
3658
+ name?: string | undefined;
3603
3659
  task?: string | undefined;
3604
3660
  agentType?: string | undefined;
3605
3661
  workflow?: {
3606
3662
  completed?: number | undefined;
3607
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3663
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3608
3664
  tokens?: number | undefined;
3609
3665
  durationMs?: number | undefined;
3610
3666
  startedAt?: number | undefined;
@@ -3620,7 +3676,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3620
3676
  agents?: {
3621
3677
  id: string;
3622
3678
  title: string;
3623
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3679
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3624
3680
  toolCallId?: string | undefined;
3625
3681
  phaseId?: string | undefined;
3626
3682
  model?: string | undefined;
@@ -3632,7 +3688,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3632
3688
  result?: string | undefined;
3633
3689
  }[] | undefined;
3634
3690
  } | undefined;
3635
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3636
3691
  }>, z.ZodObject<{
3637
3692
  type: z.ZodLiteral<"skill">;
3638
3693
  name: z.ZodString;
@@ -3728,12 +3783,12 @@ export declare const sessionEventSchema: z.ZodObject<{
3728
3783
  type: "resource_link";
3729
3784
  name: string;
3730
3785
  uri: string;
3731
- kind?: "agent" | "file" | "skill" | undefined;
3786
+ kind?: "file" | "skill" | "agent" | undefined;
3732
3787
  }, {
3733
3788
  type: "resource_link";
3734
3789
  name: string;
3735
3790
  uri: string;
3736
- kind?: "agent" | "file" | "skill" | undefined;
3791
+ kind?: "file" | "skill" | "agent" | undefined;
3737
3792
  }>]>;
3738
3793
  }, "strip", z.ZodTypeAny, {
3739
3794
  type: "content";
@@ -3749,7 +3804,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3749
3804
  type: "resource_link";
3750
3805
  name: string;
3751
3806
  uri: string;
3752
- kind?: "agent" | "file" | "skill" | undefined;
3807
+ kind?: "file" | "skill" | "agent" | undefined;
3753
3808
  };
3754
3809
  }, {
3755
3810
  type: "content";
@@ -3765,7 +3820,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3765
3820
  type: "resource_link";
3766
3821
  name: string;
3767
3822
  uri: string;
3768
- kind?: "agent" | "file" | "skill" | undefined;
3823
+ kind?: "file" | "skill" | "agent" | undefined;
3769
3824
  };
3770
3825
  }>, z.ZodObject<{
3771
3826
  type: z.ZodLiteral<"diff">;
@@ -3792,13 +3847,13 @@ export declare const sessionEventSchema: z.ZodObject<{
3792
3847
  path: string;
3793
3848
  type: "patch";
3794
3849
  diff: string;
3795
- change: "delete" | "add" | "update";
3850
+ change: "add" | "delete" | "update";
3796
3851
  movePath?: string | undefined;
3797
3852
  }, {
3798
3853
  path: string;
3799
3854
  type: "patch";
3800
3855
  diff: string;
3801
- change: "delete" | "add" | "update";
3856
+ change: "add" | "delete" | "update";
3802
3857
  movePath?: string | undefined;
3803
3858
  }>, z.ZodObject<{
3804
3859
  type: z.ZodLiteral<"terminal">;
@@ -3818,20 +3873,53 @@ export declare const sessionEventSchema: z.ZodObject<{
3818
3873
  sessionUpdate: "tool_call_update";
3819
3874
  status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
3820
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;
3821
3908
  detail?: {
3822
3909
  type: "mcp";
3823
- tool: string;
3824
3910
  server: string;
3911
+ tool: string;
3825
3912
  } | {
3826
3913
  type: "subagent";
3827
3914
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
3828
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3915
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
3829
3916
  model?: string | undefined;
3917
+ name?: string | undefined;
3830
3918
  task?: string | undefined;
3831
3919
  agentType?: string | undefined;
3832
3920
  workflow?: {
3833
3921
  completed?: number | undefined;
3834
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3922
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3835
3923
  tokens?: number | undefined;
3836
3924
  durationMs?: number | undefined;
3837
3925
  startedAt?: number | undefined;
@@ -3847,7 +3935,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3847
3935
  agents?: {
3848
3936
  id: string;
3849
3937
  title: string;
3850
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3938
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3851
3939
  toolCallId?: string | undefined;
3852
3940
  phaseId?: string | undefined;
3853
3941
  model?: string | undefined;
@@ -3879,7 +3967,13 @@ export declare const sessionEventSchema: z.ZodObject<{
3879
3967
  text: string;
3880
3968
  more?: number | undefined;
3881
3969
  } | undefined;
3882
- 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;
3883
3977
  content?: ({
3884
3978
  type: "content";
3885
3979
  content: {
@@ -3894,7 +3988,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3894
3988
  type: "resource_link";
3895
3989
  name: string;
3896
3990
  uri: string;
3897
- kind?: "agent" | "file" | "skill" | undefined;
3991
+ kind?: "file" | "skill" | "agent" | undefined;
3898
3992
  };
3899
3993
  } | {
3900
3994
  path: string;
@@ -3905,32 +3999,28 @@ export declare const sessionEventSchema: z.ZodObject<{
3905
3999
  path: string;
3906
4000
  type: "patch";
3907
4001
  diff: string;
3908
- change: "delete" | "add" | "update";
4002
+ change: "add" | "delete" | "update";
3909
4003
  movePath?: string | undefined;
3910
4004
  } | {
3911
4005
  type: "terminal";
3912
4006
  terminalId: string;
3913
4007
  })[] | undefined;
3914
- appendOutput?: string | undefined;
3915
- rawOutput?: unknown;
3916
- }, {
3917
- toolCallId: string;
3918
- sessionUpdate: "tool_call_update";
3919
- status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
3920
- title?: string | undefined;
4008
+ parentToolCallId?: string | undefined;
3921
4009
  detail?: {
3922
4010
  type: "mcp";
3923
- tool: string;
3924
4011
  server: string;
4012
+ tool: string;
3925
4013
  } | {
3926
4014
  type: "subagent";
3927
- 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;
3928
4017
  model?: string | undefined;
4018
+ name?: string | undefined;
3929
4019
  task?: string | undefined;
3930
4020
  agentType?: string | undefined;
3931
4021
  workflow?: {
3932
4022
  completed?: number | undefined;
3933
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4023
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
3934
4024
  tokens?: number | undefined;
3935
4025
  durationMs?: number | undefined;
3936
4026
  startedAt?: number | undefined;
@@ -3946,7 +4036,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3946
4036
  agents?: {
3947
4037
  id: string;
3948
4038
  title: string;
3949
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4039
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
3950
4040
  toolCallId?: string | undefined;
3951
4041
  phaseId?: string | undefined;
3952
4042
  model?: string | undefined;
@@ -3958,7 +4048,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3958
4048
  result?: string | undefined;
3959
4049
  }[] | undefined;
3960
4050
  } | undefined;
3961
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
3962
4051
  } | {
3963
4052
  type: "skill";
3964
4053
  name: string;
@@ -3979,38 +4068,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3979
4068
  text: string;
3980
4069
  more?: number | undefined;
3981
4070
  } | undefined;
3982
- parentToolCallId?: string | undefined;
3983
- content?: ({
3984
- type: "content";
3985
- content: {
3986
- type: "text";
3987
- text: string;
3988
- } | {
3989
- type: "image";
3990
- mimeType: string;
3991
- data?: string | undefined;
3992
- uri?: string | undefined;
3993
- } | {
3994
- type: "resource_link";
3995
- name: string;
3996
- uri: string;
3997
- kind?: "agent" | "file" | "skill" | undefined;
3998
- };
3999
- } | {
4000
- path: string;
4001
- type: "diff";
4002
- newText: string;
4003
- oldText?: string | null | undefined;
4004
- } | {
4005
- path: string;
4006
- type: "patch";
4007
- diff: string;
4008
- change: "delete" | "add" | "update";
4009
- movePath?: string | undefined;
4010
- } | {
4011
- type: "terminal";
4012
- terminalId: string;
4013
- })[] | undefined;
4014
4071
  appendOutput?: string | undefined;
4015
4072
  rawOutput?: unknown;
4016
4073
  }>, z.ZodObject<{
@@ -4053,16 +4110,16 @@ export declare const sessionEventSchema: z.ZodObject<{
4053
4110
  iterations: z.ZodOptional<z.ZodNumber>;
4054
4111
  lastReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4055
4112
  }, "strip", z.ZodTypeAny, {
4056
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4057
4113
  objective: string;
4114
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4058
4115
  tokenBudget?: number | null | undefined;
4059
4116
  tokensUsed?: number | undefined;
4060
4117
  timeUsedSeconds?: number | undefined;
4061
4118
  iterations?: number | undefined;
4062
4119
  lastReason?: string | null | undefined;
4063
4120
  }, {
4064
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4065
4121
  objective: string;
4122
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4066
4123
  tokenBudget?: number | null | undefined;
4067
4124
  tokensUsed?: number | undefined;
4068
4125
  timeUsedSeconds?: number | undefined;
@@ -4072,8 +4129,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4072
4129
  }, "strip", z.ZodTypeAny, {
4073
4130
  sessionUpdate: "ls_goal";
4074
4131
  goal: {
4075
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4076
4132
  objective: string;
4133
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4077
4134
  tokenBudget?: number | null | undefined;
4078
4135
  tokensUsed?: number | undefined;
4079
4136
  timeUsedSeconds?: number | undefined;
@@ -4083,8 +4140,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4083
4140
  }, {
4084
4141
  sessionUpdate: "ls_goal";
4085
4142
  goal: {
4086
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4087
4143
  objective: string;
4144
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4088
4145
  tokenBudget?: number | null | undefined;
4089
4146
  tokensUsed?: number | undefined;
4090
4147
  timeUsedSeconds?: number | undefined;
@@ -4153,6 +4210,35 @@ export declare const sessionEventSchema: z.ZodObject<{
4153
4210
  sessionUpdate: "usage_update";
4154
4211
  usedTokens?: number | undefined;
4155
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
+ }[];
4156
4242
  }>, z.ZodObject<{
4157
4243
  sessionUpdate: z.ZodLiteral<"ls_message_done">;
4158
4244
  parentToolCallId: z.ZodOptional<z.ZodString>;
@@ -4180,22 +4266,22 @@ export declare const sessionEventSchema: z.ZodObject<{
4180
4266
  sessionUpdate: "ls_message_done";
4181
4267
  messageId: string;
4182
4268
  role: "agent" | "thought" | "user";
4269
+ parentToolCallId?: string | undefined;
4183
4270
  questions?: {
4184
4271
  options: string[];
4185
4272
  id: string;
4186
4273
  title: string;
4187
4274
  }[] | undefined;
4188
- parentToolCallId?: string | undefined;
4189
4275
  }, {
4190
4276
  sessionUpdate: "ls_message_done";
4191
4277
  messageId: string;
4192
4278
  role: "agent" | "thought" | "user";
4279
+ parentToolCallId?: string | undefined;
4193
4280
  questions?: {
4194
4281
  options: string[];
4195
4282
  id: string;
4196
4283
  title: string;
4197
4284
  }[] | undefined;
4198
- parentToolCallId?: string | undefined;
4199
4285
  }>, z.ZodObject<{
4200
4286
  sessionUpdate: z.ZodLiteral<"ls_config">;
4201
4287
  options: z.ZodArray<z.ZodObject<{
@@ -4225,7 +4311,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4225
4311
  }[];
4226
4312
  id: string;
4227
4313
  name: string;
4228
- category: "mode" | "model" | "other" | "effort";
4314
+ category: "mode" | "model" | "effort" | "other";
4229
4315
  current: string;
4230
4316
  }, {
4231
4317
  values: {
@@ -4236,7 +4322,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4236
4322
  id: string;
4237
4323
  name: string;
4238
4324
  current: string;
4239
- category?: "mode" | "model" | "other" | "effort" | undefined;
4325
+ category?: "mode" | "model" | "effort" | "other" | undefined;
4240
4326
  }>, "many">;
4241
4327
  }, "strip", z.ZodTypeAny, {
4242
4328
  options: {
@@ -4247,7 +4333,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4247
4333
  }[];
4248
4334
  id: string;
4249
4335
  name: string;
4250
- category: "mode" | "model" | "other" | "effort";
4336
+ category: "mode" | "model" | "effort" | "other";
4251
4337
  current: string;
4252
4338
  }[];
4253
4339
  sessionUpdate: "ls_config";
@@ -4261,7 +4347,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4261
4347
  id: string;
4262
4348
  name: string;
4263
4349
  current: string;
4264
- category?: "mode" | "model" | "other" | "effort" | undefined;
4350
+ category?: "mode" | "model" | "effort" | "other" | undefined;
4265
4351
  }[];
4266
4352
  sessionUpdate: "ls_config";
4267
4353
  }>, z.ZodObject<{
@@ -4291,13 +4377,13 @@ export declare const sessionEventSchema: z.ZodObject<{
4291
4377
  sessionUpdate: "ls_turn";
4292
4378
  parentToolCallId?: string | undefined;
4293
4379
  turnId?: string | undefined;
4294
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
4380
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4295
4381
  }, {
4296
4382
  state: "started" | "ended";
4297
4383
  sessionUpdate: "ls_turn";
4298
4384
  parentToolCallId?: string | undefined;
4299
4385
  turnId?: string | undefined;
4300
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
4386
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4301
4387
  }>, z.ZodObject<{
4302
4388
  sessionUpdate: z.ZodLiteral<"ls_permission">;
4303
4389
  requestId: z.ZodString;
@@ -4310,12 +4396,12 @@ export declare const sessionEventSchema: z.ZodObject<{
4310
4396
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
4311
4397
  }, "strip", z.ZodTypeAny, {
4312
4398
  name: string;
4313
- optionId: string;
4314
4399
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
4400
+ optionId: string;
4315
4401
  }, {
4316
4402
  name: string;
4317
- optionId: string;
4318
4403
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
4404
+ optionId: string;
4319
4405
  }>, "many">;
4320
4406
  /**
4321
4407
  * The agent is asking the user something: answer with `sessions.answer`.
@@ -4345,8 +4431,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4345
4431
  required: z.ZodOptional<z.ZodBoolean>;
4346
4432
  }, "strip", z.ZodTypeAny, {
4347
4433
  id: string;
4348
- kind: "text" | "choice" | "choices";
4349
4434
  text: string;
4435
+ kind: "text" | "choice" | "choices";
4350
4436
  options?: {
4351
4437
  value: string;
4352
4438
  label: string;
@@ -4358,8 +4444,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4358
4444
  required?: boolean | undefined;
4359
4445
  }, {
4360
4446
  id: string;
4361
- kind: "text" | "choice" | "choices";
4362
4447
  text: string;
4448
+ kind: "text" | "choice" | "choices";
4363
4449
  options?: {
4364
4450
  value: string;
4365
4451
  label: string;
@@ -4373,18 +4459,18 @@ export declare const sessionEventSchema: z.ZodObject<{
4373
4459
  }, "strip", z.ZodTypeAny, {
4374
4460
  options: {
4375
4461
  name: string;
4376
- optionId: string;
4377
4462
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
4463
+ optionId: string;
4378
4464
  }[];
4379
4465
  title: string;
4380
- requestId: string;
4381
4466
  sessionUpdate: "ls_permission";
4467
+ requestId: string;
4382
4468
  toolCallId?: string | undefined;
4383
4469
  detail?: string | undefined;
4384
4470
  questions?: {
4385
4471
  id: string;
4386
- kind: "text" | "choice" | "choices";
4387
4472
  text: string;
4473
+ kind: "text" | "choice" | "choices";
4388
4474
  options?: {
4389
4475
  value: string;
4390
4476
  label: string;
@@ -4398,18 +4484,18 @@ export declare const sessionEventSchema: z.ZodObject<{
4398
4484
  }, {
4399
4485
  options: {
4400
4486
  name: string;
4401
- optionId: string;
4402
4487
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
4488
+ optionId: string;
4403
4489
  }[];
4404
4490
  title: string;
4405
- requestId: string;
4406
4491
  sessionUpdate: "ls_permission";
4492
+ requestId: string;
4407
4493
  toolCallId?: string | undefined;
4408
4494
  detail?: string | undefined;
4409
4495
  questions?: {
4410
4496
  id: string;
4411
- kind: "text" | "choice" | "choices";
4412
4497
  text: string;
4498
+ kind: "text" | "choice" | "choices";
4413
4499
  options?: {
4414
4500
  value: string;
4415
4501
  label: string;
@@ -4439,8 +4525,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4439
4525
  other?: string | undefined;
4440
4526
  }>, "many">>;
4441
4527
  }, "strip", z.ZodTypeAny, {
4442
- requestId: string;
4443
4528
  sessionUpdate: "ls_permission_resolved";
4529
+ requestId: string;
4444
4530
  optionId?: string | undefined;
4445
4531
  answers?: {
4446
4532
  values: string[];
@@ -4448,8 +4534,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4448
4534
  other?: string | undefined;
4449
4535
  }[] | undefined;
4450
4536
  }, {
4451
- requestId: string;
4452
4537
  sessionUpdate: "ls_permission_resolved";
4538
+ requestId: string;
4453
4539
  optionId?: string | undefined;
4454
4540
  answers?: {
4455
4541
  values: string[];
@@ -4461,21 +4547,21 @@ export declare const sessionEventSchema: z.ZodObject<{
4461
4547
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
4462
4548
  deviceId: z.ZodOptional<z.ZodString>;
4463
4549
  }, "strip", z.ZodTypeAny, {
4464
- driver: "remote" | "desktop" | "none";
4465
4550
  sessionUpdate: "ls_driver";
4551
+ driver: "desktop" | "remote" | "none";
4466
4552
  deviceId?: string | undefined;
4467
4553
  }, {
4468
- driver: "remote" | "desktop" | "none";
4469
4554
  sessionUpdate: "ls_driver";
4555
+ driver: "desktop" | "remote" | "none";
4470
4556
  deviceId?: string | undefined;
4471
4557
  }>, z.ZodObject<{
4472
4558
  sessionUpdate: z.ZodLiteral<"ls_status">;
4473
4559
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
4474
4560
  }, "strip", z.ZodTypeAny, {
4475
- state: "running" | "idle" | "waiting" | "error" | "offline";
4561
+ state: "running" | "error" | "idle" | "waiting" | "offline";
4476
4562
  sessionUpdate: "ls_status";
4477
4563
  }, {
4478
- state: "running" | "idle" | "waiting" | "error" | "offline";
4564
+ state: "running" | "error" | "idle" | "waiting" | "offline";
4479
4565
  sessionUpdate: "ls_status";
4480
4566
  }>, z.ZodObject<{
4481
4567
  sessionUpdate: z.ZodLiteral<"ls_task">;
@@ -4496,64 +4582,64 @@ export declare const sessionEventSchema: z.ZodObject<{
4496
4582
  }, "strip", z.ZodTypeAny, {
4497
4583
  id: string;
4498
4584
  title: string;
4499
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
4585
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4500
4586
  startedAt: number;
4501
4587
  kind: "shell" | "monitor";
4502
4588
  toolCallId?: string | undefined;
4503
4589
  endedAt?: number | undefined;
4504
- lastSeq?: number | undefined;
4505
4590
  command?: string | undefined;
4506
4591
  summary?: string | undefined;
4507
4592
  exitCode?: number | undefined;
4508
4593
  output?: boolean | undefined;
4509
4594
  canStop?: boolean | undefined;
4595
+ lastSeq?: number | undefined;
4510
4596
  }, {
4511
4597
  id: string;
4512
4598
  title: string;
4513
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
4599
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4514
4600
  startedAt: number;
4515
4601
  kind: "shell" | "monitor";
4516
4602
  toolCallId?: string | undefined;
4517
4603
  endedAt?: number | undefined;
4518
- lastSeq?: number | undefined;
4519
4604
  command?: string | undefined;
4520
4605
  summary?: string | undefined;
4521
4606
  exitCode?: number | undefined;
4522
4607
  output?: boolean | undefined;
4523
4608
  canStop?: boolean | undefined;
4609
+ lastSeq?: number | undefined;
4524
4610
  }>;
4525
4611
  }, "strip", z.ZodTypeAny, {
4526
4612
  task: {
4527
4613
  id: string;
4528
4614
  title: string;
4529
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
4615
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4530
4616
  startedAt: number;
4531
4617
  kind: "shell" | "monitor";
4532
4618
  toolCallId?: string | undefined;
4533
4619
  endedAt?: number | undefined;
4534
- lastSeq?: number | undefined;
4535
4620
  command?: string | undefined;
4536
4621
  summary?: string | undefined;
4537
4622
  exitCode?: number | undefined;
4538
4623
  output?: boolean | undefined;
4539
4624
  canStop?: boolean | undefined;
4625
+ lastSeq?: number | undefined;
4540
4626
  };
4541
4627
  sessionUpdate: "ls_task";
4542
4628
  }, {
4543
4629
  task: {
4544
4630
  id: string;
4545
4631
  title: string;
4546
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
4632
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4547
4633
  startedAt: number;
4548
4634
  kind: "shell" | "monitor";
4549
4635
  toolCallId?: string | undefined;
4550
4636
  endedAt?: number | undefined;
4551
- lastSeq?: number | undefined;
4552
4637
  command?: string | undefined;
4553
4638
  summary?: string | undefined;
4554
4639
  exitCode?: number | undefined;
4555
4640
  output?: boolean | undefined;
4556
4641
  canStop?: boolean | undefined;
4642
+ lastSeq?: number | undefined;
4557
4643
  };
4558
4644
  sessionUpdate: "ls_task";
4559
4645
  }>, z.ZodObject<{
@@ -4586,7 +4672,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4586
4672
  type: "resource_link";
4587
4673
  name: string;
4588
4674
  uri: string;
4589
- kind?: "agent" | "file" | "skill" | undefined;
4675
+ kind?: "file" | "skill" | "agent" | undefined;
4590
4676
  };
4591
4677
  sessionUpdate: "user_message_chunk";
4592
4678
  messageId?: string | undefined;
@@ -4603,7 +4689,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4603
4689
  type: "resource_link";
4604
4690
  name: string;
4605
4691
  uri: string;
4606
- kind?: "agent" | "file" | "skill" | undefined;
4692
+ kind?: "file" | "skill" | "agent" | undefined;
4607
4693
  };
4608
4694
  sessionUpdate: "agent_message_chunk";
4609
4695
  messageId: string;
@@ -4621,7 +4707,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4621
4707
  type: "resource_link";
4622
4708
  name: string;
4623
4709
  uri: string;
4624
- kind?: "agent" | "file" | "skill" | undefined;
4710
+ kind?: "file" | "skill" | "agent" | undefined;
4625
4711
  };
4626
4712
  sessionUpdate: "agent_thought_chunk";
4627
4713
  messageId: string;
@@ -4630,22 +4716,60 @@ export declare const sessionEventSchema: z.ZodObject<{
4630
4716
  status: "completed" | "failed" | "pending" | "in_progress";
4631
4717
  toolCallId: string;
4632
4718
  title: string;
4633
- kind: "search" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | "other";
4719
+ kind: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch";
4634
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;
4635
4758
  detail?: {
4636
4759
  type: "mcp";
4637
- tool: string;
4638
4760
  server: string;
4761
+ tool: string;
4639
4762
  } | {
4640
4763
  type: "subagent";
4641
4764
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
4642
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4765
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
4643
4766
  model?: string | undefined;
4767
+ name?: string | undefined;
4644
4768
  task?: string | undefined;
4645
4769
  agentType?: string | undefined;
4646
4770
  workflow?: {
4647
4771
  completed?: number | undefined;
4648
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4772
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
4649
4773
  tokens?: number | undefined;
4650
4774
  durationMs?: number | undefined;
4651
4775
  startedAt?: number | undefined;
@@ -4661,7 +4785,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4661
4785
  agents?: {
4662
4786
  id: string;
4663
4787
  title: string;
4664
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4788
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
4665
4789
  toolCallId?: string | undefined;
4666
4790
  phaseId?: string | undefined;
4667
4791
  model?: string | undefined;
@@ -4693,7 +4817,11 @@ export declare const sessionEventSchema: z.ZodObject<{
4693
4817
  text: string;
4694
4818
  more?: number | undefined;
4695
4819
  } | undefined;
4696
- parentToolCallId?: string | undefined;
4820
+ } | {
4821
+ toolCallId: string;
4822
+ sessionUpdate: "tool_call_update";
4823
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
4824
+ title?: string | undefined;
4697
4825
  content?: ({
4698
4826
  type: "content";
4699
4827
  content: {
@@ -4708,7 +4836,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4708
4836
  type: "resource_link";
4709
4837
  name: string;
4710
4838
  uri: string;
4711
- kind?: "agent" | "file" | "skill" | undefined;
4839
+ kind?: "file" | "skill" | "agent" | undefined;
4712
4840
  };
4713
4841
  } | {
4714
4842
  path: string;
@@ -4719,36 +4847,28 @@ export declare const sessionEventSchema: z.ZodObject<{
4719
4847
  path: string;
4720
4848
  type: "patch";
4721
4849
  diff: string;
4722
- change: "delete" | "add" | "update";
4850
+ change: "add" | "delete" | "update";
4723
4851
  movePath?: string | undefined;
4724
4852
  } | {
4725
4853
  type: "terminal";
4726
4854
  terminalId: string;
4727
4855
  })[] | undefined;
4728
- rawInput?: unknown;
4729
- locations?: {
4730
- path: string;
4731
- line?: number | undefined;
4732
- }[] | undefined;
4733
- } | {
4734
- toolCallId: string;
4735
- sessionUpdate: "tool_call_update";
4736
- status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
4737
- title?: string | undefined;
4856
+ parentToolCallId?: string | undefined;
4738
4857
  detail?: {
4739
4858
  type: "mcp";
4740
- tool: string;
4741
4859
  server: string;
4860
+ tool: string;
4742
4861
  } | {
4743
4862
  type: "subagent";
4744
4863
  action: "message" | "resume" | "spawn" | "wait" | "stop" | "list";
4745
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4864
+ state?: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending" | undefined;
4746
4865
  model?: string | undefined;
4866
+ name?: string | undefined;
4747
4867
  task?: string | undefined;
4748
4868
  agentType?: string | undefined;
4749
4869
  workflow?: {
4750
4870
  completed?: number | undefined;
4751
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4871
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
4752
4872
  tokens?: number | undefined;
4753
4873
  durationMs?: number | undefined;
4754
4874
  startedAt?: number | undefined;
@@ -4764,7 +4884,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4764
4884
  agents?: {
4765
4885
  id: string;
4766
4886
  title: string;
4767
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4887
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
4768
4888
  toolCallId?: string | undefined;
4769
4889
  phaseId?: string | undefined;
4770
4890
  model?: string | undefined;
@@ -4796,38 +4916,6 @@ export declare const sessionEventSchema: z.ZodObject<{
4796
4916
  text: string;
4797
4917
  more?: number | undefined;
4798
4918
  } | undefined;
4799
- parentToolCallId?: string | undefined;
4800
- content?: ({
4801
- type: "content";
4802
- content: {
4803
- type: "text";
4804
- text: string;
4805
- } | {
4806
- type: "image";
4807
- mimeType: string;
4808
- data?: string | undefined;
4809
- uri?: string | undefined;
4810
- } | {
4811
- type: "resource_link";
4812
- name: string;
4813
- uri: string;
4814
- kind?: "agent" | "file" | "skill" | undefined;
4815
- };
4816
- } | {
4817
- path: string;
4818
- type: "diff";
4819
- newText: string;
4820
- oldText?: string | null | undefined;
4821
- } | {
4822
- path: string;
4823
- type: "patch";
4824
- diff: string;
4825
- change: "delete" | "add" | "update";
4826
- movePath?: string | undefined;
4827
- } | {
4828
- type: "terminal";
4829
- terminalId: string;
4830
- })[] | undefined;
4831
4919
  appendOutput?: string | undefined;
4832
4920
  rawOutput?: unknown;
4833
4921
  } | {
@@ -4840,8 +4928,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4840
4928
  } | {
4841
4929
  sessionUpdate: "ls_goal";
4842
4930
  goal: {
4843
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4844
4931
  objective: string;
4932
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
4845
4933
  tokenBudget?: number | null | undefined;
4846
4934
  tokensUsed?: number | undefined;
4847
4935
  timeUsedSeconds?: number | undefined;
@@ -4866,16 +4954,23 @@ export declare const sessionEventSchema: z.ZodObject<{
4866
4954
  sessionUpdate: "usage_update";
4867
4955
  usedTokens?: number | undefined;
4868
4956
  contextWindow?: number | undefined;
4957
+ } | {
4958
+ sessionUpdate: "ls_async_questions";
4959
+ questions: {
4960
+ options: string[];
4961
+ id: string;
4962
+ title: string;
4963
+ }[];
4869
4964
  } | {
4870
4965
  sessionUpdate: "ls_message_done";
4871
4966
  messageId: string;
4872
4967
  role: "agent" | "thought" | "user";
4968
+ parentToolCallId?: string | undefined;
4873
4969
  questions?: {
4874
4970
  options: string[];
4875
4971
  id: string;
4876
4972
  title: string;
4877
4973
  }[] | undefined;
4878
- parentToolCallId?: string | undefined;
4879
4974
  } | {
4880
4975
  options: {
4881
4976
  values: {
@@ -4885,7 +4980,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4885
4980
  }[];
4886
4981
  id: string;
4887
4982
  name: string;
4888
- category: "mode" | "model" | "other" | "effort";
4983
+ category: "mode" | "model" | "effort" | "other";
4889
4984
  current: string;
4890
4985
  }[];
4891
4986
  sessionUpdate: "ls_config";
@@ -4899,22 +4994,22 @@ export declare const sessionEventSchema: z.ZodObject<{
4899
4994
  sessionUpdate: "ls_turn";
4900
4995
  parentToolCallId?: string | undefined;
4901
4996
  turnId?: string | undefined;
4902
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
4997
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4903
4998
  } | {
4904
4999
  options: {
4905
5000
  name: string;
4906
- optionId: string;
4907
5001
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
5002
+ optionId: string;
4908
5003
  }[];
4909
5004
  title: string;
4910
- requestId: string;
4911
5005
  sessionUpdate: "ls_permission";
5006
+ requestId: string;
4912
5007
  toolCallId?: string | undefined;
4913
5008
  detail?: string | undefined;
4914
5009
  questions?: {
4915
5010
  id: string;
4916
- kind: "text" | "choice" | "choices";
4917
5011
  text: string;
5012
+ kind: "text" | "choice" | "choices";
4918
5013
  options?: {
4919
5014
  value: string;
4920
5015
  label: string;
@@ -4926,8 +5021,8 @@ export declare const sessionEventSchema: z.ZodObject<{
4926
5021
  required?: boolean | undefined;
4927
5022
  }[] | undefined;
4928
5023
  } | {
4929
- requestId: string;
4930
5024
  sessionUpdate: "ls_permission_resolved";
5025
+ requestId: string;
4931
5026
  optionId?: string | undefined;
4932
5027
  answers?: {
4933
5028
  values: string[];
@@ -4935,27 +5030,27 @@ export declare const sessionEventSchema: z.ZodObject<{
4935
5030
  other?: string | undefined;
4936
5031
  }[] | undefined;
4937
5032
  } | {
4938
- driver: "remote" | "desktop" | "none";
4939
5033
  sessionUpdate: "ls_driver";
5034
+ driver: "desktop" | "remote" | "none";
4940
5035
  deviceId?: string | undefined;
4941
5036
  } | {
4942
- state: "running" | "idle" | "waiting" | "error" | "offline";
5037
+ state: "running" | "error" | "idle" | "waiting" | "offline";
4943
5038
  sessionUpdate: "ls_status";
4944
5039
  } | {
4945
5040
  task: {
4946
5041
  id: string;
4947
5042
  title: string;
4948
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
5043
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
4949
5044
  startedAt: number;
4950
5045
  kind: "shell" | "monitor";
4951
5046
  toolCallId?: string | undefined;
4952
5047
  endedAt?: number | undefined;
4953
- lastSeq?: number | undefined;
4954
5048
  command?: string | undefined;
4955
5049
  summary?: string | undefined;
4956
5050
  exitCode?: number | undefined;
4957
5051
  output?: boolean | undefined;
4958
5052
  canStop?: boolean | undefined;
5053
+ lastSeq?: number | undefined;
4959
5054
  };
4960
5055
  sessionUpdate: "ls_task";
4961
5056
  } | {
@@ -4981,7 +5076,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4981
5076
  type: "resource_link";
4982
5077
  name: string;
4983
5078
  uri: string;
4984
- kind?: "agent" | "file" | "skill" | undefined;
5079
+ kind?: "file" | "skill" | "agent" | undefined;
4985
5080
  };
4986
5081
  sessionUpdate: "user_message_chunk";
4987
5082
  messageId?: string | undefined;
@@ -4998,7 +5093,7 @@ export declare const sessionEventSchema: z.ZodObject<{
4998
5093
  type: "resource_link";
4999
5094
  name: string;
5000
5095
  uri: string;
5001
- kind?: "agent" | "file" | "skill" | undefined;
5096
+ kind?: "file" | "skill" | "agent" | undefined;
5002
5097
  };
5003
5098
  sessionUpdate: "agent_message_chunk";
5004
5099
  messageId: string;
@@ -5016,7 +5111,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5016
5111
  type: "resource_link";
5017
5112
  name: string;
5018
5113
  uri: string;
5019
- kind?: "agent" | "file" | "skill" | undefined;
5114
+ kind?: "file" | "skill" | "agent" | undefined;
5020
5115
  };
5021
5116
  sessionUpdate: "agent_thought_chunk";
5022
5117
  messageId: string;
@@ -5025,21 +5120,60 @@ export declare const sessionEventSchema: z.ZodObject<{
5025
5120
  status: "completed" | "failed" | "pending" | "in_progress";
5026
5121
  toolCallId: string;
5027
5122
  title: string;
5028
- kind: "search" | "read" | "edit" | "delete" | "move" | "execute" | "think" | "fetch" | "other";
5123
+ kind: "search" | "delete" | "other" | "read" | "edit" | "move" | "execute" | "think" | "fetch";
5029
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;
5030
5162
  detail?: {
5031
5163
  type: "mcp";
5032
- tool: string;
5033
5164
  server: string;
5165
+ tool: string;
5034
5166
  } | {
5035
5167
  type: "subagent";
5036
- 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;
5037
5170
  model?: string | undefined;
5171
+ name?: string | undefined;
5038
5172
  task?: string | undefined;
5039
5173
  agentType?: string | undefined;
5040
5174
  workflow?: {
5041
5175
  completed?: number | undefined;
5042
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
5176
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
5043
5177
  tokens?: number | undefined;
5044
5178
  durationMs?: number | undefined;
5045
5179
  startedAt?: number | undefined;
@@ -5055,7 +5189,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5055
5189
  agents?: {
5056
5190
  id: string;
5057
5191
  title: string;
5058
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
5192
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
5059
5193
  toolCallId?: string | undefined;
5060
5194
  phaseId?: string | undefined;
5061
5195
  model?: string | undefined;
@@ -5067,7 +5201,6 @@ export declare const sessionEventSchema: z.ZodObject<{
5067
5201
  result?: string | undefined;
5068
5202
  }[] | undefined;
5069
5203
  } | undefined;
5070
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
5071
5204
  } | {
5072
5205
  type: "skill";
5073
5206
  name: string;
@@ -5088,7 +5221,11 @@ export declare const sessionEventSchema: z.ZodObject<{
5088
5221
  text: string;
5089
5222
  more?: number | undefined;
5090
5223
  } | undefined;
5091
- parentToolCallId?: string | undefined;
5224
+ } | {
5225
+ toolCallId: string;
5226
+ sessionUpdate: "tool_call_update";
5227
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
5228
+ title?: string | undefined;
5092
5229
  content?: ({
5093
5230
  type: "content";
5094
5231
  content: {
@@ -5103,7 +5240,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5103
5240
  type: "resource_link";
5104
5241
  name: string;
5105
5242
  uri: string;
5106
- kind?: "agent" | "file" | "skill" | undefined;
5243
+ kind?: "file" | "skill" | "agent" | undefined;
5107
5244
  };
5108
5245
  } | {
5109
5246
  path: string;
@@ -5114,35 +5251,28 @@ export declare const sessionEventSchema: z.ZodObject<{
5114
5251
  path: string;
5115
5252
  type: "patch";
5116
5253
  diff: string;
5117
- change: "delete" | "add" | "update";
5254
+ change: "add" | "delete" | "update";
5118
5255
  movePath?: string | undefined;
5119
5256
  } | {
5120
5257
  type: "terminal";
5121
5258
  terminalId: string;
5122
5259
  })[] | undefined;
5123
- rawInput?: unknown;
5124
- locations?: {
5125
- path: string;
5126
- line?: number | undefined;
5127
- }[] | undefined;
5128
- } | {
5129
- toolCallId: string;
5130
- sessionUpdate: "tool_call_update";
5131
- status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
5132
- title?: string | undefined;
5260
+ parentToolCallId?: string | undefined;
5133
5261
  detail?: {
5134
5262
  type: "mcp";
5135
- tool: string;
5136
5263
  server: string;
5264
+ tool: string;
5137
5265
  } | {
5138
5266
  type: "subagent";
5139
- 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;
5140
5269
  model?: string | undefined;
5270
+ name?: string | undefined;
5141
5271
  task?: string | undefined;
5142
5272
  agentType?: string | undefined;
5143
5273
  workflow?: {
5144
5274
  completed?: number | undefined;
5145
- state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
5275
+ state?: "paused" | "running" | "completed" | "failed" | "stopped" | undefined;
5146
5276
  tokens?: number | undefined;
5147
5277
  durationMs?: number | undefined;
5148
5278
  startedAt?: number | undefined;
@@ -5158,7 +5288,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5158
5288
  agents?: {
5159
5289
  id: string;
5160
5290
  title: string;
5161
- state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
5291
+ state: "unknown" | "paused" | "running" | "completed" | "failed" | "stopped" | "pending";
5162
5292
  toolCallId?: string | undefined;
5163
5293
  phaseId?: string | undefined;
5164
5294
  model?: string | undefined;
@@ -5170,7 +5300,6 @@ export declare const sessionEventSchema: z.ZodObject<{
5170
5300
  result?: string | undefined;
5171
5301
  }[] | undefined;
5172
5302
  } | undefined;
5173
- action?: "message" | "resume" | "spawn" | "wait" | "stop" | "list" | undefined;
5174
5303
  } | {
5175
5304
  type: "skill";
5176
5305
  name: string;
@@ -5191,38 +5320,6 @@ export declare const sessionEventSchema: z.ZodObject<{
5191
5320
  text: string;
5192
5321
  more?: number | undefined;
5193
5322
  } | undefined;
5194
- parentToolCallId?: string | undefined;
5195
- content?: ({
5196
- type: "content";
5197
- content: {
5198
- type: "text";
5199
- text: string;
5200
- } | {
5201
- type: "image";
5202
- mimeType: string;
5203
- data?: string | undefined;
5204
- uri?: string | undefined;
5205
- } | {
5206
- type: "resource_link";
5207
- name: string;
5208
- uri: string;
5209
- kind?: "agent" | "file" | "skill" | undefined;
5210
- };
5211
- } | {
5212
- path: string;
5213
- type: "diff";
5214
- newText: string;
5215
- oldText?: string | null | undefined;
5216
- } | {
5217
- path: string;
5218
- type: "patch";
5219
- diff: string;
5220
- change: "delete" | "add" | "update";
5221
- movePath?: string | undefined;
5222
- } | {
5223
- type: "terminal";
5224
- terminalId: string;
5225
- })[] | undefined;
5226
5323
  appendOutput?: string | undefined;
5227
5324
  rawOutput?: unknown;
5228
5325
  } | {
@@ -5235,8 +5332,8 @@ export declare const sessionEventSchema: z.ZodObject<{
5235
5332
  } | {
5236
5333
  sessionUpdate: "ls_goal";
5237
5334
  goal: {
5238
- status: "paused" | "active" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
5239
5335
  objective: string;
5336
+ status: "active" | "paused" | "blocked" | "usageLimited" | "budgetLimited" | "complete";
5240
5337
  tokenBudget?: number | null | undefined;
5241
5338
  tokensUsed?: number | undefined;
5242
5339
  timeUsedSeconds?: number | undefined;
@@ -5261,16 +5358,23 @@ export declare const sessionEventSchema: z.ZodObject<{
5261
5358
  sessionUpdate: "usage_update";
5262
5359
  usedTokens?: number | undefined;
5263
5360
  contextWindow?: number | undefined;
5361
+ } | {
5362
+ sessionUpdate: "ls_async_questions";
5363
+ questions: {
5364
+ options: string[];
5365
+ id: string;
5366
+ title: string;
5367
+ }[];
5264
5368
  } | {
5265
5369
  sessionUpdate: "ls_message_done";
5266
5370
  messageId: string;
5267
5371
  role: "agent" | "thought" | "user";
5372
+ parentToolCallId?: string | undefined;
5268
5373
  questions?: {
5269
5374
  options: string[];
5270
5375
  id: string;
5271
5376
  title: string;
5272
5377
  }[] | undefined;
5273
- parentToolCallId?: string | undefined;
5274
5378
  } | {
5275
5379
  options: {
5276
5380
  values: {
@@ -5281,7 +5385,7 @@ export declare const sessionEventSchema: z.ZodObject<{
5281
5385
  id: string;
5282
5386
  name: string;
5283
5387
  current: string;
5284
- category?: "mode" | "model" | "other" | "effort" | undefined;
5388
+ category?: "mode" | "model" | "effort" | "other" | undefined;
5285
5389
  }[];
5286
5390
  sessionUpdate: "ls_config";
5287
5391
  } | {
@@ -5294,22 +5398,22 @@ export declare const sessionEventSchema: z.ZodObject<{
5294
5398
  sessionUpdate: "ls_turn";
5295
5399
  parentToolCallId?: string | undefined;
5296
5400
  turnId?: string | undefined;
5297
- stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
5401
+ stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
5298
5402
  } | {
5299
5403
  options: {
5300
5404
  name: string;
5301
- optionId: string;
5302
5405
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
5406
+ optionId: string;
5303
5407
  }[];
5304
5408
  title: string;
5305
- requestId: string;
5306
5409
  sessionUpdate: "ls_permission";
5410
+ requestId: string;
5307
5411
  toolCallId?: string | undefined;
5308
5412
  detail?: string | undefined;
5309
5413
  questions?: {
5310
5414
  id: string;
5311
- kind: "text" | "choice" | "choices";
5312
5415
  text: string;
5416
+ kind: "text" | "choice" | "choices";
5313
5417
  options?: {
5314
5418
  value: string;
5315
5419
  label: string;
@@ -5321,8 +5425,8 @@ export declare const sessionEventSchema: z.ZodObject<{
5321
5425
  required?: boolean | undefined;
5322
5426
  }[] | undefined;
5323
5427
  } | {
5324
- requestId: string;
5325
5428
  sessionUpdate: "ls_permission_resolved";
5429
+ requestId: string;
5326
5430
  optionId?: string | undefined;
5327
5431
  answers?: {
5328
5432
  values: string[];
@@ -5330,27 +5434,27 @@ export declare const sessionEventSchema: z.ZodObject<{
5330
5434
  other?: string | undefined;
5331
5435
  }[] | undefined;
5332
5436
  } | {
5333
- driver: "remote" | "desktop" | "none";
5334
5437
  sessionUpdate: "ls_driver";
5438
+ driver: "desktop" | "remote" | "none";
5335
5439
  deviceId?: string | undefined;
5336
5440
  } | {
5337
- state: "running" | "idle" | "waiting" | "error" | "offline";
5441
+ state: "running" | "error" | "idle" | "waiting" | "offline";
5338
5442
  sessionUpdate: "ls_status";
5339
5443
  } | {
5340
5444
  task: {
5341
5445
  id: string;
5342
5446
  title: string;
5343
- state: "running" | "completed" | "failed" | "stopped" | "unknown";
5447
+ state: "unknown" | "running" | "completed" | "failed" | "stopped";
5344
5448
  startedAt: number;
5345
5449
  kind: "shell" | "monitor";
5346
5450
  toolCallId?: string | undefined;
5347
5451
  endedAt?: number | undefined;
5348
- lastSeq?: number | undefined;
5349
5452
  command?: string | undefined;
5350
5453
  summary?: string | undefined;
5351
5454
  exitCode?: number | undefined;
5352
5455
  output?: boolean | undefined;
5353
5456
  canStop?: boolean | undefined;
5457
+ lastSeq?: number | undefined;
5354
5458
  };
5355
5459
  sessionUpdate: "ls_task";
5356
5460
  } | {