runtape 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -9,6 +9,7 @@ declare const SessionStartEvent: z.ZodObject<{
9
9
  } & {
10
10
  wall_ts: z.ZodString;
11
11
  sequence: z.ZodNumber;
12
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
12
13
  } & {
13
14
  type: z.ZodLiteral<"session_start">;
14
15
  source: z.ZodString;
@@ -22,6 +23,7 @@ declare const SessionStartEvent: z.ZodObject<{
22
23
  sequence: number;
23
24
  source: string;
24
25
  permission_mode?: string | undefined;
26
+ agent_tool_use_id?: string | undefined;
25
27
  }, {
26
28
  type: "session_start";
27
29
  session_id: string;
@@ -32,6 +34,7 @@ declare const SessionStartEvent: z.ZodObject<{
32
34
  sequence: number;
33
35
  source: string;
34
36
  permission_mode?: string | undefined;
37
+ agent_tool_use_id?: string | undefined;
35
38
  }>;
36
39
  declare const UserPromptEvent: z.ZodObject<{
37
40
  session_id: z.ZodString;
@@ -42,6 +45,7 @@ declare const UserPromptEvent: z.ZodObject<{
42
45
  } & {
43
46
  wall_ts: z.ZodString;
44
47
  sequence: z.ZodNumber;
48
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
45
49
  } & {
46
50
  type: z.ZodLiteral<"user_prompt">;
47
51
  prompt: z.ZodString;
@@ -55,6 +59,7 @@ declare const UserPromptEvent: z.ZodObject<{
55
59
  sequence: number;
56
60
  prompt: string;
57
61
  permission_mode?: string | undefined;
62
+ agent_tool_use_id?: string | undefined;
58
63
  }, {
59
64
  type: "user_prompt";
60
65
  session_id: string;
@@ -65,6 +70,7 @@ declare const UserPromptEvent: z.ZodObject<{
65
70
  sequence: number;
66
71
  prompt: string;
67
72
  permission_mode?: string | undefined;
73
+ agent_tool_use_id?: string | undefined;
68
74
  }>;
69
75
  declare const ToolAttemptEvent: z.ZodObject<{
70
76
  session_id: z.ZodString;
@@ -75,6 +81,7 @@ declare const ToolAttemptEvent: z.ZodObject<{
75
81
  } & {
76
82
  wall_ts: z.ZodString;
77
83
  sequence: z.ZodNumber;
84
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
78
85
  } & {
79
86
  type: z.ZodLiteral<"tool_attempt">;
80
87
  tool_name: z.ZodString;
@@ -91,6 +98,7 @@ declare const ToolAttemptEvent: z.ZodObject<{
91
98
  tool_name: string;
92
99
  tool_use_id: string;
93
100
  permission_mode?: string | undefined;
101
+ agent_tool_use_id?: string | undefined;
94
102
  tool_input?: unknown;
95
103
  }, {
96
104
  type: "tool_attempt";
@@ -103,6 +111,7 @@ declare const ToolAttemptEvent: z.ZodObject<{
103
111
  tool_name: string;
104
112
  tool_use_id: string;
105
113
  permission_mode?: string | undefined;
114
+ agent_tool_use_id?: string | undefined;
106
115
  tool_input?: unknown;
107
116
  }>;
108
117
  declare const ToolCallEvent: z.ZodObject<{
@@ -114,6 +123,7 @@ declare const ToolCallEvent: z.ZodObject<{
114
123
  } & {
115
124
  wall_ts: z.ZodString;
116
125
  sequence: z.ZodNumber;
126
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
117
127
  } & {
118
128
  type: z.ZodLiteral<"tool_call">;
119
129
  tool_name: z.ZodString;
@@ -135,6 +145,7 @@ declare const ToolCallEvent: z.ZodObject<{
135
145
  tool_use_id: string;
136
146
  duration_ms: number;
137
147
  permission_mode?: string | undefined;
148
+ agent_tool_use_id?: string | undefined;
138
149
  tool_input?: unknown;
139
150
  tool_response?: unknown;
140
151
  is_error?: boolean | undefined;
@@ -151,6 +162,7 @@ declare const ToolCallEvent: z.ZodObject<{
151
162
  tool_use_id: string;
152
163
  duration_ms: number;
153
164
  permission_mode?: string | undefined;
165
+ agent_tool_use_id?: string | undefined;
154
166
  tool_input?: unknown;
155
167
  tool_response?: unknown;
156
168
  is_error?: boolean | undefined;
@@ -165,6 +177,7 @@ declare const AssistantTurnEvent: z.ZodObject<{
165
177
  } & {
166
178
  wall_ts: z.ZodString;
167
179
  sequence: z.ZodNumber;
180
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
168
181
  } & {
169
182
  type: z.ZodLiteral<"assistant_turn">;
170
183
  message_uuid: z.ZodString;
@@ -189,6 +202,7 @@ declare const AssistantTurnEvent: z.ZodObject<{
189
202
  cache_read_tokens: number;
190
203
  cache_creation_tokens: number;
191
204
  permission_mode?: string | undefined;
205
+ agent_tool_use_id?: string | undefined;
192
206
  text?: string | undefined;
193
207
  }, {
194
208
  type: "assistant_turn";
@@ -203,6 +217,7 @@ declare const AssistantTurnEvent: z.ZodObject<{
203
217
  input_tokens: number;
204
218
  output_tokens: number;
205
219
  permission_mode?: string | undefined;
220
+ agent_tool_use_id?: string | undefined;
206
221
  cache_read_tokens?: number | undefined;
207
222
  cache_creation_tokens?: number | undefined;
208
223
  text?: string | undefined;
@@ -216,6 +231,7 @@ declare const SubagentEndEvent: z.ZodObject<{
216
231
  } & {
217
232
  wall_ts: z.ZodString;
218
233
  sequence: z.ZodNumber;
234
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
219
235
  } & {
220
236
  type: z.ZodLiteral<"subagent_end">;
221
237
  agent_id: z.ZodString;
@@ -236,6 +252,7 @@ declare const SubagentEndEvent: z.ZodObject<{
236
252
  agent_transcript_path: string;
237
253
  last_assistant_message: string;
238
254
  permission_mode?: string | undefined;
255
+ agent_tool_use_id?: string | undefined;
239
256
  stop_hook_active?: boolean | undefined;
240
257
  }, {
241
258
  type: "subagent_end";
@@ -250,6 +267,7 @@ declare const SubagentEndEvent: z.ZodObject<{
250
267
  agent_transcript_path: string;
251
268
  last_assistant_message: string;
252
269
  permission_mode?: string | undefined;
270
+ agent_tool_use_id?: string | undefined;
253
271
  stop_hook_active?: boolean | undefined;
254
272
  }>;
255
273
  declare const SessionEndEvent: z.ZodObject<{
@@ -261,6 +279,7 @@ declare const SessionEndEvent: z.ZodObject<{
261
279
  } & {
262
280
  wall_ts: z.ZodString;
263
281
  sequence: z.ZodNumber;
282
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
264
283
  } & {
265
284
  type: z.ZodLiteral<"session_end">;
266
285
  last_assistant_message: z.ZodOptional<z.ZodString>;
@@ -274,6 +293,7 @@ declare const SessionEndEvent: z.ZodObject<{
274
293
  wall_ts: string;
275
294
  sequence: number;
276
295
  permission_mode?: string | undefined;
296
+ agent_tool_use_id?: string | undefined;
277
297
  last_assistant_message?: string | undefined;
278
298
  stop_hook_active?: boolean | undefined;
279
299
  }, {
@@ -285,9 +305,46 @@ declare const SessionEndEvent: z.ZodObject<{
285
305
  wall_ts: string;
286
306
  sequence: number;
287
307
  permission_mode?: string | undefined;
308
+ agent_tool_use_id?: string | undefined;
288
309
  last_assistant_message?: string | undefined;
289
310
  stop_hook_active?: boolean | undefined;
290
311
  }>;
312
+ declare const SessionCloseEvent: z.ZodObject<{
313
+ session_id: z.ZodString;
314
+ transcript_path: z.ZodString;
315
+ cwd: z.ZodString;
316
+ hook_event_name: z.ZodString;
317
+ permission_mode: z.ZodOptional<z.ZodString>;
318
+ } & {
319
+ wall_ts: z.ZodString;
320
+ sequence: z.ZodNumber;
321
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
322
+ } & {
323
+ type: z.ZodLiteral<"session_close">;
324
+ reason: z.ZodOptional<z.ZodString>;
325
+ }, "strip", z.ZodTypeAny, {
326
+ type: "session_close";
327
+ session_id: string;
328
+ transcript_path: string;
329
+ cwd: string;
330
+ hook_event_name: string;
331
+ wall_ts: string;
332
+ sequence: number;
333
+ permission_mode?: string | undefined;
334
+ agent_tool_use_id?: string | undefined;
335
+ reason?: string | undefined;
336
+ }, {
337
+ type: "session_close";
338
+ session_id: string;
339
+ transcript_path: string;
340
+ cwd: string;
341
+ hook_event_name: string;
342
+ wall_ts: string;
343
+ sequence: number;
344
+ permission_mode?: string | undefined;
345
+ agent_tool_use_id?: string | undefined;
346
+ reason?: string | undefined;
347
+ }>;
291
348
  declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
292
349
  session_id: z.ZodString;
293
350
  transcript_path: z.ZodString;
@@ -297,6 +354,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
297
354
  } & {
298
355
  wall_ts: z.ZodString;
299
356
  sequence: z.ZodNumber;
357
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
300
358
  } & {
301
359
  type: z.ZodLiteral<"session_start">;
302
360
  source: z.ZodString;
@@ -310,6 +368,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
310
368
  sequence: number;
311
369
  source: string;
312
370
  permission_mode?: string | undefined;
371
+ agent_tool_use_id?: string | undefined;
313
372
  }, {
314
373
  type: "session_start";
315
374
  session_id: string;
@@ -320,6 +379,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
320
379
  sequence: number;
321
380
  source: string;
322
381
  permission_mode?: string | undefined;
382
+ agent_tool_use_id?: string | undefined;
323
383
  }>, z.ZodObject<{
324
384
  session_id: z.ZodString;
325
385
  transcript_path: z.ZodString;
@@ -329,6 +389,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
329
389
  } & {
330
390
  wall_ts: z.ZodString;
331
391
  sequence: z.ZodNumber;
392
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
332
393
  } & {
333
394
  type: z.ZodLiteral<"user_prompt">;
334
395
  prompt: z.ZodString;
@@ -342,6 +403,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
342
403
  sequence: number;
343
404
  prompt: string;
344
405
  permission_mode?: string | undefined;
406
+ agent_tool_use_id?: string | undefined;
345
407
  }, {
346
408
  type: "user_prompt";
347
409
  session_id: string;
@@ -352,6 +414,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
352
414
  sequence: number;
353
415
  prompt: string;
354
416
  permission_mode?: string | undefined;
417
+ agent_tool_use_id?: string | undefined;
355
418
  }>, z.ZodObject<{
356
419
  session_id: z.ZodString;
357
420
  transcript_path: z.ZodString;
@@ -361,6 +424,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
361
424
  } & {
362
425
  wall_ts: z.ZodString;
363
426
  sequence: z.ZodNumber;
427
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
364
428
  } & {
365
429
  type: z.ZodLiteral<"tool_attempt">;
366
430
  tool_name: z.ZodString;
@@ -377,6 +441,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
377
441
  tool_name: string;
378
442
  tool_use_id: string;
379
443
  permission_mode?: string | undefined;
444
+ agent_tool_use_id?: string | undefined;
380
445
  tool_input?: unknown;
381
446
  }, {
382
447
  type: "tool_attempt";
@@ -389,6 +454,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
389
454
  tool_name: string;
390
455
  tool_use_id: string;
391
456
  permission_mode?: string | undefined;
457
+ agent_tool_use_id?: string | undefined;
392
458
  tool_input?: unknown;
393
459
  }>, z.ZodObject<{
394
460
  session_id: z.ZodString;
@@ -399,6 +465,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
399
465
  } & {
400
466
  wall_ts: z.ZodString;
401
467
  sequence: z.ZodNumber;
468
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
402
469
  } & {
403
470
  type: z.ZodLiteral<"tool_call">;
404
471
  tool_name: z.ZodString;
@@ -420,6 +487,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
420
487
  tool_use_id: string;
421
488
  duration_ms: number;
422
489
  permission_mode?: string | undefined;
490
+ agent_tool_use_id?: string | undefined;
423
491
  tool_input?: unknown;
424
492
  tool_response?: unknown;
425
493
  is_error?: boolean | undefined;
@@ -436,6 +504,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
436
504
  tool_use_id: string;
437
505
  duration_ms: number;
438
506
  permission_mode?: string | undefined;
507
+ agent_tool_use_id?: string | undefined;
439
508
  tool_input?: unknown;
440
509
  tool_response?: unknown;
441
510
  is_error?: boolean | undefined;
@@ -449,6 +518,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
449
518
  } & {
450
519
  wall_ts: z.ZodString;
451
520
  sequence: z.ZodNumber;
521
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
452
522
  } & {
453
523
  type: z.ZodLiteral<"assistant_turn">;
454
524
  message_uuid: z.ZodString;
@@ -473,6 +543,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
473
543
  cache_read_tokens: number;
474
544
  cache_creation_tokens: number;
475
545
  permission_mode?: string | undefined;
546
+ agent_tool_use_id?: string | undefined;
476
547
  text?: string | undefined;
477
548
  }, {
478
549
  type: "assistant_turn";
@@ -487,6 +558,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
487
558
  input_tokens: number;
488
559
  output_tokens: number;
489
560
  permission_mode?: string | undefined;
561
+ agent_tool_use_id?: string | undefined;
490
562
  cache_read_tokens?: number | undefined;
491
563
  cache_creation_tokens?: number | undefined;
492
564
  text?: string | undefined;
@@ -499,6 +571,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
499
571
  } & {
500
572
  wall_ts: z.ZodString;
501
573
  sequence: z.ZodNumber;
574
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
502
575
  } & {
503
576
  type: z.ZodLiteral<"subagent_end">;
504
577
  agent_id: z.ZodString;
@@ -519,6 +592,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
519
592
  agent_transcript_path: string;
520
593
  last_assistant_message: string;
521
594
  permission_mode?: string | undefined;
595
+ agent_tool_use_id?: string | undefined;
522
596
  stop_hook_active?: boolean | undefined;
523
597
  }, {
524
598
  type: "subagent_end";
@@ -533,6 +607,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
533
607
  agent_transcript_path: string;
534
608
  last_assistant_message: string;
535
609
  permission_mode?: string | undefined;
610
+ agent_tool_use_id?: string | undefined;
536
611
  stop_hook_active?: boolean | undefined;
537
612
  }>, z.ZodObject<{
538
613
  session_id: z.ZodString;
@@ -543,6 +618,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
543
618
  } & {
544
619
  wall_ts: z.ZodString;
545
620
  sequence: z.ZodNumber;
621
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
546
622
  } & {
547
623
  type: z.ZodLiteral<"session_end">;
548
624
  last_assistant_message: z.ZodOptional<z.ZodString>;
@@ -556,6 +632,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
556
632
  wall_ts: string;
557
633
  sequence: number;
558
634
  permission_mode?: string | undefined;
635
+ agent_tool_use_id?: string | undefined;
559
636
  last_assistant_message?: string | undefined;
560
637
  stop_hook_active?: boolean | undefined;
561
638
  }, {
@@ -567,8 +644,44 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
567
644
  wall_ts: string;
568
645
  sequence: number;
569
646
  permission_mode?: string | undefined;
647
+ agent_tool_use_id?: string | undefined;
570
648
  last_assistant_message?: string | undefined;
571
649
  stop_hook_active?: boolean | undefined;
650
+ }>, z.ZodObject<{
651
+ session_id: z.ZodString;
652
+ transcript_path: z.ZodString;
653
+ cwd: z.ZodString;
654
+ hook_event_name: z.ZodString;
655
+ permission_mode: z.ZodOptional<z.ZodString>;
656
+ } & {
657
+ wall_ts: z.ZodString;
658
+ sequence: z.ZodNumber;
659
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
660
+ } & {
661
+ type: z.ZodLiteral<"session_close">;
662
+ reason: z.ZodOptional<z.ZodString>;
663
+ }, "strip", z.ZodTypeAny, {
664
+ type: "session_close";
665
+ session_id: string;
666
+ transcript_path: string;
667
+ cwd: string;
668
+ hook_event_name: string;
669
+ wall_ts: string;
670
+ sequence: number;
671
+ permission_mode?: string | undefined;
672
+ agent_tool_use_id?: string | undefined;
673
+ reason?: string | undefined;
674
+ }, {
675
+ type: "session_close";
676
+ session_id: string;
677
+ transcript_path: string;
678
+ cwd: string;
679
+ hook_event_name: string;
680
+ wall_ts: string;
681
+ sequence: number;
682
+ permission_mode?: string | undefined;
683
+ agent_tool_use_id?: string | undefined;
684
+ reason?: string | undefined;
572
685
  }>]>;
573
686
  type RuntapeEvent = z.infer<typeof RuntapeEvent>;
574
687
  declare const IngestionRequest: z.ZodObject<{
@@ -581,6 +694,7 @@ declare const IngestionRequest: z.ZodObject<{
581
694
  } & {
582
695
  wall_ts: z.ZodString;
583
696
  sequence: z.ZodNumber;
697
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
584
698
  } & {
585
699
  type: z.ZodLiteral<"session_start">;
586
700
  source: z.ZodString;
@@ -594,6 +708,7 @@ declare const IngestionRequest: z.ZodObject<{
594
708
  sequence: number;
595
709
  source: string;
596
710
  permission_mode?: string | undefined;
711
+ agent_tool_use_id?: string | undefined;
597
712
  }, {
598
713
  type: "session_start";
599
714
  session_id: string;
@@ -604,6 +719,7 @@ declare const IngestionRequest: z.ZodObject<{
604
719
  sequence: number;
605
720
  source: string;
606
721
  permission_mode?: string | undefined;
722
+ agent_tool_use_id?: string | undefined;
607
723
  }>, z.ZodObject<{
608
724
  session_id: z.ZodString;
609
725
  transcript_path: z.ZodString;
@@ -613,6 +729,7 @@ declare const IngestionRequest: z.ZodObject<{
613
729
  } & {
614
730
  wall_ts: z.ZodString;
615
731
  sequence: z.ZodNumber;
732
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
616
733
  } & {
617
734
  type: z.ZodLiteral<"user_prompt">;
618
735
  prompt: z.ZodString;
@@ -626,6 +743,7 @@ declare const IngestionRequest: z.ZodObject<{
626
743
  sequence: number;
627
744
  prompt: string;
628
745
  permission_mode?: string | undefined;
746
+ agent_tool_use_id?: string | undefined;
629
747
  }, {
630
748
  type: "user_prompt";
631
749
  session_id: string;
@@ -636,6 +754,7 @@ declare const IngestionRequest: z.ZodObject<{
636
754
  sequence: number;
637
755
  prompt: string;
638
756
  permission_mode?: string | undefined;
757
+ agent_tool_use_id?: string | undefined;
639
758
  }>, z.ZodObject<{
640
759
  session_id: z.ZodString;
641
760
  transcript_path: z.ZodString;
@@ -645,6 +764,7 @@ declare const IngestionRequest: z.ZodObject<{
645
764
  } & {
646
765
  wall_ts: z.ZodString;
647
766
  sequence: z.ZodNumber;
767
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
648
768
  } & {
649
769
  type: z.ZodLiteral<"tool_attempt">;
650
770
  tool_name: z.ZodString;
@@ -661,6 +781,7 @@ declare const IngestionRequest: z.ZodObject<{
661
781
  tool_name: string;
662
782
  tool_use_id: string;
663
783
  permission_mode?: string | undefined;
784
+ agent_tool_use_id?: string | undefined;
664
785
  tool_input?: unknown;
665
786
  }, {
666
787
  type: "tool_attempt";
@@ -673,6 +794,7 @@ declare const IngestionRequest: z.ZodObject<{
673
794
  tool_name: string;
674
795
  tool_use_id: string;
675
796
  permission_mode?: string | undefined;
797
+ agent_tool_use_id?: string | undefined;
676
798
  tool_input?: unknown;
677
799
  }>, z.ZodObject<{
678
800
  session_id: z.ZodString;
@@ -683,6 +805,7 @@ declare const IngestionRequest: z.ZodObject<{
683
805
  } & {
684
806
  wall_ts: z.ZodString;
685
807
  sequence: z.ZodNumber;
808
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
686
809
  } & {
687
810
  type: z.ZodLiteral<"tool_call">;
688
811
  tool_name: z.ZodString;
@@ -704,6 +827,7 @@ declare const IngestionRequest: z.ZodObject<{
704
827
  tool_use_id: string;
705
828
  duration_ms: number;
706
829
  permission_mode?: string | undefined;
830
+ agent_tool_use_id?: string | undefined;
707
831
  tool_input?: unknown;
708
832
  tool_response?: unknown;
709
833
  is_error?: boolean | undefined;
@@ -720,6 +844,7 @@ declare const IngestionRequest: z.ZodObject<{
720
844
  tool_use_id: string;
721
845
  duration_ms: number;
722
846
  permission_mode?: string | undefined;
847
+ agent_tool_use_id?: string | undefined;
723
848
  tool_input?: unknown;
724
849
  tool_response?: unknown;
725
850
  is_error?: boolean | undefined;
@@ -733,6 +858,7 @@ declare const IngestionRequest: z.ZodObject<{
733
858
  } & {
734
859
  wall_ts: z.ZodString;
735
860
  sequence: z.ZodNumber;
861
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
736
862
  } & {
737
863
  type: z.ZodLiteral<"assistant_turn">;
738
864
  message_uuid: z.ZodString;
@@ -757,6 +883,7 @@ declare const IngestionRequest: z.ZodObject<{
757
883
  cache_read_tokens: number;
758
884
  cache_creation_tokens: number;
759
885
  permission_mode?: string | undefined;
886
+ agent_tool_use_id?: string | undefined;
760
887
  text?: string | undefined;
761
888
  }, {
762
889
  type: "assistant_turn";
@@ -771,6 +898,7 @@ declare const IngestionRequest: z.ZodObject<{
771
898
  input_tokens: number;
772
899
  output_tokens: number;
773
900
  permission_mode?: string | undefined;
901
+ agent_tool_use_id?: string | undefined;
774
902
  cache_read_tokens?: number | undefined;
775
903
  cache_creation_tokens?: number | undefined;
776
904
  text?: string | undefined;
@@ -783,6 +911,7 @@ declare const IngestionRequest: z.ZodObject<{
783
911
  } & {
784
912
  wall_ts: z.ZodString;
785
913
  sequence: z.ZodNumber;
914
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
786
915
  } & {
787
916
  type: z.ZodLiteral<"subagent_end">;
788
917
  agent_id: z.ZodString;
@@ -803,6 +932,7 @@ declare const IngestionRequest: z.ZodObject<{
803
932
  agent_transcript_path: string;
804
933
  last_assistant_message: string;
805
934
  permission_mode?: string | undefined;
935
+ agent_tool_use_id?: string | undefined;
806
936
  stop_hook_active?: boolean | undefined;
807
937
  }, {
808
938
  type: "subagent_end";
@@ -817,6 +947,7 @@ declare const IngestionRequest: z.ZodObject<{
817
947
  agent_transcript_path: string;
818
948
  last_assistant_message: string;
819
949
  permission_mode?: string | undefined;
950
+ agent_tool_use_id?: string | undefined;
820
951
  stop_hook_active?: boolean | undefined;
821
952
  }>, z.ZodObject<{
822
953
  session_id: z.ZodString;
@@ -827,6 +958,7 @@ declare const IngestionRequest: z.ZodObject<{
827
958
  } & {
828
959
  wall_ts: z.ZodString;
829
960
  sequence: z.ZodNumber;
961
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
830
962
  } & {
831
963
  type: z.ZodLiteral<"session_end">;
832
964
  last_assistant_message: z.ZodOptional<z.ZodString>;
@@ -840,6 +972,7 @@ declare const IngestionRequest: z.ZodObject<{
840
972
  wall_ts: string;
841
973
  sequence: number;
842
974
  permission_mode?: string | undefined;
975
+ agent_tool_use_id?: string | undefined;
843
976
  last_assistant_message?: string | undefined;
844
977
  stop_hook_active?: boolean | undefined;
845
978
  }, {
@@ -851,8 +984,44 @@ declare const IngestionRequest: z.ZodObject<{
851
984
  wall_ts: string;
852
985
  sequence: number;
853
986
  permission_mode?: string | undefined;
987
+ agent_tool_use_id?: string | undefined;
854
988
  last_assistant_message?: string | undefined;
855
989
  stop_hook_active?: boolean | undefined;
990
+ }>, z.ZodObject<{
991
+ session_id: z.ZodString;
992
+ transcript_path: z.ZodString;
993
+ cwd: z.ZodString;
994
+ hook_event_name: z.ZodString;
995
+ permission_mode: z.ZodOptional<z.ZodString>;
996
+ } & {
997
+ wall_ts: z.ZodString;
998
+ sequence: z.ZodNumber;
999
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
1000
+ } & {
1001
+ type: z.ZodLiteral<"session_close">;
1002
+ reason: z.ZodOptional<z.ZodString>;
1003
+ }, "strip", z.ZodTypeAny, {
1004
+ type: "session_close";
1005
+ session_id: string;
1006
+ transcript_path: string;
1007
+ cwd: string;
1008
+ hook_event_name: string;
1009
+ wall_ts: string;
1010
+ sequence: number;
1011
+ permission_mode?: string | undefined;
1012
+ agent_tool_use_id?: string | undefined;
1013
+ reason?: string | undefined;
1014
+ }, {
1015
+ type: "session_close";
1016
+ session_id: string;
1017
+ transcript_path: string;
1018
+ cwd: string;
1019
+ hook_event_name: string;
1020
+ wall_ts: string;
1021
+ sequence: number;
1022
+ permission_mode?: string | undefined;
1023
+ agent_tool_use_id?: string | undefined;
1024
+ reason?: string | undefined;
856
1025
  }>]>, "many">;
857
1026
  }, "strip", z.ZodTypeAny, {
858
1027
  events: ({
@@ -865,6 +1034,7 @@ declare const IngestionRequest: z.ZodObject<{
865
1034
  sequence: number;
866
1035
  source: string;
867
1036
  permission_mode?: string | undefined;
1037
+ agent_tool_use_id?: string | undefined;
868
1038
  } | {
869
1039
  type: "user_prompt";
870
1040
  session_id: string;
@@ -875,6 +1045,7 @@ declare const IngestionRequest: z.ZodObject<{
875
1045
  sequence: number;
876
1046
  prompt: string;
877
1047
  permission_mode?: string | undefined;
1048
+ agent_tool_use_id?: string | undefined;
878
1049
  } | {
879
1050
  type: "tool_attempt";
880
1051
  session_id: string;
@@ -886,6 +1057,7 @@ declare const IngestionRequest: z.ZodObject<{
886
1057
  tool_name: string;
887
1058
  tool_use_id: string;
888
1059
  permission_mode?: string | undefined;
1060
+ agent_tool_use_id?: string | undefined;
889
1061
  tool_input?: unknown;
890
1062
  } | {
891
1063
  type: "tool_call";
@@ -899,6 +1071,7 @@ declare const IngestionRequest: z.ZodObject<{
899
1071
  tool_use_id: string;
900
1072
  duration_ms: number;
901
1073
  permission_mode?: string | undefined;
1074
+ agent_tool_use_id?: string | undefined;
902
1075
  tool_input?: unknown;
903
1076
  tool_response?: unknown;
904
1077
  is_error?: boolean | undefined;
@@ -918,6 +1091,7 @@ declare const IngestionRequest: z.ZodObject<{
918
1091
  cache_read_tokens: number;
919
1092
  cache_creation_tokens: number;
920
1093
  permission_mode?: string | undefined;
1094
+ agent_tool_use_id?: string | undefined;
921
1095
  text?: string | undefined;
922
1096
  } | {
923
1097
  type: "subagent_end";
@@ -932,6 +1106,7 @@ declare const IngestionRequest: z.ZodObject<{
932
1106
  agent_transcript_path: string;
933
1107
  last_assistant_message: string;
934
1108
  permission_mode?: string | undefined;
1109
+ agent_tool_use_id?: string | undefined;
935
1110
  stop_hook_active?: boolean | undefined;
936
1111
  } | {
937
1112
  type: "session_end";
@@ -942,8 +1117,20 @@ declare const IngestionRequest: z.ZodObject<{
942
1117
  wall_ts: string;
943
1118
  sequence: number;
944
1119
  permission_mode?: string | undefined;
1120
+ agent_tool_use_id?: string | undefined;
945
1121
  last_assistant_message?: string | undefined;
946
1122
  stop_hook_active?: boolean | undefined;
1123
+ } | {
1124
+ type: "session_close";
1125
+ session_id: string;
1126
+ transcript_path: string;
1127
+ cwd: string;
1128
+ hook_event_name: string;
1129
+ wall_ts: string;
1130
+ sequence: number;
1131
+ permission_mode?: string | undefined;
1132
+ agent_tool_use_id?: string | undefined;
1133
+ reason?: string | undefined;
947
1134
  })[];
948
1135
  }, {
949
1136
  events: ({
@@ -956,6 +1143,7 @@ declare const IngestionRequest: z.ZodObject<{
956
1143
  sequence: number;
957
1144
  source: string;
958
1145
  permission_mode?: string | undefined;
1146
+ agent_tool_use_id?: string | undefined;
959
1147
  } | {
960
1148
  type: "user_prompt";
961
1149
  session_id: string;
@@ -966,6 +1154,7 @@ declare const IngestionRequest: z.ZodObject<{
966
1154
  sequence: number;
967
1155
  prompt: string;
968
1156
  permission_mode?: string | undefined;
1157
+ agent_tool_use_id?: string | undefined;
969
1158
  } | {
970
1159
  type: "tool_attempt";
971
1160
  session_id: string;
@@ -977,6 +1166,7 @@ declare const IngestionRequest: z.ZodObject<{
977
1166
  tool_name: string;
978
1167
  tool_use_id: string;
979
1168
  permission_mode?: string | undefined;
1169
+ agent_tool_use_id?: string | undefined;
980
1170
  tool_input?: unknown;
981
1171
  } | {
982
1172
  type: "tool_call";
@@ -990,6 +1180,7 @@ declare const IngestionRequest: z.ZodObject<{
990
1180
  tool_use_id: string;
991
1181
  duration_ms: number;
992
1182
  permission_mode?: string | undefined;
1183
+ agent_tool_use_id?: string | undefined;
993
1184
  tool_input?: unknown;
994
1185
  tool_response?: unknown;
995
1186
  is_error?: boolean | undefined;
@@ -1007,6 +1198,7 @@ declare const IngestionRequest: z.ZodObject<{
1007
1198
  input_tokens: number;
1008
1199
  output_tokens: number;
1009
1200
  permission_mode?: string | undefined;
1201
+ agent_tool_use_id?: string | undefined;
1010
1202
  cache_read_tokens?: number | undefined;
1011
1203
  cache_creation_tokens?: number | undefined;
1012
1204
  text?: string | undefined;
@@ -1023,6 +1215,7 @@ declare const IngestionRequest: z.ZodObject<{
1023
1215
  agent_transcript_path: string;
1024
1216
  last_assistant_message: string;
1025
1217
  permission_mode?: string | undefined;
1218
+ agent_tool_use_id?: string | undefined;
1026
1219
  stop_hook_active?: boolean | undefined;
1027
1220
  } | {
1028
1221
  type: "session_end";
@@ -1033,8 +1226,20 @@ declare const IngestionRequest: z.ZodObject<{
1033
1226
  wall_ts: string;
1034
1227
  sequence: number;
1035
1228
  permission_mode?: string | undefined;
1229
+ agent_tool_use_id?: string | undefined;
1036
1230
  last_assistant_message?: string | undefined;
1037
1231
  stop_hook_active?: boolean | undefined;
1232
+ } | {
1233
+ type: "session_close";
1234
+ session_id: string;
1235
+ transcript_path: string;
1236
+ cwd: string;
1237
+ hook_event_name: string;
1238
+ wall_ts: string;
1239
+ sequence: number;
1240
+ permission_mode?: string | undefined;
1241
+ agent_tool_use_id?: string | undefined;
1242
+ reason?: string | undefined;
1038
1243
  })[];
1039
1244
  }>;
1040
1245
  type IngestionRequest = z.infer<typeof IngestionRequest>;
@@ -1044,25 +1249,25 @@ declare const IngestionResponse: z.ZodObject<{
1044
1249
  index: z.ZodNumber;
1045
1250
  reason: z.ZodString;
1046
1251
  }, "strip", z.ZodTypeAny, {
1047
- index: number;
1048
1252
  reason: string;
1049
- }, {
1050
1253
  index: number;
1254
+ }, {
1051
1255
  reason: string;
1256
+ index: number;
1052
1257
  }>, "many">>;
1053
1258
  }, "strip", z.ZodTypeAny, {
1054
1259
  accepted: number;
1055
1260
  errors: {
1056
- index: number;
1057
1261
  reason: string;
1262
+ index: number;
1058
1263
  }[];
1059
1264
  }, {
1060
1265
  accepted: number;
1061
1266
  errors?: {
1062
- index: number;
1063
1267
  reason: string;
1268
+ index: number;
1064
1269
  }[] | undefined;
1065
1270
  }>;
1066
1271
  type IngestionResponse = z.infer<typeof IngestionResponse>;
1067
1272
 
1068
- export { AssistantTurnEvent, IngestionRequest, IngestionResponse, RuntapeEvent, SessionEndEvent, SessionStartEvent, SubagentEndEvent, ToolAttemptEvent, ToolCallEvent, UserPromptEvent };
1273
+ export { AssistantTurnEvent, IngestionRequest, IngestionResponse, RuntapeEvent, SessionCloseEvent, SessionEndEvent, SessionStartEvent, SubagentEndEvent, ToolAttemptEvent, ToolCallEvent, UserPromptEvent };