@linkshell/wire 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/updates.d.ts CHANGED
@@ -31,14 +31,14 @@ export declare const contentBlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
31
31
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
32
32
  }, "strip", z.ZodTypeAny, {
33
33
  type: "resource_link";
34
- uri: string;
35
34
  name: string;
36
- kind?: "file" | "skill" | "agent" | undefined;
35
+ uri: string;
36
+ kind?: "agent" | "file" | "skill" | undefined;
37
37
  }, {
38
38
  type: "resource_link";
39
- uri: string;
40
39
  name: string;
41
- kind?: "file" | "skill" | "agent" | undefined;
40
+ uri: string;
41
+ kind?: "agent" | "file" | "skill" | undefined;
42
42
  }>]>;
43
43
  export type ContentBlock = z.infer<typeof contentBlockSchema>;
44
44
  export declare const toolCallStatusSchema: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
@@ -77,14 +77,14 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
77
77
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
78
78
  }, "strip", z.ZodTypeAny, {
79
79
  type: "resource_link";
80
- uri: string;
81
80
  name: string;
82
- kind?: "file" | "skill" | "agent" | undefined;
81
+ uri: string;
82
+ kind?: "agent" | "file" | "skill" | undefined;
83
83
  }, {
84
84
  type: "resource_link";
85
- uri: string;
86
85
  name: string;
87
- kind?: "file" | "skill" | "agent" | undefined;
86
+ uri: string;
87
+ kind?: "agent" | "file" | "skill" | undefined;
88
88
  }>]>;
89
89
  }, "strip", z.ZodTypeAny, {
90
90
  type: "content";
@@ -98,9 +98,9 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
98
98
  uri?: string | undefined;
99
99
  } | {
100
100
  type: "resource_link";
101
- uri: string;
102
101
  name: string;
103
- kind?: "file" | "skill" | "agent" | undefined;
102
+ uri: string;
103
+ kind?: "agent" | "file" | "skill" | undefined;
104
104
  };
105
105
  }, {
106
106
  type: "content";
@@ -114,9 +114,9 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
114
114
  uri?: string | undefined;
115
115
  } | {
116
116
  type: "resource_link";
117
- uri: string;
118
117
  name: string;
119
- kind?: "file" | "skill" | "agent" | undefined;
118
+ uri: string;
119
+ kind?: "agent" | "file" | "skill" | undefined;
120
120
  };
121
121
  }>, z.ZodObject<{
122
122
  type: z.ZodLiteral<"diff">;
@@ -143,13 +143,13 @@ export declare const toolCallContentSchema: z.ZodDiscriminatedUnion<"type", [z.Z
143
143
  type: "patch";
144
144
  path: string;
145
145
  diff: string;
146
- change: "add" | "delete" | "update";
146
+ change: "delete" | "add" | "update";
147
147
  movePath?: string | undefined;
148
148
  }, {
149
149
  type: "patch";
150
150
  path: string;
151
151
  diff: string;
152
- change: "add" | "delete" | "update";
152
+ change: "delete" | "add" | "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
- server: string;
188
187
  tool: string;
188
+ server: string;
189
189
  }, {
190
190
  type: "mcp";
191
- server: string;
192
191
  tool: string;
192
+ server: string;
193
193
  }>, z.ZodObject<{
194
194
  type: z.ZodLiteral<"subagent">;
195
195
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -198,18 +198,205 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
198
198
  /** The sub-agent's role or type, e.g. "Explore". */
199
199
  agentType: z.ZodOptional<z.ZodString>;
200
200
  model: z.ZodOptional<z.ZodString>;
201
+ /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
202
+ state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
203
+ /** A Claude workflow is a background run containing its own agents. Counts are observed, not a predicted total. */
204
+ workflow: z.ZodOptional<z.ZodObject<{
205
+ runId: z.ZodOptional<z.ZodString>;
206
+ name: z.ZodOptional<z.ZodString>;
207
+ state: z.ZodOptional<z.ZodEnum<["running", "paused", "completed", "failed", "stopped"]>>;
208
+ started: z.ZodOptional<z.ZodNumber>;
209
+ completed: z.ZodOptional<z.ZodNumber>;
210
+ tokens: z.ZodOptional<z.ZodNumber>;
211
+ durationMs: z.ZodOptional<z.ZodNumber>;
212
+ startedAt: z.ZodOptional<z.ZodNumber>;
213
+ endedAt: z.ZodOptional<z.ZodNumber>;
214
+ phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
215
+ id: z.ZodString;
216
+ title: z.ZodString;
217
+ order: z.ZodNumber;
218
+ }, "strip", z.ZodTypeAny, {
219
+ id: string;
220
+ title: string;
221
+ order: number;
222
+ }, {
223
+ id: string;
224
+ title: string;
225
+ order: number;
226
+ }>, "many">>;
227
+ agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
228
+ id: z.ZodString;
229
+ toolCallId: z.ZodOptional<z.ZodString>;
230
+ title: z.ZodString;
231
+ state: z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>;
232
+ phaseId: z.ZodOptional<z.ZodString>;
233
+ model: z.ZodOptional<z.ZodString>;
234
+ tokens: z.ZodOptional<z.ZodNumber>;
235
+ toolCalls: z.ZodOptional<z.ZodNumber>;
236
+ durationMs: z.ZodOptional<z.ZodNumber>;
237
+ startedAt: z.ZodOptional<z.ZodNumber>;
238
+ endedAt: z.ZodOptional<z.ZodNumber>;
239
+ result: z.ZodOptional<z.ZodString>;
240
+ }, "strip", z.ZodTypeAny, {
241
+ id: string;
242
+ title: string;
243
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
244
+ toolCallId?: string | undefined;
245
+ phaseId?: string | undefined;
246
+ model?: string | undefined;
247
+ tokens?: number | undefined;
248
+ toolCalls?: number | undefined;
249
+ durationMs?: number | undefined;
250
+ startedAt?: number | undefined;
251
+ endedAt?: number | undefined;
252
+ result?: string | undefined;
253
+ }, {
254
+ id: string;
255
+ title: string;
256
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
257
+ toolCallId?: string | undefined;
258
+ phaseId?: string | undefined;
259
+ model?: string | undefined;
260
+ tokens?: number | undefined;
261
+ toolCalls?: number | undefined;
262
+ durationMs?: number | undefined;
263
+ startedAt?: number | undefined;
264
+ endedAt?: number | undefined;
265
+ result?: string | undefined;
266
+ }>, "many">>;
267
+ }, "strip", z.ZodTypeAny, {
268
+ completed?: number | undefined;
269
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
270
+ tokens?: number | undefined;
271
+ durationMs?: number | undefined;
272
+ startedAt?: number | undefined;
273
+ endedAt?: number | undefined;
274
+ runId?: string | undefined;
275
+ name?: string | undefined;
276
+ started?: number | undefined;
277
+ phases?: {
278
+ id: string;
279
+ title: string;
280
+ order: number;
281
+ }[] | undefined;
282
+ agents?: {
283
+ id: string;
284
+ title: string;
285
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
286
+ toolCallId?: string | undefined;
287
+ phaseId?: string | undefined;
288
+ model?: string | undefined;
289
+ tokens?: number | undefined;
290
+ toolCalls?: number | undefined;
291
+ durationMs?: number | undefined;
292
+ startedAt?: number | undefined;
293
+ endedAt?: number | undefined;
294
+ result?: string | undefined;
295
+ }[] | undefined;
296
+ }, {
297
+ completed?: number | undefined;
298
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
299
+ tokens?: number | undefined;
300
+ durationMs?: number | undefined;
301
+ startedAt?: number | undefined;
302
+ endedAt?: number | undefined;
303
+ runId?: string | undefined;
304
+ name?: string | undefined;
305
+ started?: number | undefined;
306
+ phases?: {
307
+ id: string;
308
+ title: string;
309
+ order: number;
310
+ }[] | undefined;
311
+ agents?: {
312
+ id: string;
313
+ title: string;
314
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
315
+ toolCallId?: string | undefined;
316
+ phaseId?: string | undefined;
317
+ model?: string | undefined;
318
+ tokens?: number | undefined;
319
+ toolCalls?: number | undefined;
320
+ durationMs?: number | undefined;
321
+ startedAt?: number | undefined;
322
+ endedAt?: number | undefined;
323
+ result?: string | undefined;
324
+ }[] | undefined;
325
+ }>>;
201
326
  }, "strip", z.ZodTypeAny, {
202
327
  type: "subagent";
203
328
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
329
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
330
+ model?: string | undefined;
204
331
  task?: string | undefined;
205
332
  agentType?: string | undefined;
206
- model?: string | undefined;
333
+ workflow?: {
334
+ completed?: number | undefined;
335
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
336
+ tokens?: number | undefined;
337
+ durationMs?: number | undefined;
338
+ startedAt?: number | undefined;
339
+ endedAt?: number | undefined;
340
+ runId?: string | undefined;
341
+ name?: string | undefined;
342
+ started?: number | undefined;
343
+ phases?: {
344
+ id: string;
345
+ title: string;
346
+ order: number;
347
+ }[] | undefined;
348
+ agents?: {
349
+ id: string;
350
+ title: string;
351
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
352
+ toolCallId?: string | undefined;
353
+ phaseId?: string | undefined;
354
+ model?: string | undefined;
355
+ tokens?: number | undefined;
356
+ toolCalls?: number | undefined;
357
+ durationMs?: number | undefined;
358
+ startedAt?: number | undefined;
359
+ endedAt?: number | undefined;
360
+ result?: string | undefined;
361
+ }[] | undefined;
362
+ } | undefined;
207
363
  }, {
208
364
  type: "subagent";
209
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
365
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
366
+ model?: string | undefined;
210
367
  task?: string | undefined;
211
368
  agentType?: string | undefined;
212
- model?: string | undefined;
369
+ workflow?: {
370
+ completed?: number | undefined;
371
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
372
+ tokens?: number | undefined;
373
+ durationMs?: number | undefined;
374
+ startedAt?: number | undefined;
375
+ endedAt?: number | undefined;
376
+ runId?: string | undefined;
377
+ name?: string | undefined;
378
+ started?: number | undefined;
379
+ phases?: {
380
+ id: string;
381
+ title: string;
382
+ order: number;
383
+ }[] | undefined;
384
+ agents?: {
385
+ id: string;
386
+ title: string;
387
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
388
+ toolCallId?: string | undefined;
389
+ phaseId?: string | undefined;
390
+ model?: string | undefined;
391
+ tokens?: number | undefined;
392
+ toolCalls?: number | undefined;
393
+ durationMs?: number | undefined;
394
+ startedAt?: number | undefined;
395
+ endedAt?: number | undefined;
396
+ result?: string | undefined;
397
+ }[] | undefined;
398
+ } | undefined;
399
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
213
400
  }>, z.ZodObject<{
214
401
  type: z.ZodLiteral<"skill">;
215
402
  name: z.ZodString;
@@ -274,11 +461,11 @@ export declare const planEntrySchema: z.ZodObject<{
274
461
  priority: z.ZodDefault<z.ZodEnum<["high", "medium", "low"]>>;
275
462
  status: z.ZodEnum<["pending", "in_progress", "completed"]>;
276
463
  }, "strip", z.ZodTypeAny, {
277
- status: "pending" | "in_progress" | "completed";
464
+ status: "completed" | "pending" | "in_progress";
278
465
  content: string;
279
466
  priority: "high" | "medium" | "low";
280
467
  }, {
281
- status: "pending" | "in_progress" | "completed";
468
+ status: "completed" | "pending" | "in_progress";
282
469
  content: string;
283
470
  priority?: "high" | "medium" | "low" | undefined;
284
471
  }>;
@@ -310,9 +497,9 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
310
497
  name: string;
311
498
  description?: string | undefined;
312
499
  }[];
313
- name: string;
314
500
  id: string;
315
- category: "model" | "mode" | "effort" | "other";
501
+ name: string;
502
+ category: "model" | "other" | "mode" | "effort";
316
503
  current: string;
317
504
  }, {
318
505
  values: {
@@ -320,10 +507,10 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
320
507
  name: string;
321
508
  description?: string | undefined;
322
509
  }[];
323
- name: string;
324
510
  id: string;
511
+ name: string;
325
512
  current: string;
326
- category?: "model" | "mode" | "effort" | "other" | undefined;
513
+ category?: "model" | "other" | "mode" | "effort" | undefined;
327
514
  }>;
328
515
  export type SessionConfigOption = z.infer<typeof sessionConfigOptionSchema>;
329
516
  export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate", [z.ZodObject<{
@@ -361,14 +548,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
361
548
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
362
549
  }, "strip", z.ZodTypeAny, {
363
550
  type: "resource_link";
364
- uri: string;
365
551
  name: string;
366
- kind?: "file" | "skill" | "agent" | undefined;
552
+ uri: string;
553
+ kind?: "agent" | "file" | "skill" | undefined;
367
554
  }, {
368
555
  type: "resource_link";
369
- uri: string;
370
556
  name: string;
371
- kind?: "file" | "skill" | "agent" | undefined;
557
+ uri: string;
558
+ kind?: "agent" | "file" | "skill" | undefined;
372
559
  }>]>;
373
560
  }, "strip", z.ZodTypeAny, {
374
561
  content: {
@@ -381,9 +568,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
381
568
  uri?: string | undefined;
382
569
  } | {
383
570
  type: "resource_link";
384
- uri: string;
385
571
  name: string;
386
- kind?: "file" | "skill" | "agent" | undefined;
572
+ uri: string;
573
+ kind?: "agent" | "file" | "skill" | undefined;
387
574
  };
388
575
  sessionUpdate: "user_message_chunk";
389
576
  messageId?: string | undefined;
@@ -398,9 +585,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
398
585
  uri?: string | undefined;
399
586
  } | {
400
587
  type: "resource_link";
401
- uri: string;
402
588
  name: string;
403
- kind?: "file" | "skill" | "agent" | undefined;
589
+ uri: string;
590
+ kind?: "agent" | "file" | "skill" | undefined;
404
591
  };
405
592
  sessionUpdate: "user_message_chunk";
406
593
  messageId?: string | undefined;
@@ -440,14 +627,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
440
627
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
441
628
  }, "strip", z.ZodTypeAny, {
442
629
  type: "resource_link";
443
- uri: string;
444
630
  name: string;
445
- kind?: "file" | "skill" | "agent" | undefined;
631
+ uri: string;
632
+ kind?: "agent" | "file" | "skill" | undefined;
446
633
  }, {
447
634
  type: "resource_link";
448
- uri: string;
449
635
  name: string;
450
- kind?: "file" | "skill" | "agent" | undefined;
636
+ uri: string;
637
+ kind?: "agent" | "file" | "skill" | undefined;
451
638
  }>]>;
452
639
  }, "strip", z.ZodTypeAny, {
453
640
  content: {
@@ -460,9 +647,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
460
647
  uri?: string | undefined;
461
648
  } | {
462
649
  type: "resource_link";
463
- uri: string;
464
650
  name: string;
465
- kind?: "file" | "skill" | "agent" | undefined;
651
+ uri: string;
652
+ kind?: "agent" | "file" | "skill" | undefined;
466
653
  };
467
654
  sessionUpdate: "agent_message_chunk";
468
655
  messageId: string;
@@ -478,9 +665,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
478
665
  uri?: string | undefined;
479
666
  } | {
480
667
  type: "resource_link";
481
- uri: string;
482
668
  name: string;
483
- kind?: "file" | "skill" | "agent" | undefined;
669
+ uri: string;
670
+ kind?: "agent" | "file" | "skill" | undefined;
484
671
  };
485
672
  sessionUpdate: "agent_message_chunk";
486
673
  messageId: string;
@@ -521,14 +708,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
521
708
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
522
709
  }, "strip", z.ZodTypeAny, {
523
710
  type: "resource_link";
524
- uri: string;
525
711
  name: string;
526
- kind?: "file" | "skill" | "agent" | undefined;
712
+ uri: string;
713
+ kind?: "agent" | "file" | "skill" | undefined;
527
714
  }, {
528
715
  type: "resource_link";
529
- uri: string;
530
716
  name: string;
531
- kind?: "file" | "skill" | "agent" | undefined;
717
+ uri: string;
718
+ kind?: "agent" | "file" | "skill" | undefined;
532
719
  }>]>;
533
720
  }, "strip", z.ZodTypeAny, {
534
721
  content: {
@@ -541,9 +728,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
541
728
  uri?: string | undefined;
542
729
  } | {
543
730
  type: "resource_link";
544
- uri: string;
545
731
  name: string;
546
- kind?: "file" | "skill" | "agent" | undefined;
732
+ uri: string;
733
+ kind?: "agent" | "file" | "skill" | undefined;
547
734
  };
548
735
  sessionUpdate: "agent_thought_chunk";
549
736
  messageId: string;
@@ -559,9 +746,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
559
746
  uri?: string | undefined;
560
747
  } | {
561
748
  type: "resource_link";
562
- uri: string;
563
749
  name: string;
564
- kind?: "file" | "skill" | "agent" | undefined;
750
+ uri: string;
751
+ kind?: "agent" | "file" | "skill" | undefined;
565
752
  };
566
753
  sessionUpdate: "agent_thought_chunk";
567
754
  messageId: string;
@@ -609,14 +796,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
609
796
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
610
797
  }, "strip", z.ZodTypeAny, {
611
798
  type: "resource_link";
612
- uri: string;
613
799
  name: string;
614
- kind?: "file" | "skill" | "agent" | undefined;
800
+ uri: string;
801
+ kind?: "agent" | "file" | "skill" | undefined;
615
802
  }, {
616
803
  type: "resource_link";
617
- uri: string;
618
804
  name: string;
619
- kind?: "file" | "skill" | "agent" | undefined;
805
+ uri: string;
806
+ kind?: "agent" | "file" | "skill" | undefined;
620
807
  }>]>;
621
808
  }, "strip", z.ZodTypeAny, {
622
809
  type: "content";
@@ -630,9 +817,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
630
817
  uri?: string | undefined;
631
818
  } | {
632
819
  type: "resource_link";
633
- uri: string;
634
820
  name: string;
635
- kind?: "file" | "skill" | "agent" | undefined;
821
+ uri: string;
822
+ kind?: "agent" | "file" | "skill" | undefined;
636
823
  };
