@linkshell/host 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +2 -0
  2. package/dist/host/src/drivers/acp/driver.js +1 -1
  3. package/dist/host/src/drivers/acp/driver.js.map +1 -1
  4. package/dist/host/src/drivers/acp/mapper.js +5 -2
  5. package/dist/host/src/drivers/acp/mapper.js.map +1 -1
  6. package/dist/host/src/drivers/claude/activity.d.ts +40 -0
  7. package/dist/host/src/drivers/claude/activity.js +425 -0
  8. package/dist/host/src/drivers/claude/activity.js.map +1 -0
  9. package/dist/host/src/drivers/claude/driver.d.ts +2 -0
  10. package/dist/host/src/drivers/claude/driver.js +54 -5
  11. package/dist/host/src/drivers/claude/driver.js.map +1 -1
  12. package/dist/host/src/drivers/claude/transcript.d.ts +78 -13
  13. package/dist/host/src/drivers/claude/transcript.js +11 -3
  14. package/dist/host/src/drivers/claude/transcript.js.map +1 -1
  15. package/dist/host/src/drivers/codex/driver.js +1 -1
  16. package/dist/host/src/drivers/codex/driver.js.map +1 -1
  17. package/dist/host/src/hub.js +16 -6
  18. package/dist/host/src/hub.js.map +1 -1
  19. package/dist/host/src/input.js +0 -2
  20. package/dist/host/src/input.js.map +1 -1
  21. package/dist/host/src/rpc/server.d.ts +11 -0
  22. package/dist/host/src/rpc/server.js +37 -3
  23. package/dist/host/src/rpc/server.js.map +1 -1
  24. package/dist/host/src/store.d.ts +3 -0
  25. package/dist/host/src/store.js +14 -5
  26. package/dist/host/src/store.js.map +1 -1
  27. package/dist/host/tsconfig.tsbuildinfo +1 -1
  28. package/dist/wire/src/index.d.ts +1 -0
  29. package/dist/wire/src/index.js +1 -0
  30. package/dist/wire/src/index.js.map +1 -1
  31. package/dist/wire/src/model.d.ts +222 -30
  32. package/dist/wire/src/model.js +6 -0
  33. package/dist/wire/src/model.js.map +1 -1
  34. package/dist/wire/src/relay.d.ts +4 -4
  35. package/dist/wire/src/rpc.d.ts +2743 -384
  36. package/dist/wire/src/updates.d.ts +1405 -98
  37. package/dist/wire/src/updates.js +5 -0
  38. package/dist/wire/src/updates.js.map +1 -1
  39. package/dist/wire/src/workflow.d.ts +187 -0
  40. package/dist/wire/src/workflow.js +35 -0
  41. package/dist/wire/src/workflow.js.map +1 -0
  42. package/package.json +3 -3
@@ -198,17 +198,204 @@ 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";
365
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
366
+ model?: string | undefined;
209
367
  task?: string | undefined;
210
368
  agentType?: string | undefined;
211
- 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;
212
399
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
213
400
  }>, z.ZodObject<{
214
401
  type: z.ZodLiteral<"skill">;
@@ -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
  }>;
@@ -312,7 +499,7 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
312
499
  }[];
313
500
  id: string;
314
501
  name: string;
315
- category: "other" | "model" | "mode" | "effort";
502
+ category: "model" | "other" | "mode" | "effort";
316
503
  current: string;
