braintrust 3.7.1 → 3.9.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.
Files changed (57) hide show
  1. package/dev/dist/index.d.mts +228 -5
  2. package/dev/dist/index.d.ts +228 -5
  3. package/dev/dist/index.js +6259 -1261
  4. package/dev/dist/index.mjs +6161 -1163
  5. package/dist/auto-instrumentations/bundler/esbuild.cjs +995 -55
  6. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  7. package/dist/auto-instrumentations/bundler/rollup.cjs +995 -55
  8. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/vite.cjs +995 -55
  10. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  11. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +995 -55
  12. package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +11 -9
  13. package/dist/auto-instrumentations/bundler/webpack.cjs +995 -55
  14. package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
  15. package/dist/auto-instrumentations/{chunk-NY4CGTN6.mjs → chunk-G7F6HZGE.mjs} +9 -1
  16. package/dist/auto-instrumentations/{chunk-EVUKFMHG.mjs → chunk-ITP7RAUY.mjs} +21 -3
  17. package/dist/auto-instrumentations/chunk-KIMMUFAK.mjs +1781 -0
  18. package/dist/auto-instrumentations/{chunk-VLEJ5AEK.mjs → chunk-P5YLNB2A.mjs} +21 -3
  19. package/dist/auto-instrumentations/hook.mjs +1206 -82
  20. package/dist/auto-instrumentations/index.cjs +1161 -55
  21. package/dist/auto-instrumentations/index.d.mts +22 -1
  22. package/dist/auto-instrumentations/index.d.ts +22 -1
  23. package/dist/auto-instrumentations/index.mjs +172 -1
  24. package/dist/auto-instrumentations/loader/cjs-patch.cjs +34 -6
  25. package/dist/auto-instrumentations/loader/cjs-patch.d.mts +1 -0
  26. package/dist/auto-instrumentations/loader/cjs-patch.d.ts +1 -0
  27. package/dist/auto-instrumentations/loader/cjs-patch.mjs +15 -5
  28. package/dist/auto-instrumentations/loader/esm-hook.mjs +10 -4
  29. package/dist/auto-instrumentations/loader/get-package-version.cjs +20 -2
  30. package/dist/auto-instrumentations/loader/get-package-version.mjs +1 -1
  31. package/dist/browser.d.mts +501 -18
  32. package/dist/browser.d.ts +501 -18
  33. package/dist/browser.js +6985 -1211
  34. package/dist/browser.mjs +6985 -1211
  35. package/dist/cli.js +6160 -1133
  36. package/dist/edge-light.d.mts +1 -1
  37. package/dist/edge-light.d.ts +1 -1
  38. package/dist/edge-light.js +16054 -10191
  39. package/dist/edge-light.mjs +16054 -10191
  40. package/dist/index.d.mts +501 -18
  41. package/dist/index.d.ts +501 -18
  42. package/dist/index.js +7144 -1370
  43. package/dist/index.mjs +6985 -1211
  44. package/dist/instrumentation/index.d.mts +17 -0
  45. package/dist/instrumentation/index.d.ts +17 -0
  46. package/dist/instrumentation/index.js +5929 -1053
  47. package/dist/instrumentation/index.mjs +5929 -1053
  48. package/dist/workerd.d.mts +1 -1
  49. package/dist/workerd.d.ts +1 -1
  50. package/dist/workerd.js +16054 -10191
  51. package/dist/workerd.mjs +16054 -10191
  52. package/package.json +13 -8
  53. package/util/dist/index.d.mts +42 -1
  54. package/util/dist/index.d.ts +42 -1
  55. package/util/dist/index.js +5 -1
  56. package/util/dist/index.mjs +4 -0
  57. package/dist/auto-instrumentations/chunk-YCKND42U.mjs +0 -839
package/dist/index.d.mts CHANGED
@@ -4758,6 +4758,15 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4758
4758
  }, {
4759
4759
  type: "scorer";
4760
4760
  index: number;
4761
+ }>, z.ZodObject<{
4762
+ type: z.ZodLiteral<"classifier">;
4763
+ index: z.ZodNumber;
4764
+ }, "strip", z.ZodTypeAny, {
4765
+ type: "classifier";
4766
+ index: number;
4767
+ }, {
4768
+ type: "classifier";
4769
+ index: number;
4761
4770
  }>]>;
4762
4771
  }, "strip", z.ZodTypeAny, {
4763
4772
  type: "experiment";
@@ -4767,6 +4776,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4767
4776
  } | {
4768
4777
  type: "scorer";
4769
4778
  index: number;
4779
+ } | {
4780
+ type: "classifier";
4781
+ index: number;
4770
4782
  };
4771
4783
  }, {
4772
4784
  type: "experiment";
@@ -4776,6 +4788,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4776
4788
  } | {
4777
4789
  type: "scorer";
4778
4790
  index: number;
4791
+ } | {
4792
+ type: "classifier";
4793
+ index: number;
4779
4794
  };
4780
4795
  }>, z.ZodObject<{
4781
4796
  type: z.ZodLiteral<"function">;
@@ -4848,6 +4863,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4848
4863
  } | {
4849
4864
  type: "scorer";
4850
4865
  index: number;
4866
+ } | {
4867
+ type: "classifier";
4868
+ index: number;
4851
4869
  };
4852
4870
  } | {
4853
4871
  type: "function";
@@ -4880,6 +4898,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4880
4898
  } | {
4881
4899
  type: "scorer";
4882
4900
  index: number;
4901
+ } | {
4902
+ type: "classifier";
4903
+ index: number;
4883
4904
  };
4884
4905
  } | {
4885
4906
  type: "function";
@@ -4947,6 +4968,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4947
4968
  } | {
4948
4969
  type: "scorer";
4949
4970
  index: number;
4971
+ } | {
4972
+ type: "classifier";
4973
+ index: number;
4950
4974
  };
4951
4975
  } | {
4952
4976
  type: "function";
@@ -4992,6 +5016,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4992
5016
  } | {
4993
5017
  type: "scorer";
4994
5018
  index: number;
5019
+ } | {
5020
+ type: "classifier";
5021
+ index: number;
4995
5022
  };
4996
5023
  } | {
4997
5024
  type: "function";
@@ -6584,6 +6611,34 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6584
6611
  bundle_key: z.ZodOptional<z.ZodString>;
6585
6612
  report_key: z.ZodOptional<z.ZodString>;
6586
6613
  topic_names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6614
+ generation_settings: z.ZodOptional<z.ZodObject<{
6615
+ algorithm: z.ZodEnum<["hdbscan", "kmeans"]>;
6616
+ dimension_reduction: z.ZodEnum<["umap", "pca", "none"]>;
6617
+ sample_size: z.ZodOptional<z.ZodNumber>;
6618
+ n_clusters: z.ZodOptional<z.ZodNumber>;
6619
+ min_cluster_size: z.ZodOptional<z.ZodNumber>;
6620
+ min_samples: z.ZodOptional<z.ZodNumber>;
6621
+ hierarchy_threshold: z.ZodOptional<z.ZodNumber>;
6622
+ naming_model: z.ZodOptional<z.ZodString>;
6623
+ }, "strip", z.ZodTypeAny, {
6624
+ algorithm: "hdbscan" | "kmeans";
6625
+ dimension_reduction: "none" | "umap" | "pca";
6626
+ sample_size?: number | undefined;
6627
+ n_clusters?: number | undefined;
6628
+ min_cluster_size?: number | undefined;
6629
+ min_samples?: number | undefined;
6630
+ hierarchy_threshold?: number | undefined;
6631
+ naming_model?: string | undefined;
6632
+ }, {
6633
+ algorithm: "hdbscan" | "kmeans";
6634
+ dimension_reduction: "none" | "umap" | "pca";
6635
+ sample_size?: number | undefined;
6636
+ n_clusters?: number | undefined;
6637
+ min_cluster_size?: number | undefined;
6638
+ min_samples?: number | undefined;
6639
+ hierarchy_threshold?: number | undefined;
6640
+ naming_model?: string | undefined;
6641
+ }>>;
6587
6642
  distance_threshold: z.ZodOptional<z.ZodNumber>;
6588
6643
  }, "strip", z.ZodTypeAny, {
6589
6644
  type: "topic_map";
@@ -6592,6 +6647,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6592
6647
  bundle_key?: string | undefined;
6593
6648
  report_key?: string | undefined;
6594
6649
  topic_names?: Record<string, string> | undefined;
6650
+ generation_settings?: {
6651
+ algorithm: "hdbscan" | "kmeans";
6652
+ dimension_reduction: "none" | "umap" | "pca";
6653
+ sample_size?: number | undefined;
6654
+ n_clusters?: number | undefined;
6655
+ min_cluster_size?: number | undefined;
6656
+ min_samples?: number | undefined;
6657
+ hierarchy_threshold?: number | undefined;
6658
+ naming_model?: string | undefined;
6659
+ } | undefined;
6595
6660
  distance_threshold?: number | undefined;
6596
6661
  }, {
6597
6662
  type: "topic_map";
@@ -6600,6 +6665,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6600
6665
  bundle_key?: string | undefined;
6601
6666
  report_key?: string | undefined;
6602
6667
  topic_names?: Record<string, string> | undefined;
6668
+ generation_settings?: {
6669
+ algorithm: "hdbscan" | "kmeans";
6670
+ dimension_reduction: "none" | "umap" | "pca";
6671
+ sample_size?: number | undefined;
6672
+ n_clusters?: number | undefined;
6673
+ min_cluster_size?: number | undefined;
6674
+ min_samples?: number | undefined;
6675
+ hierarchy_threshold?: number | undefined;
6676
+ naming_model?: string | undefined;
6677
+ } | undefined;
6603
6678
  distance_threshold?: number | undefined;
6604
6679
  }>;