637
824
  }, {
638
825
  type: "content";
@@ -646,9 +833,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
646
833
  uri?: string | undefined;
647
834
  } | {
648
835
  type: "resource_link";
649
- uri: string;
650
836
  name: string;
651
- kind?: "file" | "skill" | "agent" | undefined;
837
+ uri: string;
838
+ kind?: "agent" | "file" | "skill" | undefined;
652
839
  };
653
840
  }>, z.ZodObject<{
654
841
  type: z.ZodLiteral<"diff">;
@@ -675,13 +862,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
675
862
  type: "patch";
676
863
  path: string;
677
864
  diff: string;
678
- change: "add" | "delete" | "update";
865
+ change: "delete" | "add" | "update";
679
866
  movePath?: string | undefined;
680
867
  }, {
681
868
  type: "patch";
682
869
  path: string;
683
870
  diff: string;
684
- change: "add" | "delete" | "update";
871
+ change: "delete" | "add" | "update";
685
872
  movePath?: string | undefined;
686
873
  }>, z.ZodObject<{
687
874
  type: z.ZodLiteral<"terminal">;
@@ -709,12 +896,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
709
896
  tool: z.ZodString;
710
897
  }, "strip", z.ZodTypeAny, {
711
898
  type: "mcp";
712
- server: string;
713
899
  tool: string;
900
+ server: string;
714
901
  }, {
715
902
  type: "mcp";
716
- server: string;
717
903
  tool: string;
904
+ server: string;
718
905
  }>, z.ZodObject<{
719
906
  type: z.ZodLiteral<"subagent">;
720
907
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -723,18 +910,205 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
723
910
  /** The sub-agent's role or type, e.g. "Explore". */
724
911
  agentType: z.ZodOptional<z.ZodString>;
725
912
  model: z.ZodOptional<z.ZodString>;
913
+ /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
914
+ state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
915
+ /** A Claude workflow is a background run containing its own agents. Counts are observed, not a predicted total. */
916
+ workflow: z.ZodOptional<z.ZodObject<{
917
+ runId: z.ZodOptional<z.ZodString>;
918
+ name: z.ZodOptional<z.ZodString>;
919
+ state: z.ZodOptional<z.ZodEnum<["running", "paused", "completed", "failed", "stopped"]>>;
920
+ started: z.ZodOptional<z.ZodNumber>;
921
+ completed: z.ZodOptional<z.ZodNumber>;
922
+ tokens: z.ZodOptional<z.ZodNumber>;
923
+ durationMs: z.ZodOptional<z.ZodNumber>;
924
+ startedAt: z.ZodOptional<z.ZodNumber>;
925
+ endedAt: z.ZodOptional<z.ZodNumber>;
926
+ phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
927
+ id: z.ZodString;
928
+ title: z.ZodString;
929
+ order: z.ZodNumber;
930
+ }, "strip", z.ZodTypeAny, {
931
+ id: string;
932
+ title: string;
933
+ order: number;
934
+ }, {
935
+ id: string;
936
+ title: string;
937
+ order: number;
938
+ }>, "many">>;
939
+ agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
940
+ id: z.ZodString;
941
+ toolCallId: z.ZodOptional<z.ZodString>;
942
+ title: z.ZodString;
943
+ state: z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>;
944
+ phaseId: z.ZodOptional<z.ZodString>;
945
+ model: z.ZodOptional<z.ZodString>;
946
+ tokens: z.ZodOptional<z.ZodNumber>;
947
+ toolCalls: z.ZodOptional<z.ZodNumber>;
948
+ durationMs: z.ZodOptional<z.ZodNumber>;
949
+ startedAt: z.ZodOptional<z.ZodNumber>;
950
+ endedAt: z.ZodOptional<z.ZodNumber>;
951
+ result: z.ZodOptional<z.ZodString>;
952
+ }, "strip", z.ZodTypeAny, {
953
+ id: string;
954
+ title: string;
955
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
956
+ toolCallId?: string | undefined;
957
+ phaseId?: string | undefined;
958
+ model?: string | undefined;
959
+ tokens?: number | undefined;
960
+ toolCalls?: number | undefined;
961
+ durationMs?: number | undefined;
962
+ startedAt?: number | undefined;
963
+ endedAt?: number | undefined;
964
+ result?: string | undefined;
965
+ }, {
966
+ id: string;
967
+ title: string;
968
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
969
+ toolCallId?: string | undefined;
970
+ phaseId?: string | undefined;
971
+ model?: string | undefined;
972
+ tokens?: number | undefined;
973
+ toolCalls?: number | undefined;
974
+ durationMs?: number | undefined;
975
+ startedAt?: number | undefined;
976
+ endedAt?: number | undefined;
977
+ result?: string | undefined;
978
+ }>, "many">>;
979
+ }, "strip", z.ZodTypeAny, {
980
+ completed?: number | undefined;
981
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
982
+ tokens?: number | undefined;
983
+ durationMs?: number | undefined;
984
+ startedAt?: number | undefined;
985
+ endedAt?: number | undefined;
986
+ runId?: string | undefined;
987
+ name?: string | undefined;
988
+ started?: number | undefined;
989
+ phases?: {
990
+ id: string;
991
+ title: string;
992
+ order: number;
993
+ }[] | undefined;
994
+ agents?: {
995
+ id: string;
996
+ title: string;
997
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
998
+ toolCallId?: string | undefined;
999
+ phaseId?: string | undefined;
1000
+ model?: string | undefined;
1001
+ tokens?: number | undefined;
1002
+ toolCalls?: number | undefined;
1003
+ durationMs?: number | undefined;
1004
+ startedAt?: number | undefined;
1005
+ endedAt?: number | undefined;
1006
+ result?: string | undefined;
1007
+ }[] | undefined;
1008
+ }, {
1009
+ completed?: number | undefined;
1010
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1011
+ tokens?: number | undefined;
1012
+ durationMs?: number | undefined;
1013
+ startedAt?: number | undefined;
1014
+ endedAt?: number | undefined;
1015
+ runId?: string | undefined;
1016
+ name?: string | undefined;
1017
+ started?: number | undefined;
1018
+ phases?: {
1019
+ id: string;
1020
+ title: string;
1021
+ order: number;
1022
+ }[] | undefined;
1023
+ agents?: {
1024
+ id: string;
1025
+ title: string;
1026
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1027
+ toolCallId?: string | undefined;
1028
+ phaseId?: string | undefined;
1029
+ model?: string | undefined;
1030
+ tokens?: number | undefined;
1031
+ toolCalls?: number | undefined;
1032
+ durationMs?: number | undefined;
1033
+ startedAt?: number | undefined;
1034
+ endedAt?: number | undefined;
1035
+ result?: string | undefined;
1036
+ }[] | undefined;
1037
+ }>>;
726
1038
  }, "strip", z.ZodTypeAny, {
727
1039
  type: "subagent";
728
1040
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1041
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1042
+ model?: string | undefined;
729
1043
  task?: string | undefined;
730
1044
  agentType?: string | undefined;
731
- model?: string | undefined;
1045
+ workflow?: {
1046
+ completed?: number | undefined;
1047
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1048
+ tokens?: number | undefined;
1049
+ durationMs?: number | undefined;
1050
+ startedAt?: number | undefined;
1051
+ endedAt?: number | undefined;
1052
+ runId?: string | undefined;
1053
+ name?: string | undefined;
1054
+ started?: number | undefined;
1055
+ phases?: {
1056
+ id: string;
1057
+ title: string;
1058
+ order: number;
1059
+ }[] | undefined;
1060
+ agents?: {
1061
+ id: string;
1062
+ title: string;
1063
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1064
+ toolCallId?: string | undefined;
1065
+ phaseId?: string | undefined;
1066
+ model?: string | undefined;
1067
+ tokens?: number | undefined;
1068
+ toolCalls?: number | undefined;
1069
+ durationMs?: number | undefined;
1070
+ startedAt?: number | undefined;
1071
+ endedAt?: number | undefined;
1072
+ result?: string | undefined;
1073
+ }[] | undefined;
1074
+ } | undefined;
732
1075
  }, {
733
1076
  type: "subagent";
734
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1077
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1078
+ model?: string | undefined;
735
1079
  task?: string | undefined;
736
1080
  agentType?: string | undefined;
737
- model?: string | undefined;
1081
+ workflow?: {
1082
+ completed?: number | undefined;
1083
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1084
+ tokens?: number | undefined;
1085
+ durationMs?: number | undefined;
1086
+ startedAt?: number | undefined;
1087
+ endedAt?: number | undefined;
1088
+ runId?: string | undefined;
1089
+ name?: string | undefined;
1090
+ started?: number | undefined;
1091
+ phases?: {
1092
+ id: string;
1093
+ title: string;
1094
+ order: number;
1095
+ }[] | undefined;
1096
+ agents?: {
1097
+ id: string;
1098
+ title: string;
1099
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1100
+ toolCallId?: string | undefined;
1101
+ phaseId?: string | undefined;
1102
+ model?: string | undefined;
1103
+ tokens?: number | undefined;
1104
+ toolCalls?: number | undefined;
1105
+ durationMs?: number | undefined;
1106
+ startedAt?: number | undefined;
1107
+ endedAt?: number | undefined;
1108
+ result?: string | undefined;
1109
+ }[] | undefined;
1110
+ } | undefined;
1111
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
738
1112
  }>, z.ZodObject<{
739
1113
  type: z.ZodLiteral<"skill">;
740
1114
  name: z.ZodString;
@@ -794,11 +1168,73 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
794
1168
  more?: number | undefined;
795
1169
  }>]>>;
796
1170
  }, "strip", z.ZodTypeAny, {
797
- status: "pending" | "in_progress" | "completed" | "failed";
798
- kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
799
- sessionUpdate: "tool_call";
1171
+ status: "completed" | "failed" | "pending" | "in_progress";
800
1172
  toolCallId: string;
801
1173
  title: string;
1174
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
1175
+ sessionUpdate: "tool_call";
1176
+ detail?: {
1177
+ type: "mcp";
1178
+ tool: string;
1179
+ server: string;
1180
+ } | {
1181
+ type: "subagent";
1182
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1183
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1184
+ model?: string | undefined;
1185
+ task?: string | undefined;
1186
+ agentType?: string | undefined;
1187
+ workflow?: {
1188
+ completed?: number | undefined;
1189
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1190
+ tokens?: number | undefined;
1191
+ durationMs?: number | undefined;
1192
+ startedAt?: number | undefined;
1193
+ endedAt?: number | undefined;
1194
+ runId?: string | undefined;
1195
+ name?: string | undefined;
1196
+ started?: number | undefined;
1197
+ phases?: {
1198
+ id: string;
1199
+ title: string;
1200
+ order: number;
1201
+ }[] | undefined;
1202
+ agents?: {
1203
+ id: string;
1204
+ title: string;
1205
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1206
+ toolCallId?: string | undefined;
1207
+ phaseId?: string | undefined;
1208
+ model?: string | undefined;
1209
+ tokens?: number | undefined;
1210
+ toolCalls?: number | undefined;
1211
+ durationMs?: number | undefined;
1212
+ startedAt?: number | undefined;
1213
+ endedAt?: number | undefined;
1214
+ result?: string | undefined;
1215
+ }[] | undefined;
1216
+ } | undefined;
1217
+ } | {
1218
+ type: "skill";
1219
+ name: string;
1220
+ description?: string | undefined;
1221
+ } | {
1222
+ type: "web_search";
1223
+ query?: string | undefined;
1224
+ } | {
1225
+ type: "image_generation";
1226
+ prompt?: string | undefined;
1227
+ } | {
1228
+ type: "compaction";
1229
+ } | {
1230
+ type: "review";
1231
+ phase: "started" | "finished";
1232
+ } | {
1233
+ type: "question";
1234
+ text: string;
1235
+ more?: number | undefined;
1236
+ } | undefined;
1237
+ parentToolCallId?: string | undefined;
802
1238
  content?: ({
803
1239
  type: "content";
804
1240
  content: {
@@ -811,9 +1247,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
811
1247
  uri?: string | undefined;
812
1248
  } | {
813
1249
  type: "resource_link";
814
- uri: string;
815
1250
  name: string;
816
- kind?: "file" | "skill" | "agent" | undefined;
1251
+ uri: string;
1252
+ kind?: "agent" | "file" | "skill" | undefined;
817
1253
  };
818
1254
  } | {
819
1255
  type: "diff";
@@ -824,28 +1260,64 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
824
1260
  type: "patch";
825
1261
  path: string;
826
1262
  diff: string;
827
- change: "add" | "delete" | "update";
1263
+ change: "delete" | "add" | "update";
828
1264
  movePath?: string | undefined;
829
1265
  } | {
830
1266
  type: "terminal";
831
1267
  terminalId: string;
832
1268
  })[] | undefined;
833
- parentToolCallId?: string | undefined;
834
1269
  rawInput?: unknown;
835
1270
  locations?: {
836
1271
  path: string;
837
1272
  line?: number | undefined;
838
1273
  }[] | undefined;
1274
+ }, {
1275
+ status: "completed" | "failed" | "pending" | "in_progress";
1276
+ toolCallId: string;
1277
+ title: string;
1278
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
1279
+ sessionUpdate: "tool_call";
839
1280
  detail?: {
840
1281
  type: "mcp";
841
- server: string;
842
1282
  tool: string;
1283
+ server: string;
843
1284
  } | {
844
1285
  type: "subagent";
845
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1286
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1287
+ model?: string | undefined;
846
1288
  task?: string | undefined;
847
1289
  agentType?: string | undefined;
848
- model?: string | undefined;
1290
+ workflow?: {
1291
+ completed?: number | undefined;
1292
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1293
+ tokens?: number | undefined;
1294
+ durationMs?: number | undefined;
1295
+ startedAt?: number | undefined;
1296
+ endedAt?: number | undefined;
1297
+ runId?: string | undefined;
1298
+ name?: string | undefined;
1299
+ started?: number | undefined;
1300
+ phases?: {
1301
+ id: string;
1302
+ title: string;
1303
+ order: number;
1304
+ }[] | undefined;
1305
+ agents?: {
1306
+ id: string;
1307
+ title: string;
1308
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1309
+ toolCallId?: string | undefined;
1310
+ phaseId?: string | undefined;
1311
+ model?: string | undefined;
1312
+ tokens?: number | undefined;
1313
+ toolCalls?: number | undefined;
1314
+ durationMs?: number | undefined;
1315
+ startedAt?: number | undefined;
1316
+ endedAt?: number | undefined;
1317
+ result?: string | undefined;
1318
+ }[] | undefined;
1319
+ } | undefined;
1320
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
849
1321
  } | {
850
1322
  type: "skill";
851
1323
  name: string;
@@ -866,12 +1338,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
866
1338
  text: string;
867
1339
  more?: number | undefined;
868
1340
  } | undefined;
869
- }, {
870
- status: "pending" | "in_progress" | "completed" | "failed";
871
- kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
872
- sessionUpdate: "tool_call";
873
- toolCallId: string;
874
- title: string;
1341
+ parentToolCallId?: string | undefined;
875
1342
  content?: ({
876
1343
  type: "content";
877
1344
  content: {
@@ -884,9 +1351,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
884
1351
  uri?: string | undefined;
885
1352
  } | {
886
1353
  type: "resource_link";
887
- uri: string;
888
1354
  name: string;
889
- kind?: "file" | "skill" | "agent" | undefined;
1355
+ uri: string;
1356
+ kind?: "agent" | "file" | "skill" | undefined;
890
1357
  };
891
1358
  } | {
892
1359
  type: "diff";
@@ -897,48 +1364,17 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
897
1364
  type: "patch";
898
1365
  path: string;
899
1366
  diff: string;
900
- change: "add" | "delete" | "update";
1367
+ change: "delete" | "add" | "update";
901
1368
  movePath?: string | undefined;
902
1369
  } | {
903
1370
  type: "terminal";
904
1371
  terminalId: string;
905
1372
  })[] | undefined;
906
- parentToolCallId?: string | undefined;
907
1373
  rawInput?: unknown;
908
1374
  locations?: {
909
1375
  path: string;
910
1376
  line?: number | undefined;
911
1377
  }[] | undefined;
912
- detail?: {
913
- type: "mcp";
914
- server: string;
915
- tool: string;
916
- } | {
917
- type: "subagent";
918
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
919
- task?: string | undefined;
920
- agentType?: string | undefined;
921
- model?: string | undefined;
922
- } | {
923
- type: "skill";
924
- name: string;
925
- description?: string | undefined;
926
- } | {
927
- type: "web_search";
928
- query?: string | undefined;
929
- } | {
930
- type: "image_generation";
931
- prompt?: string | undefined;
932
- } | {
933
- type: "compaction";
934
- } | {
935
- type: "review";
936
- phase: "started" | "finished";
937
- } | {
938
- type: "question";
939
- text: string;
940
- more?: number | undefined;
941
- } | undefined;
942
1378
  }>, z.ZodObject<{
943
1379
  sessionUpdate: z.ZodLiteral<"tool_call_update">;
944
1380
  toolCallId: z.ZodString;
@@ -951,12 +1387,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
951
1387
  tool: z.ZodString;
952
1388
  }, "strip", z.ZodTypeAny, {
953
1389
  type: "mcp";
954
- server: string;
955
1390
  tool: string;
1391
+ server: string;
956
1392
  }, {
957
1393
  type: "mcp";
958
- server: string;
959
1394
  tool: string;
1395
+ server: string;
960
1396
  }>, z.ZodObject<{
961
1397
  type: z.ZodLiteral<"subagent">;
962
1398
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -965,18 +1401,205 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
965
1401
  /** The sub-agent's role or type, e.g. "Explore". */
966
1402
  agentType: z.ZodOptional<z.ZodString>;
967
1403
  model: z.ZodOptional<z.ZodString>;
1404
+ /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
1405
+ state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
1406
+ /** A Claude workflow is a background run containing its own agents. Counts are observed, not a predicted total. */
1407
+ workflow: z.ZodOptional<z.ZodObject<{
1408
+ runId: z.ZodOptional<z.ZodString>;
1409
+ name: z.ZodOptional<z.ZodString>;
1410
+ state: z.ZodOptional<z.ZodEnum<["running", "paused", "completed", "failed", "stopped"]>>;
1411
+ started: z.ZodOptional<z.ZodNumber>;
1412
+ completed: z.ZodOptional<z.ZodNumber>;
1413
+ tokens: z.ZodOptional<z.ZodNumber>;
1414
+ durationMs: z.ZodOptional<z.ZodNumber>;
1415
+ startedAt: z.ZodOptional<z.ZodNumber>;
1416
+ endedAt: z.ZodOptional<z.ZodNumber>;
1417
+ phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
1418
+ id: z.ZodString;
1419
+ title: z.ZodString;
1420
+ order: z.ZodNumber;
1421
+ }, "strip", z.ZodTypeAny, {
1422
+ id: string;
1423
+ title: string;
1424
+ order: number;
1425
+ }, {
1426
+ id: string;
1427
+ title: string;
1428
+ order: number;
1429
+ }>, "many">>;
1430
+ agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
1431
+ id: z.ZodString;
1432
+ toolCallId: z.ZodOptional<z.ZodString>;
1433
+ title: z.ZodString;
1434
+ state: z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>;
1435
+ phaseId: z.ZodOptional<z.ZodString>;
1436
+ model: z.ZodOptional<z.ZodString>;
1437
+ tokens: z.ZodOptional<z.ZodNumber>;
1438
+ toolCalls: z.ZodOptional<z.ZodNumber>;
1439
+ durationMs: z.ZodOptional<z.ZodNumber>;
1440
+ startedAt: z.ZodOptional<z.ZodNumber>;
1441
+ endedAt: z.ZodOptional<z.ZodNumber>;
1442
+ result: z.ZodOptional<z.ZodString>;
1443
+ }, "strip", z.ZodTypeAny, {
1444
+ id: string;
1445
+ title: string;
1446
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1447
+ toolCallId?: string | undefined;
1448
+ phaseId?: string | undefined;
1449
+ model?: string | undefined;
1450
+ tokens?: number | undefined;
1451
+ toolCalls?: number | undefined;
1452
+ durationMs?: number | undefined;
1453
+ startedAt?: number | undefined;
1454
+ endedAt?: number | undefined;
1455
+ result?: string | undefined;
1456
+ }, {
1457
+ id: string;
1458
+ title: string;
1459
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1460
+ toolCallId?: string | undefined;
1461
+ phaseId?: string | undefined;
1462
+ model?: string | undefined;
1463
+ tokens?: number | undefined;
1464
+ toolCalls?: number | undefined;
1465
+ durationMs?: number | undefined;
1466
+ startedAt?: number | undefined;
1467
+ endedAt?: number | undefined;
1468
+ result?: string | undefined;
1469
+ }>, "many">>;
1470
+ }, "strip", z.ZodTypeAny, {
1471
+ completed?: number | undefined;
1472
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1473
+ tokens?: number | undefined;
1474
+ durationMs?: number | undefined;
1475
+ startedAt?: number | undefined;
1476
+ endedAt?: number | undefined;
1477
+ runId?: string | undefined;
1478
+ name?: string | undefined;
1479
+ started?: number | undefined;
1480
+ phases?: {
1481
+ id: string;
1482
+ title: string;
1483
+ order: number;
1484
+ }[] | undefined;
1485
+ agents?: {
1486
+ id: string;
1487
+ title: string;
1488
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1489
+ toolCallId?: string | undefined;
1490
+ phaseId?: string | undefined;
1491
+ model?: string | undefined;
1492
+ tokens?: number | undefined;
1493
+ toolCalls?: number | undefined;
1494
+ durationMs?: number | undefined;
1495
+ startedAt?: number | undefined;
1496
+ endedAt?: number | undefined;
1497
+ result?: string | undefined;
1498
+ }[] | undefined;
1499
+ }, {
1500
+ completed?: number | undefined;
1501
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1502
+ tokens?: number | undefined;
1503
+ durationMs?: number | undefined;
1504
+ startedAt?: number | undefined;
1505
+ endedAt?: number | undefined;
1506
+ runId?: string | undefined;
1507
+ name?: string | undefined;
1508
+ started?: number | undefined;
1509
+ phases?: {
1510
+ id: string;
1511
+ title: string;
1512
+ order: number;
1513
+ }[] | undefined;
1514
+ agents?: {
1515
+ id: string;
1516
+ title: string;
1517
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1518
+ toolCallId?: string | undefined;
1519
+ phaseId?: string | undefined;
1520
+ model?: string | undefined;
1521
+ tokens?: number | undefined;
1522
+ toolCalls?: number | undefined;
1523
+ durationMs?: number | undefined;
1524
+ startedAt?: number | undefined;
1525
+ endedAt?: number | undefined;
1526
+ result?: string | undefined;
1527
+ }[] | undefined;
1528
+ }>>;
968
1529
  }, "strip", z.ZodTypeAny, {
969
1530
  type: "subagent";
970
1531
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1532
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1533
+ model?: string | undefined;
971
1534
  task?: string | undefined;
972
1535
  agentType?: string | undefined;
973
- model?: string | undefined;
1536
+ workflow?: {
1537
+ completed?: number | undefined;
1538
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1539
+ tokens?: number | undefined;
1540
+ durationMs?: number | undefined;
1541
+ startedAt?: number | undefined;
1542
+ endedAt?: number | undefined;
1543
+ runId?: string | undefined;
1544
+ name?: string | undefined;
1545
+ started?: number | undefined;
1546
+ phases?: {
1547
+ id: string;
1548
+ title: string;
1549
+ order: number;
1550
+ }[] | undefined;
1551
+ agents?: {
1552
+ id: string;
1553
+ title: string;
1554
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1555
+ toolCallId?: string | undefined;
1556
+ phaseId?: string | undefined;
1557
+ model?: string | undefined;
1558
+ tokens?: number | undefined;
1559
+ toolCalls?: number | undefined;
1560
+ durationMs?: number | undefined;
1561
+ startedAt?: number | undefined;
1562
+ endedAt?: number | undefined;
1563
+ result?: string | undefined;
1564
+ }[] | undefined;
1565
+ } | undefined;
974
1566
  }, {
975
1567
  type: "subagent";
976
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1568
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1569
+ model?: string | undefined;
977
1570
  task?: string | undefined;
978
1571
  agentType?: string | undefined;
979
- model?: string | undefined;
1572
+ workflow?: {
1573
+ completed?: number | undefined;
1574
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1575
+ tokens?: number | undefined;
1576
+ durationMs?: number | undefined;
1577
+ startedAt?: number | undefined;
1578
+ endedAt?: number | undefined;
1579
+ runId?: string | undefined;
1580
+ name?: string | undefined;
1581
+ started?: number | undefined;
1582
+ phases?: {
1583
+ id: string;
1584
+ title: string;
1585
+ order: number;
1586
+ }[] | undefined;
1587
+ agents?: {
1588
+ id: string;
1589
+ title: string;
1590
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1591
+ toolCallId?: string | undefined;
1592
+ phaseId?: string | undefined;
1593
+ model?: string | undefined;
1594
+ tokens?: number | undefined;
1595
+ toolCalls?: number | undefined;
1596
+ durationMs?: number | undefined;
1597
+ startedAt?: number | undefined;
1598
+ endedAt?: number | undefined;
1599
+ result?: string | undefined;
1600
+ }[] | undefined;
1601
+ } | undefined;
1602
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
980
1603
  }>, z.ZodObject<{
981
1604
  type: z.ZodLiteral<"skill">;
982
1605
  name: z.ZodString;
@@ -1070,14 +1693,14 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1070
1693
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1071
1694
  }, "strip", z.ZodTypeAny, {
1072
1695
  type: "resource_link";
1073
- uri: string;
1074
1696
  name: string;
1075
- kind?: "file" | "skill" | "agent" | undefined;
1697
+ uri: string;
1698
+ kind?: "agent" | "file" | "skill" | undefined;
1076
1699
  }, {
1077
1700
  type: "resource_link";
1078
- uri: string;
1079
1701
  name: string;
1080
- kind?: "file" | "skill" | "agent" | undefined;
1702
+ uri: string;
1703
+ kind?: "agent" | "file" | "skill" | undefined;
1081
1704
  }>]>;
