braintrust 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dev/dist/index.d.mts +144 -2
- package/dev/dist/index.d.ts +144 -2
- package/dev/dist/index.js +3322 -799
- package/dev/dist/index.mjs +3214 -691
- package/dist/auto-instrumentations/bundler/esbuild.cjs +377 -13
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/rollup.cjs +377 -13
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +377 -13
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +377 -13
- package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +11 -9
- package/dist/auto-instrumentations/bundler/webpack.cjs +377 -13
- package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
- package/dist/auto-instrumentations/{chunk-EVUKFMHG.mjs → chunk-ITP7RAUY.mjs} +21 -3
- package/dist/auto-instrumentations/{chunk-ZK2IYER2.mjs → chunk-MD7W27YH.mjs} +5 -1
- package/dist/auto-instrumentations/{chunk-AKEXR4AL.mjs → chunk-OLBMPZXE.mjs} +378 -14
- package/dist/auto-instrumentations/{chunk-VLEJ5AEK.mjs → chunk-P5YLNB2A.mjs} +21 -3
- package/dist/auto-instrumentations/hook.mjs +393 -19
- package/dist/auto-instrumentations/index.cjs +379 -13
- package/dist/auto-instrumentations/index.d.mts +5 -1
- package/dist/auto-instrumentations/index.d.ts +5 -1
- package/dist/auto-instrumentations/index.mjs +5 -1
- package/dist/auto-instrumentations/loader/cjs-patch.cjs +34 -6
- package/dist/auto-instrumentations/loader/cjs-patch.d.mts +1 -0
- package/dist/auto-instrumentations/loader/cjs-patch.d.ts +1 -0
- package/dist/auto-instrumentations/loader/cjs-patch.mjs +15 -5
- package/dist/auto-instrumentations/loader/esm-hook.mjs +8 -3
- package/dist/auto-instrumentations/loader/get-package-version.cjs +20 -2
- package/dist/auto-instrumentations/loader/get-package-version.mjs +1 -1
- package/dist/browser.d.mts +199 -44
- package/dist/browser.d.ts +199 -44
- package/dist/browser.js +7086 -6747
- package/dist/browser.mjs +7086 -6747
- package/dist/cli.js +3200 -677
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +12645 -12215
- package/dist/edge-light.mjs +12645 -12215
- package/dist/index.d.mts +199 -44
- package/dist/index.d.ts +199 -44
- package/dist/index.js +7173 -6834
- package/dist/index.mjs +7022 -6683
- package/dist/instrumentation/index.d.mts +7 -0
- package/dist/instrumentation/index.d.ts +7 -0
- package/dist/instrumentation/index.js +3170 -669
- package/dist/instrumentation/index.mjs +3170 -669
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +12645 -12215
- package/dist/workerd.mjs +12645 -12215
- package/package.json +45 -45
package/dist/index.d.mts
CHANGED
|
@@ -6584,6 +6584,34 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6584
6584
|
bundle_key: z.ZodOptional<z.ZodString>;
|
|
6585
6585
|
report_key: z.ZodOptional<z.ZodString>;
|
|
6586
6586
|
topic_names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6587
|
+
generation_settings: z.ZodOptional<z.ZodObject<{
|
|
6588
|
+
algorithm: z.ZodEnum<["hdbscan", "kmeans"]>;
|
|
6589
|
+
dimension_reduction: z.ZodEnum<["umap", "pca", "none"]>;
|
|
6590
|
+
sample_size: z.ZodOptional<z.ZodNumber>;
|
|
6591
|
+
n_clusters: z.ZodOptional<z.ZodNumber>;
|
|
6592
|
+
min_cluster_size: z.ZodOptional<z.ZodNumber>;
|
|
6593
|
+
min_samples: z.ZodOptional<z.ZodNumber>;
|
|
6594
|
+
hierarchy_threshold: z.ZodOptional<z.ZodNumber>;
|
|
6595
|
+
naming_model: z.ZodOptional<z.ZodString>;
|
|
6596
|
+
}, "strip", z.ZodTypeAny, {
|
|
6597
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6598
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6599
|
+
sample_size?: number | undefined;
|
|
6600
|
+
n_clusters?: number | undefined;
|
|
6601
|
+
min_cluster_size?: number | undefined;
|
|
6602
|
+
min_samples?: number | undefined;
|
|
6603
|
+
hierarchy_threshold?: number | undefined;
|
|
6604
|
+
naming_model?: string | undefined;
|
|
6605
|
+
}, {
|
|
6606
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6607
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6608
|
+
sample_size?: number | undefined;
|
|
6609
|
+
n_clusters?: number | undefined;
|
|
6610
|
+
min_cluster_size?: number | undefined;
|
|
6611
|
+
min_samples?: number | undefined;
|
|
6612
|
+
hierarchy_threshold?: number | undefined;
|
|
6613
|
+
naming_model?: string | undefined;
|
|
6614
|
+
}>>;
|
|
6587
6615
|
distance_threshold: z.ZodOptional<z.ZodNumber>;
|
|
6588
6616
|
}, "strip", z.ZodTypeAny, {
|
|
6589
6617
|
type: "topic_map";
|
|
@@ -6592,6 +6620,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6592
6620
|
bundle_key?: string | undefined;
|
|
6593
6621
|
report_key?: string | undefined;
|
|
6594
6622
|
topic_names?: Record<string, string> | undefined;
|
|
6623
|
+
generation_settings?: {
|
|
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
|
+
} | undefined;
|
|
6595
6633
|
distance_threshold?: number | undefined;
|
|
6596
6634
|
}, {
|
|
6597
6635
|
type: "topic_map";
|
|
@@ -6600,6 +6638,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6600
6638
|
bundle_key?: string | undefined;
|
|
6601
6639
|
report_key?: string | undefined;
|
|
6602
6640
|
topic_names?: Record<string, string> | undefined;
|
|
6641
|
+
generation_settings?: {
|
|
6642
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6643
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6644
|
+
sample_size?: number | undefined;
|
|
6645
|
+
n_clusters?: number | undefined;
|
|
6646
|
+
min_cluster_size?: number | undefined;
|
|
6647
|
+
min_samples?: number | undefined;
|
|
6648
|
+
hierarchy_threshold?: number | undefined;
|
|
6649
|
+
naming_model?: string | undefined;
|
|
6650
|
+
} | undefined;
|
|
6603
6651
|
distance_threshold?: number | undefined;
|
|
6604
6652
|
}>;
|
|
6605
6653
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -6611,6 +6659,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6611
6659
|
bundle_key?: string | undefined;
|
|
6612
6660
|
report_key?: string | undefined;
|
|
6613
6661
|
topic_names?: Record<string, string> | undefined;
|
|
6662
|
+
generation_settings?: {
|
|
6663
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6664
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6665
|
+
sample_size?: number | undefined;
|
|
6666
|
+
n_clusters?: number | undefined;
|
|
6667
|
+
min_cluster_size?: number | undefined;
|
|
6668
|
+
min_samples?: number | undefined;
|
|
6669
|
+
hierarchy_threshold?: number | undefined;
|
|
6670
|
+
naming_model?: string | undefined;
|
|
6671
|
+
} | undefined;
|
|
6614
6672
|
distance_threshold?: number | undefined;
|
|
6615
6673
|
};
|
|
6616
6674
|
topic_map_id?: string | undefined;
|
|
@@ -6623,6 +6681,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6623
6681
|
bundle_key?: string | undefined;
|
|
6624
6682
|
report_key?: string | undefined;
|
|
6625
6683
|
topic_names?: Record<string, string> | undefined;
|
|
6684
|
+
generation_settings?: {
|
|
6685
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6686
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6687
|
+
sample_size?: number | undefined;
|
|
6688
|
+
n_clusters?: number | undefined;
|
|
6689
|
+
min_cluster_size?: number | undefined;
|
|
6690
|
+
min_samples?: number | undefined;
|
|
6691
|
+
hierarchy_threshold?: number | undefined;
|
|
6692
|
+
naming_model?: string | undefined;
|
|
6693
|
+
} | undefined;
|
|
6626
6694
|
distance_threshold?: number | undefined;
|
|
6627
6695
|
};
|
|
6628
6696
|
topic_map_id?: string | undefined;
|
|
@@ -6654,6 +6722,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6654
6722
|
bundle_key?: string | undefined;
|
|
6655
6723
|
report_key?: string | undefined;
|
|
6656
6724
|
topic_names?: Record<string, string> | undefined;
|
|
6725
|
+
generation_settings?: {
|
|
6726
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6727
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6728
|
+
sample_size?: number | undefined;
|
|
6729
|
+
n_clusters?: number | undefined;
|
|
6730
|
+
min_cluster_size?: number | undefined;
|
|
6731
|
+
min_samples?: number | undefined;
|
|
6732
|
+
hierarchy_threshold?: number | undefined;
|
|
6733
|
+
naming_model?: string | undefined;
|
|
6734
|
+
} | undefined;
|
|
6657
6735
|
distance_threshold?: number | undefined;
|
|
6658
6736
|
};
|
|
6659
6737
|
topic_map_id?: string | undefined;
|
|
@@ -6685,6 +6763,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6685
6763
|
bundle_key?: string | undefined;
|
|
6686
6764
|
report_key?: string | undefined;
|
|
6687
6765
|
topic_names?: Record<string, string> | undefined;
|
|
6766
|
+
generation_settings?: {
|
|
6767
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6768
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6769
|
+
sample_size?: number | undefined;
|
|
6770
|
+
n_clusters?: number | undefined;
|
|
6771
|
+
min_cluster_size?: number | undefined;
|
|
6772
|
+
min_samples?: number | undefined;
|
|
6773
|
+
hierarchy_threshold?: number | undefined;
|
|
6774
|
+
naming_model?: string | undefined;
|
|
6775
|
+
} | undefined;
|
|
6688
6776
|
distance_threshold?: number | undefined;
|
|
6689
6777
|
};
|
|
6690
6778
|
topic_map_id?: string | undefined;
|
|
@@ -6737,6 +6825,34 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6737
6825
|
bundle_key: z.ZodOptional<z.ZodString>;
|
|
6738
6826
|
report_key: z.ZodOptional<z.ZodString>;
|
|
6739
6827
|
topic_names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6828
|
+
generation_settings: z.ZodOptional<z.ZodObject<{
|
|
6829
|
+
algorithm: z.ZodEnum<["hdbscan", "kmeans"]>;
|
|
6830
|
+
dimension_reduction: z.ZodEnum<["umap", "pca", "none"]>;
|
|
6831
|
+
sample_size: z.ZodOptional<z.ZodNumber>;
|
|
6832
|
+
n_clusters: z.ZodOptional<z.ZodNumber>;
|
|
6833
|
+
min_cluster_size: z.ZodOptional<z.ZodNumber>;
|
|
6834
|
+
min_samples: z.ZodOptional<z.ZodNumber>;
|
|
6835
|
+
hierarchy_threshold: z.ZodOptional<z.ZodNumber>;
|
|
6836
|
+
naming_model: z.ZodOptional<z.ZodString>;
|
|
6837
|
+
}, "strip", z.ZodTypeAny, {
|
|
6838
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6839
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6840
|
+
sample_size?: number | undefined;
|
|
6841
|
+
n_clusters?: number | undefined;
|
|
6842
|
+
min_cluster_size?: number | undefined;
|
|
6843
|
+
min_samples?: number | undefined;
|
|
6844
|
+
hierarchy_threshold?: number | undefined;
|
|
6845
|
+
naming_model?: string | undefined;
|
|
6846
|
+
}, {
|
|
6847
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6848
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6849
|
+
sample_size?: number | undefined;
|
|
6850
|
+
n_clusters?: number | undefined;
|
|
6851
|
+
min_cluster_size?: number | undefined;
|
|
6852
|
+
min_samples?: number | undefined;
|
|
6853
|
+
hierarchy_threshold?: number | undefined;
|
|
6854
|
+
naming_model?: string | undefined;
|
|
6855
|
+
}>>;
|
|
6740
6856
|
distance_threshold: z.ZodOptional<z.ZodNumber>;
|
|
6741
6857
|
}, "strip", z.ZodTypeAny, {
|
|
6742
6858
|
type: "topic_map";
|
|
@@ -6745,6 +6861,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6745
6861
|
bundle_key?: string | undefined;
|
|
6746
6862
|
report_key?: string | undefined;
|
|
6747
6863
|
topic_names?: Record<string, string> | undefined;
|
|
6864
|
+
generation_settings?: {
|
|
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
|
+
} | undefined;
|
|
6748
6874
|
distance_threshold?: number | undefined;
|
|
6749
6875
|
}, {
|
|
6750
6876
|
type: "topic_map";
|
|
@@ -6753,6 +6879,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
6753
6879
|
bundle_key?: string | undefined;
|
|
6754
6880
|
report_key?: string | undefined;
|
|
6755
6881
|
topic_names?: Record<string, string> | undefined;
|
|
6882
|
+
generation_settings?: {
|
|
6883
|
+
algorithm: "hdbscan" | "kmeans";
|
|
6884
|
+
dimension_reduction: "none" | "umap" | "pca";
|
|
6885
|
+
sample_size?: number | undefined;
|
|
6886
|
+
n_clusters?: number | undefined;
|
|
6887
|
+
min_cluster_size?: number | undefined;
|
|
6888
|
+
min_samples?: number | undefined;
|
|
6889
|
+
hierarchy_threshold?: number | undefined;
|
|
6890
|
+
naming_model?: string | undefined;
|
|
6891
|
+
} | undefined;
|
|
6756
6892
|
distance_threshold?: number | undefined;
|
|
6757
6893
|
}>, z.ZodUnknown>]>;
|
|
6758
6894
|
declare const PromptData: z.ZodObject<{
|
|
@@ -15596,8 +15732,8 @@ declare const PromptSessionEvent: z.ZodObject<{
|
|
|
15596
15732
|
_xact_id: string;
|
|
15597
15733
|
prompt_session_id: string;
|
|
15598
15734
|
function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
|
|
15599
|
-
_pagination_key?: string | null | undefined;
|
|
15600
15735
|
tags?: string[] | null | undefined;
|
|
15736
|
+
_pagination_key?: string | null | undefined;
|
|
15601
15737
|
completion?: unknown;
|
|
15602
15738
|
prompt_data?: unknown;
|
|
15603
15739
|
function_data?: unknown;
|
|
@@ -15610,8 +15746,8 @@ declare const PromptSessionEvent: z.ZodObject<{
|
|
|
15610
15746
|
_xact_id: string;
|
|
15611
15747
|
prompt_session_id: string;
|
|
15612
15748
|
function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
|
|
15613
|
-
_pagination_key?: string | null | undefined;
|
|
15614
15749
|
tags?: string[] | null | undefined;
|
|
15750
|
+
_pagination_key?: string | null | undefined;
|
|
15615
15751
|
completion?: unknown;
|
|
15616
15752
|
prompt_data?: unknown;
|
|
15617
15753
|
function_data?: unknown;
|
|
@@ -15756,7 +15892,7 @@ interface IsoTracingChannel<M = any> extends IsoTracingChannelCollection<M> {
|
|
|
15756
15892
|
subscribe(handlers: IsoChannelHandlers<M>): void;
|
|
15757
15893
|
unsubscribe(handlers: IsoChannelHandlers<M>): boolean;
|
|
15758
15894
|
traceSync<F extends (...args: any[]) => any>(fn: F, message?: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
|
|
15759
|
-
tracePromise<F extends (...args: any[]) => any
|
|
15895
|
+
tracePromise<F extends (...args: any[]) => PromiseLike<any>>(fn: F, message?: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
|
|
15760
15896
|
traceCallback<F extends (...args: any[]) => any>(fn: F, position?: number, message?: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
|
|
15761
15897
|
}
|
|
15762
15898
|
interface IsoChannelHandlers<M = any> {
|
|
@@ -18561,10 +18697,29 @@ interface Span extends Exportable {
|
|
|
18561
18697
|
state(): BraintrustState;
|
|
18562
18698
|
kind: "span";
|
|
18563
18699
|
}
|
|
18700
|
+
declare const BRAINTRUST_CURRENT_SPAN_STORE: unique symbol;
|
|
18701
|
+
/**
|
|
18702
|
+
* The type of AsyncLocalStorage exposed via {@link BRAINTRUST_CURRENT_SPAN_STORE}.
|
|
18703
|
+
*
|
|
18704
|
+
* The stored value is intentionally opaque (`unknown`) because the concrete type
|
|
18705
|
+
* depends on the active context manager:
|
|
18706
|
+
* - Default (`BraintrustContextManager`): stores a `Span`
|
|
18707
|
+
* - OTEL compat (`OtelContextManager`): stores an OTEL `Context` object
|
|
18708
|
+
*
|
|
18709
|
+
* TracingChannel's `bindStore` transform (via `wrapSpanForStore`) produces the
|
|
18710
|
+
* correct value type for whichever mode is active.
|
|
18711
|
+
*/
|
|
18712
|
+
type CurrentSpanStore = IsoAsyncLocalStorage<unknown>;
|
|
18564
18713
|
declare abstract class ContextManager {
|
|
18565
18714
|
abstract getParentSpanIds(): ContextParentSpanIds | undefined;
|
|
18566
18715
|
abstract runInContext<R>(span: Span, callback: () => R): R;
|
|
18567
18716
|
abstract getCurrentSpan(): Span | undefined;
|
|
18717
|
+
/**
|
|
18718
|
+
* Returns the value to store in the ALS bound to a TracingChannel's start event.
|
|
18719
|
+
* In default mode this is the Span itself; in OTEL mode it is the OTEL Context
|
|
18720
|
+
* containing the span so that OTEL's own ALS stores a proper Context object.
|
|
18721
|
+
*/
|
|
18722
|
+
wrapSpanForStore(span: Span): unknown;
|
|
18568
18723
|
}
|
|
18569
18724
|
declare global {
|
|
18570
18725
|
var BRAINTRUST_CONTEXT_MANAGER: (new () => ContextManager) | undefined;
|
|
@@ -20840,6 +20995,10 @@ interface OpenAIResponseCreateParams {
|
|
|
20840
20995
|
stream?: boolean | null;
|
|
20841
20996
|
[key: string]: unknown;
|
|
20842
20997
|
}
|
|
20998
|
+
interface OpenAIResponseCompactParams {
|
|
20999
|
+
input: unknown;
|
|
21000
|
+
[key: string]: unknown;
|
|
21001
|
+
}
|
|
20843
21002
|
interface OpenAIUsage {
|
|
20844
21003
|
total_tokens?: number;
|
|
20845
21004
|
prompt_tokens?: number;
|
|
@@ -20955,6 +21114,7 @@ interface OpenAIModerations {
|
|
|
20955
21114
|
}
|
|
20956
21115
|
interface OpenAIResponses {
|
|
20957
21116
|
create: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse | OpenAIResponseStream>;
|
|
21117
|
+
compact?: (params: OpenAIResponseCompactParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse>;
|
|
20958
21118
|
parse?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse>;
|
|
20959
21119
|
stream?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAISyncStream;
|
|
20960
21120
|
}
|
|
@@ -20988,12 +21148,10 @@ interface WrapAISDKOptions {
|
|
|
20988
21148
|
denyOutputPaths?: string[];
|
|
20989
21149
|
}
|
|
20990
21150
|
/**
|
|
20991
|
-
* Wraps Vercel AI SDK methods with Braintrust tracing.
|
|
20992
|
-
* of generateText, streamText, generateObject, streamObject, Agent, experimental_Agent,
|
|
20993
|
-
* and ToolLoopAgent that automatically create spans and log inputs, outputs, and metrics.
|
|
21151
|
+
* Wraps Vercel AI SDK methods with Braintrust tracing.
|
|
20994
21152
|
*
|
|
20995
21153
|
* @param ai - The AI SDK namespace (e.g., import * as ai from "ai")
|
|
20996
|
-
* @returns
|
|
21154
|
+
* @returns AI SDK with Braintrust tracing.
|
|
20997
21155
|
*
|
|
20998
21156
|
* @example
|
|
20999
21157
|
* ```typescript
|
|
@@ -21074,9 +21232,8 @@ interface MiddlewareConfig {
|
|
|
21074
21232
|
declare function BraintrustMiddleware(config?: MiddlewareConfig): LanguageModelV2Middleware<any, any>;
|
|
21075
21233
|
|
|
21076
21234
|
/**
|
|
21077
|
-
* Wrap an `Anthropic` object (created with `new Anthropic(...)`)
|
|
21078
|
-
*
|
|
21079
|
-
* a no-op.
|
|
21235
|
+
* Wrap an `Anthropic` object (created with `new Anthropic(...)`) so calls emit
|
|
21236
|
+
* tracing-channel events that Braintrust plugins can consume.
|
|
21080
21237
|
*
|
|
21081
21238
|
* Currently, this only supports the `v4` API.
|
|
21082
21239
|
*
|
|
@@ -21094,31 +21251,12 @@ declare function wrapMastraAgent<T>(agent: T, _options?: {
|
|
|
21094
21251
|
}): T;
|
|
21095
21252
|
|
|
21096
21253
|
/**
|
|
21097
|
-
* Wraps the Claude Agent SDK with Braintrust tracing.
|
|
21098
|
-
*
|
|
21254
|
+
* Wraps the Claude Agent SDK with Braintrust tracing. Query calls only publish
|
|
21255
|
+
* tracing-channel events; the Claude Agent SDK plugin owns all span lifecycle
|
|
21256
|
+
* work, including root/task spans, LLM spans, tool spans, and sub-agent spans.
|
|
21099
21257
|
*
|
|
21100
21258
|
* @param sdk - The Claude Agent SDK module
|
|
21101
21259
|
* @returns Object with wrapped query, tool, and createSdkMcpServer functions
|
|
21102
|
-
*
|
|
21103
|
-
* @example
|
|
21104
|
-
* ```typescript
|
|
21105
|
-
* import * as claudeSDK from "@anthropic-ai/claude-agent-sdk";
|
|
21106
|
-
* import { wrapClaudeAgentSDK } from "braintrust";
|
|
21107
|
-
*
|
|
21108
|
-
* // Wrap once - returns { query, tool, createSdkMcpServer } with tracing built-in
|
|
21109
|
-
* const { query, tool, createSdkMcpServer } = wrapClaudeAgentSDK(claudeSDK);
|
|
21110
|
-
*
|
|
21111
|
-
* // Use normally - tracing is automatic
|
|
21112
|
-
* for await (const message of query({
|
|
21113
|
-
* prompt: "Hello, Claude!",
|
|
21114
|
-
* options: { model: "claude-haiku-4-5-20251001" }
|
|
21115
|
-
* })) {
|
|
21116
|
-
* console.log(message);
|
|
21117
|
-
* }
|
|
21118
|
-
*
|
|
21119
|
-
* // Tools created with wrapped tool() are automatically traced
|
|
21120
|
-
* const calculator = tool("calculator", "Does math", schema, handler);
|
|
21121
|
-
* ```
|
|
21122
21260
|
*/
|
|
21123
21261
|
declare function wrapClaudeAgentSDK<T extends object>(sdk: T): T;
|
|
21124
21262
|
|
|
@@ -21141,12 +21279,23 @@ declare function wrapClaudeAgentSDK<T extends object>(sdk: T): T;
|
|
|
21141
21279
|
*/
|
|
21142
21280
|
declare function wrapGoogleGenAI<T extends Record<string, any>>(googleGenAI: T): T;
|
|
21143
21281
|
|
|
21282
|
+
/**
|
|
21283
|
+
* Wrap an @openrouter/agent OpenRouter client so callModel() emits
|
|
21284
|
+
* diagnostics-channel events consumed by the OpenRouter Agent plugin.
|
|
21285
|
+
*/
|
|
21286
|
+
declare function wrapOpenRouterAgent<T extends object>(agent: T): T;
|
|
21287
|
+
|
|
21144
21288
|
/**
|
|
21145
21289
|
* Wrap an OpenRouter client (created with `new OpenRouter(...)`) so calls emit
|
|
21146
21290
|
* diagnostics-channel events that Braintrust plugins can consume.
|
|
21147
21291
|
*/
|
|
21148
21292
|
declare function wrapOpenRouter<T>(openrouter: T): T;
|
|
21149
21293
|
|
|
21294
|
+
/**
|
|
21295
|
+
* Wrap a Mistral client (created with `new Mistral(...)`) with Braintrust tracing.
|
|
21296
|
+
*/
|
|
21297
|
+
declare function wrapMistral<T>(mistral: T): T;
|
|
21298
|
+
|
|
21150
21299
|
type ScorerFunction<Output = unknown> = (args: {
|
|
21151
21300
|
output: Output;
|
|
21152
21301
|
expected?: unknown;
|
|
@@ -29426,7 +29575,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
29426
29575
|
description?: string | undefined;
|
|
29427
29576
|
default?: unknown;
|
|
29428
29577
|
}>]>>;
|
|
29429
|
-
source: z.ZodNull
|
|
29578
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodNull>>;
|
|
29430
29579
|
}, "strip", z.ZodTypeAny, {
|
|
29431
29580
|
type: "braintrust.staticParameters";
|
|
29432
29581
|
schema: Record<string, {
|
|
@@ -29692,7 +29841,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
29692
29841
|
description?: string | undefined;
|
|
29693
29842
|
default?: unknown;
|
|
29694
29843
|
}>;
|
|
29695
|
-
source
|
|
29844
|
+
source?: null | undefined;
|
|
29696
29845
|
}, {
|
|
29697
29846
|
type: "braintrust.staticParameters";
|
|
29698
29847
|
schema: Record<string, {
|
|
@@ -29958,7 +30107,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
29958
30107
|
description?: string | undefined;
|
|
29959
30108
|
default?: unknown;
|
|
29960
30109
|
}>;
|
|
29961
|
-
source
|
|
30110
|
+
source?: null | undefined;
|
|
29962
30111
|
}>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
29963
30112
|
type: z.ZodLiteral<"prompt">;
|
|
29964
30113
|
default: z.ZodOptional<z.ZodObject<{
|
|
@@ -32832,7 +32981,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32832
32981
|
description?: string | undefined;
|
|
32833
32982
|
default?: unknown;
|
|
32834
32983
|
}>;
|
|
32835
|
-
source
|
|
32984
|
+
source?: null | undefined;
|
|
32836
32985
|
} | undefined;
|
|
32837
32986
|
scores?: {
|
|
32838
32987
|
name: string;
|
|
@@ -33380,7 +33529,7 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
33380
33529
|
description?: string | undefined;
|
|
33381
33530
|
default?: unknown;
|
|
33382
33531
|
}>;
|
|
33383
|
-
source
|
|
33532
|
+
source?: null | undefined;
|
|
33384
33533
|
} | undefined;
|
|
33385
33534
|
scores?: {
|
|
33386
33535
|
name: string;
|
|
@@ -35780,7 +35929,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
35780
35929
|
description?: string | undefined;
|
|
35781
35930
|
default?: unknown;
|
|
35782
35931
|
}>]>>;
|
|
35783
|
-
source: z.ZodNull
|
|
35932
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodNull>>;
|
|
35784
35933
|
}, "strip", z.ZodTypeAny, {
|
|
35785
35934
|
type: "braintrust.staticParameters";
|
|
35786
35935
|
schema: Record<string, {
|
|
@@ -36046,7 +36195,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
36046
36195
|
description?: string | undefined;
|
|
36047
36196
|
default?: unknown;
|
|
36048
36197
|
}>;
|
|
36049
|
-
source
|
|
36198
|
+
source?: null | undefined;
|
|
36050
36199
|
}, {
|
|
36051
36200
|
type: "braintrust.staticParameters";
|
|
36052
36201
|
schema: Record<string, {
|
|
@@ -36312,7 +36461,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
36312
36461
|
description?: string | undefined;
|
|
36313
36462
|
default?: unknown;
|
|
36314
36463
|
}>;
|
|
36315
|
-
source
|
|
36464
|
+
source?: null | undefined;
|
|
36316
36465
|
}>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
36317
36466
|
type: z.ZodLiteral<"prompt">;
|
|
36318
36467
|
default: z.ZodOptional<z.ZodObject<{
|
|
@@ -39186,7 +39335,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
39186
39335
|
description?: string | undefined;
|
|
39187
39336
|
default?: unknown;
|
|
39188
39337
|
}>;
|
|
39189
|
-
source
|
|
39338
|
+
source?: null | undefined;
|
|
39190
39339
|
} | undefined;
|
|
39191
39340
|
scores?: {
|
|
39192
39341
|
name: string;
|
|
@@ -39734,7 +39883,7 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
39734
39883
|
description?: string | undefined;
|
|
39735
39884
|
default?: unknown;
|
|
39736
39885
|
}>;
|
|
39737
|
-
source
|
|
39886
|
+
source?: null | undefined;
|
|
39738
39887
|
} | undefined;
|
|
39739
39888
|
scores?: {
|
|
39740
39889
|
name: string;
|
|
@@ -40303,6 +40452,8 @@ interface InstrumentationConfig {
|
|
|
40303
40452
|
google?: boolean;
|
|
40304
40453
|
claudeAgentSDK?: boolean;
|
|
40305
40454
|
openrouter?: boolean;
|
|
40455
|
+
openrouterAgent?: boolean;
|
|
40456
|
+
mistral?: boolean;
|
|
40306
40457
|
};
|
|
40307
40458
|
}
|
|
40308
40459
|
/**
|
|
@@ -40339,6 +40490,7 @@ type exports_Attachment = Attachment;
|
|
|
40339
40490
|
declare const exports_Attachment: typeof Attachment;
|
|
40340
40491
|
type exports_AttachmentParams = AttachmentParams;
|
|
40341
40492
|
declare const exports_AttachmentReference: typeof AttachmentReference;
|
|
40493
|
+
declare const exports_BRAINTRUST_CURRENT_SPAN_STORE: typeof BRAINTRUST_CURRENT_SPAN_STORE;
|
|
40342
40494
|
type exports_BackgroundLoggerOpts = BackgroundLoggerOpts;
|
|
40343
40495
|
type exports_BaseAttachment = BaseAttachment;
|
|
40344
40496
|
declare const exports_BaseAttachment: typeof BaseAttachment;
|
|
@@ -40366,6 +40518,7 @@ type exports_ContextManager = ContextManager;
|
|
|
40366
40518
|
declare const exports_ContextManager: typeof ContextManager;
|
|
40367
40519
|
type exports_ContextParentSpanIds = ContextParentSpanIds;
|
|
40368
40520
|
type exports_CreateProjectOpts = CreateProjectOpts;
|
|
40521
|
+
type exports_CurrentSpanStore = CurrentSpanStore;
|
|
40369
40522
|
declare const exports_DEFAULT_FETCH_BATCH_SIZE: typeof DEFAULT_FETCH_BATCH_SIZE;
|
|
40370
40523
|
declare const exports_DEFAULT_MAX_REQUEST_SIZE: typeof DEFAULT_MAX_REQUEST_SIZE;
|
|
40371
40524
|
type exports_DataSummary = DataSummary;
|
|
@@ -40578,13 +40731,15 @@ declare const exports_wrapAnthropic: typeof wrapAnthropic;
|
|
|
40578
40731
|
declare const exports_wrapClaudeAgentSDK: typeof wrapClaudeAgentSDK;
|
|
40579
40732
|
declare const exports_wrapGoogleGenAI: typeof wrapGoogleGenAI;
|
|
40580
40733
|
declare const exports_wrapMastraAgent: typeof wrapMastraAgent;
|
|
40734
|
+
declare const exports_wrapMistral: typeof wrapMistral;
|
|
40581
40735
|
declare const exports_wrapOpenAI: typeof wrapOpenAI;
|
|
40582
40736
|
declare const exports_wrapOpenAIv4: typeof wrapOpenAIv4;
|
|
40583
40737
|
declare const exports_wrapOpenRouter: typeof wrapOpenRouter;
|
|
40738
|
+
declare const exports_wrapOpenRouterAgent: typeof wrapOpenRouterAgent;
|
|
40584
40739
|
declare const exports_wrapTraced: typeof wrapTraced;
|
|
40585
40740
|
declare const exports_wrapVitest: typeof wrapVitest;
|
|
40586
40741
|
declare namespace exports {
|
|
40587
|
-
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 };
|
|
40742
|
+
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_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_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 };
|
|
40588
40743
|
}
|
|
40589
40744
|
|
|
40590
|
-
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 };
|
|
40745
|
+
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 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, wrapMistral, wrapOpenAI, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };
|