runtape 0.2.0 → 0.3.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,29 +9,32 @@ 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;
15
16
  }, "strip", z.ZodTypeAny, {
16
- type: "session_start";
17
17
  session_id: string;
18
18
  transcript_path: string;
19
19
  cwd: string;
20
20
  hook_event_name: string;
21
+ type: "session_start";
21
22
  wall_ts: string;
22
23
  sequence: number;
23
24
  source: string;
24
25
  permission_mode?: string | undefined;
26
+ agent_tool_use_id?: string | undefined;
25
27
  }, {
26
- type: "session_start";
27
28
  session_id: string;
28
29
  transcript_path: string;
29
30
  cwd: string;
30
31
  hook_event_name: string;
32
+ type: "session_start";
31
33
  wall_ts: string;
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,29 +45,32 @@ 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;
48
52
  }, "strip", z.ZodTypeAny, {
49
- type: "user_prompt";
50
53
  session_id: string;
51
54
  transcript_path: string;
52
55
  cwd: string;
53
56
  hook_event_name: string;
57
+ type: "user_prompt";
54
58
  wall_ts: string;
55
59
  sequence: number;
56
60
  prompt: string;
57
61
  permission_mode?: string | undefined;
62
+ agent_tool_use_id?: string | undefined;
58
63
  }, {
59
- type: "user_prompt";
60
64
  session_id: string;
61
65
  transcript_path: string;
62
66
  cwd: string;
63
67
  hook_event_name: string;
68
+ type: "user_prompt";
64
69
  wall_ts: string;
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,34 +81,37 @@ 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;
81
88
  tool_input: z.ZodUnknown;
82
89
  tool_use_id: z.ZodString;
83
90
  }, "strip", z.ZodTypeAny, {
84
- type: "tool_attempt";
85
91
  session_id: string;
86
92
  transcript_path: string;
87
93
  cwd: string;
88
94
  hook_event_name: string;
95
+ type: "tool_attempt";
89
96
  wall_ts: string;
90
97
  sequence: number;
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
- type: "tool_attempt";
97
104
  session_id: string;
98
105
  transcript_path: string;
99
106
  cwd: string;
100
107
  hook_event_name: string;
108
+ type: "tool_attempt";
101
109
  wall_ts: string;
102
110
  sequence: number;
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;
@@ -124,33 +134,35 @@ declare const ToolCallEvent: z.ZodObject<{
124
134
  is_error: z.ZodOptional<z.ZodBoolean>;
125
135
  error_message: z.ZodOptional<z.ZodString>;
126
136
  }, "strip", z.ZodTypeAny, {
127
- type: "tool_call";
128
137
  session_id: string;
129
138
  transcript_path: string;
130
139
  cwd: string;
131
140
  hook_event_name: string;
141
+ type: "tool_call";
132
142
  wall_ts: string;
133
143
  sequence: number;
134
144
  tool_name: string;
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;
141
152
  error_message?: string | undefined;
142
153
  }, {
143
- type: "tool_call";
144
154
  session_id: string;
145
155
  transcript_path: string;
146
156
  cwd: string;
147
157
  hook_event_name: string;
158
+ type: "tool_call";
148
159
  wall_ts: string;
149
160
  sequence: number;
150
161
  tool_name: string;
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;
@@ -175,11 +188,11 @@ declare const AssistantTurnEvent: z.ZodObject<{
175
188
  cache_creation_tokens: z.ZodDefault<z.ZodNumber>;
176
189
  text: z.ZodOptional<z.ZodString>;
177
190
  }, "strip", z.ZodTypeAny, {
178
- type: "assistant_turn";
179
191
  session_id: string;
180
192
  transcript_path: string;
181
193
  cwd: string;
182
194
  hook_event_name: string;
195
+ type: "assistant_turn";
183
196
  wall_ts: string;
184
197
  sequence: number;
185
198
  message_uuid: string;
@@ -189,13 +202,14 @@ 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
- type: "assistant_turn";
195
208
  session_id: string;
196
209
  transcript_path: string;
197
210
  cwd: string;
198
211
  hook_event_name: string;
212
+ type: "assistant_turn";
199
213
  wall_ts: string;
200
214
  sequence: number;
201
215
  message_uuid: string;
@@ -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;
@@ -224,11 +240,11 @@ declare const SubagentEndEvent: z.ZodObject<{
224
240
  last_assistant_message: z.ZodString;
225
241
  stop_hook_active: z.ZodOptional<z.ZodBoolean>;
226
242
  }, "strip", z.ZodTypeAny, {
227
- type: "subagent_end";
228
243
  session_id: string;
229
244
  transcript_path: string;
230
245
  cwd: string;
231
246
  hook_event_name: string;
247
+ type: "subagent_end";
232
248
  wall_ts: string;
233
249
  sequence: number;
234
250
  agent_id: string;
@@ -236,13 +252,14 @@ 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
- type: "subagent_end";
242
258
  session_id: string;
243
259
  transcript_path: string;
244
260
  cwd: string;
245
261
  hook_event_name: string;
262
+ type: "subagent_end";
246
263
  wall_ts: string;
247
264
  sequence: number;
248
265
  agent_id: string;
@@ -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,30 +279,33 @@ 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>;
267
286
  stop_hook_active: z.ZodOptional<z.ZodBoolean>;
268
287
  }, "strip", z.ZodTypeAny, {
269
- type: "session_end";
270
288
  session_id: string;
271
289
  transcript_path: string;
272
290
  cwd: string;
273
291
  hook_event_name: string;
292
+ type: "session_end";
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
  }, {
280
- type: "session_end";
281
300
  session_id: string;
282
301
  transcript_path: string;
283
302
  cwd: string;
284
303
  hook_event_name: string;
304
+ type: "session_end";
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
  }>;
@@ -297,29 +318,32 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
297
318
  } & {
298
319
  wall_ts: z.ZodString;
299
320
  sequence: z.ZodNumber;
321
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
300
322
  } & {
301
323
  type: z.ZodLiteral<"session_start">;
302
324
  source: z.ZodString;
303
325
  }, "strip", z.ZodTypeAny, {
304
- type: "session_start";
305
326
  session_id: string;
306
327
  transcript_path: string;
307
328
  cwd: string;
308
329
  hook_event_name: string;
330
+ type: "session_start";
309
331
  wall_ts: string;
310
332
  sequence: number;
311
333
  source: string;
312
334
  permission_mode?: string | undefined;
335
+ agent_tool_use_id?: string | undefined;
313
336
  }, {
314
- type: "session_start";
315
337
  session_id: string;
316
338
  transcript_path: string;
317
339
  cwd: string;
318
340
  hook_event_name: string;
341
+ type: "session_start";
319
342
  wall_ts: string;
320
343
  sequence: number;
321
344
  source: string;
322
345
  permission_mode?: string | undefined;
346
+ agent_tool_use_id?: string | undefined;
323
347
  }>, z.ZodObject<{
324
348
  session_id: z.ZodString;
325
349
  transcript_path: z.ZodString;
@@ -329,29 +353,32 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
329
353
  } & {
330
354
  wall_ts: z.ZodString;
331
355
  sequence: z.ZodNumber;
356
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
332
357
  } & {
333
358
  type: z.ZodLiteral<"user_prompt">;
334
359
  prompt: z.ZodString;
335
360
  }, "strip", z.ZodTypeAny, {
336
- type: "user_prompt";
337
361
  session_id: string;
338
362
  transcript_path: string;
339
363
  cwd: string;
340
364
  hook_event_name: string;
365
+ type: "user_prompt";
341
366
  wall_ts: string;
342
367
  sequence: number;
343
368
  prompt: string;
344
369
  permission_mode?: string | undefined;
370
+ agent_tool_use_id?: string | undefined;
345
371
  }, {
346
- type: "user_prompt";
347
372
  session_id: string;
348
373
  transcript_path: string;
349
374
  cwd: string;
350
375
  hook_event_name: string;
376
+ type: "user_prompt";
351
377
  wall_ts: string;
352
378
  sequence: number;
353
379
  prompt: string;
354
380
  permission_mode?: string | undefined;
381
+ agent_tool_use_id?: string | undefined;
355
382
  }>, z.ZodObject<{
356
383
  session_id: z.ZodString;
357
384
  transcript_path: z.ZodString;
@@ -361,34 +388,37 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
361
388
  } & {
362
389
  wall_ts: z.ZodString;
363
390
  sequence: z.ZodNumber;
391
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
364
392
  } & {
365
393
  type: z.ZodLiteral<"tool_attempt">;
366
394
  tool_name: z.ZodString;
367
395
  tool_input: z.ZodUnknown;
368
396
  tool_use_id: z.ZodString;
369
397
  }, "strip", z.ZodTypeAny, {
370
- type: "tool_attempt";
371
398
  session_id: string;
372
399
  transcript_path: string;
373
400
  cwd: string;
374
401
  hook_event_name: string;
402
+ type: "tool_attempt";
375
403
  wall_ts: string;
376
404
  sequence: number;
377
405
  tool_name: string;
378
406
  tool_use_id: string;
379
407
  permission_mode?: string | undefined;
408
+ agent_tool_use_id?: string | undefined;
380
409
  tool_input?: unknown;
381
410
  }, {
382
- type: "tool_attempt";
383
411
  session_id: string;
384
412
  transcript_path: string;
385
413
  cwd: string;
386
414
  hook_event_name: string;
415
+ type: "tool_attempt";
387
416
  wall_ts: string;
388
417
  sequence: number;
389
418
  tool_name: string;
390
419
  tool_use_id: string;
391
420
  permission_mode?: string | undefined;
421
+ agent_tool_use_id?: string | undefined;
392
422
  tool_input?: unknown;
393
423
  }>, z.ZodObject<{
394
424
  session_id: z.ZodString;
@@ -399,6 +429,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
399
429
  } & {
400
430
  wall_ts: z.ZodString;
401
431
  sequence: z.ZodNumber;
432
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
402
433
  } & {
403
434
  type: z.ZodLiteral<"tool_call">;
404
435
  tool_name: z.ZodString;
@@ -409,33 +440,35 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
409
440
  is_error: z.ZodOptional<z.ZodBoolean>;
410
441
  error_message: z.ZodOptional<z.ZodString>;
411
442
  }, "strip", z.ZodTypeAny, {
412
- type: "tool_call";
413
443
  session_id: string;
414
444
  transcript_path: string;
415
445
  cwd: string;
416
446
  hook_event_name: string;
447
+ type: "tool_call";
417
448
  wall_ts: string;
418
449
  sequence: number;
419
450
  tool_name: string;
420
451
  tool_use_id: string;
421
452
  duration_ms: number;
422
453
  permission_mode?: string | undefined;
454
+ agent_tool_use_id?: string | undefined;
423
455
  tool_input?: unknown;
424
456
  tool_response?: unknown;
425
457
  is_error?: boolean | undefined;
426
458
  error_message?: string | undefined;
427
459
  }, {
428
- type: "tool_call";
429
460
  session_id: string;
430
461
  transcript_path: string;
431
462
  cwd: string;
432
463
  hook_event_name: string;
464
+ type: "tool_call";
433
465
  wall_ts: string;
434
466
  sequence: number;
435
467
  tool_name: string;
436
468
  tool_use_id: string;
437
469
  duration_ms: number;
438
470
  permission_mode?: string | undefined;
471
+ agent_tool_use_id?: string | undefined;
439
472
  tool_input?: unknown;
440
473
  tool_response?: unknown;
441
474
  is_error?: boolean | undefined;
@@ -449,6 +482,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
449
482
  } & {
450
483
  wall_ts: z.ZodString;
451
484
  sequence: z.ZodNumber;
485
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
452
486
  } & {
453
487
  type: z.ZodLiteral<"assistant_turn">;
454
488
  message_uuid: z.ZodString;
@@ -459,11 +493,11 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
459
493
  cache_creation_tokens: z.ZodDefault<z.ZodNumber>;
460
494
  text: z.ZodOptional<z.ZodString>;
461
495
  }, "strip", z.ZodTypeAny, {
462
- type: "assistant_turn";
463
496
  session_id: string;
464
497
  transcript_path: string;
465
498
  cwd: string;
466
499
  hook_event_name: string;
500
+ type: "assistant_turn";
467
501
  wall_ts: string;
468
502
  sequence: number;
469
503
  message_uuid: string;
@@ -473,13 +507,14 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
473
507
  cache_read_tokens: number;
474
508
  cache_creation_tokens: number;
475
509
  permission_mode?: string | undefined;
510
+ agent_tool_use_id?: string | undefined;
476
511
  text?: string | undefined;
477
512
  }, {
478
- type: "assistant_turn";
479
513
  session_id: string;
480
514
  transcript_path: string;
481
515
  cwd: string;
482
516
  hook_event_name: string;
517
+ type: "assistant_turn";
483
518
  wall_ts: string;
484
519
  sequence: number;
485
520
  message_uuid: string;
@@ -487,6 +522,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
487
522
  input_tokens: number;
488
523
  output_tokens: number;
489
524
  permission_mode?: string | undefined;
525
+ agent_tool_use_id?: string | undefined;
490
526
  cache_read_tokens?: number | undefined;
491
527
  cache_creation_tokens?: number | undefined;
492
528
  text?: string | undefined;
@@ -499,6 +535,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
499
535
  } & {
500
536
  wall_ts: z.ZodString;
501
537
  sequence: z.ZodNumber;
538
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
502
539
  } & {
503
540
  type: z.ZodLiteral<"subagent_end">;
504
541
  agent_id: z.ZodString;
@@ -507,11 +544,11 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
507
544
  last_assistant_message: z.ZodString;
508
545
  stop_hook_active: z.ZodOptional<z.ZodBoolean>;
509
546
  }, "strip", z.ZodTypeAny, {
510
- type: "subagent_end";
511
547
  session_id: string;
512
548
  transcript_path: string;
513
549
  cwd: string;
514
550
  hook_event_name: string;
551
+ type: "subagent_end";
515
552
  wall_ts: string;
516
553
  sequence: number;
517
554
  agent_id: string;
@@ -519,13 +556,14 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
519
556
  agent_transcript_path: string;
520
557
  last_assistant_message: string;
521
558
  permission_mode?: string | undefined;
559
+ agent_tool_use_id?: string | undefined;
522
560
  stop_hook_active?: boolean | undefined;
523
561
  }, {
524
- type: "subagent_end";
525
562
  session_id: string;
526
563
  transcript_path: string;
527
564
  cwd: string;
528
565
  hook_event_name: string;
566
+ type: "subagent_end";
529
567
  wall_ts: string;
530
568
  sequence: number;
531
569
  agent_id: string;
@@ -533,6 +571,7 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
533
571
  agent_transcript_path: string;
534
572
  last_assistant_message: string;
535
573
  permission_mode?: string | undefined;
574
+ agent_tool_use_id?: string | undefined;
536
575
  stop_hook_active?: boolean | undefined;
537
576
  }>, z.ZodObject<{
538
577
  session_id: z.ZodString;
@@ -543,30 +582,33 @@ declare const RuntapeEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
543
582
  } & {
544
583
  wall_ts: z.ZodString;
545
584
  sequence: z.ZodNumber;
585
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
546
586
  } & {
547
587
  type: z.ZodLiteral<"session_end">;
548
588
  last_assistant_message: z.ZodOptional<z.ZodString>;
549
589
  stop_hook_active: z.ZodOptional<z.ZodBoolean>;
550
590
  }, "strip", z.ZodTypeAny, {
551
- type: "session_end";
552
591
  session_id: string;
553
592
  transcript_path: string;
554
593
  cwd: string;
555
594
  hook_event_name: string;
595
+ type: "session_end";
556
596
  wall_ts: string;
557
597
  sequence: number;
558
598
  permission_mode?: string | undefined;
599
+ agent_tool_use_id?: string | undefined;
559
600
  last_assistant_message?: string | undefined;
560
601
  stop_hook_active?: boolean | undefined;
561
602
  }, {
562
- type: "session_end";
563
603
  session_id: string;
564
604
  transcript_path: string;
565
605
  cwd: string;
566
606
  hook_event_name: string;
607
+ type: "session_end";
567
608
  wall_ts: string;
568
609
  sequence: number;
569
610
  permission_mode?: string | undefined;
611
+ agent_tool_use_id?: string | undefined;
570
612
  last_assistant_message?: string | undefined;
571
613
  stop_hook_active?: boolean | undefined;
572
614
  }>]>;
@@ -581,29 +623,32 @@ declare const IngestionRequest: z.ZodObject<{
581
623
  } & {
582
624
  wall_ts: z.ZodString;
583
625
  sequence: z.ZodNumber;
626
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
584
627
  } & {
585
628
  type: z.ZodLiteral<"session_start">;
586
629
  source: z.ZodString;
587
630
  }, "strip", z.ZodTypeAny, {
588
- type: "session_start";
589
631
  session_id: string;
590
632
  transcript_path: string;
591
633
  cwd: string;
592
634
  hook_event_name: string;
635
+ type: "session_start";
593
636
  wall_ts: string;
594
637
  sequence: number;
595
638
  source: string;
596
639
  permission_mode?: string | undefined;
640
+ agent_tool_use_id?: string | undefined;
597
641
  }, {
598
- type: "session_start";
599
642
  session_id: string;
600
643
  transcript_path: string;
601
644
  cwd: string;
602
645
  hook_event_name: string;
646
+ type: "session_start";
603
647
  wall_ts: string;
604
648
  sequence: number;
605
649
  source: string;
606
650
  permission_mode?: string | undefined;
651
+ agent_tool_use_id?: string | undefined;
607
652
  }>, z.ZodObject<{
608
653
  session_id: z.ZodString;
609
654
  transcript_path: z.ZodString;
@@ -613,29 +658,32 @@ declare const IngestionRequest: z.ZodObject<{
613
658
  } & {
614
659
  wall_ts: z.ZodString;
615
660
  sequence: z.ZodNumber;
661
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
616
662
  } & {
617
663
  type: z.ZodLiteral<"user_prompt">;
618
664
  prompt: z.ZodString;
619
665
  }, "strip", z.ZodTypeAny, {
620
- type: "user_prompt";
621
666
  session_id: string;
622
667
  transcript_path: string;
623
668
  cwd: string;
624
669
  hook_event_name: string;
670
+ type: "user_prompt";
625
671
  wall_ts: string;
626
672
  sequence: number;
627
673
  prompt: string;
628
674
  permission_mode?: string | undefined;
675
+ agent_tool_use_id?: string | undefined;
629
676
  }, {
630
- type: "user_prompt";
631
677
  session_id: string;
632
678
  transcript_path: string;
633
679
  cwd: string;
634
680
  hook_event_name: string;
681
+ type: "user_prompt";
635
682
  wall_ts: string;
636
683
  sequence: number;
637
684
  prompt: string;
638
685
  permission_mode?: string | undefined;
686
+ agent_tool_use_id?: string | undefined;
639
687
  }>, z.ZodObject<{
640
688
  session_id: z.ZodString;
641
689
  transcript_path: z.ZodString;
@@ -645,34 +693,37 @@ declare const IngestionRequest: z.ZodObject<{
645
693
  } & {
646
694
  wall_ts: z.ZodString;
647
695
  sequence: z.ZodNumber;
696
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
648
697
  } & {
649
698
  type: z.ZodLiteral<"tool_attempt">;
650
699
  tool_name: z.ZodString;
651
700
  tool_input: z.ZodUnknown;
652
701
  tool_use_id: z.ZodString;
653
702
  }, "strip", z.ZodTypeAny, {
654
- type: "tool_attempt";
655
703
  session_id: string;
656
704
  transcript_path: string;
657
705
  cwd: string;
658
706
  hook_event_name: string;
707
+ type: "tool_attempt";
659
708
  wall_ts: string;
660
709
  sequence: number;
661
710
  tool_name: string;
662
711
  tool_use_id: string;
663
712
  permission_mode?: string | undefined;
713
+ agent_tool_use_id?: string | undefined;
664
714
  tool_input?: unknown;
665
715
  }, {
666
- type: "tool_attempt";
667
716
  session_id: string;
668
717
  transcript_path: string;
669
718
  cwd: string;
670
719
  hook_event_name: string;
720
+ type: "tool_attempt";
671
721
  wall_ts: string;
672
722
  sequence: number;
673
723
  tool_name: string;
674
724
  tool_use_id: string;
675
725
  permission_mode?: string | undefined;
726
+ agent_tool_use_id?: string | undefined;
676
727
  tool_input?: unknown;
677
728
  }>, z.ZodObject<{
678
729
  session_id: z.ZodString;
@@ -683,6 +734,7 @@ declare const IngestionRequest: z.ZodObject<{
683
734
  } & {
684
735
  wall_ts: z.ZodString;
685
736
  sequence: z.ZodNumber;
737
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
686
738
  } & {
687
739
  type: z.ZodLiteral<"tool_call">;
688
740
  tool_name: z.ZodString;
@@ -693,33 +745,35 @@ declare const IngestionRequest: z.ZodObject<{
693
745
  is_error: z.ZodOptional<z.ZodBoolean>;
694
746
  error_message: z.ZodOptional<z.ZodString>;
695
747
  }, "strip", z.ZodTypeAny, {
696
- type: "tool_call";
697
748
  session_id: string;
698
749
  transcript_path: string;
699
750
  cwd: string;
700
751
  hook_event_name: string;
752
+ type: "tool_call";
701
753
  wall_ts: string;
702
754
  sequence: number;
703
755
  tool_name: string;
704
756
  tool_use_id: string;
705
757
  duration_ms: number;
706
758
  permission_mode?: string | undefined;
759
+ agent_tool_use_id?: string | undefined;
707
760
  tool_input?: unknown;
708
761
  tool_response?: unknown;
709
762
  is_error?: boolean | undefined;
710
763
  error_message?: string | undefined;
711
764
  }, {
712
- type: "tool_call";
713
765
  session_id: string;
714
766
  transcript_path: string;
715
767
  cwd: string;
716
768
  hook_event_name: string;
769
+ type: "tool_call";
717
770
  wall_ts: string;
718
771
  sequence: number;
719
772
  tool_name: string;
720
773
  tool_use_id: string;
721
774
  duration_ms: number;
722
775
  permission_mode?: string | undefined;
776
+ agent_tool_use_id?: string | undefined;
723
777
  tool_input?: unknown;
724
778
  tool_response?: unknown;
725
779
  is_error?: boolean | undefined;
@@ -733,6 +787,7 @@ declare const IngestionRequest: z.ZodObject<{
733
787
  } & {
734
788
  wall_ts: z.ZodString;
735
789
  sequence: z.ZodNumber;
790
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
736
791
  } & {
737
792
  type: z.ZodLiteral<"assistant_turn">;
738
793
  message_uuid: z.ZodString;
@@ -743,11 +798,11 @@ declare const IngestionRequest: z.ZodObject<{
743
798
  cache_creation_tokens: z.ZodDefault<z.ZodNumber>;
744
799
  text: z.ZodOptional<z.ZodString>;
745
800
  }, "strip", z.ZodTypeAny, {
746
- type: "assistant_turn";
747
801
  session_id: string;
748
802
  transcript_path: string;
749
803
  cwd: string;
750
804
  hook_event_name: string;
805
+ type: "assistant_turn";
751
806
  wall_ts: string;
752
807
  sequence: number;
753
808
  message_uuid: string;
@@ -757,13 +812,14 @@ declare const IngestionRequest: z.ZodObject<{
757
812
  cache_read_tokens: number;
758
813
  cache_creation_tokens: number;
759
814
  permission_mode?: string | undefined;
815
+ agent_tool_use_id?: string | undefined;
760
816
  text?: string | undefined;
761
817
  }, {
762
- type: "assistant_turn";
763
818
  session_id: string;
764
819
  transcript_path: string;
765
820
  cwd: string;
766
821
  hook_event_name: string;
822
+ type: "assistant_turn";
767
823
  wall_ts: string;
768
824
  sequence: number;
769
825
  message_uuid: string;
@@ -771,6 +827,7 @@ declare const IngestionRequest: z.ZodObject<{
771
827
  input_tokens: number;
772
828
  output_tokens: number;
773
829
  permission_mode?: string | undefined;
830
+ agent_tool_use_id?: string | undefined;
774
831
  cache_read_tokens?: number | undefined;
775
832
  cache_creation_tokens?: number | undefined;
776
833
  text?: string | undefined;
@@ -783,6 +840,7 @@ declare const IngestionRequest: z.ZodObject<{
783
840
  } & {
784
841
  wall_ts: z.ZodString;
785
842
  sequence: z.ZodNumber;
843
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
786
844
  } & {
787
845
  type: z.ZodLiteral<"subagent_end">;
788
846
  agent_id: z.ZodString;
@@ -791,11 +849,11 @@ declare const IngestionRequest: z.ZodObject<{
791
849
  last_assistant_message: z.ZodString;
792
850
  stop_hook_active: z.ZodOptional<z.ZodBoolean>;
793
851
  }, "strip", z.ZodTypeAny, {
794
- type: "subagent_end";
795
852
  session_id: string;
796
853
  transcript_path: string;
797
854
  cwd: string;
798
855
  hook_event_name: string;
856
+ type: "subagent_end";
799
857
  wall_ts: string;
800
858
  sequence: number;
801
859
  agent_id: string;
@@ -803,13 +861,14 @@ declare const IngestionRequest: z.ZodObject<{
803
861
  agent_transcript_path: string;
804
862
  last_assistant_message: string;
805
863
  permission_mode?: string | undefined;
864
+ agent_tool_use_id?: string | undefined;
806
865
  stop_hook_active?: boolean | undefined;
807
866
  }, {
808
- type: "subagent_end";
809
867
  session_id: string;
810
868
  transcript_path: string;
811
869
  cwd: string;
812
870
  hook_event_name: string;
871
+ type: "subagent_end";
813
872
  wall_ts: string;
814
873
  sequence: number;
815
874
  agent_id: string;
@@ -817,6 +876,7 @@ declare const IngestionRequest: z.ZodObject<{
817
876
  agent_transcript_path: string;
818
877
  last_assistant_message: string;
819
878
  permission_mode?: string | undefined;
879
+ agent_tool_use_id?: string | undefined;
820
880
  stop_hook_active?: boolean | undefined;
821
881
  }>, z.ZodObject<{
822
882
  session_id: z.ZodString;
@@ -827,88 +887,95 @@ declare const IngestionRequest: z.ZodObject<{
827
887
  } & {
828
888
  wall_ts: z.ZodString;
829
889
  sequence: z.ZodNumber;
890
+ agent_tool_use_id: z.ZodOptional<z.ZodString>;
830
891
  } & {
831
892
  type: z.ZodLiteral<"session_end">;
832
893
  last_assistant_message: z.ZodOptional<z.ZodString>;
833
894
  stop_hook_active: z.ZodOptional<z.ZodBoolean>;
834
895
  }, "strip", z.ZodTypeAny, {
835
- type: "session_end";
836
896
  session_id: string;
837
897
  transcript_path: string;
838
898
  cwd: string;
839
899
  hook_event_name: string;
900
+ type: "session_end";
840
901
  wall_ts: string;
841
902
  sequence: number;
842
903
  permission_mode?: string | undefined;
904
+ agent_tool_use_id?: string | undefined;
843
905
  last_assistant_message?: string | undefined;
844
906
  stop_hook_active?: boolean | undefined;
845
907
  }, {
846
- type: "session_end";
847
908
  session_id: string;
848
909
  transcript_path: string;
849
910
  cwd: string;
850
911
  hook_event_name: string;
912
+ type: "session_end";
851
913
  wall_ts: string;
852
914
  sequence: number;
853
915
  permission_mode?: string | undefined;
916
+ agent_tool_use_id?: string | undefined;
854
917
  last_assistant_message?: string | undefined;
855
918
  stop_hook_active?: boolean | undefined;
856
919
  }>]>, "many">;
857
920
  }, "strip", z.ZodTypeAny, {
858
921
  events: ({
859
- type: "session_start";
860
922
  session_id: string;
861
923
  transcript_path: string;
862
924
  cwd: string;
863
925
  hook_event_name: string;
926
+ type: "session_start";
864
927
  wall_ts: string;
865
928
  sequence: number;
866
929
  source: string;
867
930
  permission_mode?: string | undefined;
931
+ agent_tool_use_id?: string | undefined;
868
932
  } | {
869
- type: "user_prompt";
870
933
  session_id: string;
871
934
  transcript_path: string;
872
935
  cwd: string;
873
936
  hook_event_name: string;
937
+ type: "user_prompt";
874
938
  wall_ts: string;
875
939
  sequence: number;
876
940
  prompt: string;
877
941
  permission_mode?: string | undefined;
942
+ agent_tool_use_id?: string | undefined;
878
943
  } | {
879
- type: "tool_attempt";
880
944
  session_id: string;
881
945
  transcript_path: string;
882
946
  cwd: string;
883
947
  hook_event_name: string;
948
+ type: "tool_attempt";
884
949
  wall_ts: string;
885
950
  sequence: number;
886
951
  tool_name: string;
887
952
  tool_use_id: string;
888
953
  permission_mode?: string | undefined;
954
+ agent_tool_use_id?: string | undefined;
889
955
  tool_input?: unknown;
890
956
  } | {
891
- type: "tool_call";
892
957
  session_id: string;
893
958
  transcript_path: string;
894
959
  cwd: string;
895
960
  hook_event_name: string;
961
+ type: "tool_call";
896
962
  wall_ts: string;
897
963
  sequence: number;
898
964
  tool_name: string;
899
965
  tool_use_id: string;
900
966
  duration_ms: number;
901
967
  permission_mode?: string | undefined;
968
+ agent_tool_use_id?: string | undefined;
902
969
  tool_input?: unknown;
903
970
  tool_response?: unknown;
904
971
  is_error?: boolean | undefined;
905
972
  error_message?: string | undefined;
906
973
  } | {
907
- type: "assistant_turn";
908
974
  session_id: string;
909
975
  transcript_path: string;
910
976
  cwd: string;
911
977
  hook_event_name: string;
978
+ type: "assistant_turn";
912
979
  wall_ts: string;
913
980
  sequence: number;
914
981
  message_uuid: string;
@@ -918,13 +985,14 @@ declare const IngestionRequest: z.ZodObject<{
918
985
  cache_read_tokens: number;
919
986
  cache_creation_tokens: number;
920
987
  permission_mode?: string | undefined;
988
+ agent_tool_use_id?: string | undefined;
921
989
  text?: string | undefined;
922
990
  } | {
923
- type: "subagent_end";
924
991
  session_id: string;
925
992
  transcript_path: string;
926
993
  cwd: string;
927
994
  hook_event_name: string;
995
+ type: "subagent_end";
928
996
  wall_ts: string;
929
997
  sequence: number;
930
998
  agent_id: string;
@@ -932,74 +1000,80 @@ declare const IngestionRequest: z.ZodObject<{
932
1000
  agent_transcript_path: string;
933
1001
  last_assistant_message: string;
934
1002
  permission_mode?: string | undefined;
1003
+ agent_tool_use_id?: string | undefined;
935
1004
  stop_hook_active?: boolean | undefined;
936
1005
  } | {
937
- type: "session_end";
938
1006
  session_id: string;
939
1007
  transcript_path: string;
940
1008
  cwd: string;
941
1009
  hook_event_name: string;
1010
+ type: "session_end";
942
1011
  wall_ts: string;
943
1012
  sequence: number;
944
1013
  permission_mode?: string | undefined;
1014
+ agent_tool_use_id?: string | undefined;
945
1015
  last_assistant_message?: string | undefined;
946
1016
  stop_hook_active?: boolean | undefined;
947
1017
  })[];
948
1018
  }, {
949
1019
  events: ({
950
- type: "session_start";
951
1020
  session_id: string;
952
1021
  transcript_path: string;
953
1022
  cwd: string;
954
1023
  hook_event_name: string;
1024
+ type: "session_start";
955
1025
  wall_ts: string;
956
1026
  sequence: number;
957
1027
  source: string;
958
1028
  permission_mode?: string | undefined;
1029
+ agent_tool_use_id?: string | undefined;
959
1030
  } | {
960
- type: "user_prompt";
961
1031
  session_id: string;
962
1032
  transcript_path: string;
963
1033
  cwd: string;
964
1034
  hook_event_name: string;
1035
+ type: "user_prompt";
965
1036
  wall_ts: string;
966
1037
  sequence: number;
967
1038
  prompt: string;
968
1039
  permission_mode?: string | undefined;
1040
+ agent_tool_use_id?: string | undefined;
969
1041
  } | {
970
- type: "tool_attempt";
971
1042
  session_id: string;
972
1043
  transcript_path: string;
973
1044
  cwd: string;
974
1045
  hook_event_name: string;
1046
+ type: "tool_attempt";
975
1047
  wall_ts: string;
976
1048
  sequence: number;
977
1049
  tool_name: string;
978
1050
  tool_use_id: string;
979
1051
  permission_mode?: string | undefined;
1052
+ agent_tool_use_id?: string | undefined;
980
1053
  tool_input?: unknown;
981
1054
  } | {
982
- type: "tool_call";
983
1055
  session_id: string;
984
1056
  transcript_path: string;
985
1057
  cwd: string;
986
1058
  hook_event_name: string;
1059
+ type: "tool_call";
987
1060
  wall_ts: string;
988
1061
  sequence: number;
989
1062
  tool_name: string;
990
1063
  tool_use_id: string;
991
1064
  duration_ms: number;
992
1065
  permission_mode?: string | undefined;
1066
+ agent_tool_use_id?: string | undefined;
993
1067
  tool_input?: unknown;
994
1068
  tool_response?: unknown;
995
1069
  is_error?: boolean | undefined;
996
1070
  error_message?: string | undefined;
997
1071
  } | {
998
- type: "assistant_turn";
999
1072
  session_id: string;
1000
1073
  transcript_path: string;
1001
1074
  cwd: string;
1002
1075
  hook_event_name: string;
1076
+ type: "assistant_turn";
1003
1077
  wall_ts: string;
1004
1078
  sequence: number;
1005
1079
  message_uuid: string;
@@ -1007,15 +1081,16 @@ declare const IngestionRequest: z.ZodObject<{
1007
1081
  input_tokens: number;
1008
1082
  output_tokens: number;
1009
1083
  permission_mode?: string | undefined;
1084
+ agent_tool_use_id?: string | undefined;
1010
1085
  cache_read_tokens?: number | undefined;
1011
1086
  cache_creation_tokens?: number | undefined;
1012
1087
  text?: string | undefined;
1013
1088
  } | {
1014
- type: "subagent_end";
1015
1089
  session_id: string;
1016
1090
  transcript_path: string;
1017
1091
  cwd: string;
1018
1092
  hook_event_name: string;
1093
+ type: "subagent_end";
1019
1094
  wall_ts: string;
1020
1095
  sequence: number;
1021
1096
  agent_id: string;
@@ -1023,16 +1098,18 @@ declare const IngestionRequest: z.ZodObject<{
1023
1098
  agent_transcript_path: string;
1024
1099
  last_assistant_message: string;
1025
1100
  permission_mode?: string | undefined;
1101
+ agent_tool_use_id?: string | undefined;
1026
1102
  stop_hook_active?: boolean | undefined;
1027
1103
  } | {
1028
- type: "session_end";
1029
1104
  session_id: string;
1030
1105
  transcript_path: string;
1031
1106
  cwd: string;
1032
1107
  hook_event_name: string;
1108
+ type: "session_end";
1033
1109
  wall_ts: string;
1034
1110
  sequence: number;
1035
1111
  permission_mode?: string | undefined;
1112
+ agent_tool_use_id?: string | undefined;
1036
1113
  last_assistant_message?: string | undefined;
1037
1114
  stop_hook_active?: boolean | undefined;
1038
1115
  })[];