1082
1705
  }, "strip", z.ZodTypeAny, {
1083
1706
  type: "content";
@@ -1091,9 +1714,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1091
1714
  uri?: string | undefined;
1092
1715
  } | {
1093
1716
  type: "resource_link";
1094
- uri: string;
1095
1717
  name: string;
1096
- kind?: "file" | "skill" | "agent" | undefined;
1718
+ uri: string;
1719
+ kind?: "agent" | "file" | "skill" | undefined;
1097
1720
  };
1098
1721
  }, {
1099
1722
  type: "content";
@@ -1107,9 +1730,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1107
1730
  uri?: string | undefined;
1108
1731
  } | {
1109
1732
  type: "resource_link";
1110
- uri: string;
1111
1733
  name: string;
1112
- kind?: "file" | "skill" | "agent" | undefined;
1734
+ uri: string;
1735
+ kind?: "agent" | "file" | "skill" | undefined;
1113
1736
  };
1114
1737
  }>, z.ZodObject<{
1115
1738
  type: z.ZodLiteral<"diff">;
@@ -1136,13 +1759,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1136
1759
  type: "patch";
1137
1760
  path: string;
1138
1761
  diff: string;
1139
- change: "add" | "delete" | "update";
1762
+ change: "delete" | "add" | "update";
1140
1763
  movePath?: string | undefined;
1141
1764
  }, {
1142
1765
  type: "patch";
1143
1766
  path: string;
1144
1767
  diff: string;
1145
- change: "add" | "delete" | "update";
1768
+ change: "delete" | "add" | "update";
1146
1769
  movePath?: string | undefined;
1147
1770
  }>, z.ZodObject<{
1148
1771
  type: z.ZodLiteral<"terminal">;
@@ -1158,52 +1781,51 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1158
1781
  appendOutput: z.ZodOptional<z.ZodString>;
1159
1782
  rawOutput: z.ZodOptional<z.ZodUnknown>;
1160
1783
  }, "strip", z.ZodTypeAny, {
1161
- sessionUpdate: "tool_call_update";
1162
1784
  toolCallId: string;
1163
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
1164
- content?: ({
1165
- type: "content";
1166
- content: {
1167
- type: "text";
1168
- text: string;
1169
- } | {
1170
- type: "image";
1171
- mimeType: string;
1172
- data?: string | undefined;
1173
- uri?: string | undefined;
1174
- } | {
1175
- type: "resource_link";
1176
- uri: string;
1177
- name: string;
1178
- kind?: "file" | "skill" | "agent" | undefined;
1179
- };
1180
- } | {
1181
- type: "diff";
1182
- path: string;
1183
- newText: string;
1184
- oldText?: string | null | undefined;
1185
- } | {
1186
- type: "patch";
1187
- path: string;
1188
- diff: string;
1189
- change: "add" | "delete" | "update";
1190
- movePath?: string | undefined;
1191
- } | {
1192
- type: "terminal";
1193
- terminalId: string;
1194
- })[] | undefined;
1195
- parentToolCallId?: string | undefined;
1785
+ sessionUpdate: "tool_call_update";
1786
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
1196
1787
  title?: string | undefined;
1197
1788
  detail?: {
1198
1789
  type: "mcp";
1199
- server: string;
1200
1790
  tool: string;
1791
+ server: string;
1201
1792
  } | {
1202
1793
  type: "subagent";
1203
1794
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1795
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1796
+ model?: string | undefined;
1204
1797
  task?: string | undefined;
1205
1798
  agentType?: string | undefined;
1206
- model?: string | undefined;
1799
+ workflow?: {
1800
+ completed?: number | undefined;
1801
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1802
+ tokens?: number | undefined;
1803
+ durationMs?: number | undefined;
1804
+ startedAt?: number | undefined;
1805
+ endedAt?: number | undefined;
1806
+ runId?: string | undefined;
1807
+ name?: string | undefined;
1808
+ started?: number | undefined;
1809
+ phases?: {
1810
+ id: string;
1811
+ title: string;
1812
+ order: number;
1813
+ }[] | undefined;
1814
+ agents?: {
1815
+ id: string;
1816
+ title: string;
1817
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1818
+ toolCallId?: string | undefined;
1819
+ phaseId?: string | undefined;
1820
+ model?: string | undefined;
1821
+ tokens?: number | undefined;
1822
+ toolCalls?: number | undefined;
1823
+ durationMs?: number | undefined;
1824
+ startedAt?: number | undefined;
1825
+ endedAt?: number | undefined;
1826
+ result?: string | undefined;
1827
+ }[] | undefined;
1828
+ } | undefined;
1207
1829
  } | {
1208
1830
  type: "skill";
1209
1831
  name: string;
@@ -1224,12 +1846,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1224
1846
  text: string;
1225
1847
  more?: number | undefined;
1226
1848
  } | undefined;
1227
- appendOutput?: string | undefined;
1228
- rawOutput?: unknown;
1229
- }, {
1230
- sessionUpdate: "tool_call_update";
1231
- toolCallId: string;
1232
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
1849
+ parentToolCallId?: string | undefined;
1233
1850
  content?: ({
1234
1851
  type: "content";
1235
1852
  content: {
@@ -1242,9 +1859,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1242
1859
  uri?: string | undefined;
1243
1860
  } | {
1244
1861
  type: "resource_link";
1245
- uri: string;
1246
1862
  name: string;
1247
- kind?: "file" | "skill" | "agent" | undefined;
1863
+ uri: string;
1864
+ kind?: "agent" | "file" | "skill" | undefined;
1248
1865
  };
1249
1866
  } | {
1250
1867
  type: "diff";
@@ -1255,24 +1872,60 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1255
1872
  type: "patch";
1256
1873
  path: string;
1257
1874
  diff: string;
1258
- change: "add" | "delete" | "update";
1875
+ change: "delete" | "add" | "update";
1259
1876
  movePath?: string | undefined;
1260
1877
  } | {
1261
1878
  type: "terminal";
1262
1879
  terminalId: string;
1263
1880
  })[] | undefined;
1264
- parentToolCallId?: string | 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;
1265
1887
  title?: string | undefined;
1266
1888
  detail?: {
1267
1889
  type: "mcp";
1268
- server: string;
1269
1890
  tool: string;
1891
+ server: string;
1270
1892
  } | {
1271
1893
  type: "subagent";
1272
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1894
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1895
+ model?: string | undefined;
1273
1896
  task?: string | undefined;
1274
1897
  agentType?: string | undefined;
1275
- model?: string | undefined;
1898
+ workflow?: {
1899
+ completed?: number | undefined;
1900
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
1901
+ tokens?: number | undefined;
1902
+ durationMs?: number | undefined;
1903
+ startedAt?: number | undefined;
1904
+ endedAt?: number | undefined;
1905
+ runId?: string | undefined;
1906
+ name?: string | undefined;
1907
+ started?: number | undefined;
1908
+ phases?: {
1909
+ id: string;
1910
+ title: string;
1911
+ order: number;
1912
+ }[] | undefined;
1913
+ agents?: {
1914
+ id: string;
1915
+ title: string;
1916
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
1917
+ toolCallId?: string | undefined;
1918
+ phaseId?: string | undefined;
1919
+ model?: string | undefined;
1920
+ tokens?: number | undefined;
1921
+ toolCalls?: number | undefined;
1922
+ durationMs?: number | undefined;
1923
+ startedAt?: number | undefined;
1924
+ endedAt?: number | undefined;
1925
+ result?: string | undefined;
1926
+ }[] | undefined;
1927
+ } | undefined;
1928
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1276
1929
  } | {
1277
1930
  type: "skill";
1278
1931
  name: string;
@@ -1293,6 +1946,38 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1293
1946
  text: string;
1294
1947
  more?: number | undefined;
1295
1948
  } | 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
+ type: "diff";
1968
+ path: string;
1969
+ newText: string;
1970
+ oldText?: string | null | undefined;
1971
+ } | {
1972
+ type: "patch";
1973
+ path: string;
1974
+ diff: string;
1975
+ change: "delete" | "add" | "update";
1976
+ movePath?: string | undefined;
1977
+ } | {
1978
+ type: "terminal";
1979
+ terminalId: string;
1980
+ })[] | undefined;
1296
1981
  appendOutput?: string | undefined;
1297
1982
  rawOutput?: unknown;
1298
1983
  }>, z.ZodObject<{
@@ -1302,24 +1987,24 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1302
1987
  priority: z.ZodDefault<z.ZodEnum<["high", "medium", "low"]>>;
1303
1988
  status: z.ZodEnum<["pending", "in_progress", "completed"]>;
1304
1989
  }, "strip", z.ZodTypeAny, {
1305
- status: "pending" | "in_progress" | "completed";
1990
+ status: "completed" | "pending" | "in_progress";
1306
1991
  content: string;
1307
1992
  priority: "high" | "medium" | "low";
1308
1993
  }, {
1309
- status: "pending" | "in_progress" | "completed";
1994
+ status: "completed" | "pending" | "in_progress";
1310
1995
  content: string;
1311
1996
  priority?: "high" | "medium" | "low" | undefined;
1312
1997
  }>, "many">;
1313
1998
  }, "strip", z.ZodTypeAny, {
1314
1999
  entries: {
1315
- status: "pending" | "in_progress" | "completed";
2000
+ status: "completed" | "pending" | "in_progress";
1316
2001
  content: string;
1317
2002
  priority: "high" | "medium" | "low";
1318
2003
  }[];
1319
2004
  sessionUpdate: "plan";
1320
2005
  }, {
1321
2006
  entries: {
1322
- status: "pending" | "in_progress" | "completed";
2007
+ status: "completed" | "pending" | "in_progress";
1323
2008
  content: string;
1324
2009
  priority?: "high" | "medium" | "low" | undefined;
1325
2010
  }[];
@@ -1368,12 +2053,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1368
2053
  model: z.ZodOptional<z.ZodString>;
1369
2054
  }, "strip", z.ZodTypeAny, {
1370
2055
  sessionUpdate: "session_info_update";
1371
- model?: string | undefined;
1372
2056
  title?: string | undefined;
2057
+ model?: string | undefined;
1373
2058
  }, {
1374
2059
  sessionUpdate: "session_info_update";
1375
- model?: string | undefined;
1376
2060
  title?: string | undefined;
2061
+ model?: string | undefined;
1377
2062
  }>, z.ZodObject<{
1378
2063
  sessionUpdate: z.ZodLiteral<"usage_update">;
1379
2064
  usedTokens: z.ZodOptional<z.ZodNumber>;
@@ -1428,9 +2113,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1428
2113
  name: string;
1429
2114
  description?: string | undefined;
1430
2115
  }[];