6605
6680
  }, "strip", z.ZodTypeAny, {
@@ -6611,6 +6686,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6611
6686
  bundle_key?: string | undefined;
6612
6687
  report_key?: string | undefined;
6613
6688
  topic_names?: Record<string, string> | undefined;
6689
+ generation_settings?: {
6690
+ algorithm: "hdbscan" | "kmeans";
6691
+ dimension_reduction: "none" | "umap" | "pca";
6692
+ sample_size?: number | undefined;
6693
+ n_clusters?: number | undefined;
6694
+ min_cluster_size?: number | undefined;
6695
+ min_samples?: number | undefined;
6696
+ hierarchy_threshold?: number | undefined;
6697
+ naming_model?: string | undefined;
6698
+ } | undefined;
6614
6699
  distance_threshold?: number | undefined;
6615
6700
  };
6616
6701
  topic_map_id?: string | undefined;
@@ -6623,6 +6708,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6623
6708
  bundle_key?: string | undefined;
6624
6709
  report_key?: string | undefined;
6625
6710
  topic_names?: Record<string, string> | undefined;
6711
+ generation_settings?: {
6712
+ algorithm: "hdbscan" | "kmeans";
6713
+ dimension_reduction: "none" | "umap" | "pca";
6714
+ sample_size?: number | undefined;
6715
+ n_clusters?: number | undefined;
6716
+ min_cluster_size?: number | undefined;
6717
+ min_samples?: number | undefined;
6718
+ hierarchy_threshold?: number | undefined;
6719
+ naming_model?: string | undefined;
6720
+ } | undefined;
6626
6721
  distance_threshold?: number | undefined;
6627
6722
  };
6628
6723
  topic_map_id?: string | undefined;
@@ -6654,6 +6749,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6654
6749
  bundle_key?: string | undefined;
6655
6750
  report_key?: string | undefined;
6656
6751
  topic_names?: Record<string, string> | undefined;
6752
+ generation_settings?: {
6753
+ algorithm: "hdbscan" | "kmeans";
6754
+ dimension_reduction: "none" | "umap" | "pca";
6755
+ sample_size?: number | undefined;
6756
+ n_clusters?: number | undefined;
6757
+ min_cluster_size?: number | undefined;
6758
+ min_samples?: number | undefined;
6759
+ hierarchy_threshold?: number | undefined;
6760
+ naming_model?: string | undefined;
6761
+ } | undefined;
6657
6762
  distance_threshold?: number | undefined;
6658
6763
  };
6659
6764
  topic_map_id?: string | undefined;
@@ -6685,6 +6790,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6685
6790
  bundle_key?: string | undefined;
6686
6791
  report_key?: string | undefined;
6687
6792
  topic_names?: Record<string, string> | undefined;
6793
+ generation_settings?: {
6794
+ algorithm: "hdbscan" | "kmeans";
6795
+ dimension_reduction: "none" | "umap" | "pca";
6796
+ sample_size?: number | undefined;
6797
+ n_clusters?: number | undefined;
6798
+ min_cluster_size?: number | undefined;
6799
+ min_samples?: number | undefined;
6800
+ hierarchy_threshold?: number | undefined;
6801
+ naming_model?: string | undefined;
6802
+ } | undefined;
6688
6803
  distance_threshold?: number | undefined;
6689
6804
  };
6690
6805
  topic_map_id?: string | undefined;
@@ -6737,6 +6852,34 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6737
6852
  bundle_key: z.ZodOptional<z.ZodString>;
6738
6853
  report_key: z.ZodOptional<z.ZodString>;
6739
6854
  topic_names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6855
+ generation_settings: z.ZodOptional<z.ZodObject<{
6856
+ algorithm: z.ZodEnum<["hdbscan", "kmeans"]>;
6857
+ dimension_reduction: z.ZodEnum<["umap", "pca", "none"]>;
6858
+ sample_size: z.ZodOptional<z.ZodNumber>;
6859
+ n_clusters: z.ZodOptional<z.ZodNumber>;
6860
+ min_cluster_size: z.ZodOptional<z.ZodNumber>;
6861
+ min_samples: z.ZodOptional<z.ZodNumber>;
6862
+ hierarchy_threshold: z.ZodOptional<z.ZodNumber>;
6863
+ naming_model: z.ZodOptional<z.ZodString>;
6864
+ }, "strip", z.ZodTypeAny, {
6865
+ algorithm: "hdbscan" | "kmeans";
6866
+ dimension_reduction: "none" | "umap" | "pca";
6867
+ sample_size?: number | undefined;
6868
+ n_clusters?: number | undefined;
6869
+ min_cluster_size?: number | undefined;
6870
+ min_samples?: number | undefined;
6871
+ hierarchy_threshold?: number | undefined;
6872
+ naming_model?: string | undefined;
6873
+ }, {
6874
+ algorithm: "hdbscan" | "kmeans";
6875
+ dimension_reduction: "none" | "umap" | "pca";
6876
+ sample_size?: number | undefined;
6877
+ n_clusters?: number | undefined;
6878
+ min_cluster_size?: number | undefined;
6879
+ min_samples?: number | undefined;
6880
+ hierarchy_threshold?: number | undefined;
6881
+ naming_model?: string | undefined;
6882
+ }>>;
6740
6883
  distance_threshold: z.ZodOptional<z.ZodNumber>;
6741
6884
  }, "strip", z.ZodTypeAny, {
6742
6885
  type: "topic_map";
@@ -6745,6 +6888,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6745
6888
  bundle_key?: string | undefined;
6746
6889
  report_key?: string | undefined;
6747
6890
  topic_names?: Record<string, string> | undefined;
6891
+ generation_settings?: {
6892
+ algorithm: "hdbscan" | "kmeans";
6893
+ dimension_reduction: "none" | "umap" | "pca";
6894
+ sample_size?: number | undefined;
6895
+ n_clusters?: number | undefined;
6896
+ min_cluster_size?: number | undefined;
6897
+ min_samples?: number | undefined;
6898
+ hierarchy_threshold?: number | undefined;
6899
+ naming_model?: string | undefined;
6900
+ } | undefined;
6748
6901
  distance_threshold?: number | undefined;
6749
6902
  }, {
6750
6903
  type: "topic_map";
@@ -6753,6 +6906,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6753
6906
  bundle_key?: string | undefined;
6754
6907
  report_key?: string | undefined;
6755
6908
  topic_names?: Record<string, string> | undefined;
6909
+ generation_settings?: {
6910
+ algorithm: "hdbscan" | "kmeans";
6911
+ dimension_reduction: "none" | "umap" | "pca";
6912
+ sample_size?: number | undefined;
6913
+ n_clusters?: number | undefined;
6914
+ min_cluster_size?: number | undefined;
6915
+ min_samples?: number | undefined;
6916
+ hierarchy_threshold?: number | undefined;
6917
+ naming_model?: string | undefined;
6918
+ } | undefined;
6756
6919
  distance_threshold?: number | undefined;
6757
6920
  }>, z.ZodUnknown>]>;