317
504
  }, {
318
505
  values: {
@@ -323,7 +510,7 @@ export declare const sessionConfigOptionSchema: z.ZodObject<{
323
510
  id: string;
324
511
  name: string;
325
512
  current: string;
326
- category?: "other" | "model" | "mode" | "effort" | 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<{
@@ -723,17 +910,204 @@ 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";
1077
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1078
+ model?: string | undefined;
734
1079
  task?: string | undefined;
735
1080
  agentType?: string | undefined;
736
- 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;
737
1111
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
738
1112
  }>, z.ZodObject<{
739
1113
  type: z.ZodLiteral<"skill">;
@@ -794,10 +1168,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
794
1168
  more?: number | undefined;
795
1169
  }>]>>;
796
1170
  }, "strip", z.ZodTypeAny, {
797
- status: "failed" | "pending" | "in_progress" | "completed";
798
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
799
- title: string;
1171
+ status: "completed" | "failed" | "pending" | "in_progress";
800
1172
  toolCallId: string;
1173
+ title: string;
1174
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
801
1175
  sessionUpdate: "tool_call";
802
1176
  detail?: {
803
1177
  type: "mcp";
@@ -806,9 +1180,40 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
806
1180
  } | {
807
1181
  type: "subagent";
808
1182
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1183
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1184
+ model?: string | undefined;
809
1185
  task?: string | undefined;
810
1186
  agentType?: string | undefined;
811
- model?: 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;
812
1217
  } | {
813
1218
  type: "skill";
814
1219
  name: string;
@@ -829,6 +1234,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
829
1234
  text: string;
830
1235
  more?: number | undefined;
831
1236
  } | undefined;
1237
+ parentToolCallId?: string | undefined;
832
1238
  content?: ({
833
1239
  type: "content";
834
1240
  content: {
@@ -860,17 +1266,16 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
860
1266
  type: "terminal";
861
1267
  terminalId: string;
862
1268
  })[] | undefined;
863
- parentToolCallId?: string | undefined;
864
1269
  rawInput?: unknown;
865
1270
  locations?: {
866
1271
  path: string;
867
1272
  line?: number | undefined;
868
1273
  }[] | undefined;
869
1274
  }, {
870
- status: "failed" | "pending" | "in_progress" | "completed";
871
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
872
- title: string;
1275
+ status: "completed" | "failed" | "pending" | "in_progress";
873
1276
  toolCallId: string;
1277
+ title: string;
1278
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
874
1279
  sessionUpdate: "tool_call";
875
1280
  detail?: {
876
1281
  type: "mcp";
@@ -878,9 +1283,40 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
878
1283
  server: string;
879
1284
  } | {
880
1285
  type: "subagent";
1286
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1287
+ model?: string | undefined;
881
1288
  task?: string | undefined;
882
1289
  agentType?: string | undefined;
883
- 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;
884
1320
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
885
1321
  } | {
886
1322
  type: "skill";
@@ -902,6 +1338,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
902
1338
  text: string;
903
1339
  more?: number | undefined;
904
1340
  } | undefined;
1341
+ parentToolCallId?: string | undefined;
905
1342
  content?: ({
906
1343
  type: "content";
907
1344
  content: {
@@ -933,7 +1370,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
933
1370
  type: "terminal";
934
1371
  terminalId: string;
935
1372
  })[] | undefined;
936
- parentToolCallId?: string | undefined;
937
1373
  rawInput?: unknown;
938
1374
  locations?: {
939
1375
  path: string;
@@ -965,17 +1401,204 @@ 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";
1568
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1569
+ model?: string | undefined;
976
1570
  task?: string | undefined;
977
1571
  agentType?: string | undefined;
978
- 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;
979
1602
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
980
1603
  }>, z.ZodObject<{
981
1604
  type: z.ZodLiteral<"skill">;
@@ -1160,7 +1783,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1160
1783
  }, "strip", z.ZodTypeAny, {
1161
1784
  toolCallId: string;
1162
1785
  sessionUpdate: "tool_call_update";
1163
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
1786
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
1164
1787
  title?: string | undefined;
1165
1788
  detail?: {
1166
1789
  type: "mcp";
@@ -1169,9 +1792,40 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1169
1792
  } | {
1170
1793
  type: "subagent";
1171
1794
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
1795
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1796
+ model?: string | undefined;
1172
1797
  task?: string | undefined;
1173
1798
  agentType?: string | undefined;
1174
- 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;
1175
1829
  } | {
1176
1830
  type: "skill";
1177
1831
  name: string;
@@ -1192,6 +1846,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1192
1846
  text: string;
1193
1847
  more?: number | undefined;
1194
1848
  } | undefined;
1849
+ parentToolCallId?: string | undefined;
1195
1850
  content?: ({
1196
1851
  type: "content";
1197
1852
  content: {
@@ -1223,13 +1878,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1223
1878
  type: "terminal";
1224
1879
  terminalId: string;
1225
1880
  })[] | undefined;
1226
- parentToolCallId?: string | undefined;
1227
1881
  appendOutput?: string | undefined;
1228
1882
  rawOutput?: unknown;
1229
1883
  }, {
1230
1884
  toolCallId: string;
1231
1885
  sessionUpdate: "tool_call_update";
1232
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
1886
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
1233
1887
  title?: string | undefined;
1234
1888
  detail?: {
1235
1889
  type: "mcp";
@@ -1237,9 +1891,40 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1237
1891
  server: string;
1238
1892
  } | {
1239
1893
  type: "subagent";
1894
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
1895
+ model?: string | undefined;
1240
1896
  task?: string | undefined;
1241
1897
  agentType?: string | undefined;
1242
- 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;
1243
1928
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
1244
1929
  } | {
1245
1930
  type: "skill";
@@ -1261,6 +1946,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1261
1946
  text: string;
1262
1947
  more?: number | undefined;
1263
1948
  } | undefined;
1949
+ parentToolCallId?: string | undefined;
1264
1950
  content?: ({
1265
1951
  type: "content";
1266
1952
  content: {
@@ -1292,7 +1978,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1292
1978
  type: "terminal";
1293
1979
  terminalId: string;
1294
1980
  })[] | undefined;
1295
- parentToolCallId?: string | 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
  }[];
@@ -1430,7 +2115,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1430
2115
  }[];
1431
2116
  id: string;
1432
2117
  name: string;
1433
- category: "other" | "model" | "mode" | "effort";
2118
+ category: "model" | "other" | "mode" | "effort";
1434
2119
  current: string;
1435
2120
  }, {
1436
2121
  values: {
@@ -1441,7 +2126,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1441
2126
  id: string;
1442
2127
  name: string;
1443
2128
  current: string;
1444
- category?: "other" | "model" | "mode" | "effort" | undefined;
2129
+ category?: "model" | "other" | "mode" | "effort" | undefined;
1445
2130
  }>, "many">;
1446
2131
  }, "strip", z.ZodTypeAny, {
1447
2132
  options: {
@@ -1452,7 +2137,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1452
2137
  }[];
1453
2138
  id: string;
1454
2139
  name: string;
1455
- category: "other" | "model" | "mode" | "effort";
2140
+ category: "model" | "other" | "mode" | "effort";
1456
2141
  current: string;
1457
2142
  }[];
1458
2143
  sessionUpdate: "ls_config";
@@ -1466,7 +2151,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1466
2151
  id: string;
1467
2152
  name: string;
1468
2153
  current: string;
1469
- category?: "other" | "model" | "mode" | "effort" | undefined;
2154
+ category?: "model" | "other" | "mode" | "effort" | undefined;
1470
2155
  }[];
1471
2156
  sessionUpdate: "ls_config";
1472
2157
  }>, z.ZodObject<{
@@ -1514,12 +2199,12 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1514
2199
  name: z.ZodString;
1515
2200
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
1516
2201
  }, "strip", z.ZodTypeAny, {
1517
- optionId: string;
1518
2202
  name: string;
2203
+ optionId: string;
1519
2204
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1520
2205
  }, {
1521
- optionId: string;
1522
2206
  name: string;
2207
+ optionId: string;
1523
2208
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1524
2209
  }>, "many">;
1525
2210
  /**
@@ -1577,8 +2262,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1577
2262
  }>, "many">>;
1578
2263
  }, "strip", z.ZodTypeAny, {
1579
2264
  options: {
1580
- optionId: string;
1581
2265
  name: string;
2266
+ optionId: string;
1582
2267
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1583
2268
  }[];
1584
2269
  title: string;
@@ -1602,8 +2287,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1602
2287
  }[] | undefined;
1603
2288
  }, {
1604
2289
  options: {
1605
- optionId: string;
1606
2290
  name: string;
2291
+ optionId: string;
1607
2292
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1608
2293
  }[];
1609
2294
  title: string;
@@ -1677,10 +2362,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1677
2362
  sessionUpdate: z.ZodLiteral<"ls_status">;
1678
2363
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
1679
2364
  }, "strip", z.ZodTypeAny, {
1680
- state: "idle" | "running" | "waiting" | "error" | "offline";
2365
+ state: "running" | "idle" | "waiting" | "error" | "offline";
1681
2366
  sessionUpdate: "ls_status";
1682
2367
  }, {
1683
- state: "idle" | "running" | "waiting" | "error" | "offline";
2368
+ state: "running" | "idle" | "waiting" | "error" | "offline";
1684
2369
  sessionUpdate: "ls_status";
1685
2370
  }>, z.ZodObject<{
1686
2371
  sessionUpdate: z.ZodLiteral<"ls_error">;
@@ -2102,17 +2787,204 @@ 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";
2954
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
2955
+ model?: string | undefined;
2113
2956
  task?: string | undefined;
2114
2957
  agentType?: string | undefined;
2115
- 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;
2116
2988
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2117
2989
  }>, z.ZodObject<{
2118
2990
  type: z.ZodLiteral<"skill">;
@@ -2173,10 +3045,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2173
3045
  more?: number | undefined;
2174
3046
  }>]>>;
2175
3047
  }, "strip", z.ZodTypeAny, {
2176
- status: "failed" | "pending" | "in_progress" | "completed";
2177
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2178
- title: string;
3048
+ status: "completed" | "failed" | "pending" | "in_progress";
2179
3049
  toolCallId: string;
3050
+ title: string;
3051
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2180
3052
  sessionUpdate: "tool_call";
2181
3053
  detail?: {
2182
3054
  type: "mcp";
@@ -2185,9 +3057,40 @@ export declare const sessionEventSchema: z.ZodObject<{
2185
3057
  } | {
2186
3058
  type: "subagent";
2187
3059
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3060
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3061
+ model?: string | undefined;
2188
3062
  task?: string | undefined;
2189
3063
  agentType?: string | undefined;
2190
- model?: 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;
2191
3094
  } | {
2192
3095
  type: "skill";
2193
3096
  name: string;
@@ -2208,6 +3111,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2208
3111
  text: string;
2209
3112
  more?: number | undefined;
2210
3113
  } | undefined;
3114
+ parentToolCallId?: string | undefined;
2211
3115
  content?: ({
2212
3116
  type: "content";
2213
3117
  content: {
@@ -2239,17 +3143,16 @@ export declare const sessionEventSchema: z.ZodObject<{
2239
3143
  type: "terminal";
2240
3144
  terminalId: string;
2241
3145
  })[] | undefined;
2242
- parentToolCallId?: string | undefined;
2243
3146
  rawInput?: unknown;
2244
3147
  locations?: {
2245
3148
  path: string;
2246
3149
  line?: number | undefined;
2247
3150
  }[] | undefined;
2248
3151
  }, {
2249
- status: "failed" | "pending" | "in_progress" | "completed";
2250
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2251
- title: string;
3152
+ status: "completed" | "failed" | "pending" | "in_progress";
2252
3153
  toolCallId: string;
3154
+ title: string;
3155
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
2253
3156
  sessionUpdate: "tool_call";
2254
3157
  detail?: {
2255
3158
  type: "mcp";
@@ -2257,9 +3160,40 @@ export declare const sessionEventSchema: z.ZodObject<{
2257
3160
  server: string;
2258
3161
  } | {
2259
3162
  type: "subagent";
3163
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3164
+ model?: string | undefined;
2260
3165
  task?: string | undefined;
2261
3166
  agentType?: string | undefined;
2262
- 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;
2263
3197
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2264
3198
  } | {
2265
3199
  type: "skill";
@@ -2281,6 +3215,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2281
3215
  text: string;
2282
3216
  more?: number | undefined;
2283
3217
  } | undefined;
3218
+ parentToolCallId?: string | undefined;
2284
3219
  content?: ({
2285
3220
  type: "content";
2286
3221
  content: {
@@ -2312,7 +3247,6 @@ export declare const sessionEventSchema: z.ZodObject<{
2312
3247
  type: "terminal";
2313
3248
  terminalId: string;
2314
3249
  })[] | undefined;
2315
- parentToolCallId?: string | undefined;
2316
3250
  rawInput?: unknown;
2317
3251
  locations?: {
2318
3252
  path: string;
@@ -2344,17 +3278,204 @@ 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";
3445
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3446
+ model?: string | undefined;
2355
3447
  task?: string | undefined;
2356
3448
  agentType?: string | undefined;
2357
- 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;
2358
3479
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2359
3480
  }>, z.ZodObject<{
2360
3481
  type: z.ZodLiteral<"skill">;
@@ -2539,7 +3660,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2539
3660
  }, "strip", z.ZodTypeAny, {
2540
3661
  toolCallId: string;
2541
3662
  sessionUpdate: "tool_call_update";
2542
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
3663
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
2543
3664
  title?: string | undefined;
2544
3665
  detail?: {
2545
3666
  type: "mcp";
@@ -2548,9 +3669,40 @@ export declare const sessionEventSchema: z.ZodObject<{
2548
3669
  } | {
2549
3670
  type: "subagent";
2550
3671
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
3672
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3673
+ model?: string | undefined;
2551
3674
  task?: string | undefined;
2552
3675
  agentType?: string | undefined;
2553
- 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;
2554
3706
  } | {
2555
3707
  type: "skill";
2556
3708
  name: string;
@@ -2571,6 +3723,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2571
3723
  text: string;
2572
3724
  more?: number | undefined;
2573
3725
  } | undefined;
3726
+ parentToolCallId?: string | undefined;
2574
3727
  content?: ({
2575
3728
  type: "content";
2576
3729
  content: {
@@ -2602,13 +3755,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2602
3755
  type: "terminal";
2603
3756
  terminalId: string;
2604
3757
  })[] | undefined;
2605
- parentToolCallId?: string | undefined;
2606
3758
  appendOutput?: string | undefined;
2607
3759
  rawOutput?: unknown;
2608
3760
  }, {
2609
3761
  toolCallId: string;
2610
3762
  sessionUpdate: "tool_call_update";
2611
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
3763
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
2612
3764
  title?: string | undefined;
2613
3765
  detail?: {
2614
3766
  type: "mcp";
@@ -2616,9 +3768,40 @@ export declare const sessionEventSchema: z.ZodObject<{
2616
3768
  server: string;
2617
3769
  } | {
2618
3770
  type: "subagent";
3771
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
3772
+ model?: string | undefined;
2619
3773
  task?: string | undefined;
2620
3774
  agentType?: string | undefined;
2621
- 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;
2622
3805
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
2623
3806
  } | {
2624
3807
  type: "skill";
@@ -2640,6 +3823,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2640
3823
  text: string;
2641
3824
  more?: number | undefined;
2642
3825
  } | undefined;
3826
+ parentToolCallId?: string | undefined;
2643
3827
  content?: ({
2644
3828
  type: "content";
2645
3829
  content: {
@@ -2671,7 +3855,6 @@ export declare const sessionEventSchema: z.ZodObject<{
2671
3855
  type: "terminal";
2672
3856
  terminalId: string;
2673
3857
  })[] | undefined;
2674
- parentToolCallId?: string | 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
  }[];
@@ -2809,7 +3992,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2809
3992
  }[];
2810
3993
  id: string;
2811
3994
  name: string;
2812
- category: "other" | "model" | "mode" | "effort";
3995
+ category: "model" | "other" | "mode" | "effort";
2813
3996
  current: string;
2814
3997
  }, {
2815
3998
  values: {
@@ -2820,7 +4003,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2820
4003
  id: string;
2821
4004
  name: string;
2822
4005
  current: string;
2823
- category?: "other" | "model" | "mode" | "effort" | undefined;
4006
+ category?: "model" | "other" | "mode" | "effort" | undefined;
2824
4007
  }>, "many">;
2825
4008
  }, "strip", z.ZodTypeAny, {
2826
4009
  options: {
@@ -2831,7 +4014,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2831
4014
  }[];
2832
4015
  id: string;
2833
4016
  name: string;
2834
- category: "other" | "model" | "mode" | "effort";
4017
+ category: "model" | "other" | "mode" | "effort";
2835
4018
  current: string;
2836
4019
  }[];
2837
4020
  sessionUpdate: "ls_config";
@@ -2845,7 +4028,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2845
4028
  id: string;
2846
4029
  name: string;
2847
4030
  current: string;
2848
- category?: "other" | "model" | "mode" | "effort" | undefined;
4031
+ category?: "model" | "other" | "mode" | "effort" | undefined;
2849
4032
  }[];
2850
4033
  sessionUpdate: "ls_config";
2851
4034
  }>, z.ZodObject<{
@@ -2893,12 +4076,12 @@ export declare const sessionEventSchema: z.ZodObject<{
2893
4076
  name: z.ZodString;
2894
4077
  kind: z.ZodEnum<["allow_once", "allow_always", "reject_once", "reject_always"]>;
2895
4078
  }, "strip", z.ZodTypeAny, {
2896
- optionId: string;
2897
4079
  name: string;
4080
+ optionId: string;
2898
4081
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2899
4082
  }, {
2900
- optionId: string;
2901
4083
  name: string;
4084
+ optionId: string;
2902
4085
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2903
4086
  }>, "many">;
2904
4087
  /**
@@ -2956,8 +4139,8 @@ export declare const sessionEventSchema: z.ZodObject<{
2956
4139
  }>, "many">>;
2957
4140
  }, "strip", z.ZodTypeAny, {
2958
4141
  options: {
2959
- optionId: string;
2960
4142
  name: string;
4143
+ optionId: string;
2961
4144
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2962
4145
  }[];
2963
4146
  title: string;
@@ -2981,8 +4164,8 @@ export declare const sessionEventSchema: z.ZodObject<{
2981
4164
  }[] | undefined;
2982
4165
  }, {
2983
4166
  options: {
2984
- optionId: string;
2985
4167
  name: string;
4168
+ optionId: string;
2986
4169
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2987
4170
  }[];
2988
4171
  title: string;
@@ -3056,10 +4239,10 @@ export declare const sessionEventSchema: z.ZodObject<{
3056
4239
  sessionUpdate: z.ZodLiteral<"ls_status">;
3057
4240
  state: z.ZodEnum<["idle", "running", "waiting", "error", "offline"]>;
3058
4241
  }, "strip", z.ZodTypeAny, {
3059
- state: "idle" | "running" | "waiting" | "error" | "offline";
4242
+ state: "running" | "idle" | "waiting" | "error" | "offline";
3060
4243
  sessionUpdate: "ls_status";
3061
4244
  }, {
3062
- state: "idle" | "running" | "waiting" | "error" | "offline";
4245
+ state: "running" | "idle" | "waiting" | "error" | "offline";
3063
4246
  sessionUpdate: "ls_status";
3064
4247
  }>, z.ZodObject<{
3065
4248
  sessionUpdate: z.ZodLiteral<"ls_error">;
@@ -3132,10 +4315,10 @@ export declare const sessionEventSchema: z.ZodObject<{
3132
4315
  messageId: string;
3133
4316
  parentToolCallId?: string | undefined;
3134
4317
  } | {
3135
- status: "failed" | "pending" | "in_progress" | "completed";
3136
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3137
- title: string;
4318
+ status: "completed" | "failed" | "pending" | "in_progress";
3138
4319
  toolCallId: string;
4320
+ title: string;
4321
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3139
4322
  sessionUpdate: "tool_call";
3140
4323
  detail?: {
3141
4324
  type: "mcp";
@@ -3144,9 +4327,40 @@ export declare const sessionEventSchema: z.ZodObject<{
3144
4327
  } | {
3145
4328
  type: "subagent";
3146
4329
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
4330
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4331
+ model?: string | undefined;
3147
4332
  task?: string | undefined;
3148
4333
  agentType?: string | undefined;
3149
- model?: 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;
3150
4364
  } | {
3151
4365
  type: "skill";
3152
4366
  name: string;
@@ -3167,6 +4381,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3167
4381
  text: string;
3168
4382
  more?: number | undefined;
3169
4383
  } | undefined;
4384
+ parentToolCallId?: string | undefined;
3170
4385
  content?: ({
3171
4386
  type: "content";
3172
4387
  content: {
@@ -3198,7 +4413,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3198
4413
  type: "terminal";
3199
4414
  terminalId: string;
3200
4415
  })[] | undefined;
3201
- parentToolCallId?: string | undefined;
3202
4416
  rawInput?: unknown;
3203
4417
  locations?: {
3204
4418
  path: string;
@@ -3207,7 +4421,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3207
4421
  } | {
3208
4422
  toolCallId: string;
3209
4423
  sessionUpdate: "tool_call_update";
3210
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
4424
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
3211
4425
  title?: string | undefined;
3212
4426
  detail?: {
3213
4427
  type: "mcp";
@@ -3216,9 +4430,40 @@ export declare const sessionEventSchema: z.ZodObject<{
3216
4430
  } | {
3217
4431
  type: "subagent";
3218
4432
  action: "message" | "spawn" | "wait" | "stop" | "resume" | "list";
4433
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4434
+ model?: string | undefined;
3219
4435
  task?: string | undefined;
3220
4436
  agentType?: string | undefined;
3221
- 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;
3222
4467
  } | {
3223
4468
  type: "skill";
3224
4469
  name: string;
@@ -3239,6 +4484,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3239
4484
  text: string;
3240
4485
  more?: number | undefined;
3241
4486
  } | undefined;
4487
+ parentToolCallId?: string | undefined;
3242
4488
  content?: ({
3243
4489
  type: "content";
3244
4490
  content: {
@@ -3270,12 +4516,11 @@ export declare const sessionEventSchema: z.ZodObject<{
3270
4516
  type: "terminal";
3271
4517
  terminalId: string;
3272
4518
  })[] | undefined;
3273
- parentToolCallId?: string | 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
  }[];
@@ -3312,7 +4557,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3312
4557
  }[];
3313
4558
  id: string;
3314
4559
  name: string;
3315
- category: "other" | "model" | "mode" | "effort";
4560
+ category: "model" | "other" | "mode" | "effort";
3316
4561
  current: string;
3317
4562
  }[];
3318
4563
  sessionUpdate: "ls_config";
@@ -3329,8 +4574,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3329
4574
  stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3330
4575
  } | {
3331
4576
  options: {
3332
- optionId: string;
3333
4577
  name: string;
4578
+ optionId: string;
3334
4579
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3335
4580
  }[];
3336
4581
  title: string;
@@ -3366,7 +4611,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3366
4611
  sessionUpdate: "ls_driver";
3367
4612
  deviceId?: string | undefined;
3368
4613
  } | {
3369
- state: "idle" | "running" | "waiting" | "error" | "offline";
4614
+ state: "running" | "idle" | "waiting" | "error" | "offline";
3370
4615
  sessionUpdate: "ls_status";
3371
4616
  } | {
3372
4617
  code: string;
@@ -3432,10 +4677,10 @@ export declare const sessionEventSchema: z.ZodObject<{
3432
4677
  messageId: string;
3433
4678
  parentToolCallId?: string | undefined;
3434
4679
  } | {
3435
- status: "failed" | "pending" | "in_progress" | "completed";
3436
- kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3437
- title: string;
4680
+ status: "completed" | "failed" | "pending" | "in_progress";
3438
4681
  toolCallId: string;
4682
+ title: string;
4683
+ kind: "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "other";
3439
4684
  sessionUpdate: "tool_call";
3440
4685
  detail?: {
3441
4686
  type: "mcp";
@@ -3443,9 +4688,40 @@ export declare const sessionEventSchema: z.ZodObject<{
3443
4688
  server: string;
3444
4689
  } | {
3445
4690
  type: "subagent";
4691
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4692
+ model?: string | undefined;
3446
4693
  task?: string | undefined;
3447
4694
  agentType?: string | undefined;
3448
- model?: 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;
3449
4725
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3450
4726
  } | {
3451
4727
  type: "skill";
@@ -3467,6 +4743,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3467
4743
  text: string;
3468
4744
  more?: number | undefined;
3469
4745
  } | undefined;
4746
+ parentToolCallId?: string | undefined;
3470
4747
  content?: ({
3471
4748
  type: "content";
3472
4749
  content: {
@@ -3498,7 +4775,6 @@ export declare const sessionEventSchema: z.ZodObject<{
3498
4775
  type: "terminal";
3499
4776
  terminalId: string;
3500
4777
  })[] | undefined;
3501
- parentToolCallId?: string | undefined;
3502
4778
  rawInput?: unknown;
3503
4779
  locations?: {
3504
4780
  path: string;
@@ -3507,7 +4783,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3507
4783
  } | {
3508
4784
  toolCallId: string;
3509
4785
  sessionUpdate: "tool_call_update";
3510
- status?: "failed" | "pending" | "in_progress" | "completed" | undefined;
4786
+ status?: "completed" | "failed" | "pending" | "in_progress" | undefined;
3511
4787
  title?: string | undefined;
3512
4788
  detail?: {
3513
4789
  type: "mcp";
@@ -3515,9 +4791,40 @@ export declare const sessionEventSchema: z.ZodObject<{
3515
4791
  server: string;
3516
4792
  } | {
3517
4793
  type: "subagent";
4794
+ state?: "running" | "paused" | "completed" | "failed" | "stopped" | "pending" | "unknown" | undefined;
4795
+ model?: string | undefined;
3518
4796
  task?: string | undefined;
3519
4797
  agentType?: string | undefined;
3520
- 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;
3521
4828
  action?: "message" | "spawn" | "wait" | "stop" | "resume" | "list" | undefined;
3522
4829
  } | {
3523
4830
  type: "skill";
@@ -3539,6 +4846,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3539
4846
  text: string;
3540
4847
  more?: number | undefined;
3541
4848
  } | undefined;
4849
+ parentToolCallId?: string | undefined;
3542
4850
  content?: ({
3543
4851
  type: "content";
3544
4852
  content: {
@@ -3570,12 +4878,11 @@ export declare const sessionEventSchema: z.ZodObject<{
3570
4878
  type: "terminal";
3571
4879
  terminalId: string;
3572
4880
  })[] | undefined;
3573
- parentToolCallId?: string | 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
  }[];
@@ -3613,7 +4920,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3613
4920
  id: string;
3614
4921
  name: string;
3615
4922
  current: string;
3616
- category?: "other" | "model" | "mode" | "effort" | undefined;
4923
+ category?: "model" | "other" | "mode" | "effort" | undefined;
3617
4924
  }[];
3618
4925
  sessionUpdate: "ls_config";
3619
4926
  } | {
@@ -3629,8 +4936,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3629
4936
  stopReason?: "error" | "end_turn" | "cancelled" | "max_tokens" | "refusal" | undefined;
3630
4937
  } | {
3631
4938
  options: {
3632
- optionId: string;
3633
4939
  name: string;
4940
+ optionId: string;
3634
4941
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
3635
4942
  }[];
3636
4943
  title: string;
@@ -3666,7 +4973,7 @@ export declare const sessionEventSchema: z.ZodObject<{
3666
4973
  sessionUpdate: "ls_driver";
3667
4974
  deviceId?: string | undefined;
3668
4975
  } | {
3669
- state: "idle" | "running" | "waiting" | "error" | "offline";
4976
+ state: "running" | "idle" | "waiting" | "error" | "offline";
3670
4977
  sessionUpdate: "ls_status";
3671
4978
  } | {
3672
4979
  code: string;