1431
- name: string;
1432
2116
  id: string;
1433
- category: "model" | "mode" | "effort" | "other";
2117
+ name: string;
2118
+ category: "model" | "other" | "mode" | "effort";
1434
2119
  current: string;
1435
2120
  }, {
1436
2121
  values: {
@@ -1438,10 +2123,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1438
2123
  name: string;
1439
2124
  description?: string | undefined;
1440
2125
  }[];
1441
- name: string;
1442
2126
  id: string;
2127
+ name: string;
1443
2128
  current: string;
1444
- category?: "model" | "mode" | "effort" | "other" | undefined;
2129
+ category?: "model" | "other" | "mode" | "effort" | undefined;
1445
2130
  }>, "many">;
1446
2131
  }, "strip", z.ZodTypeAny, {
1447
2132
  options: {
@@ -1450,9 +2135,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1450
2135
  name: string;
1451
2136
  description?: string | undefined;
1452
2137
  }[];
1453
- name: string;
1454
2138
  id: string;
1455
- category: "model" | "mode" | "effort" | "other";
2139
+ name: string;
2140
+ category: "model" | "other" | "mode" | "effort";
1456
2141
  current: string;
1457
2142
  }[];
1458
2143
  sessionUpdate: "ls_config";
@@ -1463,10 +2148,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1463
2148
  name: string;
1464
2149
  description?: string | undefined;
1465
2150
  }[];
1466
- name: string;
1467
2151
  id: string;
2152
+ name: string;
1468
2153
  current: string;
1469
- category?: "model" | "mode" | "effort" | "other" | undefined;
2154
+ category?: "model" | "other" | "mode" | "effort" | undefined;
1470
2155
  }[];
1471
2156
  sessionUpdate: "ls_config";
1472
2157
  }>, z.ZodObject<{
@@ -1475,13 +2160,13 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1475
2160
  title: z.ZodString;
1476
2161
  detail: z.ZodOptional<z.ZodString>;
1477
2162
  }, "strip", z.ZodTypeAny, {
1478
- sessionUpdate: "ls_notice";
1479
2163
  title: string;
2164
+ sessionUpdate: "ls_notice";
1480
2165
  level: "info" | "warning";
1481
2166
  detail?: string | undefined;
1482
2167
  }, {
1483
- sessionUpdate: "ls_notice";
1484
2168
  title: string;
2169
+ sessionUpdate: "ls_notice";
1485
2170
  level: "info" | "warning";
1486
2171
  detail?: string | undefined;
1487
2172
  }>, z.ZodObject<{
@@ -1492,17 +2177,17 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1492
2177
  turnId: z.ZodOptional<z.ZodString>;
1493
2178
  stopReason: z.ZodOptional<z.ZodEnum<["end_turn", "cancelled", "error", "max_tokens", "refusal"]>>;
1494
2179
  }, "strip", z.ZodTypeAny, {
1495
- sessionUpdate: "ls_turn";
1496
2180
  state: "started" | "ended";
2181
+ sessionUpdate: "ls_turn";
1497
2182
  parentToolCallId?: string | undefined;
1498
2183
  turnId?: string | undefined;
1499
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2184
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
1500
2185
  }, {
1501
- sessionUpdate: "ls_turn";
1502
2186
  state: "started" | "ended";
2187
+ sessionUpdate: "ls_turn";
1503
2188
  parentToolCallId?: string | undefined;
1504
2189
  turnId?: string | undefined;
1505
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
2190
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
1506
2191
  }>, z.ZodObject<{
1507
2192
  sessionUpdate: z.ZodLiteral<"ls_permission">;
1508
2193
  requestId: z.ZodString;
@@ -1515,12 +2200,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1515
2200
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
1516
2201
  }, "strip", z.ZodTypeAny, {
1517
2202
  name: string;
1518
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1519
2203
  optionId: string;
2204
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1520
2205
  }, {
1521
2206
  name: string;
1522
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1523
2207
  optionId: string;
2208
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1524
2209
  }>, "many">;
1525
2210
  /**
1526
2211
  * The agent is asking the user something: answer with `sessions.answer`.
@@ -1549,9 +2234,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1549
2234
  secret: z.ZodOptional<z.ZodBoolean>;
1550
2235
  required: z.ZodOptional<z.ZodBoolean>;
1551
2236
  }, "strip", z.ZodTypeAny, {
1552
- text: string;
1553
- kind: "text" | "choice" | "choices";
1554
2237
  id: string;
2238
+ kind: "text" | "choice" | "choices";
2239
+ text: string;
1555
2240
  options?: {
1556
2241
  value: string;
1557
2242
  label: string;
@@ -1562,9 +2247,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1562
2247
  secret?: boolean | undefined;
1563
2248
  required?: boolean | undefined;
1564
2249
  }, {
1565
- text: string;
1566
- kind: "text" | "choice" | "choices";
1567
2250
  id: string;
2251
+ kind: "text" | "choice" | "choices";
2252
+ text: string;
1568
2253
  options?: {
1569
2254
  value: string;
1570
2255
  label: string;
@@ -1578,18 +2263,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1578
2263
  }, "strip", z.ZodTypeAny, {
1579
2264
  options: {
1580
2265
  name: string;
1581
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1582
2266
  optionId: string;
2267
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1583
2268
  }[];
1584
- sessionUpdate: "ls_permission";
1585
2269
  title: string;
1586
2270
  requestId: string;
2271
+ sessionUpdate: "ls_permission";
1587
2272
  toolCallId?: string | undefined;
1588
2273
  detail?: string | undefined;
1589
2274
  questions?: {
1590
- text: string;
1591
- kind: "text" | "choice" | "choices";
1592
2275
  id: string;
2276
+ kind: "text" | "choice" | "choices";
2277
+ text: string;
1593
2278
  options?: {
1594
2279
  value: string;
1595
2280
  label: string;
@@ -1603,18 +2288,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1603
2288
  }, {
1604
2289
  options: {
1605
2290
  name: string;
1606
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1607
2291
  optionId: string;
2292
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1608
2293
  }[];
1609
- sessionUpdate: "ls_permission";
1610
2294
  title: string;
1611
2295
  requestId: string;
2296
+ sessionUpdate: "ls_permission";
1612
2297
  toolCallId?: string | undefined;
1613
2298
  detail?: string | undefined;
1614
2299
  questions?: {
1615
- text: string;
1616
- kind: "text" | "choice" | "choices";
1617
2300
  id: string;
2301
+ kind: "text" | "choice" | "choices";
2302
+ text: string;
1618
2303
  options?: {
1619
2304
  value: string;
1620
2305
  label: string;
@@ -1644,8 +2329,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1644
2329
  other?: string | undefined;
1645
2330
  }>, "many">>;
1646
2331
  }, "strip", z.ZodTypeAny, {
1647
- sessionUpdate: "ls_permission_resolved";
1648
2332
  requestId: string;
2333
+ sessionUpdate: "ls_permission_resolved";
1649
2334
  optionId?: string | undefined;
1650
2335
  answers?: {
1651
2336
  values: string[];
@@ -1653,8 +2338,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1653
2338
  other?: string | undefined;
1654
2339
  }[] | undefined;
1655
2340
  }, {
1656
- sessionUpdate: "ls_permission_resolved";
1657
2341
  requestId: string;
2342
+ sessionUpdate: "ls_permission_resolved";
1658
2343
  optionId?: string | undefined;
1659
2344
  answers?: {
1660
2345
  values: string[];
@@ -1666,22 +2351,22 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1666
2351
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
1667
2352
  deviceId: z.ZodOptional<z.ZodString>;
1668
2353
  }, "strip", z.ZodTypeAny, {
2354
+ driver: "remote" | "desktop" | "none";
1669
2355
  sessionUpdate: "ls_driver";
1670
- driver: "desktop" | "remote" | "none";
1671
2356
  deviceId?: string | undefined;
1672
2357
  }, {
2358
+ driver: "remote" | "desktop" | "none";
1673
2359
  sessionUpdate: "ls_driver";
1674
- driver: "desktop" | "remote" | "none";
1675
2360
  deviceId?: string | undefined;
1676
2361
  }>, z.ZodObject<{
1677
2362
  sessionUpdate: z.ZodLiteral<"ls_status">;
1678
2363
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
1679
2364
  }, "strip", z.ZodTypeAny, {
2365
+ state: "error" | "running" | "idle" | "waiting" | "offline";
1680
2366
  sessionUpdate: "ls_status";
1681
- state: "error" | "idle" | "running" | "waiting" | "offline";
1682
2367
  }, {
2368
+ state: "error" | "running" | "idle" | "waiting" | "offline";
1683
2369
  sessionUpdate: "ls_status";
1684
- state: "error" | "idle" | "running" | "waiting" | "offline";
1685
2370
  }>, z.ZodObject<{
1686
2371
  sessionUpdate: z.ZodLiteral<"ls_error">;
1687
2372
  code: z.ZodString;
@@ -1740,14 +2425,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1740
2425
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1741
2426
  }, "strip", z.ZodTypeAny, {
1742
2427
  type: "resource_link";
1743
- uri: string;
1744
2428
  name: string;
1745
- kind?: "file" | "skill" | "agent" | undefined;
2429
+ uri: string;
2430
+ kind?: "agent" | "file" | "skill" | undefined;
1746
2431
  }, {
1747
2432
  type: "resource_link";
1748
- uri: string;
1749
2433
  name: string;
1750
- kind?: "file" | "skill" | "agent" | undefined;
2434
+ uri: string;
2435
+ kind?: "agent" | "file" | "skill" | undefined;
1751
2436
  }>]>;
1752
2437
  }, "strip", z.ZodTypeAny, {
1753
2438
  content: {
@@ -1760,9 +2445,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1760
2445
  uri?: string | undefined;
1761
2446
  } | {
1762
2447
  type: "resource_link";
1763
- uri: string;
1764
2448
  name: string;
1765
- kind?: "file" | "skill" | "agent" | undefined;
2449
+ uri: string;
2450
+ kind?: "agent" | "file" | "skill" | undefined;
1766
2451
  };
1767
2452
  sessionUpdate: "user_message_chunk";
1768
2453
  messageId?: string | undefined;
@@ -1777,9 +2462,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1777
2462
  uri?: string | undefined;
1778
2463
  } | {
1779
2464
  type: "resource_link";
1780
- uri: string;
1781
2465
  name: string;
1782
- kind?: "file" | "skill" | "agent" | undefined;
2466
+ uri: string;
2467
+ kind?: "agent" | "file" | "skill" | undefined;
1783
2468
  };
1784
2469
  sessionUpdate: "user_message_chunk";
1785
2470
  messageId?: string | undefined;
@@ -1819,14 +2504,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1819
2504
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1820
2505
  }, "strip", z.ZodTypeAny, {
1821
2506
  type: "resource_link";
1822
- uri: string;
1823
2507
  name: string;
1824
- kind?: "file" | "skill" | "agent" | undefined;
2508
+ uri: string;
2509
+ kind?: "agent" | "file" | "skill" | undefined;
1825
2510
  }, {
1826
2511
  type: "resource_link";
1827
- uri: string;
1828
2512
  name: string;
1829
- kind?: "file" | "skill" | "agent" | undefined;
2513
+ uri: string;
2514
+ kind?: "agent" | "file" | "skill" | undefined;
1830
2515
  }>]>;
1831
2516
  }, "strip", z.ZodTypeAny, {
1832
2517
  content: {
@@ -1839,9 +2524,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1839
2524
  uri?: string | undefined;
1840
2525
  } | {
1841
2526
  type: "resource_link";
1842
- uri: string;
1843
2527
  name: string;
1844
- kind?: "file" | "skill" | "agent" | undefined;
2528
+ uri: string;
2529
+ kind?: "agent" | "file" | "skill" | undefined;
1845
2530
  };
1846
2531
  sessionUpdate: "agent_message_chunk";
1847
2532
  messageId: string;
@@ -1857,9 +2542,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1857
2542
  uri?: string | undefined;
1858
2543
  } | {
1859
2544
  type: "resource_link";
1860
- uri: string;
1861
2545
  name: string;
1862
- kind?: "file" | "skill" | "agent" | undefined;
2546
+ uri: string;
2547
+ kind?: "agent" | "file" | "skill" | undefined;
1863
2548
  };
1864
2549
  sessionUpdate: "agent_message_chunk";
1865
2550
  messageId: string;
@@ -1900,14 +2585,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1900
2585
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1901
2586
  }, "strip", z.ZodTypeAny, {
1902
2587
  type: "resource_link";
1903
- uri: string;
1904
2588
  name: string;
1905
- kind?: "file" | "skill" | "agent" | undefined;
2589
+ uri: string;
2590
+ kind?: "agent" | "file" | "skill" | undefined;
1906
2591
  }, {
1907
2592
  type: "resource_link";
1908
- uri: string;
1909
2593
  name: string;
1910
- kind?: "file" | "skill" | "agent" | undefined;
2594
+ uri: string;
2595
+ kind?: "agent" | "file" | "skill" | undefined;
1911
2596
  }>]>;
1912
2597
  }, "strip", z.ZodTypeAny, {
1913
2598
  content: {
@@ -1920,9 +2605,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1920
2605
  uri?: string | undefined;
1921
2606
  } | {
1922
2607
  type: "resource_link";
1923
- uri: string;
1924
2608
  name: string;
1925
- kind?: "file" | "skill" | "agent" | undefined;
2609
+ uri: string;
2610
+ kind?: "agent" | "file" | "skill" | undefined;
1926
2611
  };
1927
2612
  sessionUpdate: "agent_thought_chunk";
1928
2613
  messageId: string;
@@ -1938,9 +2623,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1938
2623
  uri?: string | undefined;
1939
2624
  } | {
1940
2625
  type: "resource_link";
1941
- uri: string;
1942
2626
  name: string;
1943
- kind?: "file" | "skill" | "agent" | undefined;
2627
+ uri: string;
2628
+ kind?: "agent" | "file" | "skill" | undefined;
1944
2629
  };
1945
2630
  sessionUpdate: "agent_thought_chunk";
1946
2631
  messageId: string;
@@ -1988,14 +2673,14 @@ export declare const sessionEventSchema: z.ZodObject<{
1988
2673
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
1989
2674
  }, "strip", z.ZodTypeAny, {
1990
2675
  type: "resource_link";
1991
- uri: string;
1992
2676
  name: string;
1993
- kind?: "file" | "skill" | "agent" | undefined;
2677
+ uri: string;
2678
+ kind?: "agent" | "file" | "skill" | undefined;
1994
2679
  }, {
1995
2680
  type: "resource_link";
1996
- uri: string;
1997
2681
  name: string;
1998
- kind?: "file" | "skill" | "agent" | undefined;
2682
+ uri: string;
2683
+ kind?: "agent" | "file" | "skill" | undefined;
1999
2684
  }>]>;
2000
2685
  }, "strip", z.ZodTypeAny, {
2001
2686
  type: "content";
@@ -2009,9 +2694,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2009
2694
  uri?: string | undefined;
2010
2695
  } | {
2011
2696
  type: "resource_link";
2012
- uri: string;
2013
2697
  name: string;
2014
- kind?: "file" | "skill" | "agent" | undefined;
2698
+ uri: string;
2699
+ kind?: "agent" | "file" | "skill" | undefined;
2015
2700
  };
2016
2701
  }, {
2017
2702
  type: "content";
@@ -2025,9 +2710,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2025
2710
  uri?: string | undefined;
2026
2711
  } | {
2027
2712
  type: "resource_link";
2028
- uri: string;
2029
2713
  name: string;
2030
- kind?: "file" | "skill" | "agent" | undefined;
2714
+ uri: string;
2715
+ kind?: "agent" | "file" | "skill" | undefined;
2031
2716
  };
2032
2717
  }>, z.ZodObject<{
2033
2718
  type: z.ZodLiteral<"diff">;
@@ -2054,13 +2739,13 @@ export declare const sessionEventSchema: z.ZodObject<{
2054
2739
  type: "patch";
2055
2740
  path: string;
2056
2741
  diff: string;
2057
- change: "add" | "delete" | "update";
2742
+ change: "delete" | "add" | "update";
2058
2743
  movePath?: string | undefined;
2059
2744
  }, {
2060
2745
  type: "patch";
2061
2746
  path: string;
2062
2747
  diff: string;
2063
- change: "add" | "delete" | "update";
2748
+ change: "delete" | "add" | "update";
2064
2749
  movePath?: string | undefined;
2065
2750
  }>, z.ZodObject<{
2066
2751
  type: z.ZodLiteral<"terminal">;
@@ -2088,12 +2773,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2088
2773
  tool: z.ZodString;
2089
2774
  }, "strip", z.ZodTypeAny, {
2090
2775
  type: "mcp";
2091
- server: string;
2092
2776
  tool: string;
2777
+ server: string;
2093
2778
  }, {
2094
2779
  type: "mcp";
2095
- server: string;
2096
2780
  tool: string;
2781
+ server: string;
2097
2782
  }>, z.ZodObject<{
2098
2783
  type: z.ZodLiteral<"subagent">;
2099
2784
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -2102,18 +2787,205 @@ export declare const sessionEventSchema: z.ZodObject<{
2102
2787
  /** The sub-agent's role or type, e.g. "Explore". */
2103
2788
  agentType: z.ZodOptional<z.ZodString>;
2104
2789
  model: z.ZodOptional<z.ZodString>;