6758
6921
  declare const PromptData: z.ZodObject<{
@@ -15596,8 +15759,8 @@ declare const PromptSessionEvent: z.ZodObject<{
15596
15759
  _xact_id: string;
15597
15760
  prompt_session_id: string;
15598
15761
  function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
15599
- _pagination_key?: string | null | undefined;
15600
15762
  tags?: string[] | null | undefined;
15763
+ _pagination_key?: string | null | undefined;
15601
15764
  completion?: unknown;
15602
15765
  prompt_data?: unknown;
15603
15766
  function_data?: unknown;
@@ -15610,8 +15773,8 @@ declare const PromptSessionEvent: z.ZodObject<{
15610
15773
  _xact_id: string;
15611
15774
  prompt_session_id: string;
15612
15775
  function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
15613
- _pagination_key?: string | null | undefined;
15614
15776
  tags?: string[] | null | undefined;
15777
+ _pagination_key?: string | null | undefined;
15615
15778
  completion?: unknown;
15616
15779
  prompt_data?: unknown;
15617
15780
  function_data?: unknown;
@@ -15970,6 +16133,10 @@ type OtherExperimentLogFields = {
15970
16133
  error: unknown;
15971
16134
  tags: string[];
15972
16135
  scores: Record<string, number | null>;
16136
+ classifications?: Record<string, {
16137
+ id: string;
16138
+ label?: string;
16139
+ }[]>;
15973
16140
  metadata: Record<string, unknown>;
15974
16141
  metrics: Record<string, unknown>;
15975
16142
  datasetRecordId: string;
@@ -16137,6 +16304,42 @@ declare class SpanComponentsV3 {
16137
16304
  private static fromJsonObj;
16138
16305
  }
16139
16306
 
16307
+ /**
16308
+ * The result returned by a classifier function. Unlike `Score`, `id` is
16309
+ * required and the span will be recorded as a classifier span.
16310
+ */
16311
+ interface Classification {
16312
+ /**
16313
+ * The name of this classification result. Used as the key in the
16314
+ * `classifications` log record. If omitted, defaults to the classifier
16315
+ * function's name.
16316
+ */
16317
+ name: string;
16318
+ /**
16319
+ * A machine-readable identifier for the classification outcome
16320
+ * (e.g. `"positive"`, `"negative"`, `"neutral"`). This value is stored
16321
+ * in the log and used for programmatic analysis.
16322
+ */
16323
+ id: string;
16324
+ /**
16325
+ * An optional human-readable display label for this outcome. If omitted,
16326
+ * defaults to `id`. Use this when you want a friendlier label in the UI
16327
+ * while keeping a stable `id` for programmatic use.
16328
+ */
16329
+ label?: string;
16330
+ /**
16331
+ * Optional arbitrary metadata to attach to this classification result.
16332
+ */
16333
+ metadata?: Record<string, unknown>;
16334
+ }
16335
+ /**
16336
+ * The serialized form of a classification stored in the `classifications` log record.
16337
+ */
16338
+ interface ClassificationItem {
16339
+ id: string;
16340
+ label: string;
16341
+ metadata?: Record<string, unknown>;
16342
+ }
16140
16343
  interface Score {
16141
16344
  name: string;
16142
16345
  score: number | null;
@@ -18561,10 +18764,29 @@ interface Span extends Exportable {
18561
18764
  state(): BraintrustState;
18562
18765
  kind: "span";
18563
18766
  }
18767
+ declare const BRAINTRUST_CURRENT_SPAN_STORE: unique symbol;
18768
+ /**
18769
+ * The type of AsyncLocalStorage exposed via {@link BRAINTRUST_CURRENT_SPAN_STORE}.
18770
+ *
18771
+ * The stored value is intentionally opaque (`unknown`) because the concrete type
18772
+ * depends on the active context manager:
18773
+ * - Default (`BraintrustContextManager`): stores a `Span`
18774
+ * - OTEL compat (`OtelContextManager`): stores an OTEL `Context` object
18775
+ *
18776
+ * TracingChannel's `bindStore` transform (via `wrapSpanForStore`) produces the
18777
+ * correct value type for whichever mode is active.
18778
+ */
18779
+ type CurrentSpanStore = IsoAsyncLocalStorage<unknown>;
18564
18780
  declare abstract class ContextManager {
18565
18781
  abstract getParentSpanIds(): ContextParentSpanIds | undefined;
18566
18782
  abstract runInContext<R>(span: Span, callback: () => R): R;
18567
18783
  abstract getCurrentSpan(): Span | undefined;
18784
+ /**
18785
+ * Returns the value to store in the ALS bound to a TracingChannel's start event.
18786
+ * In default mode this is the Span itself; in OTEL mode it is the OTEL Context
18787
+ * containing the span so that OTEL's own ALS stores a proper Context object.
18788
+ */
18789
+ wrapSpanForStore(span: Span): unknown;
18568
18790
  }
18569
18791
  declare global {
18570
18792
  var BRAINTRUST_CONTEXT_MANAGER: (new () => ContextManager) | undefined;
@@ -19812,6 +20034,7 @@ type EvalCase<Input, Expected, Metadata> = {
19812
20034
  _xact_id?: TransactionId;
19813
20035
  created?: string | null;
19814
20036
  upsert_id?: string;
20037
+ trialCount?: number;
19815
20038
  } & (Expected extends void ? object : {
19816
20039
  expected: Expected;
19817
20040
  }) & (Metadata extends void ? object : {
@@ -20840,6 +21063,10 @@ interface OpenAIResponseCreateParams {
20840
21063
  stream?: boolean | null;
20841
21064
  [key: string]: unknown;
20842
21065
  }
21066
+ interface OpenAIResponseCompactParams {
21067
+ input: unknown;
21068
+ [key: string]: unknown;
21069
+ }
20843
21070
  interface OpenAIUsage {
20844
21071
  total_tokens?: number;
20845
21072
  prompt_tokens?: number;
@@ -20865,14 +21092,27 @@ interface OpenAIChatToolCall {
20865
21092
  interface OpenAIChatMessage {
20866
21093
  role?: string;
20867
21094
  content?: unknown;
21095
+ refusal?: string;
20868
21096
  tool_calls?: OpenAIChatToolCall[];
20869
21097
  [key: string]: unknown;
20870
21098
  }
21099
+ interface OpenAIChatTokenLogprob {
21100
+ token?: string;
21101
+ logprob?: number;
21102
+ bytes?: number[] | null;
21103
+ top_logprobs?: OpenAIChatTokenLogprob[];
21104
+ [key: string]: unknown;
21105
+ }
21106
+ interface OpenAIChatLogprobs {
21107
+ content?: OpenAIChatTokenLogprob[] | null;
21108
+ refusal?: OpenAIChatTokenLogprob[] | null;
21109
+ [key: string]: unknown;
21110
+ }
20871
21111
  interface OpenAIChatChoice {
20872
21112
  index: number;
20873
21113
  message: OpenAIChatMessage;
20874
21114
  finish_reason?: string | null;
20875
- logprobs?: unknown;
21115
+ logprobs?: OpenAIChatLogprobs | null;
20876
21116
  [key: string]: unknown;
20877
21117
  }
20878
21118
  interface OpenAIChatCompletion {
@@ -20883,6 +21123,7 @@ interface OpenAIChatCompletion {
20883
21123
  interface OpenAIChatDelta {
20884
21124
  role?: string;
20885
21125
  content?: string;
21126
+ refusal?: string;
20886
21127
  tool_calls?: OpenAIChatToolCall[];
20887
21128
  finish_reason?: string | null;
20888
21129
  [key: string]: unknown;
@@ -20890,6 +21131,7 @@ interface OpenAIChatDelta {
20890
21131
  interface OpenAIChatChunkChoice {
20891
21132
  delta?: OpenAIChatDelta;
20892
21133
  finish_reason?: string | null;
21134
+ logprobs?: OpenAIChatLogprobs | null;
20893
21135
  [key: string]: unknown;
20894
21136
  }
20895
21137
  interface OpenAIChatCompletionChunk {
@@ -20955,6 +21197,7 @@ interface OpenAIModerations {
20955
21197
  }
20956
21198
  interface OpenAIResponses {
20957
21199
  create: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse | OpenAIResponseStream>;
21200
+ compact?: (params: OpenAIResponseCompactParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse>;
20958
21201
  parse?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse>;
20959
21202
  stream?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAISyncStream;
20960
21203
  }
@@ -21119,12 +21362,201 @@ declare function wrapClaudeAgentSDK<T extends object>(sdk: T): T;
21119
21362
  */
21120
21363
  declare function wrapGoogleGenAI<T extends Record<string, any>>(googleGenAI: T): T;
21121
21364
 
21365
+ /**
21366
+ * Wrap a Google ADK module (imported with `import * as adk from '@google/adk'`) to add tracing.
21367
+ * If Braintrust is not configured, nothing will be traced.
21368
+ *
21369
+ * This wraps:
21370
+ * - Runner.runAsync / InMemoryRunner.runAsync — top-level agent execution
21371
+ * - BaseAgent.runAsync (and all subclasses) — individual agent invocations
21372
+ * - BaseTool.runAsync / FunctionTool.runAsync — tool execution
21373
+ *
21374
+ * LLM calls are already traced via the existing @google/genai instrumentation,
21375
+ * since ADK uses GenAI internally.
21376
+ *
21377
+ * @param adkModule The Google ADK module
21378
+ * @returns The wrapped Google ADK module
21379
+ *
21380
+ * @example
21381
+ * ```typescript
21382
+ * import * as adk from '@google/adk';
21383
+ * import { wrapGoogleADK, initLogger } from 'braintrust';
21384
+ *
21385
+ * initLogger({ projectName: 'Your project' });
21386
+ * const { LlmAgent, InMemoryRunner } = wrapGoogleADK(adk);
21387
+ *
21388
+ * const agent = new LlmAgent({ name: 'my_agent', model: 'gemini-2.5-flash' });
21389
+ * const runner = new InMemoryRunner({ agent });
21390
+ * for await (const event of runner.runAsync({ userId: 'u1', sessionId: 's1', newMessage: ... })) {
21391
+ * console.log(event);
21392
+ * }
21393
+ * ```
21394
+ */
21395
+ declare function wrapGoogleADK<T extends Record<string, any>>(adkModule: T): T;
21396
+
21397
+ interface HuggingFaceRequestOptions {
21398
+ retry_on_error?: boolean;
21399
+ fetch?: typeof fetch;
21400
+ signal?: AbortSignal;
21401
+ includeCredentials?: string | boolean;
21402
+ billTo?: string;
21403
+ [key: string]: unknown;
21404
+ }
21405
+ interface HuggingFaceClientConstructor {
21406
+ new (...args: unknown[]): HuggingFaceClient;
21407
+ }
21408
+ interface HuggingFaceModule {
21409
+ InferenceClient?: HuggingFaceClientConstructor;
21410
+ InferenceClientEndpoint?: HuggingFaceClientConstructor;
21411
+ HfInference?: HuggingFaceClientConstructor;
21412
+ HfInferenceEndpoint?: HuggingFaceClientConstructor;
21413
+ chatCompletion?: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceChatCompletion>;
21414
+ chatCompletionStream?: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceChatCompletionChunk>;
21415
+ textGeneration?: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceTextGenerationOutput>;
21416
+ textGenerationStream?: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceTextGenerationStreamOutput>;
21417
+ featureExtraction?: (params: HuggingFaceFeatureExtractionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceFeatureExtractionOutput>;
21418
+ [key: string]: unknown;
21419
+ }
21420
+ interface HuggingFaceClient {
21421
+ chatCompletion: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceChatCompletion>;
21422
+ chatCompletionStream: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceChatCompletionChunk>;
21423
+ textGeneration: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceTextGenerationOutput>;
21424
+ textGenerationStream: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceTextGenerationStreamOutput>;
21425
+ featureExtraction: (params: HuggingFaceFeatureExtractionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceFeatureExtractionOutput>;
21426
+ endpoint?: (endpointUrl: string) => HuggingFaceClient;
21427
+ [key: string]: unknown;
21428
+ }
21429
+ interface HuggingFaceChatCompletionParams {
21430
+ messages?: unknown;
21431
+ model?: string;
21432
+ provider?: string;
21433
+ endpointUrl?: string;
21434
+ stream?: boolean;
21435
+ [key: string]: unknown;
21436
+ }
21437
+ interface HuggingFaceTextGenerationParams {
21438
+ inputs?: unknown;
21439
+ model?: string;
21440
+ provider?: string;
21441
+ endpointUrl?: string;
21442
+ stream?: boolean;
21443
+ parameters?: Record<string, unknown>;
21444
+ [key: string]: unknown;
21445
+ }
21446
+ interface HuggingFaceFeatureExtractionParams {
21447
+ inputs?: unknown;
21448
+ model?: string;
21449
+ provider?: string;
21450
+ endpointUrl?: string;
21451
+ dimensions?: number | null;
21452
+ encoding_format?: "float" | "base64";
21453
+ [key: string]: unknown;
21454
+ }
21455
+ interface HuggingFaceUsage {
21456
+ prompt_tokens?: number;
21457
+ completion_tokens?: number;
21458
+ total_tokens?: number;
21459
+ [key: string]: unknown;
21460
+ }
21461
+ interface HuggingFaceChatMessage {
21462
+ role?: string;
21463
+ content?: string | null | unknown[];
21464
+ tool_calls?: unknown;
21465
+ [key: string]: unknown;
21466
+ }
21467
+ interface HuggingFaceChatCompletionChoice {
21468
+ index?: number;
21469
+ message?: HuggingFaceChatMessage;
21470
+ delta?: HuggingFaceChatMessage;
21471
+ finish_reason?: string | null;
21472
+ [key: string]: unknown;
21473
+ }
21474
+ interface HuggingFaceChatCompletion {
21475
+ id?: string;
21476
+ object?: string;
21477
+ model?: string;
21478
+ created?: number;
21479
+ usage?: HuggingFaceUsage;
21480
+ choices?: HuggingFaceChatCompletionChoice[];
21481
+ [key: string]: unknown;
21482
+ }
21483
+ type HuggingFaceChatCompletionChunk = HuggingFaceChatCompletion;
21484
+ interface HuggingFaceTextGenerationToken {
21485
+ id?: number;
21486
+ text?: string;
21487
+ logprob?: number;
21488
+ special?: boolean;
21489
+ [key: string]: unknown;
21490
+ }
21491
+ interface HuggingFaceTextGenerationDetails {
21492
+ finish_reason?: string | null;
21493
+ generated_tokens?: number;
21494
+ prefill?: HuggingFaceTextGenerationToken[];
21495
+ tokens?: HuggingFaceTextGenerationToken[];
21496
+ [key: string]: unknown;
21497
+ }
21498
+ interface HuggingFaceTextGenerationOutput {
21499
+ generated_text?: string | null;
21500
+ details?: HuggingFaceTextGenerationDetails | null;
21501
+ [key: string]: unknown;
21502
+ }
21503
+ interface HuggingFaceTextGenerationChoice {
21504
+ index?: number;
21505
+ text?: string;
21506
+ finish_reason?: string | null;
21507
+ [key: string]: unknown;
21508
+ }
21509
+ interface HuggingFaceTextGenerationStreamOutput {
21510
+ index?: number;
21511
+ token?: HuggingFaceTextGenerationToken;
21512
+ choices?: HuggingFaceTextGenerationChoice[];
21513
+ generated_text?: string | null;
21514
+ details?: HuggingFaceTextGenerationDetails | null;
21515
+ usage?: HuggingFaceUsage;
21516
+ model?: string;
21517
+ object?: string;
21518
+ created?: number;
21519
+ [key: string]: unknown;
21520
+ }
21521
+ type HuggingFaceFeatureExtractionOutput = number[] | number[][] | number[][][];
21522
+
21523
+ /**
21524
+ * Wrap a HuggingFace Inference SDK module or client with Braintrust tracing.
21525
+ *
21526
+ * Supports the LLM and embeddings APIs we intentionally instrument:
21527
+ * - chatCompletion
21528
+ * - chatCompletionStream
21529
+ * - textGeneration
21530
+ * - textGenerationStream
21531
+ * - featureExtraction
21532
+ */
21533
+ declare function wrapHuggingFace(huggingFace: HuggingFaceModule): HuggingFaceModule;
21534
+ declare function wrapHuggingFace(huggingFace: HuggingFaceClient): HuggingFaceClient;
21535
+ declare function wrapHuggingFace<T>(huggingFace: T): T;
21536
+
21537
+ /**
21538
+ * Wrap an @openrouter/agent OpenRouter client so callModel() emits
21539
+ * diagnostics-channel events consumed by the OpenRouter Agent plugin.
21540
+ */
21541
+ declare function wrapOpenRouterAgent<T extends object>(agent: T): T;
21542
+
21122
21543
  /**
21123
21544
  * Wrap an OpenRouter client (created with `new OpenRouter(...)`) so calls emit
21124
21545
  * diagnostics-channel events that Braintrust plugins can consume.
21125
21546
  */
21126
21547
  declare function wrapOpenRouter<T>(openrouter: T): T;
21127
21548
 
21549
+ /**
21550
+ * Wrap a Mistral client (created with `new Mistral(...)`) with Braintrust tracing.
21551
+ */
21552
+ declare function wrapMistral<T>(mistral: T): T;
21553
+
21554
+ /**
21555
+ * Wrap a Cohere client so method calls emit diagnostics-channel events that
21556
+ * Braintrust plugins can consume.
21557
+ */
21558
+ declare function wrapCohere<T>(cohere: T): T;
21559
+
21128
21560
  type ScorerFunction<Output = unknown> = (args: {
21129
21561
  output: Output;
21130
21562
  expected?: unknown;
@@ -29404,7 +29836,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
29404
29836
  description?: string | undefined;
29405
29837
  default?: unknown;
29406
29838
  }>]>>;
29407
- source: z.ZodNull;
29839
+ source: z.ZodOptional<z.ZodNullable<z.ZodNull>>;
29408
29840
  }, "strip", z.ZodTypeAny, {
29409
29841
  type: "braintrust.staticParameters";
29410
29842
  schema: Record<string, {
@@ -29670,7 +30102,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
29670
30102
  description?: string | undefined;
29671
30103
  default?: unknown;
29672
30104
  }>;
29673
- source: null;
30105
+ source?: null | undefined;
29674
30106
  }, {
29675
30107
  type: "braintrust.staticParameters";
29676
30108
  schema: Record<string, {
@@ -29936,7 +30368,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
29936
30368
  description?: string | undefined;
29937
30369
  default?: unknown;
29938
30370
  }>;
29939
- source: null;
30371
+ source?: null | undefined;
29940
30372
  }>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
29941
30373
  type: z.ZodLiteral<"prompt">;
29942
30374
  default: z.ZodOptional<z.ZodObject<{
@@ -32267,6 +32699,13 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32267
32699
  }, {
32268
32700
  name: string;
32269
32701
  }>, "many">>;
32702
+ classifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
32703
+ name: z.ZodString;
32704
+ }, "strip", z.ZodTypeAny, {
32705
+ name: string;
32706
+ }, {
32707
+ name: string;
32708
+ }>, "many">>;
32270
32709
  }, "strip", z.ZodTypeAny, {
32271
32710
  parameters?: Record<string, {
32272
32711
  type: "prompt";
@@ -32810,11 +33249,14 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32810
33249
  description?: string | undefined;
32811
33250
  default?: unknown;
32812
33251
  }>;
32813
- source: null;
33252
+ source?: null | undefined;
32814
33253
  } | undefined;
32815
33254
  scores?: {
32816
33255
  name: string;
32817
33256
  }[] | undefined;
33257
+ classifiers?: {
33258
+ name: string;
33259
+ }[] | undefined;
32818
33260
  }, {
32819
33261
  parameters?: Record<string, {
32820
33262
  type: "prompt";
@@ -33358,11 +33800,14 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33358
33800
  description?: string | undefined;
33359
33801
  default?: unknown;
33360
33802
  }>;
33361
- source: null;
33803
+ source?: null | undefined;
33362
33804
  } | undefined;
33363
33805
  scores?: {
33364
33806
  name: string;
33365
33807
  }[] | undefined;
33808
+ classifiers?: {
33809
+ name: string;
33810
+ }[] | undefined;
33366
33811
  }>;
33367
33812
  type EvaluatorDefinition = z.infer<typeof evaluatorDefinitionSchema>;
33368
33813
  declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -35758,7 +36203,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
35758
36203
  description?: string | undefined;
35759
36204
  default?: unknown;
35760
36205
  }>]>>;
35761
- source: z.ZodNull;
36206
+ source: z.ZodOptional<z.ZodNullable<z.ZodNull>>;
35762
36207
  }, "strip", z.ZodTypeAny, {
35763
36208
  type: "braintrust.staticParameters";
35764
36209
  schema: Record<string, {
@@ -36024,7 +36469,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
36024
36469
  description?: string | undefined;
36025
36470
  default?: unknown;
36026
36471
  }>;
36027
- source: null;
36472
+ source?: null | undefined;
36028
36473
  }, {
36029
36474
  type: "braintrust.staticParameters";
36030
36475
  schema: Record<string, {
@@ -36290,7 +36735,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
36290
36735
  description?: string | undefined;
36291
36736
  default?: unknown;
36292
36737
  }>;
36293
- source: null;
36738
+ source?: null | undefined;
36294
36739
  }>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
36295
36740
  type: z.ZodLiteral<"prompt">;
36296
36741
  default: z.ZodOptional<z.ZodObject<{
@@ -38621,6 +39066,13 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38621
39066
  }, {
38622
39067
  name: string;
38623
39068
  }>, "many">>;
39069
+ classifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
39070
+ name: z.ZodString;
39071
+ }, "strip", z.ZodTypeAny, {
39072
+ name: string;
39073
+ }, {
39074
+ name: string;
39075
+ }>, "many">>;
38624
39076
  }, "strip", z.ZodTypeAny, {
38625
39077
  parameters?: Record<string, {
38626
39078
  type: "prompt";
@@ -39164,11 +39616,14 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39164
39616
  description?: string | undefined;
39165
39617
  default?: unknown;
39166
39618
  }>;
39167
- source: null;
39619
+ source?: null | undefined;
39168
39620
  } | undefined;
39169
39621
  scores?: {
39170
39622
  name: string;
39171
39623
  }[] | undefined;
39624
+ classifiers?: {
39625
+ name: string;
39626
+ }[] | undefined;
39172
39627
  }, {
39173
39628
  parameters?: Record<string, {
39174
39629
  type: "prompt";
@@ -39712,11 +40167,14 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39712
40167
  description?: string | undefined;
39713
40168
  default?: unknown;
39714
40169
  }>;
39715
- source: null;
40170
+ source?: null | undefined;
39716
40171
  } | undefined;
39717
40172
  scores?: {
39718
40173
  name: string;
39719
40174
  }[] | undefined;
40175
+ classifiers?: {
40176
+ name: string;
40177
+ }[] | undefined;
39720
40178
  }>>;
39721
40179
  type EvaluatorDefinitions = z.infer<typeof evaluatorDefinitionsSchema>;
39722
40180
 
@@ -40007,17 +40465,23 @@ type EvalScorerArgs<Input, Output, Expected, Metadata extends BaseMetadata = Def
40007
40465
  };
40008
40466
  type OneOrMoreScores = Score | number | null | Array<Score>;
40009
40467
  type EvalScorer<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = (args: EvalScorerArgs<Input, Output, Expected, Metadata>) => OneOrMoreScores | Promise<OneOrMoreScores>;
40468
+ type OneOrMoreClassifications = Classification | Classification[] | null;
40469
+ type EvalClassifier<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = (args: EvalScorerArgs<Input, Output, Expected, Metadata>) => OneOrMoreClassifications | Promise<OneOrMoreClassifications>;
40010
40470
  type EvalResult<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalCase<Input, Expected, Metadata> & {
40011
40471
  output: Output;
40012
- scores: Record<string, number | null>;
40013
40472
  error: unknown;
40014
40473
  origin?: ObjectReferenceType;
40474
+ scores: Record<string, number | null>;
40475
+ classifications?: Record<string, ClassificationItem[]>;
40015
40476
  };
40016
40477
  type ErrorScoreHandler = (args: {
40017
40478
  rootSpan: Span;
40018
40479
  data: EvalCase<any, any, any>;
40019
40480
  unhandledScores: string[];
40020
40481
  }) => Record<string, number> | undefined | void;
40482
+ /**
40483
+ * Defines an evaluator. At least one of `scores` or `classifiers` must be provided.
40484
+ */
40021
40485
  interface Evaluator<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters> {
40022
40486
  /**
40023
40487
  * A function that returns a list of inputs, expected outputs, and metadata.
@@ -40028,9 +40492,16 @@ interface Evaluator<Input, Output, Expected, Metadata extends BaseMetadata = Def
40028
40492
  */
40029
40493
  task: EvalTask<Input, Output, Expected, Metadata, Parameters>;
40030
40494
  /**
40031
- * A set of functions that take an input, output, and expected value and return a score.
40495
+ * A set of functions that take an input, output, and expected value and return a {@link Score}.
40496
+ * At least one of `scores` or `classifiers` must be provided.
40497
+ */
40498
+ scores?: EvalScorer<Input, Output, Expected, Metadata>[];
40499
+ /**
40500
+ * A set of functions that take an input, output, and expected value and return a
40501
+ * {@link Classification}. Results are recorded under the `classifications` column.
40502
+ * At least one of `scores` or `classifiers` must be provided.
40032
40503
  */
40033
- scores: EvalScorer<Input, Output, Expected, Metadata>[];
40504
+ classifiers?: EvalClassifier<Input, Output, Expected, Metadata>[];
40034
40505
  /**
40035
40506
  * A set of parameters that will be passed to the evaluator.
40036
40507
  * Can be:
@@ -40279,8 +40750,12 @@ interface InstrumentationConfig {
40279
40750
  vercel?: boolean;
40280
40751
  aisdk?: boolean;
40281
40752
  google?: boolean;
40753
+ huggingface?: boolean;
40282
40754
  claudeAgentSDK?: boolean;
40283
40755
  openrouter?: boolean;
40756
+ openrouterAgent?: boolean;
40757
+ mistral?: boolean;
40758
+ cohere?: boolean;
40284
40759
  };
40285
40760
  }
40286
40761
  /**
@@ -40317,6 +40792,7 @@ type exports_Attachment = Attachment;
40317
40792
  declare const exports_Attachment: typeof Attachment;
40318
40793
  type exports_AttachmentParams = AttachmentParams;
40319
40794
  declare const exports_AttachmentReference: typeof AttachmentReference;
40795
+ declare const exports_BRAINTRUST_CURRENT_SPAN_STORE: typeof BRAINTRUST_CURRENT_SPAN_STORE;
40320
40796
  type exports_BackgroundLoggerOpts = BackgroundLoggerOpts;
40321
40797
  type exports_BaseAttachment = BaseAttachment;
40322
40798
  declare const exports_BaseAttachment: typeof BaseAttachment;
@@ -40344,6 +40820,7 @@ type exports_ContextManager = ContextManager;
40344
40820
  declare const exports_ContextManager: typeof ContextManager;
40345
40821
  type exports_ContextParentSpanIds = ContextParentSpanIds;
40346
40822
  type exports_CreateProjectOpts = CreateProjectOpts;
40823
+ type exports_CurrentSpanStore = CurrentSpanStore;
40347
40824
  declare const exports_DEFAULT_FETCH_BATCH_SIZE: typeof DEFAULT_FETCH_BATCH_SIZE;
40348
40825
  declare const exports_DEFAULT_MAX_REQUEST_SIZE: typeof DEFAULT_MAX_REQUEST_SIZE;
40349
40826
  type exports_DataSummary = DataSummary;
@@ -40357,6 +40834,7 @@ declare const exports_ERR_PERMALINK: typeof ERR_PERMALINK;
40357
40834
  type exports_EndSpanArgs = EndSpanArgs;
40358
40835
  declare const exports_Eval: typeof Eval;
40359
40836
  type exports_EvalCase<Input, Expected, Metadata> = EvalCase<Input, Expected, Metadata>;
40837
+ type exports_EvalClassifier<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalClassifier<Input, Output, Expected, Metadata>;
40360
40838
  type exports_EvalHooks<Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters> = EvalHooks<Expected, Metadata, Parameters>;
40361
40839
  type exports_EvalParameterSerializedSchema = EvalParameterSerializedSchema;
40362
40840
  type exports_EvalParameters = EvalParameters;
@@ -40554,15 +41032,20 @@ declare const exports_wrapAISDKModel: typeof wrapAISDKModel;
40554
41032
  declare const exports_wrapAgentClass: typeof wrapAgentClass;
40555
41033
  declare const exports_wrapAnthropic: typeof wrapAnthropic;
40556
41034
  declare const exports_wrapClaudeAgentSDK: typeof wrapClaudeAgentSDK;
41035
+ declare const exports_wrapCohere: typeof wrapCohere;
41036
+ declare const exports_wrapGoogleADK: typeof wrapGoogleADK;
40557
41037
  declare const exports_wrapGoogleGenAI: typeof wrapGoogleGenAI;
41038
+ declare const exports_wrapHuggingFace: typeof wrapHuggingFace;
40558
41039
  declare const exports_wrapMastraAgent: typeof wrapMastraAgent;
41040
+ declare const exports_wrapMistral: typeof wrapMistral;
40559
41041
  declare const exports_wrapOpenAI: typeof wrapOpenAI;
40560
41042
  declare const exports_wrapOpenAIv4: typeof wrapOpenAIv4;
40561
41043
  declare const exports_wrapOpenRouter: typeof wrapOpenRouter;
41044
+ declare const exports_wrapOpenRouterAgent: typeof wrapOpenRouterAgent;
40562
41045
  declare const exports_wrapTraced: typeof wrapTraced;
40563
41046
  declare const exports_wrapVitest: typeof wrapVitest;
40564
41047
  declare namespace exports {
40565
- export { type exports_AnyDataset as AnyDataset, exports_Attachment as Attachment, type exports_AttachmentParams as AttachmentParams, exports_AttachmentReference as AttachmentReference, type exports_BackgroundLoggerOpts as BackgroundLoggerOpts, exports_BaseAttachment as BaseAttachment, exports_BaseExperiment as BaseExperiment, type exports_BaseMetadata as BaseMetadata, exports_BraintrustMiddleware as BraintrustMiddleware, exports_BraintrustState as BraintrustState, exports_BraintrustStream as BraintrustStream, type exports_BraintrustStreamChunk as BraintrustStreamChunk, exports_CachedSpanFetcher as CachedSpanFetcher, type exports_ChatPrompt as ChatPrompt, exports_CodeFunction as CodeFunction, type exports_CodeOpts as CodeOpts, exports_CodePrompt as CodePrompt, type exports_CommentEvent as CommentEvent, type exports_CompiledPrompt as CompiledPrompt, type exports_CompiledPromptParams as CompiledPromptParams, type exports_CompletionPrompt as CompletionPrompt, exports_ContextManager as ContextManager, type exports_ContextParentSpanIds as ContextParentSpanIds, type exports_CreateProjectOpts as CreateProjectOpts, exports_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports_DataSummary as DataSummary, exports_Dataset as Dataset, type exports_DatasetRecord as DatasetRecord, type exports_DatasetSummary as DatasetSummary, type exports_DefaultMetadataType as DefaultMetadataType, type exports_DefaultPromptArgs as DefaultPromptArgs, exports_ERR_PERMALINK as ERR_PERMALINK, type exports_EndSpanArgs as EndSpanArgs, exports_Eval as Eval, type exports_EvalCase as EvalCase, type exports_EvalHooks as EvalHooks, type exports_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports_EvalParameters as EvalParameters, type exports_EvalResult as EvalResult, exports_EvalResultWithSummary as EvalResultWithSummary, type exports_EvalScorer as EvalScorer, type exports_EvalScorerArgs as EvalScorerArgs, type exports_EvalTask as EvalTask, type exports_Evaluator as Evaluator, type exports_EvaluatorDef as EvaluatorDef, type exports_EvaluatorDefinition as EvaluatorDefinition, type exports_EvaluatorDefinitions as EvaluatorDefinitions, type exports_EvaluatorFile as EvaluatorFile, type exports_EvaluatorManifest as EvaluatorManifest, exports_Experiment as Experiment, type exports_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports_ExperimentSummary as ExperimentSummary, type exports_Exportable as Exportable, exports_ExternalAttachment as ExternalAttachment, type exports_ExternalAttachmentParams as ExternalAttachmentParams, exports_FailedHTTPResponse as FailedHTTPResponse, type exports_FullInitDatasetOptions as FullInitDatasetOptions, type exports_FullInitOptions as FullInitOptions, type exports_FullLoginOptions as FullLoginOptions, type exports_FunctionEvent as FunctionEvent, type exports_GetThreadOptions as GetThreadOptions, exports_IDGenerator as IDGenerator, type exports_IdField as IdField, type exports_InitDatasetOptions as InitDatasetOptions, type exports_InitLoggerOptions as InitLoggerOptions, type exports_InitOptions as InitOptions, type exports_InputField as InputField, type exports_InstrumentationConfig as InstrumentationConfig, type exports_InvokeFunctionArgs as InvokeFunctionArgs, type exports_InvokeReturn as InvokeReturn, exports_JSONAttachment as JSONAttachment, exports_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, exports_LazyValue as LazyValue, type exports_LoadPromptOptions as LoadPromptOptions, type exports_LogCommentFullArgs as LogCommentFullArgs, type exports_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports_LogOptions as LogOptions, exports_Logger as Logger, exports_LoginInvalidOrgError as LoginInvalidOrgError, type exports_LoginOptions as LoginOptions, type exports_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports_Logs3OverflowUpload as Logs3OverflowUpload, type exports_MetricSummary as MetricSummary, exports_NOOP_SPAN as NOOP_SPAN, exports_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports_NoopSpan as NoopSpan, exports_ObjectFetcher as ObjectFetcher, type exports_ObjectMetadata as ObjectMetadata, type exports_OtherExperimentLogFields as OtherExperimentLogFields, type exports_ParametersSource as ParametersSource, type exports_ParentExperimentIds as ParentExperimentIds, type exports_ParentProjectLogIds as ParentProjectLogIds, exports_Project as Project, exports_ProjectNameIdMap as ProjectNameIdMap, type exports_PromiseUnless as PromiseUnless, exports_Prompt as Prompt, exports_PromptBuilder as PromptBuilder, type exports_PromptContents as PromptContents, type exports_PromptDefinition as PromptDefinition, type exports_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports_PromptOpts as PromptOpts, type exports_PromptRowWithId as PromptRowWithId, exports_ReadonlyAttachment as ReadonlyAttachment, exports_ReadonlyExperiment as ReadonlyExperiment, type exports_RegisterSandboxOptions as RegisterSandboxOptions, type exports_RegisterSandboxResult as RegisterSandboxResult, exports_Reporter as Reporter, type exports_ReporterBody as ReporterBody, type exports_SandboxConfig as SandboxConfig, type exports_ScoreSummary as ScoreSummary, exports_ScorerBuilder as ScorerBuilder, type exports_ScorerOpts as ScorerOpts, type exports_SerializedBraintrustState as SerializedBraintrustState, type exports_SetCurrentArg as SetCurrentArg, type exports_Span as Span, type exports_SpanContext as SpanContext, type exports_SpanData as SpanData, exports_SpanFetcher as SpanFetcher, exports_SpanImpl as SpanImpl, type exports_StartSpanArgs as StartSpanArgs, type exports_TemplateFormat as TemplateFormat, type exports_TemplateRenderer as TemplateRenderer, type exports_TemplateRendererPlugin as TemplateRendererPlugin, exports_TestBackgroundLogger as TestBackgroundLogger, exports_ToolBuilder as ToolBuilder, type exports_Trace as Trace, exports_UUIDGenerator as UUIDGenerator, type exports_WithTransactionId as WithTransactionId, exports_X_CACHED_HEADER as X_CACHED_HEADER, exports__exportsForTestingOnly as _exportsForTestingOnly, exports__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports__internalSetInitialState as _internalSetInitialState, exports_addAzureBlobHeaders as addAzureBlobHeaders, exports_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports_buildLocalSummary as buildLocalSummary, exports_configureInstrumentation as configureInstrumentation, exports_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports_currentExperiment as currentExperiment, exports_currentLogger as currentLogger, exports_currentSpan as currentSpan, exports_deepCopyEvent as deepCopyEvent, exports_defaultErrorScoreHandler as defaultErrorScoreHandler, exports_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports_devNullWritableStream as devNullWritableStream, exports_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports_flush as flush, exports_getContextManager as getContextManager, exports_getIdGenerator as getIdGenerator, exports_getPromptVersions as getPromptVersions, exports_getSpanParentObject as getSpanParentObject, exports_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports_init as init, exports_initDataset as initDataset, exports_initExperiment as initExperiment, exports_initFunction as initFunction, exports_initLogger as initLogger, exports_initNodeTestSuite as initNodeTestSuite, exports_invoke as invoke, exports_isTemplateFormat as isTemplateFormat, exports_loadParameters as loadParameters, exports_loadPrompt as loadPrompt, exports_log as log, exports_logError as logError, exports_login as login, exports_loginToState as loginToState, exports_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports_newId as newId, exports_parseCachedHeader as parseCachedHeader, exports_parseTemplateFormat as parseTemplateFormat, exports_permalink as permalink, exports_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports_projects as projects, exports_promptContentsSchema as promptContentsSchema, exports_promptDefinitionSchema as promptDefinitionSchema, exports_promptDefinitionToPromptData as promptDefinitionToPromptData, exports_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports_registerOtelFlush as registerOtelFlush, exports_registerSandbox as registerSandbox, exports_registerTemplatePlugin as registerTemplatePlugin, exports_renderMessage as renderMessage, exports_renderPromptParams as renderPromptParams, exports_renderTemplateContent as renderTemplateContent, exports_reportFailures as reportFailures, exports_runEvaluator as runEvaluator, exports_setFetch as setFetch, exports_setMaskingFunction as setMaskingFunction, exports_spanComponentsToObjectId as spanComponentsToObjectId, exports_startSpan as startSpan, exports_summarize as summarize, exports_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports_traceable as traceable, exports_traced as traced, exports_updateSpan as updateSpan, exports_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports_utf8ByteLength as utf8ByteLength, exports_withCurrent as withCurrent, exports_withDataset as withDataset, exports_withExperiment as withExperiment, exports_withLogger as withLogger, exports_withParent as withParent, exports_wrapAISDK as wrapAISDK, exports_wrapAISDKModel as wrapAISDKModel, exports_wrapAgentClass as wrapAgentClass, exports_wrapAnthropic as wrapAnthropic, exports_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports_wrapGoogleGenAI as wrapGoogleGenAI, exports_wrapMastraAgent as wrapMastraAgent, exports_wrapOpenAI as wrapOpenAI, exports_wrapOpenAIv4 as wrapOpenAIv4, exports_wrapOpenRouter as wrapOpenRouter, exports_wrapTraced as wrapTraced, exports_wrapVitest as wrapVitest };
41048
+ export { type exports_AnyDataset as AnyDataset, exports_Attachment as Attachment, type exports_AttachmentParams as AttachmentParams, exports_AttachmentReference as AttachmentReference, exports_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, type exports_BackgroundLoggerOpts as BackgroundLoggerOpts, exports_BaseAttachment as BaseAttachment, exports_BaseExperiment as BaseExperiment, type exports_BaseMetadata as BaseMetadata, exports_BraintrustMiddleware as BraintrustMiddleware, exports_BraintrustState as BraintrustState, exports_BraintrustStream as BraintrustStream, type exports_BraintrustStreamChunk as BraintrustStreamChunk, exports_CachedSpanFetcher as CachedSpanFetcher, type exports_ChatPrompt as ChatPrompt, exports_CodeFunction as CodeFunction, type exports_CodeOpts as CodeOpts, exports_CodePrompt as CodePrompt, type exports_CommentEvent as CommentEvent, type exports_CompiledPrompt as CompiledPrompt, type exports_CompiledPromptParams as CompiledPromptParams, type exports_CompletionPrompt as CompletionPrompt, exports_ContextManager as ContextManager, type exports_ContextParentSpanIds as ContextParentSpanIds, type exports_CreateProjectOpts as CreateProjectOpts, type exports_CurrentSpanStore as CurrentSpanStore, exports_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports_DataSummary as DataSummary, exports_Dataset as Dataset, type exports_DatasetRecord as DatasetRecord, type exports_DatasetSummary as DatasetSummary, type exports_DefaultMetadataType as DefaultMetadataType, type exports_DefaultPromptArgs as DefaultPromptArgs, exports_ERR_PERMALINK as ERR_PERMALINK, type exports_EndSpanArgs as EndSpanArgs, exports_Eval as Eval, type exports_EvalCase as EvalCase, type exports_EvalClassifier as EvalClassifier, type exports_EvalHooks as EvalHooks, type exports_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports_EvalParameters as EvalParameters, type exports_EvalResult as EvalResult, exports_EvalResultWithSummary as EvalResultWithSummary, type exports_EvalScorer as EvalScorer, type exports_EvalScorerArgs as EvalScorerArgs, type exports_EvalTask as EvalTask, type exports_Evaluator as Evaluator, type exports_EvaluatorDef as EvaluatorDef, type exports_EvaluatorDefinition as EvaluatorDefinition, type exports_EvaluatorDefinitions as EvaluatorDefinitions, type exports_EvaluatorFile as EvaluatorFile, type exports_EvaluatorManifest as EvaluatorManifest, exports_Experiment as Experiment, type exports_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports_ExperimentSummary as ExperimentSummary, type exports_Exportable as Exportable, exports_ExternalAttachment as ExternalAttachment, type exports_ExternalAttachmentParams as ExternalAttachmentParams, exports_FailedHTTPResponse as FailedHTTPResponse, type exports_FullInitDatasetOptions as FullInitDatasetOptions, type exports_FullInitOptions as FullInitOptions, type exports_FullLoginOptions as FullLoginOptions, type exports_FunctionEvent as FunctionEvent, type exports_GetThreadOptions as GetThreadOptions, exports_IDGenerator as IDGenerator, type exports_IdField as IdField, type exports_InitDatasetOptions as InitDatasetOptions, type exports_InitLoggerOptions as InitLoggerOptions, type exports_InitOptions as InitOptions, type exports_InputField as InputField, type exports_InstrumentationConfig as InstrumentationConfig, type exports_InvokeFunctionArgs as InvokeFunctionArgs, type exports_InvokeReturn as InvokeReturn, exports_JSONAttachment as JSONAttachment, exports_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, exports_LazyValue as LazyValue, type exports_LoadPromptOptions as LoadPromptOptions, type exports_LogCommentFullArgs as LogCommentFullArgs, type exports_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports_LogOptions as LogOptions, exports_Logger as Logger, exports_LoginInvalidOrgError as LoginInvalidOrgError, type exports_LoginOptions as LoginOptions, type exports_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports_Logs3OverflowUpload as Logs3OverflowUpload, type exports_MetricSummary as MetricSummary, exports_NOOP_SPAN as NOOP_SPAN, exports_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports_NoopSpan as NoopSpan, exports_ObjectFetcher as ObjectFetcher, type exports_ObjectMetadata as ObjectMetadata, type exports_OtherExperimentLogFields as OtherExperimentLogFields, type exports_ParametersSource as ParametersSource, type exports_ParentExperimentIds as ParentExperimentIds, type exports_ParentProjectLogIds as ParentProjectLogIds, exports_Project as Project, exports_ProjectNameIdMap as ProjectNameIdMap, type exports_PromiseUnless as PromiseUnless, exports_Prompt as Prompt, exports_PromptBuilder as PromptBuilder, type exports_PromptContents as PromptContents, type exports_PromptDefinition as PromptDefinition, type exports_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports_PromptOpts as PromptOpts, type exports_PromptRowWithId as PromptRowWithId, exports_ReadonlyAttachment as ReadonlyAttachment, exports_ReadonlyExperiment as ReadonlyExperiment, type exports_RegisterSandboxOptions as RegisterSandboxOptions, type exports_RegisterSandboxResult as RegisterSandboxResult, exports_Reporter as Reporter, type exports_ReporterBody as ReporterBody, type exports_SandboxConfig as SandboxConfig, type exports_ScoreSummary as ScoreSummary, exports_ScorerBuilder as ScorerBuilder, type exports_ScorerOpts as ScorerOpts, type exports_SerializedBraintrustState as SerializedBraintrustState, type exports_SetCurrentArg as SetCurrentArg, type exports_Span as Span, type exports_SpanContext as SpanContext, type exports_SpanData as SpanData, exports_SpanFetcher as SpanFetcher, exports_SpanImpl as SpanImpl, type exports_StartSpanArgs as StartSpanArgs, type exports_TemplateFormat as TemplateFormat, type exports_TemplateRenderer as TemplateRenderer, type exports_TemplateRendererPlugin as TemplateRendererPlugin, exports_TestBackgroundLogger as TestBackgroundLogger, exports_ToolBuilder as ToolBuilder, type exports_Trace as Trace, exports_UUIDGenerator as UUIDGenerator, type exports_WithTransactionId as WithTransactionId, exports_X_CACHED_HEADER as X_CACHED_HEADER, exports__exportsForTestingOnly as _exportsForTestingOnly, exports__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports__internalSetInitialState as _internalSetInitialState, exports_addAzureBlobHeaders as addAzureBlobHeaders, exports_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports_buildLocalSummary as buildLocalSummary, exports_configureInstrumentation as configureInstrumentation, exports_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports_currentExperiment as currentExperiment, exports_currentLogger as currentLogger, exports_currentSpan as currentSpan, exports_deepCopyEvent as deepCopyEvent, exports_defaultErrorScoreHandler as defaultErrorScoreHandler, exports_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports_devNullWritableStream as devNullWritableStream, exports_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports_flush as flush, exports_getContextManager as getContextManager, exports_getIdGenerator as getIdGenerator, exports_getPromptVersions as getPromptVersions, exports_getSpanParentObject as getSpanParentObject, exports_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports_init as init, exports_initDataset as initDataset, exports_initExperiment as initExperiment, exports_initFunction as initFunction, exports_initLogger as initLogger, exports_initNodeTestSuite as initNodeTestSuite, exports_invoke as invoke, exports_isTemplateFormat as isTemplateFormat, exports_loadParameters as loadParameters, exports_loadPrompt as loadPrompt, exports_log as log, exports_logError as logError, exports_login as login, exports_loginToState as loginToState, exports_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports_newId as newId, exports_parseCachedHeader as parseCachedHeader, exports_parseTemplateFormat as parseTemplateFormat, exports_permalink as permalink, exports_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports_projects as projects, exports_promptContentsSchema as promptContentsSchema, exports_promptDefinitionSchema as promptDefinitionSchema, exports_promptDefinitionToPromptData as promptDefinitionToPromptData, exports_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports_registerOtelFlush as registerOtelFlush, exports_registerSandbox as registerSandbox, exports_registerTemplatePlugin as registerTemplatePlugin, exports_renderMessage as renderMessage, exports_renderPromptParams as renderPromptParams, exports_renderTemplateContent as renderTemplateContent, exports_reportFailures as reportFailures, exports_runEvaluator as runEvaluator, exports_setFetch as setFetch, exports_setMaskingFunction as setMaskingFunction, exports_spanComponentsToObjectId as spanComponentsToObjectId, exports_startSpan as startSpan, exports_summarize as summarize, exports_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports_traceable as traceable, exports_traced as traced, exports_updateSpan as updateSpan, exports_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports_utf8ByteLength as utf8ByteLength, exports_withCurrent as withCurrent, exports_withDataset as withDataset, exports_withExperiment as withExperiment, exports_withLogger as withLogger, exports_withParent as withParent, exports_wrapAISDK as wrapAISDK, exports_wrapAISDKModel as wrapAISDKModel, exports_wrapAgentClass as wrapAgentClass, exports_wrapAnthropic as wrapAnthropic, exports_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports_wrapCohere as wrapCohere, exports_wrapGoogleADK as wrapGoogleADK, exports_wrapGoogleGenAI as wrapGoogleGenAI, exports_wrapHuggingFace as wrapHuggingFace, exports_wrapMastraAgent as wrapMastraAgent, exports_wrapMistral as wrapMistral, exports_wrapOpenAI as wrapOpenAI, exports_wrapOpenAIv4 as wrapOpenAIv4, exports_wrapOpenRouter as wrapOpenRouter, exports_wrapOpenRouterAgent as wrapOpenRouterAgent, exports_wrapTraced as wrapTraced, exports_wrapVitest as wrapVitest };
40566
41049
  }
40567
41050
 
40568
- export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustMiddleware, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, LazyValue, type LoadPromptOptions, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, braintrustStreamChunkSchema, buildLocalSummary, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapClaudeAgentSDK, wrapGoogleGenAI, wrapMastraAgent, wrapOpenAI, wrapOpenAIv4, wrapOpenRouter, wrapTraced, wrapVitest };
41051
+ export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustMiddleware, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalClassifier, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, LazyValue, type LoadPromptOptions, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, braintrustStreamChunkSchema, buildLocalSummary, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapClaudeAgentSDK, wrapCohere, wrapGoogleADK, wrapGoogleGenAI, wrapHuggingFace, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };