@goodtiming/baton-sdk 0.5.2 → 0.5.4

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/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
 
3
- declare const SDK_VERSION = "ts-0.5.2";
3
+ declare const SDK_VERSION = "ts-0.5.4";
4
4
 
5
5
  /**
6
6
  * Zod schemas + TS types for the Baton event stream per SPEC §11.4.
@@ -90,13 +90,13 @@ declare const ToolCallErrorPayloadSchema: z.ZodObject<{
90
90
  failure_kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
91
  }, z.core.$strict>;
92
92
  type ToolCallErrorPayload = z.infer<typeof ToolCallErrorPayloadSchema>;
93
- /** Agent-supplied context. All fields nullable per SPEC §5.1.1 — the agent
94
- * populates what it has. Proactive annotations typically populate
95
- * `intent`/`expected_outcome`/`workflow`; reactive annotations typically
96
- * populate `signal_type`/`suggested_improvement`. */
93
+ /** Agent-supplied context, all nullable. An annotation with `what_happened`
94
+ * filled is a report; one without is a note (SPEC §11.4). `signal_type` is
95
+ * kept for events from older producers: this SDK always sends it null. */
97
96
  declare const AnnotationPayloadSchema: z.ZodObject<{
98
97
  intent: z.ZodDefault<z.ZodNullable<z.ZodString>>;
99
98
  expected_outcome: z.ZodDefault<z.ZodNullable<z.ZodString>>;
99
+ what_happened: z.ZodDefault<z.ZodNullable<z.ZodString>>;
100
100
  signal_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
101
101
  workflow: z.ZodDefault<z.ZodNullable<z.ZodString>>;
102
102
  suggested_improvement: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -173,6 +173,9 @@ declare const EventTypeSchema: z.ZodEnum<{
173
173
  prompt_get_start: "prompt_get_start";
174
174
  prompt_get_end: "prompt_get_end";
175
175
  prompt_get_error: "prompt_get_error";
176
+ tool_list_start: "tool_list_start";
177
+ tool_list_end: "tool_list_end";
178
+ tool_list_error: "tool_list_error";
176
179
  }>;
177
180
  type EventType = z.infer<typeof EventTypeSchema>;
178
181
  /** `resources/list` reached the server. Deliberately EMPTY — a list request
@@ -261,6 +264,24 @@ declare const PromptListErrorPayloadSchema: z.ZodObject<{
261
264
  error_body: z.ZodString;
262
265
  }, z.core.$strict>;
263
266
  type PromptListErrorPayload = z.infer<typeof PromptListErrorPayloadSchema>;
267
+ /** `tools/list` reached the server (SPEC §11.4.5). Empty, for the reason
268
+ * `ResourceListStartPayloadSchema` carries. */
269
+ declare const ToolListStartPayloadSchema: z.ZodObject<{}, z.core.$strict>;
270
+ type ToolListStartPayload = z.infer<typeof ToolListStartPayloadSchema>;
271
+ /** `tools/list` returned. `count` is the length of the `tools` array in that
272
+ * one response, this SDK's own tool included. */
273
+ declare const ToolListEndPayloadSchema: z.ZodObject<{
274
+ duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
275
+ count: z.ZodNumber;
276
+ }, z.core.$strict>;
277
+ type ToolListEndPayload = z.infer<typeof ToolListEndPayloadSchema>;
278
+ /** `tools/list` failed. See `ResourceReadErrorPayloadSchema`. */
279
+ declare const ToolListErrorPayloadSchema: z.ZodObject<{
280
+ duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
281
+ error_type: z.ZodString;
282
+ error_body: z.ZodString;
283
+ }, z.core.$strict>;
284
+ type ToolListErrorPayload = z.infer<typeof ToolListErrorPayloadSchema>;
264
285
  /** `prompts/get` reached the server.
265
286
  *
266
287
  * ⚠ **`params` is the request's `arguments` member ALONE, not the whole params
@@ -293,6 +314,7 @@ declare const PromptGetErrorPayloadSchema: z.ZodObject<{
293
314
  }, z.core.$strict>;
294
315
  type PromptGetErrorPayload = z.infer<typeof PromptGetErrorPayloadSchema>;
295
316
  declare const ToolCallStartEventSchema: z.ZodObject<{
317
+ call_id: z.ZodString;
296
318
  event_type: z.ZodDefault<z.ZodLiteral<"tool_call_start">>;
297
319
  payload: z.ZodObject<{
298
320
  tool_name: z.ZodString;
@@ -318,11 +340,21 @@ declare const ToolCallStartEventSchema: z.ZodObject<{
318
340
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
319
341
  }, z.core.$strict>>>;
320
342
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
321
- call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
343
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
344
+ info: z.ZodOptional<z.ZodObject<{
345
+ name: z.ZodOptional<z.ZodString>;
346
+ version: z.ZodOptional<z.ZodString>;
347
+ }, z.core.$strict>>;
348
+ headers: z.ZodOptional<z.ZodObject<{
349
+ "user-agent": z.ZodOptional<z.ZodString>;
350
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
351
+ }, z.core.$strict>>;
352
+ }, z.core.$strict>>>;
322
353
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
323
354
  }, z.core.$strict>;
324
355
  type ToolCallStartEvent = z.infer<typeof ToolCallStartEventSchema>;
325
356
  declare const ToolCallEndEventSchema: z.ZodObject<{
357
+ call_id: z.ZodString;
326
358
  event_type: z.ZodDefault<z.ZodLiteral<"tool_call_end">>;
327
359
  payload: z.ZodObject<{
328
360
  tool_name: z.ZodString;
@@ -346,11 +378,21 @@ declare const ToolCallEndEventSchema: z.ZodObject<{
346
378
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
347
379
  }, z.core.$strict>>>;
348
380
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
349
- call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
381
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
382
+ info: z.ZodOptional<z.ZodObject<{
383
+ name: z.ZodOptional<z.ZodString>;
384
+ version: z.ZodOptional<z.ZodString>;
385
+ }, z.core.$strict>>;
386
+ headers: z.ZodOptional<z.ZodObject<{
387
+ "user-agent": z.ZodOptional<z.ZodString>;
388
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
389
+ }, z.core.$strict>>;
390
+ }, z.core.$strict>>>;
350
391
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
351
392
  }, z.core.$strict>;
352
393
  type ToolCallEndEvent = z.infer<typeof ToolCallEndEventSchema>;
353
394
  declare const ToolCallErrorEventSchema: z.ZodObject<{
395
+ call_id: z.ZodString;
354
396
  event_type: z.ZodDefault<z.ZodLiteral<"tool_call_error">>;
355
397
  payload: z.ZodObject<{
356
398
  tool_name: z.ZodString;
@@ -377,7 +419,16 @@ declare const ToolCallErrorEventSchema: z.ZodObject<{
377
419
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
378
420
  }, z.core.$strict>>>;
379
421
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
380
- call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
422
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
423
+ info: z.ZodOptional<z.ZodObject<{
424
+ name: z.ZodOptional<z.ZodString>;
425
+ version: z.ZodOptional<z.ZodString>;
426
+ }, z.core.$strict>>;
427
+ headers: z.ZodOptional<z.ZodObject<{
428
+ "user-agent": z.ZodOptional<z.ZodString>;
429
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
430
+ }, z.core.$strict>>;
431
+ }, z.core.$strict>>>;
381
432
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
382
433
  }, z.core.$strict>;
383
434
  type ToolCallErrorEvent = z.infer<typeof ToolCallErrorEventSchema>;
@@ -386,6 +437,7 @@ declare const AnnotationEventSchema: z.ZodObject<{
386
437
  payload: z.ZodObject<{
387
438
  intent: z.ZodDefault<z.ZodNullable<z.ZodString>>;
388
439
  expected_outcome: z.ZodDefault<z.ZodNullable<z.ZodString>>;
440
+ what_happened: z.ZodDefault<z.ZodNullable<z.ZodString>>;
389
441
  signal_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
390
442
  workflow: z.ZodDefault<z.ZodNullable<z.ZodString>>;
391
443
  suggested_improvement: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -409,6 +461,16 @@ declare const AnnotationEventSchema: z.ZodObject<{
409
461
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
410
462
  }, z.core.$strict>>>;
411
463
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
464
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
465
+ info: z.ZodOptional<z.ZodObject<{
466
+ name: z.ZodOptional<z.ZodString>;
467
+ version: z.ZodOptional<z.ZodString>;
468
+ }, z.core.$strict>>;
469
+ headers: z.ZodOptional<z.ZodObject<{
470
+ "user-agent": z.ZodOptional<z.ZodString>;
471
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
472
+ }, z.core.$strict>>;
473
+ }, z.core.$strict>>>;
412
474
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
413
475
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
414
476
  }, z.core.$strict>;
@@ -439,6 +501,16 @@ declare const SurfaceSnapshotEventSchema: z.ZodObject<{
439
501
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
440
502
  }, z.core.$strict>>>;
441
503
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
504
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
505
+ info: z.ZodOptional<z.ZodObject<{
506
+ name: z.ZodOptional<z.ZodString>;
507
+ version: z.ZodOptional<z.ZodString>;
508
+ }, z.core.$strict>>;
509
+ headers: z.ZodOptional<z.ZodObject<{
510
+ "user-agent": z.ZodOptional<z.ZodString>;
511
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
512
+ }, z.core.$strict>>;
513
+ }, z.core.$strict>>>;
442
514
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
443
515
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
444
516
  }, z.core.$strict>;
@@ -462,6 +534,16 @@ declare const ResourceListStartEventSchema: z.ZodObject<{
462
534
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
463
535
  }, z.core.$strict>>>;
464
536
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
537
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
538
+ info: z.ZodOptional<z.ZodObject<{
539
+ name: z.ZodOptional<z.ZodString>;
540
+ version: z.ZodOptional<z.ZodString>;
541
+ }, z.core.$strict>>;
542
+ headers: z.ZodOptional<z.ZodObject<{
543
+ "user-agent": z.ZodOptional<z.ZodString>;
544
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
545
+ }, z.core.$strict>>;
546
+ }, z.core.$strict>>>;
465
547
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
466
548
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
467
549
  }, z.core.$strict>;
@@ -488,6 +570,16 @@ declare const ResourceListEndEventSchema: z.ZodObject<{
488
570
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
489
571
  }, z.core.$strict>>>;
490
572
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
573
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
574
+ info: z.ZodOptional<z.ZodObject<{
575
+ name: z.ZodOptional<z.ZodString>;
576
+ version: z.ZodOptional<z.ZodString>;
577
+ }, z.core.$strict>>;
578
+ headers: z.ZodOptional<z.ZodObject<{
579
+ "user-agent": z.ZodOptional<z.ZodString>;
580
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
581
+ }, z.core.$strict>>;
582
+ }, z.core.$strict>>>;
491
583
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
492
584
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
493
585
  }, z.core.$strict>;
@@ -515,6 +607,16 @@ declare const ResourceListErrorEventSchema: z.ZodObject<{
515
607
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
516
608
  }, z.core.$strict>>>;
517
609
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
610
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
611
+ info: z.ZodOptional<z.ZodObject<{
612
+ name: z.ZodOptional<z.ZodString>;
613
+ version: z.ZodOptional<z.ZodString>;
614
+ }, z.core.$strict>>;
615
+ headers: z.ZodOptional<z.ZodObject<{
616
+ "user-agent": z.ZodOptional<z.ZodString>;
617
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
618
+ }, z.core.$strict>>;
619
+ }, z.core.$strict>>>;
518
620
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
519
621
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
520
622
  }, z.core.$strict>;
@@ -541,6 +643,16 @@ declare const ResourceReadStartEventSchema: z.ZodObject<{
541
643
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
542
644
  }, z.core.$strict>>>;
543
645
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
646
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
647
+ info: z.ZodOptional<z.ZodObject<{
648
+ name: z.ZodOptional<z.ZodString>;
649
+ version: z.ZodOptional<z.ZodString>;
650
+ }, z.core.$strict>>;
651
+ headers: z.ZodOptional<z.ZodObject<{
652
+ "user-agent": z.ZodOptional<z.ZodString>;
653
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
654
+ }, z.core.$strict>>;
655
+ }, z.core.$strict>>>;
544
656
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
545
657
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
546
658
  }, z.core.$strict>;
@@ -567,6 +679,16 @@ declare const ResourceReadEndEventSchema: z.ZodObject<{
567
679
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
568
680
  }, z.core.$strict>>>;
569
681
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
682
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
683
+ info: z.ZodOptional<z.ZodObject<{
684
+ name: z.ZodOptional<z.ZodString>;
685
+ version: z.ZodOptional<z.ZodString>;
686
+ }, z.core.$strict>>;
687
+ headers: z.ZodOptional<z.ZodObject<{
688
+ "user-agent": z.ZodOptional<z.ZodString>;
689
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
690
+ }, z.core.$strict>>;
691
+ }, z.core.$strict>>>;
570
692
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
571
693
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
572
694
  }, z.core.$strict>;
@@ -595,6 +717,16 @@ declare const ResourceReadErrorEventSchema: z.ZodObject<{
595
717
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
596
718
  }, z.core.$strict>>>;
597
719
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
720
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
721
+ info: z.ZodOptional<z.ZodObject<{
722
+ name: z.ZodOptional<z.ZodString>;
723
+ version: z.ZodOptional<z.ZodString>;
724
+ }, z.core.$strict>>;
725
+ headers: z.ZodOptional<z.ZodObject<{
726
+ "user-agent": z.ZodOptional<z.ZodString>;
727
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
728
+ }, z.core.$strict>>;
729
+ }, z.core.$strict>>>;
598
730
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
599
731
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
600
732
  }, z.core.$strict>;
@@ -618,6 +750,16 @@ declare const PromptListStartEventSchema: z.ZodObject<{
618
750
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
619
751
  }, z.core.$strict>>>;
620
752
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
753
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
754
+ info: z.ZodOptional<z.ZodObject<{
755
+ name: z.ZodOptional<z.ZodString>;
756
+ version: z.ZodOptional<z.ZodString>;
757
+ }, z.core.$strict>>;
758
+ headers: z.ZodOptional<z.ZodObject<{
759
+ "user-agent": z.ZodOptional<z.ZodString>;
760
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
761
+ }, z.core.$strict>>;
762
+ }, z.core.$strict>>>;
621
763
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
622
764
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
623
765
  }, z.core.$strict>;
@@ -644,6 +786,16 @@ declare const PromptListEndEventSchema: z.ZodObject<{
644
786
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
645
787
  }, z.core.$strict>>>;
646
788
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
789
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
790
+ info: z.ZodOptional<z.ZodObject<{
791
+ name: z.ZodOptional<z.ZodString>;
792
+ version: z.ZodOptional<z.ZodString>;
793
+ }, z.core.$strict>>;
794
+ headers: z.ZodOptional<z.ZodObject<{
795
+ "user-agent": z.ZodOptional<z.ZodString>;
796
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
797
+ }, z.core.$strict>>;
798
+ }, z.core.$strict>>>;
647
799
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
648
800
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
649
801
  }, z.core.$strict>;
@@ -671,6 +823,16 @@ declare const PromptListErrorEventSchema: z.ZodObject<{
671
823
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
672
824
  }, z.core.$strict>>>;
673
825
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
826
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
827
+ info: z.ZodOptional<z.ZodObject<{
828
+ name: z.ZodOptional<z.ZodString>;
829
+ version: z.ZodOptional<z.ZodString>;
830
+ }, z.core.$strict>>;
831
+ headers: z.ZodOptional<z.ZodObject<{
832
+ "user-agent": z.ZodOptional<z.ZodString>;
833
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
834
+ }, z.core.$strict>>;
835
+ }, z.core.$strict>>>;
674
836
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
675
837
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
676
838
  }, z.core.$strict>;
@@ -697,6 +859,16 @@ declare const PromptGetStartEventSchema: z.ZodObject<{
697
859
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
698
860
  }, z.core.$strict>>>;
699
861
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
862
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
863
+ info: z.ZodOptional<z.ZodObject<{
864
+ name: z.ZodOptional<z.ZodString>;
865
+ version: z.ZodOptional<z.ZodString>;
866
+ }, z.core.$strict>>;
867
+ headers: z.ZodOptional<z.ZodObject<{
868
+ "user-agent": z.ZodOptional<z.ZodString>;
869
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
870
+ }, z.core.$strict>>;
871
+ }, z.core.$strict>>>;
700
872
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
701
873
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
702
874
  }, z.core.$strict>;
@@ -723,6 +895,16 @@ declare const PromptGetEndEventSchema: z.ZodObject<{
723
895
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
724
896
  }, z.core.$strict>>>;
725
897
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
898
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
899
+ info: z.ZodOptional<z.ZodObject<{
900
+ name: z.ZodOptional<z.ZodString>;
901
+ version: z.ZodOptional<z.ZodString>;
902
+ }, z.core.$strict>>;
903
+ headers: z.ZodOptional<z.ZodObject<{
904
+ "user-agent": z.ZodOptional<z.ZodString>;
905
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
906
+ }, z.core.$strict>>;
907
+ }, z.core.$strict>>>;
726
908
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
727
909
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
728
910
  }, z.core.$strict>;
@@ -751,11 +933,128 @@ declare const PromptGetErrorEventSchema: z.ZodObject<{
751
933
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
752
934
  }, z.core.$strict>>>;
753
935
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
936
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
937
+ info: z.ZodOptional<z.ZodObject<{
938
+ name: z.ZodOptional<z.ZodString>;
939
+ version: z.ZodOptional<z.ZodString>;
940
+ }, z.core.$strict>>;
941
+ headers: z.ZodOptional<z.ZodObject<{
942
+ "user-agent": z.ZodOptional<z.ZodString>;
943
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
944
+ }, z.core.$strict>>;
945
+ }, z.core.$strict>>>;
754
946
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
755
947
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
756
948
  }, z.core.$strict>;
757
949
  type PromptGetErrorEvent = z.infer<typeof PromptGetErrorEventSchema>;
950
+ declare const ToolListStartEventSchema: z.ZodObject<{
951
+ event_type: z.ZodDefault<z.ZodLiteral<"tool_list_start">>;
952
+ payload: z.ZodObject<{}, z.core.$strict>;
953
+ event_id: z.ZodDefault<z.ZodUUID>;
954
+ tenant_id: z.ZodString;
955
+ vendor_id: z.ZodString;
956
+ session_id: z.ZodString;
957
+ sequence_number: z.ZodNumber;
958
+ captured_at: z.ZodString;
959
+ consent_token: z.ZodString;
960
+ sdk_version: z.ZodDefault<z.ZodString>;
961
+ agent_runtime: z.ZodDefault<z.ZodString>;
962
+ principal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
963
+ id: z.ZodString;
964
+ source: z.ZodString;
965
+ form: z.ZodString;
966
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
+ }, z.core.$strict>>>;
968
+ transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
969
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
970
+ info: z.ZodOptional<z.ZodObject<{
971
+ name: z.ZodOptional<z.ZodString>;
972
+ version: z.ZodOptional<z.ZodString>;
973
+ }, z.core.$strict>>;
974
+ headers: z.ZodOptional<z.ZodObject<{
975
+ "user-agent": z.ZodOptional<z.ZodString>;
976
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
977
+ }, z.core.$strict>>;
978
+ }, z.core.$strict>>>;
979
+ call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
980
+ runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
981
+ }, z.core.$strict>;
982
+ type ToolListStartEvent = z.infer<typeof ToolListStartEventSchema>;
983
+ declare const ToolListEndEventSchema: z.ZodObject<{
984
+ event_type: z.ZodDefault<z.ZodLiteral<"tool_list_end">>;
985
+ payload: z.ZodObject<{
986
+ duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
987
+ count: z.ZodNumber;
988
+ }, z.core.$strict>;
989
+ event_id: z.ZodDefault<z.ZodUUID>;
990
+ tenant_id: z.ZodString;
991
+ vendor_id: z.ZodString;
992
+ session_id: z.ZodString;
993
+ sequence_number: z.ZodNumber;
994
+ captured_at: z.ZodString;
995
+ consent_token: z.ZodString;
996
+ sdk_version: z.ZodDefault<z.ZodString>;
997
+ agent_runtime: z.ZodDefault<z.ZodString>;
998
+ principal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
999
+ id: z.ZodString;
1000
+ source: z.ZodString;
1001
+ form: z.ZodString;
1002
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1003
+ }, z.core.$strict>>>;
1004
+ transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1005
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1006
+ info: z.ZodOptional<z.ZodObject<{
1007
+ name: z.ZodOptional<z.ZodString>;
1008
+ version: z.ZodOptional<z.ZodString>;
1009
+ }, z.core.$strict>>;
1010
+ headers: z.ZodOptional<z.ZodObject<{
1011
+ "user-agent": z.ZodOptional<z.ZodString>;
1012
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1013
+ }, z.core.$strict>>;
1014
+ }, z.core.$strict>>>;
1015
+ call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1016
+ runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1017
+ }, z.core.$strict>;
1018
+ type ToolListEndEvent = z.infer<typeof ToolListEndEventSchema>;
1019
+ declare const ToolListErrorEventSchema: z.ZodObject<{
1020
+ event_type: z.ZodDefault<z.ZodLiteral<"tool_list_error">>;
1021
+ payload: z.ZodObject<{
1022
+ duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1023
+ error_type: z.ZodString;
1024
+ error_body: z.ZodString;
1025
+ }, z.core.$strict>;
1026
+ event_id: z.ZodDefault<z.ZodUUID>;
1027
+ tenant_id: z.ZodString;
1028
+ vendor_id: z.ZodString;
1029
+ session_id: z.ZodString;
1030
+ sequence_number: z.ZodNumber;
1031
+ captured_at: z.ZodString;
1032
+ consent_token: z.ZodString;
1033
+ sdk_version: z.ZodDefault<z.ZodString>;
1034
+ agent_runtime: z.ZodDefault<z.ZodString>;
1035
+ principal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1036
+ id: z.ZodString;
1037
+ source: z.ZodString;
1038
+ form: z.ZodString;
1039
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1040
+ }, z.core.$strict>>>;
1041
+ transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1042
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1043
+ info: z.ZodOptional<z.ZodObject<{
1044
+ name: z.ZodOptional<z.ZodString>;
1045
+ version: z.ZodOptional<z.ZodString>;
1046
+ }, z.core.$strict>>;
1047
+ headers: z.ZodOptional<z.ZodObject<{
1048
+ "user-agent": z.ZodOptional<z.ZodString>;
1049
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1050
+ }, z.core.$strict>>;
1051
+ }, z.core.$strict>>>;
1052
+ call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1053
+ runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1054
+ }, z.core.$strict>;
1055
+ type ToolListErrorEvent = z.infer<typeof ToolListErrorEventSchema>;
758
1056
  declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1057
+ call_id: z.ZodString;
759
1058
  event_type: z.ZodDefault<z.ZodLiteral<"tool_call_start">>;
760
1059
  payload: z.ZodObject<{
761
1060
  tool_name: z.ZodString;
@@ -781,9 +1080,19 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
781
1080
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
782
1081
  }, z.core.$strict>>>;
783
1082
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
784
- call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1083
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1084
+ info: z.ZodOptional<z.ZodObject<{
1085
+ name: z.ZodOptional<z.ZodString>;
1086
+ version: z.ZodOptional<z.ZodString>;
1087
+ }, z.core.$strict>>;
1088
+ headers: z.ZodOptional<z.ZodObject<{
1089
+ "user-agent": z.ZodOptional<z.ZodString>;
1090
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1091
+ }, z.core.$strict>>;
1092
+ }, z.core.$strict>>>;
785
1093
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
786
1094
  }, z.core.$strict>, z.ZodObject<{
1095
+ call_id: z.ZodString;
787
1096
  event_type: z.ZodDefault<z.ZodLiteral<"tool_call_end">>;
788
1097
  payload: z.ZodObject<{
789
1098
  tool_name: z.ZodString;
@@ -807,9 +1116,19 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
807
1116
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
808
1117
  }, z.core.$strict>>>;
809
1118
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
810
- call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1119
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1120
+ info: z.ZodOptional<z.ZodObject<{
1121
+ name: z.ZodOptional<z.ZodString>;
1122
+ version: z.ZodOptional<z.ZodString>;
1123
+ }, z.core.$strict>>;
1124
+ headers: z.ZodOptional<z.ZodObject<{
1125
+ "user-agent": z.ZodOptional<z.ZodString>;
1126
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1127
+ }, z.core.$strict>>;
1128
+ }, z.core.$strict>>>;
811
1129
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
812
1130
  }, z.core.$strict>, z.ZodObject<{
1131
+ call_id: z.ZodString;
813
1132
  event_type: z.ZodDefault<z.ZodLiteral<"tool_call_error">>;
814
1133
  payload: z.ZodObject<{
815
1134
  tool_name: z.ZodString;
@@ -836,13 +1155,23 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
836
1155
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
837
1156
  }, z.core.$strict>>>;
838
1157
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
839
- call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1158
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1159
+ info: z.ZodOptional<z.ZodObject<{
1160
+ name: z.ZodOptional<z.ZodString>;
1161
+ version: z.ZodOptional<z.ZodString>;
1162
+ }, z.core.$strict>>;
1163
+ headers: z.ZodOptional<z.ZodObject<{
1164
+ "user-agent": z.ZodOptional<z.ZodString>;
1165
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1166
+ }, z.core.$strict>>;
1167
+ }, z.core.$strict>>>;
840
1168
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
841
1169
  }, z.core.$strict>, z.ZodObject<{
842
1170
  event_type: z.ZodDefault<z.ZodLiteral<"annotation">>;
843
1171
  payload: z.ZodObject<{
844
1172
  intent: z.ZodDefault<z.ZodNullable<z.ZodString>>;
845
1173
  expected_outcome: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1174
+ what_happened: z.ZodDefault<z.ZodNullable<z.ZodString>>;
846
1175
  signal_type: z.ZodDefault<z.ZodNullable<z.ZodString>>;
847
1176
  workflow: z.ZodDefault<z.ZodNullable<z.ZodString>>;
848
1177
  suggested_improvement: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -866,6 +1195,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
866
1195
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
867
1196
  }, z.core.$strict>>>;
868
1197
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1198
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1199
+ info: z.ZodOptional<z.ZodObject<{
1200
+ name: z.ZodOptional<z.ZodString>;
1201
+ version: z.ZodOptional<z.ZodString>;
1202
+ }, z.core.$strict>>;
1203
+ headers: z.ZodOptional<z.ZodObject<{
1204
+ "user-agent": z.ZodOptional<z.ZodString>;
1205
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1206
+ }, z.core.$strict>>;
1207
+ }, z.core.$strict>>>;
869
1208
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
870
1209
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
871
1210
  }, z.core.$strict>, z.ZodObject<{
@@ -894,6 +1233,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
894
1233
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
895
1234
  }, z.core.$strict>>>;
896
1235
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1236
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1237
+ info: z.ZodOptional<z.ZodObject<{
1238
+ name: z.ZodOptional<z.ZodString>;
1239
+ version: z.ZodOptional<z.ZodString>;
1240
+ }, z.core.$strict>>;
1241
+ headers: z.ZodOptional<z.ZodObject<{
1242
+ "user-agent": z.ZodOptional<z.ZodString>;
1243
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1244
+ }, z.core.$strict>>;
1245
+ }, z.core.$strict>>>;
897
1246
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
898
1247
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
899
1248
  }, z.core.$strict>, z.ZodObject<{
@@ -915,6 +1264,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
915
1264
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
916
1265
  }, z.core.$strict>>>;
917
1266
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1267
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1268
+ info: z.ZodOptional<z.ZodObject<{
1269
+ name: z.ZodOptional<z.ZodString>;
1270
+ version: z.ZodOptional<z.ZodString>;
1271
+ }, z.core.$strict>>;
1272
+ headers: z.ZodOptional<z.ZodObject<{
1273
+ "user-agent": z.ZodOptional<z.ZodString>;
1274
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1275
+ }, z.core.$strict>>;
1276
+ }, z.core.$strict>>>;
918
1277
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
919
1278
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
920
1279
  }, z.core.$strict>, z.ZodObject<{
@@ -939,6 +1298,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
939
1298
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
940
1299
  }, z.core.$strict>>>;
941
1300
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1301
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1302
+ info: z.ZodOptional<z.ZodObject<{
1303
+ name: z.ZodOptional<z.ZodString>;
1304
+ version: z.ZodOptional<z.ZodString>;
1305
+ }, z.core.$strict>>;
1306
+ headers: z.ZodOptional<z.ZodObject<{
1307
+ "user-agent": z.ZodOptional<z.ZodString>;
1308
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1309
+ }, z.core.$strict>>;
1310
+ }, z.core.$strict>>>;
942
1311
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
943
1312
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
944
1313
  }, z.core.$strict>, z.ZodObject<{
@@ -964,6 +1333,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
964
1333
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
965
1334
  }, z.core.$strict>>>;
966
1335
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1336
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1337
+ info: z.ZodOptional<z.ZodObject<{
1338
+ name: z.ZodOptional<z.ZodString>;
1339
+ version: z.ZodOptional<z.ZodString>;
1340
+ }, z.core.$strict>>;
1341
+ headers: z.ZodOptional<z.ZodObject<{
1342
+ "user-agent": z.ZodOptional<z.ZodString>;
1343
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1344
+ }, z.core.$strict>>;
1345
+ }, z.core.$strict>>>;
967
1346
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
968
1347
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
969
1348
  }, z.core.$strict>, z.ZodObject<{
@@ -988,6 +1367,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
988
1367
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
989
1368
  }, z.core.$strict>>>;
990
1369
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1370
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1371
+ info: z.ZodOptional<z.ZodObject<{
1372
+ name: z.ZodOptional<z.ZodString>;
1373
+ version: z.ZodOptional<z.ZodString>;
1374
+ }, z.core.$strict>>;
1375
+ headers: z.ZodOptional<z.ZodObject<{
1376
+ "user-agent": z.ZodOptional<z.ZodString>;
1377
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1378
+ }, z.core.$strict>>;
1379
+ }, z.core.$strict>>>;
991
1380
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
992
1381
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
993
1382
  }, z.core.$strict>, z.ZodObject<{
@@ -1012,6 +1401,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1012
1401
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1013
1402
  }, z.core.$strict>>>;
1014
1403
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1404
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1405
+ info: z.ZodOptional<z.ZodObject<{
1406
+ name: z.ZodOptional<z.ZodString>;
1407
+ version: z.ZodOptional<z.ZodString>;
1408
+ }, z.core.$strict>>;
1409
+ headers: z.ZodOptional<z.ZodObject<{
1410
+ "user-agent": z.ZodOptional<z.ZodString>;
1411
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1412
+ }, z.core.$strict>>;
1413
+ }, z.core.$strict>>>;
1015
1414
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1016
1415
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1017
1416
  }, z.core.$strict>, z.ZodObject<{
@@ -1038,6 +1437,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1038
1437
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1039
1438
  }, z.core.$strict>>>;
1040
1439
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1440
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1441
+ info: z.ZodOptional<z.ZodObject<{
1442
+ name: z.ZodOptional<z.ZodString>;
1443
+ version: z.ZodOptional<z.ZodString>;
1444
+ }, z.core.$strict>>;
1445
+ headers: z.ZodOptional<z.ZodObject<{
1446
+ "user-agent": z.ZodOptional<z.ZodString>;
1447
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1448
+ }, z.core.$strict>>;
1449
+ }, z.core.$strict>>>;
1041
1450
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1042
1451
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1043
1452
  }, z.core.$strict>, z.ZodObject<{
@@ -1059,6 +1468,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1059
1468
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1060
1469
  }, z.core.$strict>>>;
1061
1470
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1471
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1472
+ info: z.ZodOptional<z.ZodObject<{
1473
+ name: z.ZodOptional<z.ZodString>;
1474
+ version: z.ZodOptional<z.ZodString>;
1475
+ }, z.core.$strict>>;
1476
+ headers: z.ZodOptional<z.ZodObject<{
1477
+ "user-agent": z.ZodOptional<z.ZodString>;
1478
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1479
+ }, z.core.$strict>>;
1480
+ }, z.core.$strict>>>;
1062
1481
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1063
1482
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1064
1483
  }, z.core.$strict>, z.ZodObject<{
@@ -1083,6 +1502,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1083
1502
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1084
1503
  }, z.core.$strict>>>;
1085
1504
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1505
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1506
+ info: z.ZodOptional<z.ZodObject<{
1507
+ name: z.ZodOptional<z.ZodString>;
1508
+ version: z.ZodOptional<z.ZodString>;
1509
+ }, z.core.$strict>>;
1510
+ headers: z.ZodOptional<z.ZodObject<{
1511
+ "user-agent": z.ZodOptional<z.ZodString>;
1512
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1513
+ }, z.core.$strict>>;
1514
+ }, z.core.$strict>>>;
1086
1515
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1087
1516
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1088
1517
  }, z.core.$strict>, z.ZodObject<{
@@ -1108,6 +1537,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1108
1537
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1109
1538
  }, z.core.$strict>>>;
1110
1539
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1540
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1541
+ info: z.ZodOptional<z.ZodObject<{
1542
+ name: z.ZodOptional<z.ZodString>;
1543
+ version: z.ZodOptional<z.ZodString>;
1544
+ }, z.core.$strict>>;
1545
+ headers: z.ZodOptional<z.ZodObject<{
1546
+ "user-agent": z.ZodOptional<z.ZodString>;
1547
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1548
+ }, z.core.$strict>>;
1549
+ }, z.core.$strict>>>;
1111
1550
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1112
1551
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1113
1552
  }, z.core.$strict>, z.ZodObject<{
@@ -1132,6 +1571,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1132
1571
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1133
1572
  }, z.core.$strict>>>;
1134
1573
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1574
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1575
+ info: z.ZodOptional<z.ZodObject<{
1576
+ name: z.ZodOptional<z.ZodString>;
1577
+ version: z.ZodOptional<z.ZodString>;
1578
+ }, z.core.$strict>>;
1579
+ headers: z.ZodOptional<z.ZodObject<{
1580
+ "user-agent": z.ZodOptional<z.ZodString>;
1581
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1582
+ }, z.core.$strict>>;
1583
+ }, z.core.$strict>>>;
1135
1584
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1136
1585
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1137
1586
  }, z.core.$strict>, z.ZodObject<{
@@ -1156,6 +1605,16 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1156
1605
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1157
1606
  }, z.core.$strict>>>;
1158
1607
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1608
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1609
+ info: z.ZodOptional<z.ZodObject<{
1610
+ name: z.ZodOptional<z.ZodString>;
1611
+ version: z.ZodOptional<z.ZodString>;
1612
+ }, z.core.$strict>>;
1613
+ headers: z.ZodOptional<z.ZodObject<{
1614
+ "user-agent": z.ZodOptional<z.ZodString>;
1615
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1616
+ }, z.core.$strict>>;
1617
+ }, z.core.$strict>>>;
1159
1618
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1160
1619
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1161
1620
  }, z.core.$strict>, z.ZodObject<{
@@ -1182,11 +1641,121 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1182
1641
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1183
1642
  }, z.core.$strict>>>;
1184
1643
  transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1644
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1645
+ info: z.ZodOptional<z.ZodObject<{
1646
+ name: z.ZodOptional<z.ZodString>;
1647
+ version: z.ZodOptional<z.ZodString>;
1648
+ }, z.core.$strict>>;
1649
+ headers: z.ZodOptional<z.ZodObject<{
1650
+ "user-agent": z.ZodOptional<z.ZodString>;
1651
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1652
+ }, z.core.$strict>>;
1653
+ }, z.core.$strict>>>;
1654
+ call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1655
+ runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1656
+ }, z.core.$strict>, z.ZodObject<{
1657
+ event_type: z.ZodDefault<z.ZodLiteral<"tool_list_start">>;
1658
+ payload: z.ZodObject<{}, z.core.$strict>;
1659
+ event_id: z.ZodDefault<z.ZodUUID>;
1660
+ tenant_id: z.ZodString;
1661
+ vendor_id: z.ZodString;
1662
+ session_id: z.ZodString;
1663
+ sequence_number: z.ZodNumber;
1664
+ captured_at: z.ZodString;
1665
+ consent_token: z.ZodString;
1666
+ sdk_version: z.ZodDefault<z.ZodString>;
1667
+ agent_runtime: z.ZodDefault<z.ZodString>;
1668
+ principal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1669
+ id: z.ZodString;
1670
+ source: z.ZodString;
1671
+ form: z.ZodString;
1672
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1673
+ }, z.core.$strict>>>;
1674
+ transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1675
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1676
+ info: z.ZodOptional<z.ZodObject<{
1677
+ name: z.ZodOptional<z.ZodString>;
1678
+ version: z.ZodOptional<z.ZodString>;
1679
+ }, z.core.$strict>>;
1680
+ headers: z.ZodOptional<z.ZodObject<{
1681
+ "user-agent": z.ZodOptional<z.ZodString>;
1682
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1683
+ }, z.core.$strict>>;
1684
+ }, z.core.$strict>>>;
1685
+ call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1686
+ runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1687
+ }, z.core.$strict>, z.ZodObject<{
1688
+ event_type: z.ZodDefault<z.ZodLiteral<"tool_list_end">>;
1689
+ payload: z.ZodObject<{
1690
+ duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1691
+ count: z.ZodNumber;
1692
+ }, z.core.$strict>;
1693
+ event_id: z.ZodDefault<z.ZodUUID>;
1694
+ tenant_id: z.ZodString;
1695
+ vendor_id: z.ZodString;
1696
+ session_id: z.ZodString;
1697
+ sequence_number: z.ZodNumber;
1698
+ captured_at: z.ZodString;
1699
+ consent_token: z.ZodString;
1700
+ sdk_version: z.ZodDefault<z.ZodString>;
1701
+ agent_runtime: z.ZodDefault<z.ZodString>;
1702
+ principal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1703
+ id: z.ZodString;
1704
+ source: z.ZodString;
1705
+ form: z.ZodString;
1706
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1707
+ }, z.core.$strict>>>;
1708
+ transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1709
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1710
+ info: z.ZodOptional<z.ZodObject<{
1711
+ name: z.ZodOptional<z.ZodString>;
1712
+ version: z.ZodOptional<z.ZodString>;
1713
+ }, z.core.$strict>>;
1714
+ headers: z.ZodOptional<z.ZodObject<{
1715
+ "user-agent": z.ZodOptional<z.ZodString>;
1716
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1717
+ }, z.core.$strict>>;
1718
+ }, z.core.$strict>>>;
1719
+ call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1720
+ runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1721
+ }, z.core.$strict>, z.ZodObject<{
1722
+ event_type: z.ZodDefault<z.ZodLiteral<"tool_list_error">>;
1723
+ payload: z.ZodObject<{
1724
+ duration_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1725
+ error_type: z.ZodString;
1726
+ error_body: z.ZodString;
1727
+ }, z.core.$strict>;
1728
+ event_id: z.ZodDefault<z.ZodUUID>;
1729
+ tenant_id: z.ZodString;
1730
+ vendor_id: z.ZodString;
1731
+ session_id: z.ZodString;
1732
+ sequence_number: z.ZodNumber;
1733
+ captured_at: z.ZodString;
1734
+ consent_token: z.ZodString;
1735
+ sdk_version: z.ZodDefault<z.ZodString>;
1736
+ agent_runtime: z.ZodDefault<z.ZodString>;
1737
+ principal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1738
+ id: z.ZodString;
1739
+ source: z.ZodString;
1740
+ form: z.ZodString;
1741
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1742
+ }, z.core.$strict>>>;
1743
+ transport_observed: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1744
+ client_observed: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1745
+ info: z.ZodOptional<z.ZodObject<{
1746
+ name: z.ZodOptional<z.ZodString>;
1747
+ version: z.ZodOptional<z.ZodString>;
1748
+ }, z.core.$strict>>;
1749
+ headers: z.ZodOptional<z.ZodObject<{
1750
+ "user-agent": z.ZodOptional<z.ZodString>;
1751
+ "x-anthropic-client": z.ZodOptional<z.ZodString>;
1752
+ }, z.core.$strict>>;
1753
+ }, z.core.$strict>>>;
1185
1754
  call_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1186
1755
  runtime_meta: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1187
1756
  }, z.core.$strict>], "event_type">;
1188
1757
  /** ⚠ DERIVED, not hand-listed. It used to be a third list of the same
1189
- * seventeen members, after `EventTypeSchema` and `EventSchema`'s own branches,
1758
+ * members, after `EventTypeSchema` and `EventSchema`'s own branches,
1190
1759
  * and the twelve lifecycle types made that visible: three lists to keep in
1191
1760
  * step. `EventSchema` is the discriminated union over exactly these schemas,
1192
1761
  * so its inferred output type IS this union — verified mutually assignable
@@ -1478,12 +2047,7 @@ interface AuthInfo {
1478
2047
  *
1479
2048
  * Adapter-neutral BY CONSTRUCTION rather than by convention — the peers' own
1480
2049
  * handler-context objects differ in shape between the two majors, and this
1481
- * type is what makes one hook portable across them. The prior art takes the
1482
- * opposite approach: AgentCat's `identify()` receives the raw per-major object
1483
- * behind `{ sessionId?: string; [key: string]: any }`, documented as "only
1484
- * `sessionId` is common to both; everything else is SDK-version-specific".
1485
- * That is the divergence handed to the vendor as `any`; this is the divergence
1486
- * absorbed by us.
2050
+ * type is what makes one hook portable across them.
1487
2051
  */
1488
2052
  interface PrincipalResolutionContext {
1489
2053
  /** The call's HTTP headers, case-insensitive on BOTH majors — see
@@ -1497,10 +2061,12 @@ interface PrincipalResolutionContext {
1497
2061
  /** The call's `_meta`, from wherever this major keeps it. */
1498
2062
  meta: Record<string, unknown> | null;
1499
2063
  /** The tool being called — the annotation tool's own name on that path, so a
1500
- * hook can answer differently per call rather than per install. */
1501
- toolName: string;
2064
+ * hook can answer differently per call rather than per install. `null` on a
2065
+ * request that is not a tool call. */
2066
+ toolName: string | null;
1502
2067
  /** The call's arguments, AFTER Baton's injected intent params are stripped,
1503
- * so a hook sees exactly what the vendor's own handler will. */
2068
+ * so a hook sees exactly what the vendor's own handler will. Empty on a
2069
+ * request that is not a tool call. */
1504
2070
  arguments: Record<string, unknown>;
1505
2071
  /** The validated access token for this request, read from wherever this
1506
2072
  * major keeps it — see `extraAuthInfo`. `null` on stdio and on any
@@ -1624,10 +2190,10 @@ interface BatonConfig {
1624
2190
  /** Per-tool intent-param injection (mirrors baton-extmcp's vendor-neutral
1625
2191
  * naming). `"required"` (default) injects `user_goal`/`expected_result`/
1626
2192
  * `overall_task` string params on every wrapped tool's advertised schema
1627
- * and ADVERTISES `user_goal` as required in `tools/list`, without enforcing
1628
- * it: a call that omits it still reaches your handler, and its event simply
1629
- * carries no intent. `"optional"` injects the same params and advertises
1630
- * none of them as required. `"off"` disables injection. The params are
2193
+ * and ADVERTISES all three as required in
2194
+ * `tools/list`, without enforcing them: a call that omits them still reaches
2195
+ * your handler, and its event simply carries no intent. `"optional"` injects
2196
+ * the same params and advertises none of them as required. `"off"` disables injection. The params are
1631
2197
  * stripped before the vendor handler runs, so the tool never sees them.
1632
2198
  * This is what captures intent on runtimes that drop `instructions`
1633
2199
  * (notably Claude Desktop) — where the annotation tool alone yields
@@ -1664,11 +2230,14 @@ interface BatonConfig {
1664
2230
  * envelope's `principal` (SPEC §11.4 rung 0), which emits
1665
2231
  * `source: "asserted"`. It is the only provenance this SDK has.
1666
2232
  *
1667
- * Called on every captured tool call and on the annotation tool, with an
1668
- * adapter-neutral {@link PrincipalResolutionContext}: headers folded to ONE
1669
- * case-insensitive shape across both SDK majors, the call's `_meta`, the
1670
- * tool name, and the arguments the vendor's own handler will see. Return a
1671
- * `Principal`, or `null` for "no opinion about this caller".
2233
+ * Called on every captured tool call, on the annotation tool, on every
2234
+ * `tools/list` request and on every resource and prompt request, with an
2235
+ * adapter-neutral
2236
+ * {@link PrincipalResolutionContext}: headers folded to ONE case-insensitive
2237
+ * shape across both SDK majors, the request's `_meta`, the tool name, and
2238
+ * the arguments the vendor's own handler will see. On a request that is not
2239
+ * a tool call the tool name is `null` and the arguments are empty. Return a `Principal`,
2240
+ * or `null` for "no opinion about this caller".
1672
2241
  *
1673
2242
  * **This is the only identity mechanism, on both SDKs** (SPEC §11.4): unset,
1674
2243
  * no event carries a `principal`. For OAuth, pass `principalFromOAuthSub` or
@@ -1676,9 +2245,10 @@ interface BatonConfig {
1676
2245
  * carries as `authInfo`. MCP auth is HTTP middleware, so on stdio there is no
1677
2246
  * token and a hook names the user from whatever the vendor authenticated.
1678
2247
  *
1679
- * Never fails a tool call: a hook that throws or returns junk yields an
1680
- * anonymous call. ⚠ It is awaited INLINE with no timeout — a blocking hook
1681
- * stalls its own request.
2248
+ * Never fails a request: a hook that throws or returns junk yields an
2249
+ * anonymous one. A hook that has not answered after 5 seconds is given up
2250
+ * on, and that request is anonymous. ⚠ That only bounds an async hook: one that
2251
+ * blocks synchronously holds the whole process, and nothing can interrupt it.
1682
2252
  *
1683
2253
  * The SDK sends what the hook returns and does nothing else to it: the id
1684
2254
  * as given, `form` to say whether the hook hashed it, and `displayName` for
@@ -1812,6 +2382,16 @@ interface SupportedMcpServer {
1812
2382
  }
1813
2383
  /** Install Baton into an `McpServer`. See module docstring for usage. */
1814
2384
  declare function withBaton(server: SupportedMcpServer, supplied?: BatonConfig): BatonHandle;
2385
+ /** One Baton for a process that builds a new `McpServer` for every request.
2386
+ * Owns the sink, so a request has nothing to close. */
2387
+ interface Baton {
2388
+ wrap(server: SupportedMcpServer): void;
2389
+ flush(): Promise<void>;
2390
+ aclose(): Promise<void>;
2391
+ }
2392
+ /** Create once at startup, then `wrap` each per-request server. For a server
2393
+ * that lives as long as the process, use `withBaton`. */
2394
+ declare function createBaton(supplied?: BatonConfig): Baton;
1815
2395
 
1816
2396
  /** Ready-made `resolvePrincipal` hooks for a server running OAuth.
1817
2397
  *
@@ -1861,4 +2441,4 @@ declare function principalFromOAuthSub(context: PrincipalResolutionContext): Pri
1861
2441
  * good enough is the vendor's call. */
1862
2442
  declare function principalFromOAuthEmail(context: PrincipalResolutionContext): Principal | null;
1863
2443
 
1864
- export { type AnnotationEvent, AnnotationEventSchema, type AnnotationPayload, AnnotationPayloadSchema, type AuthInfo, type BatonConfig, BatonHandle, DEFAULT_CONSENT_TOKEN, DEPTH_LIMIT, type Event, EventSchema, type EventType, EventTypeSchema, HttpSink, type HttpSinkOptions, PRINCIPAL_FORM_HASHED, PRINCIPAL_FORM_RAW, PRINCIPAL_SOURCE_ASSERTED, type Principal, type PrincipalForm, type PrincipalResolutionContext, PrincipalWireSchema, type PromptGetEndEvent, PromptGetEndEventSchema, type PromptGetEndPayload, PromptGetEndPayloadSchema, type PromptGetErrorEvent, PromptGetErrorEventSchema, type PromptGetErrorPayload, PromptGetErrorPayloadSchema, type PromptGetStartEvent, PromptGetStartEventSchema, type PromptGetStartPayload, PromptGetStartPayloadSchema, type PromptListEndEvent, PromptListEndEventSchema, type PromptListEndPayload, PromptListEndPayloadSchema, type PromptListErrorEvent, PromptListErrorEventSchema, type PromptListErrorPayload, PromptListErrorPayloadSchema, type PromptListStartEvent, PromptListStartEventSchema, type PromptListStartPayload, PromptListStartPayloadSchema, type ResolvePrincipalHook, type ResourceListEndEvent, ResourceListEndEventSchema, type ResourceListEndPayload, ResourceListEndPayloadSchema, type ResourceListErrorEvent, ResourceListErrorEventSchema, type ResourceListErrorPayload, ResourceListErrorPayloadSchema, type ResourceListStartEvent, ResourceListStartEventSchema, type ResourceListStartPayload, ResourceListStartPayloadSchema, type ResourceReadEndEvent, ResourceReadEndEventSchema, type ResourceReadEndPayload, ResourceReadEndPayloadSchema, type ResourceReadErrorEvent, ResourceReadErrorEventSchema, type ResourceReadErrorPayload, ResourceReadErrorPayloadSchema, type ResourceReadStartEvent, ResourceReadStartEventSchema, type ResourceReadStartPayload, ResourceReadStartPayloadSchema, type ResultCaptureMode, SDK_VERSION, Scrubber, type Sink, StdoutSink, type StdoutSinkOptions, type SupportedMcpServer, type SurfaceSnapshotEvent, SurfaceSnapshotEventSchema, type SurfaceSnapshotPayload, SurfaceSnapshotPayloadSchema, type ToolCallEndEvent, ToolCallEndEventSchema, type ToolCallEndPayload, ToolCallEndPayloadSchema, type ToolCallErrorEvent, ToolCallErrorEventSchema, type ToolCallErrorPayload, ToolCallErrorPayloadSchema, type ToolCallStartEvent, ToolCallStartEventSchema, type ToolCallStartPayload, ToolCallStartPayloadSchema, identityScrub, principalFromOAuthEmail, principalFromOAuthSub, safeWrite, withBaton };
2444
+ export { type AnnotationEvent, AnnotationEventSchema, type AnnotationPayload, AnnotationPayloadSchema, type AuthInfo, type Baton, type BatonConfig, BatonHandle, DEFAULT_CONSENT_TOKEN, DEPTH_LIMIT, type Event, EventSchema, type EventType, EventTypeSchema, HttpSink, type HttpSinkOptions, PRINCIPAL_FORM_HASHED, PRINCIPAL_FORM_RAW, PRINCIPAL_SOURCE_ASSERTED, type Principal, type PrincipalForm, type PrincipalResolutionContext, PrincipalWireSchema, type PromptGetEndEvent, PromptGetEndEventSchema, type PromptGetEndPayload, PromptGetEndPayloadSchema, type PromptGetErrorEvent, PromptGetErrorEventSchema, type PromptGetErrorPayload, PromptGetErrorPayloadSchema, type PromptGetStartEvent, PromptGetStartEventSchema, type PromptGetStartPayload, PromptGetStartPayloadSchema, type PromptListEndEvent, PromptListEndEventSchema, type PromptListEndPayload, PromptListEndPayloadSchema, type PromptListErrorEvent, PromptListErrorEventSchema, type PromptListErrorPayload, PromptListErrorPayloadSchema, type PromptListStartEvent, PromptListStartEventSchema, type PromptListStartPayload, PromptListStartPayloadSchema, type ResolvePrincipalHook, type ResourceListEndEvent, ResourceListEndEventSchema, type ResourceListEndPayload, ResourceListEndPayloadSchema, type ResourceListErrorEvent, ResourceListErrorEventSchema, type ResourceListErrorPayload, ResourceListErrorPayloadSchema, type ResourceListStartEvent, ResourceListStartEventSchema, type ResourceListStartPayload, ResourceListStartPayloadSchema, type ResourceReadEndEvent, ResourceReadEndEventSchema, type ResourceReadEndPayload, ResourceReadEndPayloadSchema, type ResourceReadErrorEvent, ResourceReadErrorEventSchema, type ResourceReadErrorPayload, ResourceReadErrorPayloadSchema, type ResourceReadStartEvent, ResourceReadStartEventSchema, type ResourceReadStartPayload, ResourceReadStartPayloadSchema, type ResultCaptureMode, SDK_VERSION, Scrubber, type Sink, StdoutSink, type StdoutSinkOptions, type SupportedMcpServer, type SurfaceSnapshotEvent, SurfaceSnapshotEventSchema, type SurfaceSnapshotPayload, SurfaceSnapshotPayloadSchema, type ToolCallEndEvent, ToolCallEndEventSchema, type ToolCallEndPayload, ToolCallEndPayloadSchema, type ToolCallErrorEvent, ToolCallErrorEventSchema, type ToolCallErrorPayload, ToolCallErrorPayloadSchema, type ToolCallStartEvent, ToolCallStartEventSchema, type ToolCallStartPayload, ToolCallStartPayloadSchema, type ToolListEndEvent, ToolListEndEventSchema, type ToolListEndPayload, ToolListEndPayloadSchema, type ToolListErrorEvent, ToolListErrorEventSchema, type ToolListErrorPayload, ToolListErrorPayloadSchema, type ToolListStartEvent, ToolListStartEventSchema, type ToolListStartPayload, ToolListStartPayloadSchema, createBaton, identityScrub, principalFromOAuthEmail, principalFromOAuthSub, safeWrite, withBaton };