2790
+ /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
2791
+ state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
2792
+ /** A Claude workflow is a background run containing its own agents. Counts are observed, not a predicted total. */
2793
+ workflow: z.ZodOptional<z.ZodObject<{
2794
+ runId: z.ZodOptional<z.ZodString>;
2795
+ name: z.ZodOptional<z.ZodString>;
2796
+ state: z.ZodOptional<z.ZodEnum<["running", "paused", "completed", "failed", "stopped"]>>;
2797
+ started: z.ZodOptional<z.ZodNumber>;
2798
+ completed: z.ZodOptional<z.ZodNumber>;
2799
+ tokens: z.ZodOptional<z.ZodNumber>;
2800
+ durationMs: z.ZodOptional<z.ZodNumber>;
2801
+ startedAt: z.ZodOptional<z.ZodNumber>;
2802
+ endedAt: z.ZodOptional<z.ZodNumber>;
2803
+ phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
2804
+ id: z.ZodString;
2805
+ title: z.ZodString;
2806
+ order: z.ZodNumber;
2807
+ }, "strip", z.ZodTypeAny, {
2808
+ id: string;
2809
+ title: string;
2810
+ order: number;
2811
+ }, {
2812
+ id: string;
2813
+ title: string;
2814
+ order: number;
2815
+ }>, "many">>;
2816
+ agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
2817
+ id: z.ZodString;
2818
+ toolCallId: z.ZodOptional<z.ZodString>;
2819
+ title: z.ZodString;
2820
+ state: z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>;
2821
+ phaseId: z.ZodOptional<z.ZodString>;
2822
+ model: z.ZodOptional<z.ZodString>;
2823
+ tokens: z.ZodOptional<z.ZodNumber>;
2824
+ toolCalls: z.ZodOptional<z.ZodNumber>;
2825
+ durationMs: z.ZodOptional<z.ZodNumber>;
2826
+ startedAt: z.ZodOptional<z.ZodNumber>;
2827
+ endedAt: z.ZodOptional<z.ZodNumber>;
2828
+ result: z.ZodOptional<z.ZodString>;
2829
+ }, "strip", z.ZodTypeAny, {
2830
+ id: string;
2831
+ title: string;
2832
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
2833
+ toolCallId?: string | undefined;
2834
+ phaseId?: string | undefined;
2835
+ model?: string | undefined;
2836
+ tokens?: number | undefined;
2837
+ toolCalls?: number | undefined;
2838
+ durationMs?: number | undefined;
2839
+ startedAt?: number | undefined;
2840
+ endedAt?: number | undefined;
2841
+ result?: string | undefined;
2842
+ }, {
2843
+ id: string;
2844
+ title: string;
2845
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
2846
+ toolCallId?: string | undefined;
2847
+ phaseId?: string | undefined;
2848
+ model?: string | undefined;
2849
+ tokens?: number | undefined;
2850
+ toolCalls?: number | undefined;
2851
+ durationMs?: number | undefined;
2852
+ startedAt?: number | undefined;
2853
+ endedAt?: number | undefined;
2854
+ result?: string | undefined;
2855
+ }>, "many">>;
2856
+ }, "strip", z.ZodTypeAny, {
2857
+ completed?: number | undefined;
2858
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
2859
+ tokens?: number | undefined;
2860
+ durationMs?: number | undefined;
2861
+ startedAt?: number | undefined;
2862
+ endedAt?: number | undefined;
2863
+ runId?: string | undefined;
2864
+ name?: string | undefined;
2865
+ started?: number | undefined;
2866
+ phases?: {
2867
+ id: string;
2868
+ title: string;
2869
+ order: number;
2870
+ }[] | undefined;
2871
+ agents?: {
2872
+ id: string;
2873
+ title: string;
2874
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
2875
+ toolCallId?: string | undefined;
2876
+ phaseId?: string | undefined;
2877
+ model?: string | undefined;
2878
+ tokens?: number | undefined;
2879
+ toolCalls?: number | undefined;
2880
+ durationMs?: number | undefined;
2881
+ startedAt?: number | undefined;
2882
+ endedAt?: number | undefined;
2883
+ result?: string | undefined;
2884
+ }[] | undefined;
2885
+ }, {
2886
+ completed?: number | undefined;
2887
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
2888
+ tokens?: number | undefined;
2889
+ durationMs?: number | undefined;
2890
+ startedAt?: number | undefined;
2891
+ endedAt?: number | undefined;
2892
+ runId?: string | undefined;
2893
+ name?: string | undefined;
2894
+ started?: number | undefined;
2895
+ phases?: {
2896
+ id: string;
2897
+ title: string;
2898
+ order: number;
2899
+ }[] | undefined;
2900
+ agents?: {
2901
+ id: string;
2902
+ title: string;
2903
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
2904
+ toolCallId?: string | undefined;
2905
+ phaseId?: string | undefined;
2906
+ model?: string | undefined;
2907
+ tokens?: number | undefined;
2908
+ toolCalls?: number | undefined;
2909
+ durationMs?: number | undefined;
2910
+ startedAt?: number | undefined;
2911
+ endedAt?: number | undefined;
2912
+ result?: string | undefined;
2913
+ }[] | undefined;
2914
+ }>>;
2105
2915
  }, "strip", z.ZodTypeAny, {
2106
2916
  type: "subagent";
2107
2917
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
2918
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
2919
+ model?: string | undefined;
2108
2920
  task?: string | undefined;
2109
2921
  agentType?: string | undefined;
2110
- model?: string | undefined;
2922
+ workflow?: {
2923
+ completed?: number | undefined;
2924
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
2925
+ tokens?: number | undefined;
2926
+ durationMs?: number | undefined;
2927
+ startedAt?: number | undefined;
2928
+ endedAt?: number | undefined;
2929
+ runId?: string | undefined;
2930
+ name?: string | undefined;
2931
+ started?: number | undefined;
2932
+ phases?: {
2933
+ id: string;
2934
+ title: string;
2935
+ order: number;
2936
+ }[] | undefined;
2937
+ agents?: {
2938
+ id: string;
2939
+ title: string;
2940
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
2941
+ toolCallId?: string | undefined;
2942
+ phaseId?: string | undefined;
2943
+ model?: string | undefined;
2944
+ tokens?: number | undefined;
2945
+ toolCalls?: number | undefined;
2946
+ durationMs?: number | undefined;
2947
+ startedAt?: number | undefined;
2948
+ endedAt?: number | undefined;
2949
+ result?: string | undefined;
2950
+ }[] | undefined;
2951
+ } | undefined;
2111
2952
  }, {
2112
2953
  type: "subagent";
2113
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2954
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
2955
+ model?: string | undefined;
2114
2956
  task?: string | undefined;
2115
2957
  agentType?: string | undefined;
2116
- model?: string | undefined;
2958
+ workflow?: {
2959
+ completed?: number | undefined;
2960
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
2961
+ tokens?: number | undefined;
2962
+ durationMs?: number | undefined;
2963
+ startedAt?: number | undefined;
2964
+ endedAt?: number | undefined;
2965
+ runId?: string | undefined;
2966
+ name?: string | undefined;
2967
+ started?: number | undefined;
2968
+ phases?: {
2969
+ id: string;
2970
+ title: string;
2971
+ order: number;
2972
+ }[] | undefined;
2973
+ agents?: {
2974
+ id: string;
2975
+ title: string;
2976
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
2977
+ toolCallId?: string | undefined;
2978
+ phaseId?: string | undefined;
2979
+ model?: string | undefined;
2980
+ tokens?: number | undefined;
2981
+ toolCalls?: number | undefined;
2982
+ durationMs?: number | undefined;
2983
+ startedAt?: number | undefined;
2984
+ endedAt?: number | undefined;
2985
+ result?: string | undefined;
2986
+ }[] | undefined;
2987
+ } | undefined;
2988
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2117
2989
  }>, z.ZodObject<{
2118
2990
  type: z.ZodLiteral<"skill">;
2119
2991
  name: z.ZodString;
@@ -2173,11 +3045,73 @@ export declare const sessionEventSchema: z.ZodObject<{
2173
3045
  more?: number | undefined;
2174
3046
  }>]>>;
2175
3047
  }, "strip", z.ZodTypeAny, {
2176
- status: "pending" | "in_progress" | "completed" | "failed";
2177
- kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
2178
- sessionUpdate: "tool_call";
3048
+ status: "completed" | "failed" | "pending" | "in_progress";
2179
3049
  toolCallId: string;
2180
3050
  title: string;
3051
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3052
+ sessionUpdate: "tool_call";
3053
+ detail?: {
3054
+ type: "mcp";
3055
+ tool: string;
3056
+ server: string;
3057
+ } | {
3058
+ type: "subagent";
3059
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3060
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3061
+ model?: string | undefined;
3062
+ task?: string | undefined;
3063
+ agentType?: string | undefined;
3064
+ workflow?: {
3065
+ completed?: number | undefined;
3066
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3067
+ tokens?: number | undefined;
3068
+ durationMs?: number | undefined;
3069
+ startedAt?: number | undefined;
3070
+ endedAt?: number | undefined;
3071
+ runId?: string | undefined;
3072
+ name?: string | undefined;
3073
+ started?: number | undefined;
3074
+ phases?: {
3075
+ id: string;
3076
+ title: string;
3077
+ order: number;
3078
+ }[] | undefined;
3079
+ agents?: {
3080
+ id: string;
3081
+ title: string;
3082
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3083
+ toolCallId?: string | undefined;
3084
+ phaseId?: string | undefined;
3085
+ model?: string | undefined;
3086
+ tokens?: number | undefined;
3087
+ toolCalls?: number | undefined;
3088
+ durationMs?: number | undefined;
3089
+ startedAt?: number | undefined;
3090
+ endedAt?: number | undefined;
3091
+ result?: string | undefined;
3092
+ }[] | undefined;
3093
+ } | undefined;
3094
+ } | {
3095
+ type: "skill";
3096
+ name: string;
3097
+ description?: string | undefined;
3098
+ } | {
3099
+ type: "web_search";
3100
+ query?: string | undefined;
3101
+ } | {
3102
+ type: "image_generation";
3103
+ prompt?: string | undefined;
3104
+ } | {
3105
+ type: "compaction";
3106
+ } | {
3107
+ type: "review";
3108
+ phase: "started" | "finished";
3109
+ } | {
3110
+ type: "question";
3111
+ text: string;
3112
+ more?: number | undefined;
3113
+ } | undefined;
3114
+ parentToolCallId?: string | undefined;
2181
3115
  content?: ({
2182
3116
  type: "content";
2183
3117
  content: {
@@ -2190,9 +3124,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2190
3124
  uri?: string | undefined;
2191
3125
  } | {
2192
3126
  type: "resource_link";
2193
- uri: string;
2194
3127
  name: string;
2195
- kind?: "file" | "skill" | "agent" | undefined;
3128
+ uri: string;
3129
+ kind?: "agent" | "file" | "skill" | undefined;
2196
3130
  };
2197
3131
  } | {
2198
3132
  type: "diff";
@@ -2203,28 +3137,64 @@ export declare const sessionEventSchema: z.ZodObject<{
2203
3137
  type: "patch";
2204
3138
  path: string;
2205
3139
  diff: string;
2206
- change: "add" | "delete" | "update";
3140
+ change: "delete" | "add" | "update";
2207
3141
  movePath?: string | undefined;
2208
3142
  } | {
2209
3143
  type: "terminal";
2210
3144
  terminalId: string;
2211
3145
  })[] | undefined;
2212
- parentToolCallId?: string | undefined;
2213
3146
  rawInput?: unknown;
2214
3147
  locations?: {
2215
3148
  path: string;
2216
3149
  line?: number | undefined;
2217
3150
  }[] | undefined;
3151
+ }, {
3152
+ status: "completed" | "failed" | "pending" | "in_progress";
3153
+ toolCallId: string;
3154
+ title: string;
3155
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3156
+ sessionUpdate: "tool_call";
2218
3157
  detail?: {
2219
3158
  type: "mcp";
2220
- server: string;
2221
3159
  tool: string;
3160
+ server: string;
2222
3161
  } | {
2223
3162
  type: "subagent";
2224
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3163
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3164
+ model?: string | undefined;
2225
3165
  task?: string | undefined;
2226
3166
  agentType?: string | undefined;
2227
- model?: string | undefined;
3167
+ workflow?: {
3168
+ completed?: number | undefined;
3169
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3170
+ tokens?: number | undefined;
3171
+ durationMs?: number | undefined;
3172
+ startedAt?: number | undefined;
3173
+ endedAt?: number | undefined;
3174
+ runId?: string | undefined;
3175
+ name?: string | undefined;
3176
+ started?: number | undefined;
3177
+ phases?: {
3178
+ id: string;
3179
+ title: string;
3180
+ order: number;
3181
+ }[] | undefined;
3182
+ agents?: {
3183
+ id: string;
3184
+ title: string;
3185
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3186
+ toolCallId?: string | undefined;
3187
+ phaseId?: string | undefined;
3188
+ model?: string | undefined;
3189
+ tokens?: number | undefined;
3190
+ toolCalls?: number | undefined;
3191
+ durationMs?: number | undefined;
3192
+ startedAt?: number | undefined;
3193
+ endedAt?: number | undefined;
3194
+ result?: string | undefined;
3195
+ }[] | undefined;
3196
+ } | undefined;
3197
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2228
3198
  } | {
2229
3199
  type: "skill";
2230
3200
  name: string;
@@ -2245,12 +3215,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2245
3215
  text: string;
2246
3216
  more?: number | undefined;
2247
3217
  } | undefined;
2248
- }, {
2249
- status: "pending" | "in_progress" | "completed" | "failed";
2250
- kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
2251
- sessionUpdate: "tool_call";
2252
- toolCallId: string;
2253
- title: string;
3218
+ parentToolCallId?: string | undefined;
2254
3219
  content?: ({
2255
3220
  type: "content";
2256
3221
  content: {
@@ -2263,9 +3228,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2263
3228
  uri?: string | undefined;
2264
3229
  } | {
2265
3230
  type: "resource_link";
2266
- uri: string;
2267
3231
  name: string;
2268
- kind?: "file" | "skill" | "agent" | undefined;
3232
+ uri: string;
3233
+ kind?: "agent" | "file" | "skill" | undefined;
2269
3234
  };
2270
3235
  } | {
2271
3236
  type: "diff";
@@ -2276,66 +3241,35 @@ export declare const sessionEventSchema: z.ZodObject<{
2276
3241
  type: "patch";
2277
3242
  path: string;
2278
3243
  diff: string;
2279
- change: "add" | "delete" | "update";
3244
+ change: "delete" | "add" | "update";
2280
3245
  movePath?: string | undefined;
2281
3246
  } | {
2282
3247
  type: "terminal";
2283
3248
  terminalId: string;
2284
3249
  })[] | undefined;
2285
- parentToolCallId?: string | undefined;
2286
3250
  rawInput?: unknown;
2287
3251
  locations?: {
2288
3252
  path: string;
2289
3253
  line?: number | undefined;
2290
3254
  }[] | undefined;
2291
- detail?: {
3255
+ }>, z.ZodObject<{
3256
+ sessionUpdate: z.ZodLiteral<"tool_call_update">;
3257
+ toolCallId: z.ZodString;
3258
+ parentToolCallId: z.ZodOptional<z.ZodString>;
3259
+ status: z.ZodOptional<z.ZodEnum<["pending", "in_progress", "completed", "failed"]>>;
3260
+ title: z.ZodOptional<z.ZodString>;
3261
+ detail: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3262
+ type: z.ZodLiteral<"mcp">;
3263
+ server: z.ZodString;
3264
+ tool: z.ZodString;
3265
+ }, "strip", z.ZodTypeAny, {
2292
3266
  type: "mcp";
3267
+ tool: string;
2293
3268
  server: string;
3269
+ }, {
3270
+ type: "mcp";
2294
3271
  tool: string;
2295
- } | {
2296
- type: "subagent";
2297
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2298
- task?: string | undefined;
2299
- agentType?: string | undefined;
2300
- model?: string | undefined;
2301
- } | {
2302
- type: "skill";
2303
- name: string;
2304
- description?: string | undefined;
2305
- } | {
2306
- type: "web_search";
2307
- query?: string | undefined;
2308
- } | {
2309
- type: "image_generation";
2310
- prompt?: string | undefined;
2311
- } | {
2312
- type: "compaction";
2313
- } | {
2314
- type: "review";
2315
- phase: "started" | "finished";
2316
- } | {
2317
- type: "question";
2318
- text: string;
2319
- more?: number | undefined;
2320
- } | undefined;
2321
- }>, z.ZodObject<{
2322
- sessionUpdate: z.ZodLiteral<"tool_call_update">;
2323
- toolCallId: z.ZodString;
2324
- parentToolCallId: z.ZodOptional<z.ZodString>;
2325
- status: z.ZodOptional<z.ZodEnum<["pending", "in_progress", "completed", "failed"]>>;
2326
- title: z.ZodOptional<z.ZodString>;
2327
- detail: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2328
- type: z.ZodLiteral<"mcp">;
2329
- server: z.ZodString;
2330
- tool: z.ZodString;
2331
- }, "strip", z.ZodTypeAny, {
2332
- type: "mcp";
2333
- server: string;
2334
- tool: string;
2335
- }, {
2336
- type: "mcp";
2337
3272
  server: string;
2338
- tool: string;
2339
3273
  }>, z.ZodObject<{
2340
3274
  type: z.ZodLiteral<"subagent">;
2341
3275
  /** spawn starts a sub-agent (its work nests under this call); the rest talk to one. */
@@ -2344,18 +3278,205 @@ export declare const sessionEventSchema: z.ZodObject<{
2344
3278
  /** The sub-agent's role or type, e.g. "Explore". */
2345
3279
  agentType: z.ZodOptional<z.ZodString>;
2346
3280
  model: z.ZodOptional<z.ZodString>;
3281
+ /** Agent outcome when a tool's coarse completed/failed state is insufficient. */
3282
+ state: z.ZodOptional<z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>>;
3283
+ /** A Claude workflow is a background run containing its own agents. Counts are observed, not a predicted total. */
3284
+ workflow: z.ZodOptional<z.ZodObject<{
3285
+ runId: z.ZodOptional<z.ZodString>;
3286
+ name: z.ZodOptional<z.ZodString>;
3287
+ state: z.ZodOptional<z.ZodEnum<["running", "paused", "completed", "failed", "stopped"]>>;
3288
+ started: z.ZodOptional<z.ZodNumber>;
3289
+ completed: z.ZodOptional<z.ZodNumber>;
3290
+ tokens: z.ZodOptional<z.ZodNumber>;
3291
+ durationMs: z.ZodOptional<z.ZodNumber>;
3292
+ startedAt: z.ZodOptional<z.ZodNumber>;
3293
+ endedAt: z.ZodOptional<z.ZodNumber>;
3294
+ phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
3295
+ id: z.ZodString;
3296
+ title: z.ZodString;
3297
+ order: z.ZodNumber;
3298
+ }, "strip", z.ZodTypeAny, {
3299
+ id: string;
3300
+ title: string;
3301
+ order: number;
3302
+ }, {
3303
+ id: string;
3304
+ title: string;
3305
+ order: number;
3306
+ }>, "many">>;
3307
+ agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
3308
+ id: z.ZodString;
3309
+ toolCallId: z.ZodOptional<z.ZodString>;
3310
+ title: z.ZodString;
3311
+ state: z.ZodEnum<["pending", "running", "paused", "completed", "failed", "stopped", "unknown"]>;
3312
+ phaseId: z.ZodOptional<z.ZodString>;
3313
+ model: z.ZodOptional<z.ZodString>;
3314
+ tokens: z.ZodOptional<z.ZodNumber>;
3315
+ toolCalls: z.ZodOptional<z.ZodNumber>;
3316
+ durationMs: z.ZodOptional<z.ZodNumber>;
3317
+ startedAt: z.ZodOptional<z.ZodNumber>;
3318
+ endedAt: z.ZodOptional<z.ZodNumber>;
3319
+ result: z.ZodOptional<z.ZodString>;
3320
+ }, "strip", z.ZodTypeAny, {
3321
+ id: string;
3322
+ title: string;
3323
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3324
+ toolCallId?: string | undefined;
3325
+ phaseId?: string | undefined;
3326
+ model?: string | undefined;
3327
+ tokens?: number | undefined;
3328
+ toolCalls?: number | undefined;
3329
+ durationMs?: number | undefined;
3330
+ startedAt?: number | undefined;
3331
+ endedAt?: number | undefined;
3332
+ result?: string | undefined;
3333
+ }, {
3334
+ id: string;
3335
+ title: string;
3336
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3337
+ toolCallId?: string | undefined;
3338
+ phaseId?: string | undefined;
3339
+ model?: string | undefined;
3340
+ tokens?: number | undefined;
3341
+ toolCalls?: number | undefined;
3342
+ durationMs?: number | undefined;
3343
+ startedAt?: number | undefined;
3344
+ endedAt?: number | undefined;
3345
+ result?: string | undefined;
3346
+ }>, "many">>;
3347
+ }, "strip", z.ZodTypeAny, {
3348
+ completed?: number | undefined;
3349
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3350
+ tokens?: number | undefined;
3351
+ durationMs?: number | undefined;
3352
+ startedAt?: number | undefined;
3353
+ endedAt?: number | undefined;
3354
+ runId?: string | undefined;
3355
+ name?: string | undefined;
3356
+ started?: number | undefined;
3357
+ phases?: {
3358
+ id: string;
3359
+ title: string;
3360
+ order: number;
3361
+ }[] | undefined;
3362
+ agents?: {
3363
+ id: string;
3364
+ title: string;
3365
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3366
+ toolCallId?: string | undefined;
3367
+ phaseId?: string | undefined;
3368
+ model?: string | undefined;
3369
+ tokens?: number | undefined;
3370
+ toolCalls?: number | undefined;
3371
+ durationMs?: number | undefined;
3372
+ startedAt?: number | undefined;
3373
+ endedAt?: number | undefined;
3374
+ result?: string | undefined;
3375
+ }[] | undefined;
3376
+ }, {
3377
+ completed?: number | undefined;
3378
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3379
+ tokens?: number | undefined;
3380
+ durationMs?: number | undefined;
3381
+ startedAt?: number | undefined;
3382
+ endedAt?: number | undefined;
3383
+ runId?: string | undefined;
3384
+ name?: string | undefined;
3385
+ started?: number | undefined;
3386
+ phases?: {
3387
+ id: string;
3388
+ title: string;
3389
+ order: number;
3390
+ }[] | undefined;
3391
+ agents?: {
3392
+ id: string;
3393
+ title: string;
3394
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3395
+ toolCallId?: string | undefined;
3396
+ phaseId?: string | undefined;
3397
+ model?: string | undefined;
3398
+ tokens?: number | undefined;
3399
+ toolCalls?: number | undefined;
3400
+ durationMs?: number | undefined;
3401
+ startedAt?: number | undefined;
3402
+ endedAt?: number | undefined;
3403
+ result?: string | undefined;
3404
+ }[] | undefined;
3405
+ }>>;
2347
3406
  }, "strip", z.ZodTypeAny, {
2348
3407
  type: "subagent";
2349
3408
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3409
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3410
+ model?: string | undefined;
2350
3411
  task?: string | undefined;
2351
3412
  agentType?: string | undefined;
2352
- model?: string | undefined;
3413
+ workflow?: {
3414
+ completed?: number | undefined;
3415
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3416
+ tokens?: number | undefined;
3417
+ durationMs?: number | undefined;
3418
+ startedAt?: number | undefined;
3419
+ endedAt?: number | undefined;
3420
+ runId?: string | undefined;
3421
+ name?: string | undefined;
3422
+ started?: number | undefined;
3423
+ phases?: {
3424
+ id: string;
3425
+ title: string;
3426
+ order: number;
3427
+ }[] | undefined;
3428
+ agents?: {
3429
+ id: string;
3430
+ title: string;
3431
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3432
+ toolCallId?: string | undefined;
3433
+ phaseId?: string | undefined;
3434
+ model?: string | undefined;
3435
+ tokens?: number | undefined;
3436
+ toolCalls?: number | undefined;
3437
+ durationMs?: number | undefined;
3438
+ startedAt?: number | undefined;
3439
+ endedAt?: number | undefined;
3440
+ result?: string | undefined;
3441
+ }[] | undefined;
3442
+ } | undefined;
2353
3443
  }, {
2354
3444
  type: "subagent";
2355
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3445
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3446
+ model?: string | undefined;
2356
3447
  task?: string | undefined;
2357
3448
  agentType?: string | undefined;
2358
- model?: string | undefined;
3449
+ workflow?: {
3450
+ completed?: number | undefined;
3451
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3452
+ tokens?: number | undefined;
3453
+ durationMs?: number | undefined;
3454
+ startedAt?: number | undefined;
3455
+ endedAt?: number | undefined;
3456
+ runId?: string | undefined;
3457
+ name?: string | undefined;
3458
+ started?: number | undefined;
3459
+ phases?: {
3460
+ id: string;
3461
+ title: string;
3462
+ order: number;
3463
+ }[] | undefined;
3464
+ agents?: {
3465
+ id: string;
3466
+ title: string;
3467
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3468
+ toolCallId?: string | undefined;
3469
+ phaseId?: string | undefined;
3470
+ model?: string | undefined;
3471
+ tokens?: number | undefined;
3472
+ toolCalls?: number | undefined;
3473
+ durationMs?: number | undefined;
3474
+ startedAt?: number | undefined;
3475
+ endedAt?: number | undefined;
3476
+ result?: string | undefined;
3477
+ }[] | undefined;
3478
+ } | undefined;
3479
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2359
3480
  }>, z.ZodObject<{
2360
3481
  type: z.ZodLiteral<"skill">;
2361
3482
  name: z.ZodString;
@@ -2449,14 +3570,14 @@ export declare const sessionEventSchema: z.ZodObject<{
2449
3570
  kind: z.ZodOptional<z.ZodEnum<["file", "skill", "agent"]>>;
2450
3571
  }, "strip", z.ZodTypeAny, {
2451
3572
  type: "resource_link";
2452
- uri: string;
2453
3573
  name: string;
2454
- kind?: "file" | "skill" | "agent" | undefined;
3574
+ uri: string;
3575
+ kind?: "agent" | "file" | "skill" | undefined;
2455
3576
  }, {
2456
3577
  type: "resource_link";
2457
- uri: string;
2458
3578
  name: string;
2459
- kind?: "file" | "skill" | "agent" | undefined;
3579
+ uri: string;
3580
+ kind?: "agent" | "file" | "skill" | undefined;
2460
3581
  }>]>;
2461
3582
  }, "strip", z.ZodTypeAny, {
2462
3583
  type: "content";
@@ -2470,9 +3591,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2470
3591
  uri?: string | undefined;
2471
3592
  } | {
2472
3593
  type: "resource_link";
2473
- uri: string;
2474
3594
  name: string;
2475
- kind?: "file" | "skill" | "agent" | undefined;
3595
+ uri: string;
3596
+ kind?: "agent" | "file" | "skill" | undefined;
2476
3597
  };
2477
3598
  }, {
2478
3599
  type: "content";
@@ -2486,9 +3607,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2486
3607
  uri?: string | undefined;
2487
3608
  } | {
2488
3609
  type: "resource_link";
2489
- uri: string;
2490
3610
  name: string;
2491
- kind?: "file" | "skill" | "agent" | undefined;
3611
+ uri: string;
3612
+ kind?: "agent" | "file" | "skill" | undefined;
2492
3613
  };
2493
3614
  }>, z.ZodObject<{
2494
3615
  type: z.ZodLiteral<"diff">;
@@ -2515,13 +3636,13 @@ export declare const sessionEventSchema: z.ZodObject<{
2515
3636
  type: "patch";
2516
3637
  path: string;
2517
3638
  diff: string;
2518
- change: "add" | "delete" | "update";
3639
+ change: "delete" | "add" | "update";
2519
3640
  movePath?: string | undefined;
2520
3641
  }, {
2521
3642
  type: "patch";
2522
3643
  path: string;
2523
3644
  diff: string;
2524
- change: "add" | "delete" | "update";
3645
+ change: "delete" | "add" | "update";
2525
3646
  movePath?: string | undefined;
2526
3647
  }>, z.ZodObject<{
2527
3648
  type: z.ZodLiteral<"terminal">;
@@ -2537,52 +3658,51 @@ export declare const sessionEventSchema: z.ZodObject<{
2537
3658
  appendOutput: z.ZodOptional<z.ZodString>;
2538
3659
  rawOutput: z.ZodOptional<z.ZodUnknown>;
2539
3660
  }, "strip", z.ZodTypeAny, {
2540
- sessionUpdate: "tool_call_update";
2541
3661
  toolCallId: string;
2542
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
2543
- content?: ({
2544
- type: "content";
2545
- content: {
2546
- type: "text";
2547
- text: string;
2548
- } | {
2549
- type: "image";
2550
- mimeType: string;
2551
- data?: string | undefined;
2552
- uri?: string | undefined;
2553
- } | {
2554
- type: "resource_link";
2555
- uri: string;
2556
- name: string;
2557
- kind?: "file" | "skill" | "agent" | undefined;
2558
- };
2559
- } | {
2560
- type: "diff";
2561
- path: string;
2562
- newText: string;
2563
- oldText?: string | null | undefined;
2564
- } | {
2565
- type: "patch";
2566
- path: string;
2567
- diff: string;
2568
- change: "add" | "delete" | "update";
2569
- movePath?: string | undefined;
2570
- } | {
2571
- type: "terminal";
2572
- terminalId: string;
2573
- })[] | undefined;
2574
- parentToolCallId?: string | undefined;
3662
+ sessionUpdate: "tool_call_update";
3663
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
2575
3664
  title?: string | undefined;
2576
3665
  detail?: {
2577
3666
  type: "mcp";
2578
- server: string;
2579
3667
  tool: string;
3668
+ server: string;
2580
3669
  } | {
2581
3670
  type: "subagent";
2582
3671
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3672
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3673
+ model?: string | undefined;
2583
3674
  task?: string | undefined;
2584
3675
  agentType?: string | undefined;
2585
- model?: string | undefined;
3676
+ workflow?: {
3677
+ completed?: number | undefined;
3678
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3679
+ tokens?: number | undefined;
3680
+ durationMs?: number | undefined;
3681
+ startedAt?: number | undefined;
3682
+ endedAt?: number | undefined;
3683
+ runId?: string | undefined;
3684
+ name?: string | undefined;
3685
+ started?: number | undefined;
3686
+ phases?: {
3687
+ id: string;
3688
+ title: string;
3689
+ order: number;
3690
+ }[] | undefined;
3691
+ agents?: {
3692
+ id: string;
3693
+ title: string;
3694
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3695
+ toolCallId?: string | undefined;
3696
+ phaseId?: string | undefined;
3697
+ model?: string | undefined;
3698
+ tokens?: number | undefined;
3699
+ toolCalls?: number | undefined;
3700
+ durationMs?: number | undefined;
3701
+ startedAt?: number | undefined;
3702
+ endedAt?: number | undefined;
3703
+ result?: string | undefined;
3704
+ }[] | undefined;
3705
+ } | undefined;
2586
3706
  } | {
2587
3707
  type: "skill";
2588
3708
  name: string;
@@ -2603,12 +3723,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2603
3723
  text: string;
2604
3724
  more?: number | undefined;
2605
3725
  } | undefined;
2606
- appendOutput?: string | undefined;
2607
- rawOutput?: unknown;
2608
- }, {
2609
- sessionUpdate: "tool_call_update";
2610
- toolCallId: string;
2611
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
3726
+ parentToolCallId?: string | undefined;
2612
3727
  content?: ({
2613
3728
  type: "content";
2614
3729
  content: {
@@ -2621,9 +3736,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2621
3736
  uri?: string | undefined;
2622
3737
  } | {
2623
3738
  type: "resource_link";
2624
- uri: string;
2625
3739
  name: string;
2626
- kind?: "file" | "skill" | "agent" | undefined;
3740
+ uri: string;
3741
+ kind?: "agent" | "file" | "skill" | undefined;
2627
3742
  };
2628
3743
  } | {
2629
3744
  type: "diff";
@@ -2634,24 +3749,60 @@ export declare const sessionEventSchema: z.ZodObject<{
2634
3749
  type: "patch";
2635
3750
  path: string;
2636
3751
  diff: string;
2637
- change: "add" | "delete" | "update";
3752
+ change: "delete" | "add" | "update";
2638
3753
  movePath?: string | undefined;
2639
3754
  } | {
2640
3755
  type: "terminal";
2641
3756
  terminalId: string;
2642
3757
  })[] | undefined;
2643
- parentToolCallId?: string | undefined;
3758
+ appendOutput?: string | undefined;
3759
+ rawOutput?: unknown;
3760
+ }, {
3761
+ toolCallId: string;
3762
+ sessionUpdate: "tool_call_update";
3763
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
2644
3764
  title?: string | undefined;
2645
3765
  detail?: {
2646
3766
  type: "mcp";
2647
- server: string;
2648
3767
  tool: string;
3768
+ server: string;
2649
3769
  } | {
2650
3770
  type: "subagent";
2651
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3771
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3772
+ model?: string | undefined;
2652
3773
  task?: string | undefined;
2653
3774
  agentType?: string | undefined;
2654
- model?: string | undefined;
3775
+ workflow?: {
3776
+ completed?: number | undefined;
3777
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
3778
+ tokens?: number | undefined;
3779
+ durationMs?: number | undefined;
3780
+ startedAt?: number | undefined;
3781
+ endedAt?: number | undefined;
3782
+ runId?: string | undefined;
3783
+ name?: string | undefined;
3784
+ started?: number | undefined;
3785
+ phases?: {
3786
+ id: string;
3787
+ title: string;
3788
+ order: number;
3789
+ }[] | undefined;
3790
+ agents?: {
3791
+ id: string;
3792
+ title: string;
3793
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
3794
+ toolCallId?: string | undefined;
3795
+ phaseId?: string | undefined;
3796
+ model?: string | undefined;
3797
+ tokens?: number | undefined;
3798
+ toolCalls?: number | undefined;
3799
+ durationMs?: number | undefined;
3800
+ startedAt?: number | undefined;
3801
+ endedAt?: number | undefined;
3802
+ result?: string | undefined;
3803
+ }[] | undefined;
3804
+ } | undefined;
3805
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2655
3806
  } | {
2656
3807
  type: "skill";
2657
3808
  name: string;
@@ -2672,6 +3823,38 @@ export declare const sessionEventSchema: z.ZodObject<{
2672
3823
  text: string;
2673
3824
  more?: number | undefined;
2674
3825
  } | undefined;
3826
+ parentToolCallId?: string | undefined;
3827
+ content?: ({
3828
+ type: "content";
3829
+ content: {
3830
+ type: "text";
3831
+ text: string;
3832
+ } | {
3833
+ type: "image";
3834
+ mimeType: string;
3835
+ data?: string | undefined;
3836
+ uri?: string | undefined;
3837
+ } | {
3838
+ type: "resource_link";
3839
+ name: string;
3840
+ uri: string;
3841
+ kind?: "agent" | "file" | "skill" | undefined;
3842
+ };
3843
+ } | {
3844
+ type: "diff";
3845
+ path: string;
3846
+ newText: string;
3847
+ oldText?: string | null | undefined;
3848
+ } | {
3849
+ type: "patch";
3850
+ path: string;
3851
+ diff: string;
3852
+ change: "delete" | "add" | "update";
3853
+ movePath?: string | undefined;
3854
+ } | {
3855
+ type: "terminal";
3856
+ terminalId: string;
3857
+ })[] | undefined;
2675
3858
  appendOutput?: string | undefined;
2676
3859
  rawOutput?: unknown;
2677
3860
  }>, z.ZodObject<{
@@ -2681,24 +3864,24 @@ export declare const sessionEventSchema: z.ZodObject<{
2681
3864
  priority: z.ZodDefault<z.ZodEnum<["high", "medium", "low"]>>;
2682
3865
  status: z.ZodEnum<["pending", "in_progress", "completed"]>;
2683
3866
  }, "strip", z.ZodTypeAny, {
2684
- status: "pending" | "in_progress" | "completed";
3867
+ status: "completed" | "pending" | "in_progress";
2685
3868
  content: string;
2686
3869
  priority: "high" | "medium" | "low";
2687
3870
  }, {
2688
- status: "pending" | "in_progress" | "completed";
3871
+ status: "completed" | "pending" | "in_progress";
2689
3872
  content: string;
2690
3873
  priority?: "high" | "medium" | "low" | undefined;
2691
3874
  }>, "many">;
2692
3875
  }, "strip", z.ZodTypeAny, {
2693
3876
  entries: {
2694
- status: "pending" | "in_progress" | "completed";
3877
+ status: "completed" | "pending" | "in_progress";
2695
3878
  content: string;
2696
3879
  priority: "high" | "medium" | "low";
2697
3880
  }[];
2698
3881
  sessionUpdate: "plan";
2699
3882
  }, {
2700
3883
  entries: {
2701
- status: "pending" | "in_progress" | "completed";
3884
+ status: "completed" | "pending" | "in_progress";
2702
3885
  content: string;
2703
3886
  priority?: "high" | "medium" | "low" | undefined;
2704
3887
  }[];
@@ -2747,12 +3930,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2747
3930
  model: z.ZodOptional<z.ZodString>;
2748
3931
  }, "strip", z.ZodTypeAny, {
2749
3932
  sessionUpdate: "session_info_update";
2750
- model?: string | undefined;
2751
3933
  title?: string | undefined;
3934
+ model?: string | undefined;
2752
3935
  }, {
2753
3936
  sessionUpdate: "session_info_update";
2754
- model?: string | undefined;
2755
3937
  title?: string | undefined;
3938
+ model?: string | undefined;
2756
3939
  }>, z.ZodObject<{
2757
3940
  sessionUpdate: z.ZodLiteral<"usage_update">;
2758
3941
  usedTokens: z.ZodOptional<z.ZodNumber>;
@@ -2807,9 +3990,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2807
3990
  name: string;
2808
3991
  description?: string | undefined;
2809
3992
  }[];
2810
- name: string;
2811
3993
  id: string;
2812
- category: "model" | "mode" | "effort" | "other";
3994
+ name: string;
3995
+ category: "model" | "other" | "mode" | "effort";
2813
3996
  current: string;
2814
3997
  }, {
2815
3998
  values: {
@@ -2817,10 +4000,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2817
4000
  name: string;
2818
4001
  description?: string | undefined;
2819
4002
  }[];
2820
- name: string;
2821
4003
  id: string;
4004
+ name: string;
2822
4005
  current: string;
2823
- category?: "model" | "mode" | "effort" | "other" | undefined;
4006
+ category?: "model" | "other" | "mode" | "effort" | undefined;
2824
4007
  }>, "many">;
2825
4008
  }, "strip", z.ZodTypeAny, {
2826
4009
  options: {
@@ -2829,9 +4012,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2829
4012
  name: string;
2830
4013
  description?: string | undefined;
2831
4014
  }[];
2832
- name: string;
2833
4015
  id: string;
2834
- category: "model" | "mode" | "effort" | "other";
4016
+ name: string;
4017
+ category: "model" | "other" | "mode" | "effort";
2835
4018
  current: string;
2836
4019
  }[];
2837
4020
  sessionUpdate: "ls_config";
@@ -2842,10 +4025,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2842
4025
  name: string;
2843
4026
  description?: string | undefined;
2844
4027
  }[];
2845
- name: string;
2846
4028
  id: string;
4029
+ name: string;
2847
4030
  current: string;
2848
- category?: "model" | "mode" | "effort" | "other" | undefined;
4031
+ category?: "model" | "other" | "mode" | "effort" | undefined;
2849
4032
  }[];
2850
4033
  sessionUpdate: "ls_config";
2851
4034
  }>, z.ZodObject<{
@@ -2854,13 +4037,13 @@ export declare const sessionEventSchema: z.ZodObject<{
2854
4037
  title: z.ZodString;
2855
4038
  detail: z.ZodOptional<z.ZodString>;
2856
4039
  }, "strip", z.ZodTypeAny, {
2857
- sessionUpdate: "ls_notice";
2858
4040
  title: string;
4041
+ sessionUpdate: "ls_notice";
2859
4042
  level: "info" | "warning";
2860
4043
  detail?: string | undefined;
2861
4044
  }, {
2862
- sessionUpdate: "ls_notice";
2863
4045
  title: string;
4046
+ sessionUpdate: "ls_notice";
2864
4047
  level: "info" | "warning";
2865
4048
  detail?: string | undefined;
2866
4049
  }>, z.ZodObject<{
@@ -2871,17 +4054,17 @@ export declare const sessionEventSchema: z.ZodObject<{
2871
4054
  turnId: z.ZodOptional<z.ZodString>;
2872
4055
  stopReason: z.ZodOptional<z.ZodEnum<["end_turn", "cancelled", "error", "max_tokens", "refusal"]>>;
2873
4056
  }, "strip", z.ZodTypeAny, {
2874
- sessionUpdate: "ls_turn";
2875
4057
  state: "started" | "ended";
4058
+ sessionUpdate: "ls_turn";
2876
4059
  parentToolCallId?: string | undefined;
2877
4060
  turnId?: string | undefined;
2878
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4061
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2879
4062
  }, {
2880
- sessionUpdate: "ls_turn";
2881
4063
  state: "started" | "ended";
4064
+ sessionUpdate: "ls_turn";
2882
4065
  parentToolCallId?: string | undefined;
2883
4066
  turnId?: string | undefined;
2884
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4067
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
2885
4068
  }>, z.ZodObject<{
2886
4069
  sessionUpdate: z.ZodLiteral<"ls_permission">;
2887
4070
  requestId: z.ZodString;
@@ -2894,12 +4077,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2894
4077
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
2895
4078
  }, "strip", z.ZodTypeAny, {
2896
4079
  name: string;
2897
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2898
4080
  optionId: string;
4081
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2899
4082
  }, {
2900
4083
  name: string;
2901
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2902
4084
  optionId: string;
4085
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2903
4086
  }>, "many">;
2904
4087
  /**
2905
4088
  * The agent is asking the user something: answer with `sessions.answer`.
@@ -2928,9 +4111,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2928
4111
  secret: z.ZodOptional<z.ZodBoolean>;
2929
4112
  required: z.ZodOptional<z.ZodBoolean>;
2930
4113
  }, "strip", z.ZodTypeAny, {
2931
- text: string;
2932
- kind: "text" | "choice" | "choices";
2933
4114
  id: string;
4115
+ kind: "text" | "choice" | "choices";
4116
+ text: string;
2934
4117
  options?: {
2935
4118
  value: string;
2936
4119
  label: string;
@@ -2941,9 +4124,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2941
4124
  secret?: boolean | undefined;
2942
4125
  required?: boolean | undefined;
2943
4126
  }, {
2944
- text: string;
2945
- kind: "text" | "choice" | "choices";
2946
4127
  id: string;
4128
+ kind: "text" | "choice" | "choices";
4129
+ text: string;
2947
4130
  options?: {
2948
4131
  value: string;
2949
4132
  label: string;
@@ -2957,18 +4140,18 @@ export declare const sessionEventSchema: z.ZodObject<{
2957
4140
  }, "strip", z.ZodTypeAny, {
2958
4141
  options: {
2959
4142
  name: string;
2960
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2961
4143
  optionId: string;
4144
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2962
4145
  }[];
2963
- sessionUpdate: "ls_permission";
2964
4146
  title: string;
2965
4147
  requestId: string;
4148
+ sessionUpdate: "ls_permission";
2966
4149
  toolCallId?: string | undefined;
2967
4150
  detail?: string | undefined;
2968
4151
  questions?: {
2969
- text: string;
2970
- kind: "text" | "choice" | "choices";
2971
4152
  id: string;
4153
+ kind: "text" | "choice" | "choices";
4154
+ text: string;
2972
4155
  options?: {
2973
4156
  value: string;
2974
4157
  label: string;
@@ -2982,18 +4165,18 @@ export declare const sessionEventSchema: z.ZodObject<{
2982
4165
  }, {
2983
4166
  options: {
2984
4167
  name: string;
2985
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2986
4168
  optionId: string;
4169
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2987
4170
  }[];
2988
- sessionUpdate: "ls_permission";
2989
4171
  title: string;
2990
4172
  requestId: string;
4173
+ sessionUpdate: "ls_permission";
2991
4174
  toolCallId?: string | undefined;
2992
4175
  detail?: string | undefined;
2993
4176
  questions?: {
2994
- text: string;
2995
- kind: "text" | "choice" | "choices";
2996
4177
  id: string;
4178
+ kind: "text" | "choice" | "choices";
4179
+ text: string;
2997
4180
  options?: {
2998
4181
  value: string;
2999
4182
  label: string;
@@ -3023,8 +4206,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3023
4206
  other?: string | undefined;
3024
4207
  }>, "many">>;
3025
4208
  }, "strip", z.ZodTypeAny, {
3026
- sessionUpdate: "ls_permission_resolved";
3027
4209
  requestId: string;
4210
+ sessionUpdate: "ls_permission_resolved";
3028
4211
  optionId?: string | undefined;
3029
4212
  answers?: {
3030
4213
  values: string[];
@@ -3032,8 +4215,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3032
4215
  other?: string | undefined;
3033
4216
  }[] | undefined;
3034
4217
  }, {
3035
- sessionUpdate: "ls_permission_resolved";
3036
4218
  requestId: string;
4219
+ sessionUpdate: "ls_permission_resolved";
3037
4220
  optionId?: string | undefined;
3038
4221
  answers?: {
3039
4222
  values: string[];
@@ -3045,22 +4228,22 @@ export declare const sessionEventSchema: z.ZodObject<{
3045
4228
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
3046
4229
  deviceId: z.ZodOptional<z.ZodString>;
3047
4230
  }, "strip", z.ZodTypeAny, {
4231
+ driver: "remote" | "desktop" | "none";
3048
4232
  sessionUpdate: "ls_driver";
3049
- driver: "desktop" | "remote" | "none";
3050
4233
  deviceId?: string | undefined;
3051
4234
  }, {
4235
+ driver: "remote" | "desktop" | "none";
3052
4236
  sessionUpdate: "ls_driver";
3053
- driver: "desktop" | "remote" | "none";
3054
4237
  deviceId?: string | undefined;
3055
4238
  }>, z.ZodObject<{
3056
4239
  sessionUpdate: z.ZodLiteral<"ls_status">;
3057
4240
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
3058
4241
  }, "strip", z.ZodTypeAny, {
4242
+ state: "error" | "running" | "idle" | "waiting" | "offline";
3059
4243
  sessionUpdate: "ls_status";
3060
- state: "error" | "idle" | "running" | "waiting" | "offline";
3061
4244
  }, {
4245
+ state: "error" | "running" | "idle" | "waiting" | "offline";
3062
4246
  sessionUpdate: "ls_status";
3063
- state: "error" | "idle" | "running" | "waiting" | "offline";
3064
4247
  }>, z.ZodObject<{
3065
4248
  sessionUpdate: z.ZodLiteral<"ls_error">;
3066
4249
  code: z.ZodString;
@@ -3089,9 +4272,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3089
4272
  uri?: string | undefined;
3090
4273
  } | {
3091
4274
  type: "resource_link";
3092
- uri: string;
3093
4275
  name: string;
3094
- kind?: "file" | "skill" | "agent" | undefined;
4276
+ uri: string;
4277
+ kind?: "agent" | "file" | "skill" | undefined;
3095
4278
  };
3096
4279
  sessionUpdate: "user_message_chunk";
3097
4280
  messageId?: string | undefined;
@@ -3106,9 +4289,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3106
4289
  uri?: string | undefined;
3107
4290
  } | {
3108
4291
  type: "resource_link";
3109
- uri: string;
3110
4292
  name: string;
3111
- kind?: "file" | "skill" | "agent" | undefined;
4293
+ uri: string;
4294
+ kind?: "agent" | "file" | "skill" | undefined;
3112
4295
  };
3113
4296
  sessionUpdate: "agent_message_chunk";
3114
4297
  messageId: string;
@@ -3124,19 +4307,81 @@ export declare const sessionEventSchema: z.ZodObject<{
3124
4307
  uri?: string | undefined;
3125
4308
  } | {
3126
4309
  type: "resource_link";
3127
- uri: string;
3128
4310
  name: string;
3129
- kind?: "file" | "skill" | "agent" | undefined;
4311
+ uri: string;
4312
+ kind?: "agent" | "file" | "skill" | undefined;
3130
4313
  };
3131
4314
  sessionUpdate: "agent_thought_chunk";
3132
4315
  messageId: string;
3133
4316
  parentToolCallId?: string | undefined;
3134
4317
  } | {
3135
- status: "pending" | "in_progress" | "completed" | "failed";
3136
- kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
3137
- sessionUpdate: "tool_call";
4318
+ status: "completed" | "failed" | "pending" | "in_progress";
3138
4319
  toolCallId: string;
3139
4320
  title: string;
4321
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
4322
+ sessionUpdate: "tool_call";
4323
+ detail?: {
4324
+ type: "mcp";
4325
+ tool: string;
4326
+ server: string;
4327
+ } | {
4328
+ type: "subagent";
4329
+ action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
4330
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4331
+ model?: string | undefined;
4332
+ task?: string | undefined;
4333
+ agentType?: string | undefined;
4334
+ workflow?: {
4335
+ completed?: number | undefined;
4336
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4337
+ tokens?: number | undefined;
4338
+ durationMs?: number | undefined;
4339
+ startedAt?: number | undefined;
4340
+ endedAt?: number | undefined;
4341
+ runId?: string | undefined;
4342
+ name?: string | undefined;
4343
+ started?: number | undefined;
4344
+ phases?: {
4345
+ id: string;
4346
+ title: string;
4347
+ order: number;
4348
+ }[] | undefined;
4349
+ agents?: {
4350
+ id: string;
4351
+ title: string;
4352
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4353
+ toolCallId?: string | undefined;
4354
+ phaseId?: string | undefined;
4355
+ model?: string | undefined;
4356
+ tokens?: number | undefined;
4357
+ toolCalls?: number | undefined;
4358
+ durationMs?: number | undefined;
4359
+ startedAt?: number | undefined;
4360
+ endedAt?: number | undefined;
4361
+ result?: string | undefined;
4362
+ }[] | undefined;
4363
+ } | undefined;
4364
+ } | {
4365
+ type: "skill";
4366
+ name: string;
4367
+ description?: string | undefined;
4368
+ } | {
4369
+ type: "web_search";
4370
+ query?: string | undefined;
4371
+ } | {
4372
+ type: "image_generation";
4373
+ prompt?: string | undefined;
4374
+ } | {
4375
+ type: "compaction";
4376
+ } | {
4377
+ type: "review";
4378
+ phase: "started" | "finished";
4379
+ } | {
4380
+ type: "question";
4381
+ text: string;
4382
+ more?: number | undefined;
4383
+ } | undefined;
4384
+ parentToolCallId?: string | undefined;
3140
4385
  content?: ({
3141
4386
  type: "content";
3142
4387
  content: {
@@ -3149,9 +4394,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3149
4394
  uri?: string | undefined;
3150
4395
  } | {
3151
4396
  type: "resource_link";
3152
- uri: string;
3153
4397
  name: string;
3154
- kind?: "file" | "skill" | "agent" | undefined;
4398
+ uri: string;
4399
+ kind?: "agent" | "file" | "skill" | undefined;
3155
4400
  };
3156
4401
  } | {
3157
4402
  type: "diff";
@@ -3162,28 +4407,63 @@ export declare const sessionEventSchema: z.ZodObject<{
3162
4407
  type: "patch";
3163
4408
  path: string;
3164
4409
  diff: string;
3165
- change: "add" | "delete" | "update";
4410
+ change: "delete" | "add" | "update";
3166
4411
  movePath?: string | undefined;
3167
4412
  } | {
3168
4413
  type: "terminal";
3169
4414
  terminalId: string;
3170
4415
  })[] | undefined;
3171
- parentToolCallId?: string | undefined;
3172
4416
  rawInput?: unknown;
3173
4417
  locations?: {
3174
4418
  path: string;
3175
4419
  line?: number | undefined;
3176
4420
  }[] | undefined;
4421
+ } | {
4422
+ toolCallId: string;
4423
+ sessionUpdate: "tool_call_update";
4424
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
4425
+ title?: string | undefined;
3177
4426
  detail?: {
3178
4427
  type: "mcp";
3179
- server: string;
3180
4428
  tool: string;
4429
+ server: string;
3181
4430
  } | {
3182
4431
  type: "subagent";
3183
4432
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
4433
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4434
+ model?: string | undefined;
3184
4435
  task?: string | undefined;
3185
4436
  agentType?: string | undefined;
3186
- model?: string | undefined;
4437
+ workflow?: {
4438
+ completed?: number | undefined;
4439
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4440
+ tokens?: number | undefined;
4441
+ durationMs?: number | undefined;
4442
+ startedAt?: number | undefined;
4443
+ endedAt?: number | undefined;
4444
+ runId?: string | undefined;
4445
+ name?: string | undefined;
4446
+ started?: number | undefined;
4447
+ phases?: {
4448
+ id: string;
4449
+ title: string;
4450
+ order: number;
4451
+ }[] | undefined;
4452
+ agents?: {
4453
+ id: string;
4454
+ title: string;
4455
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4456
+ toolCallId?: string | undefined;
4457
+ phaseId?: string | undefined;
4458
+ model?: string | undefined;
4459
+ tokens?: number | undefined;
4460
+ toolCalls?: number | undefined;
4461
+ durationMs?: number | undefined;
4462
+ startedAt?: number | undefined;
4463
+ endedAt?: number | undefined;
4464
+ result?: string | undefined;
4465
+ }[] | undefined;
4466
+ } | undefined;
3187
4467
  } | {
3188
4468
  type: "skill";
3189
4469
  name: string;
@@ -3204,10 +4484,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3204
4484
  text: string;
3205
4485
  more?: number | undefined;
3206
4486
  } | undefined;
3207
- } | {
3208
- sessionUpdate: "tool_call_update";
3209
- toolCallId: string;
3210
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
4487
+ parentToolCallId?: string | undefined;
3211
4488
  content?: ({
3212
4489
  type: "content";
3213
4490
  content: {
@@ -3220,9 +4497,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3220
4497
  uri?: string | undefined;
3221
4498
  } | {
3222
4499
  type: "resource_link";
3223
- uri: string;
3224
4500
  name: string;
3225
- kind?: "file" | "skill" | "agent" | undefined;
4501
+ uri: string;
4502
+ kind?: "agent" | "file" | "skill" | undefined;
3226
4503
  };
3227
4504
  } | {
3228
4505
  type: "diff";
@@ -3233,49 +4510,17 @@ export declare const sessionEventSchema: z.ZodObject<{
3233
4510
  type: "patch";
3234
4511
  path: string;
3235
4512
  diff: string;
3236
- change: "add" | "delete" | "update";
4513
+ change: "delete" | "add" | "update";
3237
4514
  movePath?: string | undefined;
3238
4515
  } | {
3239
4516
  type: "terminal";
3240
4517
  terminalId: string;
3241
4518
  })[] | undefined;
3242
- parentToolCallId?: string | undefined;
3243
- title?: string | undefined;
3244
- detail?: {
3245
- type: "mcp";
3246
- server: string;
3247
- tool: string;
3248
- } | {
3249
- type: "subagent";
3250
- action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3251
- task?: string | undefined;
3252
- agentType?: string | undefined;
3253
- model?: string | undefined;
3254
- } | {
3255
- type: "skill";
3256
- name: string;
3257
- description?: string | undefined;
3258
- } | {
3259
- type: "web_search";
3260
- query?: string | undefined;
3261
- } | {
3262
- type: "image_generation";
3263
- prompt?: string | undefined;
3264
- } | {
3265
- type: "compaction";
3266
- } | {
3267
- type: "review";
3268
- phase: "started" | "finished";
3269
- } | {
3270
- type: "question";
3271
- text: string;
3272
- more?: number | undefined;
3273
- } | undefined;
3274
4519
  appendOutput?: string | undefined;
3275
4520
  rawOutput?: unknown;
3276
4521
  } | {
3277
4522
  entries: {
3278
- status: "pending" | "in_progress" | "completed";
4523
+ status: "completed" | "pending" | "in_progress";
3279
4524
  content: string;
3280
4525
  priority: "high" | "medium" | "low";
3281
4526
  }[];
@@ -3292,8 +4537,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3292
4537
  currentModeId: string;
3293
4538
  } | {
3294
4539
  sessionUpdate: "session_info_update";
3295
- model?: string | undefined;
3296
4540
  title?: string | undefined;
4541
+ model?: string | undefined;
3297
4542
  } | {
3298
4543
  sessionUpdate: "usage_update";
3299
4544
  usedTokens?: number | undefined;
@@ -3310,38 +4555,38 @@ export declare const sessionEventSchema: z.ZodObject<{
3310
4555
  name: string;
3311
4556
  description?: string | undefined;
3312
4557
  }[];
3313
- name: string;
3314
4558
  id: string;
3315
- category: "model" | "mode" | "effort" | "other";
4559
+ name: string;
4560
+ category: "model" | "other" | "mode" | "effort";
3316
4561
  current: string;
3317
4562
  }[];
3318
4563
  sessionUpdate: "ls_config";
3319
4564
  } | {
3320
- sessionUpdate: "ls_notice";
3321
4565
  title: string;
4566
+ sessionUpdate: "ls_notice";
3322
4567
  level: "info" | "warning";
3323
4568
  detail?: string | undefined;
3324
4569
  } | {
3325
- sessionUpdate: "ls_turn";
3326
4570
  state: "started" | "ended";
4571
+ sessionUpdate: "ls_turn";
3327
4572
  parentToolCallId?: string | undefined;
3328
4573
  turnId?: string | undefined;
3329
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4574
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3330
4575
  } | {
3331
4576
  options: {
3332
4577
  name: string;
3333
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3334
4578
  optionId: string;
4579
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3335
4580
  }[];
3336
- sessionUpdate: "ls_permission";
3337
4581
  title: string;
3338
4582
  requestId: string;
4583
+ sessionUpdate: "ls_permission";
3339
4584
  toolCallId?: string | undefined;
3340
4585
  detail?: string | undefined;
3341
4586
  questions?: {
3342
- text: string;
3343
- kind: "text" | "choice" | "choices";
3344
4587
  id: string;
4588
+ kind: "text" | "choice" | "choices";
4589
+ text: string;
3345
4590
  options?: {
3346
4591
  value: string;
3347
4592
  label: string;
@@ -3353,8 +4598,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3353
4598
  required?: boolean | undefined;
3354
4599
  }[] | undefined;
3355
4600
  } | {
3356
- sessionUpdate: "ls_permission_resolved";
3357
4601
  requestId: string;
4602
+ sessionUpdate: "ls_permission_resolved";
3358
4603
  optionId?: string | undefined;
3359
4604
  answers?: {
3360
4605
  values: string[];
@@ -3362,12 +4607,12 @@ export declare const sessionEventSchema: z.ZodObject<{
3362
4607
  other?: string | undefined;
3363
4608
  }[] | undefined;
3364
4609
  } | {
4610
+ driver: "remote" | "desktop" | "none";
3365
4611
  sessionUpdate: "ls_driver";
3366
- driver: "desktop" | "remote" | "none";
3367
4612
  deviceId?: string | undefined;
3368
4613
  } | {
4614
+ state: "error" | "running" | "idle" | "waiting" | "offline";
3369
4615
  sessionUpdate: "ls_status";
3370
- state: "error" | "idle" | "running" | "waiting" | "offline";
3371
4616
  } | {
3372
4617
  code: string;
3373
4618
  message: string;
@@ -3389,9 +4634,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3389
4634
  uri?: string | undefined;
3390
4635
  } | {
3391
4636
  type: "resource_link";
3392
- uri: string;
3393
4637
  name: string;
3394
- kind?: "file" | "skill" | "agent" | undefined;
4638
+ uri: string;
4639
+ kind?: "agent" | "file" | "skill" | undefined;
3395
4640
  };
3396
4641
  sessionUpdate: "user_message_chunk";
3397
4642
  messageId?: string | undefined;
@@ -3406,9 +4651,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3406
4651
  uri?: string | undefined;
3407
4652
  } | {
3408
4653
  type: "resource_link";
3409
- uri: string;
3410
4654
  name: string;
3411
- kind?: "file" | "skill" | "agent" | undefined;
4655
+ uri: string;
4656
+ kind?: "agent" | "file" | "skill" | undefined;
3412
4657
  };
3413
4658
  sessionUpdate: "agent_message_chunk";
3414
4659
  messageId: string;
@@ -3424,19 +4669,81 @@ export declare const sessionEventSchema: z.ZodObject<{
3424
4669
  uri?: string | undefined;
3425
4670
  } | {
3426
4671
  type: "resource_link";
3427
- uri: string;
3428
4672
  name: string;
3429
- kind?: "file" | "skill" | "agent" | undefined;
4673
+ uri: string;
4674
+ kind?: "agent" | "file" | "skill" | undefined;
3430
4675
  };
3431
4676
  sessionUpdate: "agent_thought_chunk";
3432
4677
  messageId: string;
3433
4678
  parentToolCallId?: string | undefined;
3434
4679
  } | {
3435
- status: "pending" | "in_progress" | "completed" | "failed";
3436
- kind: "delete" | "other" | "read" | "edit" | "move" | "search" | "execute" | "think" | "fetch";
3437
- sessionUpdate: "tool_call";
4680
+ status: "completed" | "failed" | "pending" | "in_progress";
3438
4681
  toolCallId: string;
3439
4682
  title: string;
4683
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
4684
+ sessionUpdate: "tool_call";
4685
+ detail?: {
4686
+ type: "mcp";
4687
+ tool: string;
4688
+ server: string;
4689
+ } | {
4690
+ type: "subagent";
4691
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4692
+ model?: string | undefined;
4693
+ task?: string | undefined;
4694
+ agentType?: string | undefined;
4695
+ workflow?: {
4696
+ completed?: number | undefined;
4697
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4698
+ tokens?: number | undefined;
4699
+ durationMs?: number | undefined;
4700
+ startedAt?: number | undefined;
4701
+ endedAt?: number | undefined;
4702
+ runId?: string | undefined;
4703
+ name?: string | undefined;
4704
+ started?: number | undefined;
4705
+ phases?: {
4706
+ id: string;
4707
+ title: string;
4708
+ order: number;
4709
+ }[] | undefined;
4710
+ agents?: {
4711
+ id: string;
4712
+ title: string;
4713
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4714
+ toolCallId?: string | undefined;
4715
+ phaseId?: string | undefined;
4716
+ model?: string | undefined;
4717
+ tokens?: number | undefined;
4718
+ toolCalls?: number | undefined;
4719
+ durationMs?: number | undefined;
4720
+ startedAt?: number | undefined;
4721
+ endedAt?: number | undefined;
4722
+ result?: string | undefined;
4723
+ }[] | undefined;
4724
+ } | undefined;
4725
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
4726
+ } | {
4727
+ type: "skill";
4728
+ name: string;
4729
+ description?: string | undefined;
4730
+ } | {
4731
+ type: "web_search";
4732
+ query?: string | undefined;
4733
+ } | {
4734
+ type: "image_generation";
4735
+ prompt?: string | undefined;
4736
+ } | {
4737
+ type: "compaction";
4738
+ } | {
4739
+ type: "review";
4740
+ phase: "started" | "finished";
4741
+ } | {
4742
+ type: "question";
4743
+ text: string;
4744
+ more?: number | undefined;
4745
+ } | undefined;
4746
+ parentToolCallId?: string | undefined;
3440
4747
  content?: ({
3441
4748
  type: "content";
3442
4749
  content: {
@@ -3449,9 +4756,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3449
4756
  uri?: string | undefined;
3450
4757
  } | {
3451
4758
  type: "resource_link";
3452
- uri: string;
3453
4759
  name: string;
3454
- kind?: "file" | "skill" | "agent" | undefined;
4760
+ uri: string;
4761
+ kind?: "agent" | "file" | "skill" | undefined;
3455
4762
  };
3456
4763
  } | {
3457
4764
  type: "diff";
@@ -3462,28 +4769,63 @@ export declare const sessionEventSchema: z.ZodObject<{
3462
4769
  type: "patch";
3463
4770
  path: string;
3464
4771
  diff: string;
3465
- change: "add" | "delete" | "update";
4772
+ change: "delete" | "add" | "update";
3466
4773
  movePath?: string | undefined;
3467
4774
  } | {
3468
4775
  type: "terminal";
3469
4776
  terminalId: string;
3470
4777
  })[] | undefined;
3471
- parentToolCallId?: string | undefined;
3472
4778
  rawInput?: unknown;
3473
4779
  locations?: {
3474
4780
  path: string;
3475
4781
  line?: number | undefined;
3476
4782
  }[] | undefined;
4783
+ } | {
4784
+ toolCallId: string;
4785
+ sessionUpdate: "tool_call_update";
4786
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
4787
+ title?: string | undefined;
3477
4788
  detail?: {
3478
4789
  type: "mcp";
3479
- server: string;
3480
4790
  tool: string;
4791
+ server: string;
3481
4792
  } | {
3482
4793
  type: "subagent";
3483
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
4794
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4795
+ model?: string | undefined;
3484
4796
  task?: string | undefined;
3485
4797
  agentType?: string | undefined;
3486
- model?: string | undefined;
4798
+ workflow?: {
4799
+ completed?: number | undefined;
4800
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | undefined;
4801
+ tokens?: number | undefined;
4802
+ durationMs?: number | undefined;
4803
+ startedAt?: number | undefined;
4804
+ endedAt?: number | undefined;
4805
+ runId?: string | undefined;
4806
+ name?: string | undefined;
4807
+ started?: number | undefined;
4808
+ phases?: {
4809
+ id: string;
4810
+ title: string;
4811
+ order: number;
4812
+ }[] | undefined;
4813
+ agents?: {
4814
+ id: string;
4815
+ title: string;
4816
+ state: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown";
4817
+ toolCallId?: string | undefined;
4818
+ phaseId?: string | undefined;
4819
+ model?: string | undefined;
4820
+ tokens?: number | undefined;
4821
+ toolCalls?: number | undefined;
4822
+ durationMs?: number | undefined;
4823
+ startedAt?: number | undefined;
4824
+ endedAt?: number | undefined;
4825
+ result?: string | undefined;
4826
+ }[] | undefined;
4827
+ } | undefined;
4828
+ action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3487
4829
  } | {
3488
4830
  type: "skill";
3489
4831
  name: string;
@@ -3504,10 +4846,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3504
4846
  text: string;
3505
4847
  more?: number | undefined;
3506
4848
  } | undefined;
3507
- } | {
3508
- sessionUpdate: "tool_call_update";
3509
- toolCallId: string;
3510
- status?: "pending" | "in_progress" | "completed" | "failed" | undefined;
4849
+ parentToolCallId?: string | undefined;
3511
4850
  content?: ({
3512
4851
  type: "content";
3513
4852
  content: {
@@ -3520,9 +4859,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3520
4859
  uri?: string | undefined;
3521
4860
  } | {
3522
4861
  type: "resource_link";
3523
- uri: string;
3524
4862
  name: string;
3525
- kind?: "file" | "skill" | "agent" | undefined;
4863
+ uri: string;
4864
+ kind?: "agent" | "file" | "skill" | undefined;
3526
4865
  };
3527
4866
  } | {
3528
4867
  type: "diff";
@@ -3533,49 +4872,17 @@ export declare const sessionEventSchema: z.ZodObject<{
3533
4872
  type: "patch";
3534
4873
  path: string;
3535
4874
  diff: string;
3536
- change: "add" | "delete" | "update";
4875
+ change: "delete" | "add" | "update";
3537
4876
  movePath?: string | undefined;
3538
4877
  } | {
3539
4878
  type: "terminal";
3540
4879
  terminalId: string;
3541
4880
  })[] | undefined;
3542
- parentToolCallId?: string | undefined;
3543
- title?: string | undefined;
3544
- detail?: {
3545
- type: "mcp";
3546
- server: string;
3547
- tool: string;
3548
- } | {
3549
- type: "subagent";
3550
- action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3551
- task?: string | undefined;
3552
- agentType?: string | undefined;
3553
- model?: string | undefined;
3554
- } | {
3555
- type: "skill";
3556
- name: string;
3557
- description?: string | undefined;
3558
- } | {
3559
- type: "web_search";
3560
- query?: string | undefined;
3561
- } | {
3562
- type: "image_generation";
3563
- prompt?: string | undefined;
3564
- } | {
3565
- type: "compaction";
3566
- } | {
3567
- type: "review";
3568
- phase: "started" | "finished";
3569
- } | {
3570
- type: "question";
3571
- text: string;
3572
- more?: number | undefined;
3573
- } | undefined;
3574
4881
  appendOutput?: string | undefined;
3575
4882
  rawOutput?: unknown;
3576
4883
  } | {
3577
4884
  entries: {
3578
- status: "pending" | "in_progress" | "completed";
4885
+ status: "completed" | "pending" | "in_progress";
3579
4886
  content: string;
3580
4887
  priority?: "high" | "medium" | "low" | undefined;
3581
4888
  }[];
@@ -3592,8 +4899,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3592
4899
  currentModeId: string;
3593
4900
  } | {
3594
4901
  sessionUpdate: "session_info_update";
3595
- model?: string | undefined;
3596
4902
  title?: string | undefined;
4903
+ model?: string | undefined;
3597
4904
  } | {
3598
4905
  sessionUpdate: "usage_update";
3599
4906
  usedTokens?: number | undefined;
@@ -3610,38 +4917,38 @@ export declare const sessionEventSchema: z.ZodObject<{
3610
4917
  name: string;
3611
4918
  description?: string | undefined;
3612
4919
  }[];
3613
- name: string;
3614
4920
  id: string;
4921
+ name: string;
3615
4922
  current: string;
3616
- category?: "model" | "mode" | "effort" | "other" | undefined;
4923
+ category?: "model" | "other" | "mode" | "effort" | undefined;
3617
4924
  }[];
3618
4925
  sessionUpdate: "ls_config";
3619
4926
  } | {
3620
- sessionUpdate: "ls_notice";
3621
4927
  title: string;
4928
+ sessionUpdate: "ls_notice";
3622
4929
  level: "info" | "warning";
3623
4930
  detail?: string | undefined;
3624
4931
  } | {
3625
- sessionUpdate: "ls_turn";
3626
4932
  state: "started" | "ended";
4933
+ sessionUpdate: "ls_turn";
3627
4934
  parentToolCallId?: string | undefined;
3628
4935
  turnId?: string | undefined;
3629
- stopReason?: "end_turn" | "cancelled" | "error" | "max_tokens" | "refusal" | undefined;
4936
+ stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3630
4937
  } | {
3631
4938
  options: {
3632
4939
  name: string;
3633
- kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3634
4940
  optionId: string;
4941
+ kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3635
4942
  }[];
3636
- sessionUpdate: "ls_permission";
3637
4943
  title: string;
3638
4944
  requestId: string;
4945
+ sessionUpdate: "ls_permission";
3639
4946
  toolCallId?: string | undefined;
3640
4947
  detail?: string | undefined;
3641
4948
  questions?: {
3642
- text: string;
3643
- kind: "text" | "choice" | "choices";
3644
4949
  id: string;
4950
+ kind: "text" | "choice" | "choices";
4951
+ text: string;
3645
4952
  options?: {
3646
4953
  value: string;
3647
4954
  label: string;
@@ -3653,8 +4960,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3653
4960
  required?: boolean | undefined;
3654
4961
  }[] | undefined;
3655
4962
  } | {
3656
- sessionUpdate: "ls_permission_resolved";
3657
4963
  requestId: string;
4964
+ sessionUpdate: "ls_permission_resolved";
3658
4965
  optionId?: string | undefined;
3659
4966
  answers?: {
3660
4967
  values: string[];
@@ -3662,12 +4969,12 @@ export declare const sessionEventSchema: z.ZodObject<{
3662
4969
  other?: string | undefined;
3663
4970
  }[] | undefined;
3664
4971
  } | {
4972
+ driver: "remote" | "desktop" | "none";
3665
4973
  sessionUpdate: "ls_driver";
3666
- driver: "desktop" | "remote" | "none";
3667
4974
  deviceId?: string | undefined;
3668
4975
  } | {
4976
+ state: "error" | "running" | "idle" | "waiting" | "offline";
3669
4977
  sessionUpdate: "ls_status";
3670
- state: "error" | "idle" | "running" | "waiting" | "offline";
3671
4978
  } | {
3672
4979
  code: string;
3673
4980
  message: string;