braintrust 3.3.0-rc.45 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +52 -67
  2. package/dev/dist/index.d.mts +53 -9
  3. package/dev/dist/index.d.ts +53 -9
  4. package/dev/dist/index.js +1839 -1298
  5. package/dev/dist/index.mjs +1503 -962
  6. package/dist/auto-instrumentations/bundler/esbuild.cjs +270 -23
  7. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  8. package/dist/auto-instrumentations/bundler/rollup.cjs +270 -23
  9. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  10. package/dist/auto-instrumentations/bundler/vite.cjs +270 -23
  11. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  12. package/dist/auto-instrumentations/bundler/webpack.cjs +270 -23
  13. package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
  14. package/dist/auto-instrumentations/{chunk-OLOPGWTJ.mjs → chunk-D5ZPIUEL.mjs} +1 -1
  15. package/dist/auto-instrumentations/chunk-LVWWLUMN.mjs +535 -0
  16. package/dist/auto-instrumentations/hook.mjs +306 -23
  17. package/dist/auto-instrumentations/index.cjs +270 -23
  18. package/dist/auto-instrumentations/index.d.mts +5 -5
  19. package/dist/auto-instrumentations/index.d.ts +5 -5
  20. package/dist/auto-instrumentations/index.mjs +1 -1
  21. package/dist/auto-instrumentations/loader/esm-hook.mjs +7 -8
  22. package/dist/browser.d.mts +558 -47
  23. package/dist/browser.d.ts +558 -47
  24. package/dist/browser.js +2432 -2174
  25. package/dist/browser.mjs +2432 -2174
  26. package/dist/cli.js +1732 -1105
  27. package/dist/edge-light.d.mts +1 -1
  28. package/dist/edge-light.d.ts +1 -1
  29. package/dist/edge-light.js +2342 -2086
  30. package/dist/edge-light.mjs +2342 -2086
  31. package/dist/index.d.mts +558 -47
  32. package/dist/index.d.ts +558 -47
  33. package/dist/index.js +2655 -2399
  34. package/dist/index.mjs +2433 -2177
  35. package/dist/instrumentation/index.d.mts +16 -22
  36. package/dist/instrumentation/index.d.ts +16 -22
  37. package/dist/instrumentation/index.js +1558 -1068
  38. package/dist/instrumentation/index.mjs +1558 -1068
  39. package/dist/workerd.d.mts +1 -1
  40. package/dist/workerd.d.ts +1 -1
  41. package/dist/workerd.js +2342 -2086
  42. package/dist/workerd.mjs +2342 -2086
  43. package/package.json +6 -3
  44. package/dist/auto-instrumentations/chunk-KVX7OFPD.mjs +0 -288
package/dist/browser.d.ts CHANGED
@@ -15705,6 +15705,25 @@ interface IsoAsyncLocalStorage<T> {
15705
15705
  run<R>(store: T | undefined, callback: () => R): R;
15706
15706
  getStore(): T | undefined;
15707
15707
  }
15708
+ /**
15709
+ * TracingChannel interface matching both node:diagnostics_channel and dc-browser.
15710
+ * Provides event-based instrumentation for sync/async operations.
15711
+ */
15712
+ interface IsoTracingChannel<M = any> {
15713
+ hasSubscribers: boolean;
15714
+ subscribe(handlers: IsoChannelHandlers<M>): void;
15715
+ unsubscribe(handlers: IsoChannelHandlers<M>): boolean;
15716
+ traceSync<F extends (...args: any[]) => any>(fn: F, message: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
15717
+ tracePromise<F extends (...args: any[]) => any>(fn: F, message: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): Promise<Awaited<ReturnType<F>>>;
15718
+ traceCallback<F extends (...args: any[]) => any>(fn: F, position: number | undefined, message: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
15719
+ }
15720
+ interface IsoChannelHandlers<M = any> {
15721
+ start?: (context: M, name: string) => void;
15722
+ end?: (context: M, name: string) => void;
15723
+ asyncStart?: (context: M, name: string) => void;
15724
+ asyncEnd?: (context: M, name: string) => void;
15725
+ error?: (context: M, name: string) => void;
15726
+ }
15708
15727
  interface Common {
15709
15728
  buildType: "browser" | "browser-js" | "node" | "edge-light" | "workerd" | "unknown";
15710
15729
  getRepoInfo: (settings?: GitMetadataSettingsType) => Promise<RepoInfoType | undefined>;
@@ -15712,6 +15731,7 @@ interface Common {
15712
15731
  getEnv: (name: string) => string | undefined;
15713
15732
  getCallerLocation: () => CallerLocation | undefined;
15714
15733
  newAsyncLocalStorage: <T>() => IsoAsyncLocalStorage<T>;
15734
+ newTracingChannel: <M = any>(nameOrChannels: string | object) => IsoTracingChannel<M>;
15715
15735
  processOn: (event: string, handler: (code: any) => void) => void;
15716
15736
  hash?: (data: string) => string;
15717
15737
  basename: (filepath: string) => string;
@@ -15740,6 +15760,10 @@ interface Common {
15740
15760
  }
15741
15761
  declare const iso: Common;
15742
15762
 
15763
+ type DebugLogLevel = "error" | "warn" | "info" | "debug";
15764
+ type DebugLogLevelOption = DebugLogLevel | false | undefined;
15765
+ declare function resetDebugLoggerForTests(): void;
15766
+
15743
15767
  /**
15744
15768
  * Abstract base class for ID generators
15745
15769
  */
@@ -18248,11 +18272,25 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
18248
18272
  type: "function";
18249
18273
  }[] | undefined;
18250
18274
  }) | undefined;
18275
+ }>, z.ZodObject<{
18276
+ type: z.ZodLiteral<"model">;
18277
+ default: z.ZodOptional<z.ZodString>;
18278
+ description: z.ZodOptional<z.ZodString>;
18279
+ }, "strip", z.ZodTypeAny, {
18280
+ type: "model";
18281
+ description?: string | undefined;
18282
+ default?: string | undefined;
18283
+ }, {
18284
+ type: "model";
18285
+ description?: string | undefined;
18286
+ default?: string | undefined;
18251
18287
  }>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>>;
18252
18288
  type EvalParameters = z.infer<typeof evalParametersSchema>;
18253
18289
  type InferParameterValue<T> = T extends {
18254
18290
  type: "prompt";
18255
- } ? Prompt : T extends z.ZodType ? z.infer<T> : never;
18291
+ } ? Prompt : T extends {
18292
+ type: "model";
18293
+ } ? string : T extends z.ZodType ? z.infer<T> : never;
18256
18294
  type InferParameters<T extends EvalParameters> = {
18257
18295
  [K in keyof T]: InferParameterValue<T[K]>;
18258
18296
  };
@@ -18538,6 +18576,8 @@ declare const loginSchema: z.ZodObject<{
18538
18576
  collect: "some" | "none" | "all";
18539
18577
  fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
18540
18578
  }>>>;
18579
+ debugLogLevel: z.ZodOptional<z.ZodEnum<["error", "warn", "info", "debug"]>>;
18580
+ debugLogLevelDisabled: z.ZodOptional<z.ZodBoolean>;
18541
18581
  }, "strict", z.ZodTypeAny, {
18542
18582
  appUrl: string;
18543
18583
  appPublicUrl: string;
@@ -18550,6 +18590,8 @@ declare const loginSchema: z.ZodObject<{
18550
18590
  collect: "some" | "none" | "all";
18551
18591
  fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
18552
18592
  } | null | undefined;
18593
+ debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
18594
+ debugLogLevelDisabled?: boolean | undefined;
18553
18595
  }, {
18554
18596
  appUrl: string;
18555
18597
  appPublicUrl: string;
@@ -18562,6 +18604,8 @@ declare const loginSchema: z.ZodObject<{
18562
18604
  collect: "some" | "none" | "all";
18563
18605
  fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
18564
18606
  } | null | undefined;
18607
+ debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
18608
+ debugLogLevelDisabled?: boolean | undefined;
18565
18609
  }>;
18566
18610
  type SerializedBraintrustState = z.infer<typeof loginSchema>;
18567
18611
  declare class BraintrustState {
@@ -18582,6 +18626,8 @@ declare class BraintrustState {
18582
18626
  proxyUrl: string | null;
18583
18627
  loggedIn: boolean;
18584
18628
  gitMetadataSettings?: GitMetadataSettingsType;
18629
+ debugLogLevel?: DebugLogLevel;
18630
+ private debugLogLevelConfigured;
18585
18631
  fetch: typeof globalThis.fetch;
18586
18632
  private _appConn;
18587
18633
  private _apiConn;
@@ -18612,6 +18658,9 @@ declare class BraintrustState {
18612
18658
  static deserialize(serialized: unknown, opts?: LoginOptions): BraintrustState;
18613
18659
  setFetch(fetch: typeof globalThis.fetch): void;
18614
18660
  setMaskingFunction(maskingFunction: ((value: unknown) => unknown) | null): void;
18661
+ setDebugLogLevel(option: DebugLogLevelOption): void;
18662
+ getDebugLogLevel(): DebugLogLevel | undefined;
18663
+ hasDebugLogLevelOverride(): boolean;
18615
18664
  login(loginParams: LoginOptions & {
18616
18665
  forceLogin?: boolean;
18617
18666
  }): Promise<void>;
@@ -19330,6 +19379,7 @@ type InitLoggerOptions<IsAsyncFlush> = FullLoginOptions & {
19330
19379
  * key is specified, will prompt the user to login.
19331
19380
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
19332
19381
  * @param options.forceLogin Login again, even if you have already logged in (by default, the logger will not login if you are already logged in)
19382
+ * @param options.debugLogLevel Enables internal Braintrust SDK troubleshooting output. Use `"error"`, `"warn"`, `"info"`, or `"debug"` to choose an explicit level, or `false` to explicitly disable it. If omitted, the SDK stays silent unless `BRAINTRUST_DEBUG_LOG_LEVEL` is set.
19333
19383
  * @param setCurrent If true (the default), set the global current-experiment to the newly-created one.
19334
19384
  * @returns The newly created Logger.
19335
19385
  */
@@ -19473,6 +19523,19 @@ interface LoginOptions {
19473
19523
  * server. Defaults to false.
19474
19524
  */
19475
19525
  disableSpanCache?: boolean;
19526
+ /**
19527
+ * Controls internal Braintrust SDK troubleshooting output.
19528
+ *
19529
+ * Use `"error"`, `"warn"`, `"info"`, or `"debug"` to control how much
19530
+ * internal SDK troubleshooting output is emitted. Use `false` to explicitly
19531
+ * disable this output.
19532
+ *
19533
+ * When omitted, the SDK remains silent unless
19534
+ * `BRAINTRUST_DEBUG_LOG_LEVEL` is set to `"error"`, `"warn"`, `"info"`, or
19535
+ * `"debug"`. This option only affects local console output; it does not
19536
+ * change what data is logged to Braintrust.
19537
+ */
19538
+ debugLogLevel?: DebugLogLevel | false;
19476
19539
  }
19477
19540
  type FullLoginOptions = LoginOptions & {
19478
19541
  forceLogin?: boolean;
@@ -20183,6 +20246,7 @@ declare const _exportsForTestingOnly: {
20183
20246
  deepCopyEvent: typeof deepCopyEvent;
20184
20247
  useTestBackgroundLogger: typeof useTestBackgroundLogger;
20185
20248
  clearTestBackgroundLogger: typeof clearTestBackgroundLogger;
20249
+ resetDebugLoggerForTests: typeof resetDebugLoggerForTests;
20186
20250
  simulateLoginForTests: typeof simulateLoginForTests;
20187
20251
  simulateLogoutForTests: typeof simulateLogoutForTests;
20188
20252
  setInitialTestState: typeof setInitialTestState;
@@ -20194,6 +20258,86 @@ declare const _exportsForTestingOnly: {
20194
20258
  isomorph: Common;
20195
20259
  };
20196
20260
 
20261
+ /**
20262
+ * Configuration for a sandbox runtime.
20263
+ * @internal
20264
+ */
20265
+ interface SandboxConfig {
20266
+ /** The sandbox provider. Currently only "modal" is supported. */
20267
+ provider: "modal";
20268
+ /** Reference to the sandbox snapshot. */
20269
+ snapshotRef: string;
20270
+ }
20271
+ /**
20272
+ * Options for registering a sandbox function.
20273
+ * @internal
20274
+ */
20275
+ interface RegisterSandboxOptions {
20276
+ /** Group name for the sandbox functions. */
20277
+ name: string;
20278
+ /** Name of the project to register the sandbox in. */
20279
+ project: string;
20280
+ /** Sandbox configuration (provider and snapshot reference). */
20281
+ sandbox: SandboxConfig;
20282
+ /** Optional list of entrypoints available in the sandbox. */
20283
+ entrypoints?: string[];
20284
+ /** Optional description. */
20285
+ description?: string;
20286
+ /** Optional metadata. */
20287
+ metadata?: Record<string, unknown>;
20288
+ /** What to do if function already exists. Defaults to "replace". */
20289
+ ifExists?: IfExistsType;
20290
+ /** Braintrust API key. Uses BRAINTRUST_API_KEY env var if not provided. */
20291
+ apiKey?: string;
20292
+ /** Braintrust app URL. Uses default if not provided. */
20293
+ appUrl?: string;
20294
+ /** Organization name. */
20295
+ orgName?: string;
20296
+ /** Optional BraintrustState instance. Defaults to the global state. */
20297
+ state?: BraintrustState;
20298
+ }
20299
+ /**
20300
+ * Result of registering a sandbox.
20301
+ * @internal
20302
+ */
20303
+ interface RegisterSandboxResult {
20304
+ /** Project ID the sandbox is registered in. */
20305
+ projectId: string;
20306
+ /** Registered eval functions discovered from this sandbox. */
20307
+ functions: {
20308
+ /** Eval name discovered from sandbox list endpoint. */
20309
+ evalName: string;
20310
+ /** Unique identifier for the function. */
20311
+ id: string;
20312
+ /** Function name. */
20313
+ name: string;
20314
+ /** URL-friendly identifier. */
20315
+ slug: string;
20316
+ }[];
20317
+ }
20318
+ /**
20319
+ * Register a sandbox function with Braintrust.
20320
+ *
20321
+ * @param options Configuration for the sandbox to register.
20322
+ * @returns The registered sandbox function details.
20323
+ * @internal
20324
+ *
20325
+ * @example
20326
+ * ```typescript
20327
+ * const result = await registerSandbox({
20328
+ * name: "My Sandbox",
20329
+ * project: "My Project",
20330
+ * entrypoints: ["./my-eval.eval.ts"],
20331
+ * sandbox: {
20332
+ * provider: "modal",
20333
+ * snapshotRef: "sb-xxx",
20334
+ * },
20335
+ * });
20336
+ * console.log(result.functions.map((f) => f.id));
20337
+ * ```
20338
+ */
20339
+ declare function registerSandbox(options: RegisterSandboxOptions): Promise<RegisterSandboxResult>;
20340
+
20197
20341
  declare function isTemplateFormat(v: unknown): v is TemplateFormat;
20198
20342
  declare function parseTemplateFormat(value: unknown, defaultFormat?: TemplateFormat): TemplateFormat;
20199
20343
  declare function renderTemplateContent(template: string, variables: Record<string, unknown>, escape: (v: unknown) => string, options: {
@@ -20594,24 +20738,167 @@ declare function initFunction({ projectName, slug, version, state, }: {
20594
20738
  state?: BraintrustState;
20595
20739
  }): (input: any) => Promise<any>;
20596
20740
 
20597
- interface BetaLike {
20598
- chat: {
20599
- completions: {
20600
- stream: any;
20601
- };
20602
- };
20603
- embeddings: any;
20741
+ declare const LEGACY_CACHED_HEADER = "x-cached";
20742
+ declare const X_CACHED_HEADER = "x-bt-cached";
20743
+ declare function parseCachedHeader(value: string | null | undefined): number | undefined;
20744
+
20745
+ /**
20746
+ * Vendored types for the OpenAI SDK which our wrapper and instrumentation consume.
20747
+ *
20748
+ * Should never be exposed to users of the SDK!
20749
+ */
20750
+ interface OpenAIAPIPromise<T> extends Promise<T> {
20751
+ withResponse(): Promise<OpenAIWithResponse<T>>;
20752
+ }
20753
+ interface OpenAIWithResponse<T> {
20754
+ data: T;
20755
+ response: Response;
20756
+ }
20757
+ interface OpenAIChatCreateParams {
20758
+ messages: unknown;
20759
+ stream?: boolean | null;
20760
+ [key: string]: unknown;
20761
+ }
20762
+ interface OpenAIEmbeddingCreateParams {
20763
+ input: unknown;
20764
+ [key: string]: unknown;
20604
20765
  }
20605
- interface ChatLike {
20606
- completions: any;
20766
+ interface OpenAIModerationCreateParams {
20767
+ input: unknown;
20768
+ [key: string]: unknown;
20607
20769
  }
20608
- interface OpenAILike {
20609
- chat: ChatLike;
20610
- embeddings: any;
20611
- moderations: any;
20612
- beta?: BetaLike;
20613
- responses?: any;
20770
+ interface OpenAIResponseCreateParams {
20771
+ input?: unknown;
20772
+ stream?: boolean | null;
20773
+ [key: string]: unknown;
20774
+ }
20775
+ interface OpenAIUsage {
20776
+ total_tokens?: number;
20777
+ prompt_tokens?: number;
20778
+ completion_tokens?: number;
20779
+ input_tokens?: number;
20780
+ output_tokens?: number;
20781
+ cached?: number;
20782
+ input_tokens_details?: Record<string, number>;
20783
+ output_tokens_details?: Record<string, number>;
20784
+ [key: string]: number | Record<string, number> | undefined;
20614
20785
  }
20786
+ interface OpenAIChatToolFunction {
20787
+ arguments: string;
20788
+ name?: string;
20789
+ [key: string]: unknown;
20790
+ }
20791
+ interface OpenAIChatToolCall {
20792
+ id?: string;
20793
+ type?: string;
20794
+ function: OpenAIChatToolFunction;
20795
+ [key: string]: unknown;
20796
+ }
20797
+ interface OpenAIChatMessage {
20798
+ role?: string;
20799
+ content?: unknown;
20800
+ tool_calls?: OpenAIChatToolCall[];
20801
+ [key: string]: unknown;
20802
+ }
20803
+ interface OpenAIChatChoice {
20804
+ index: number;
20805
+ message: OpenAIChatMessage;
20806
+ finish_reason?: string | null;
20807
+ logprobs?: unknown;
20808
+ [key: string]: unknown;
20809
+ }
20810
+ interface OpenAIChatCompletion {
20811
+ choices: OpenAIChatChoice[];
20812
+ usage?: OpenAIUsage;
20813
+ [key: string]: unknown;
20814
+ }
20815
+ interface OpenAIChatDelta {
20816
+ role?: string;
20817
+ content?: string;
20818
+ tool_calls?: OpenAIChatToolCall[];
20819
+ finish_reason?: string | null;
20820
+ [key: string]: unknown;
20821
+ }
20822
+ interface OpenAIChatChunkChoice {
20823
+ delta?: OpenAIChatDelta;
20824
+ finish_reason?: string | null;
20825
+ [key: string]: unknown;
20826
+ }
20827
+ interface OpenAIChatCompletionChunk {
20828
+ choices?: OpenAIChatChunkChoice[];
20829
+ usage?: OpenAIUsage;
20830
+ [key: string]: unknown;
20831
+ }
20832
+ type OpenAIChatStream = AsyncIterable<OpenAIChatCompletionChunk>;
20833
+ interface OpenAIEmbeddingResponse {
20834
+ data?: Array<{
20835
+ embedding?: number[];
20836
+ [key: string]: unknown;
20837
+ }>;
20838
+ usage?: OpenAIUsage;
20839
+ [key: string]: unknown;
20840
+ }
20841
+ interface OpenAIModerationResponse {
20842
+ results?: unknown[];
20843
+ usage?: OpenAIUsage;
20844
+ [key: string]: unknown;
20845
+ }
20846
+ interface OpenAIResponse {
20847
+ output?: unknown;
20848
+ usage?: OpenAIUsage;
20849
+ [key: string]: unknown;
20850
+ }
20851
+ interface OpenAIResponseCompletedEvent {
20852
+ type: "response.completed";
20853
+ response: OpenAIResponse;
20854
+ }
20855
+ type OpenAIResponseStreamEvent = OpenAIResponseCompletedEvent | {
20856
+ type: string;
20857
+ response?: OpenAIResponse;
20858
+ [key: string]: unknown;
20859
+ };
20860
+ type OpenAIResponseStream = AsyncIterable<OpenAIResponseStreamEvent>;
20861
+ interface OpenAISyncStream {
20862
+ [key: string]: unknown;
20863
+ }
20864
+ interface OpenAIChatCompletions {
20865
+ create: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion | OpenAIChatStream>;
20866
+ parse?: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion>;
20867
+ stream?: (params: OpenAIChatCreateParams, options?: unknown) => OpenAISyncStream;
20868
+ }
20869
+ interface OpenAIChatCompletionsWithParsing extends OpenAIChatCompletions {
20870
+ parse: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion>;
20871
+ stream: (params: OpenAIChatCreateParams, options?: unknown) => OpenAISyncStream;
20872
+ }
20873
+ interface OpenAIChat {
20874
+ completions: OpenAIChatCompletions;
20875
+ }
20876
+ interface OpenAIChatWithParsing {
20877
+ completions: OpenAIChatCompletionsWithParsing;
20878
+ }
20879
+ interface OpenAIBeta {
20880
+ chat: OpenAIChatWithParsing;
20881
+ }
20882
+ interface OpenAIEmbeddings {
20883
+ create: (params: OpenAIEmbeddingCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIEmbeddingResponse>;
20884
+ }
20885
+ interface OpenAIModerations {
20886
+ create: (params: OpenAIModerationCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIModerationResponse>;
20887
+ }
20888
+ interface OpenAIResponses {
20889
+ create: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse | OpenAIResponseStream>;
20890
+ parse?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse>;
20891
+ stream?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAISyncStream;
20892
+ }
20893
+
20894
+ interface OpenAIV4Client {
20895
+ chat: OpenAIChat;
20896
+ embeddings: OpenAIEmbeddings;
20897
+ moderations: OpenAIModerations;
20898
+ beta?: OpenAIBeta;
20899
+ responses?: OpenAIResponses;
20900
+ }
20901
+
20615
20902
  declare global {
20616
20903
  var __inherited_braintrust_wrap_openai: ((openai: any) => any) | undefined;
20617
20904
  }
@@ -20620,16 +20907,14 @@ declare global {
20620
20907
  * not configured, nothing will be traced. If this is not an `OpenAI` object, this function is
20621
20908
  * a no-op.
20622
20909
  *
20623
- * Currently, this supports both the `v4` and `v5` API.
20910
+ * Currently, this supports the `v4`, `v5`, and `v6` API.
20624
20911
  *
20625
20912
  * @param openai
20626
20913
  * @returns The wrapped `OpenAI` object.
20627
20914
  */
20628
20915
  declare function wrapOpenAI<T extends object>(openai: T): T;
20916
+ type OpenAILike = OpenAIV4Client;
20629
20917
  declare function wrapOpenAIv4<T extends OpenAILike>(openai: T): T;
20630
- declare const LEGACY_CACHED_HEADER = "x-cached";
20631
- declare const X_CACHED_HEADER = "x-bt-cached";
20632
- declare function parseCachedHeader(value: string | null | undefined): number | undefined;
20633
20918
 
20634
20919
  interface WrapAISDKOptions {
20635
20920
  denyOutputPaths?: string[];
@@ -20794,6 +21079,24 @@ type ScorerFunction<Output = unknown> = (args: {
20794
21079
  input?: unknown;
20795
21080
  metadata?: Record<string, unknown>;
20796
21081
  }) => Score | Promise<Score> | number | null | Array<Score>;
21082
+ type ProgressEvent = {
21083
+ type: "suite_start";
21084
+ suiteName: string;
21085
+ } | {
21086
+ type: "test_start";
21087
+ testName: string;
21088
+ } | {
21089
+ type: "test_complete";
21090
+ testName: string;
21091
+ passed: boolean;
21092
+ duration: number;
21093
+ } | {
21094
+ type: "suite_complete";
21095
+ suiteName: string;
21096
+ passed: number;
21097
+ failed: number;
21098
+ };
21099
+
20797
21100
  interface BraintrustTestConfig {
20798
21101
  input?: unknown;
20799
21102
  expected?: unknown;
@@ -20875,23 +21178,6 @@ interface BraintrustVitest<VitestContext = unknown, ExpectType extends (...args:
20875
21178
  displaySummary?: boolean;
20876
21179
  }) => Promise<void>;
20877
21180
  }
20878
- type ProgressEvent = {
20879
- type: "suite_start";
20880
- suiteName: string;
20881
- } | {
20882
- type: "test_start";
20883
- testName: string;
20884
- } | {
20885
- type: "test_complete";
20886
- testName: string;
20887
- passed: boolean;
20888
- duration: number;
20889
- } | {
20890
- type: "suite_complete";
20891
- suiteName: string;
20892
- passed: number;
20893
- failed: number;
20894
- };
20895
21181
  interface WrapperConfig {
20896
21182
  projectName?: string;
20897
21183
  /**
@@ -20956,6 +21242,115 @@ interface WrapperConfig {
20956
21242
  */
20957
21243
  declare function wrapVitest<VitestContext = unknown, ExpectType extends (...args: unknown[]) => unknown = (...args: unknown[]) => unknown>(vitestMethods: VitestMethods<VitestContext, ExpectType>, config?: WrapperConfig): BraintrustVitest<VitestContext, ExpectType>;
20958
21244
 
21245
+ /** Progress events emitted by the node-test integration. */
21246
+ type NodeTestProgressEvent = {
21247
+ type: "test_start";
21248
+ testName: string;
21249
+ } | {
21250
+ type: "test_complete";
21251
+ testName: string;
21252
+ passed: boolean;
21253
+ duration: number;
21254
+ };
21255
+ /**
21256
+ * Minimal test context interface compatible with node:test's TestContext.
21257
+ * We only use `name` from the context, making this compatible with any
21258
+ * test runner that provides a `{ name?: string }` context object.
21259
+ */
21260
+ interface MinimalTestContext {
21261
+ name?: string;
21262
+ }
21263
+ /**
21264
+ * Configuration for `initNodeTestSuite()`.
21265
+ */
21266
+ interface NodeTestSuiteConfig {
21267
+ /** Project name for the Braintrust experiment. */
21268
+ projectName: string;
21269
+ /** Optional experiment name. Defaults to a timestamp-based name. */
21270
+ experimentName?: string;
21271
+ /**
21272
+ * If true, displays a formatted experiment summary after flushing.
21273
+ * Defaults to true.
21274
+ */
21275
+ displaySummary?: boolean;
21276
+ /**
21277
+ * Pass `after` from `node:test` to auto-register a flush hook.
21278
+ * When provided, `suite.flush()` is called automatically after all tests.
21279
+ */
21280
+ after?: (fn: () => void | Promise<void>) => void;
21281
+ /**
21282
+ * Callback for real-time progress events.
21283
+ * Emits `test_start` and `test_complete` events.
21284
+ */
21285
+ onProgress?: (event: NodeTestProgressEvent) => void;
21286
+ }
21287
+ /**
21288
+ * Configuration for a single eval test case.
21289
+ */
21290
+ interface EvalConfig {
21291
+ /** Test input data, logged to the span. */
21292
+ input?: unknown;
21293
+ /** Expected output, passed to scorers. */
21294
+ expected?: unknown;
21295
+ /** Custom metadata, logged to the span. */
21296
+ metadata?: Record<string, unknown>;
21297
+ /** Tags for organizing test cases. */
21298
+ tags?: string[];
21299
+ /** Scorer functions to evaluate the output. */
21300
+ scorers?: ScorerFunction[];
21301
+ /** Override span name (defaults to `t.name`, then `"unnamed test"`). */
21302
+ name?: string;
21303
+ }
21304
+ /**
21305
+ * Context passed to the eval test function.
21306
+ */
21307
+ interface EvalContext {
21308
+ input: unknown;
21309
+ expected?: unknown;
21310
+ metadata?: Record<string, unknown>;
21311
+ }
21312
+ /**
21313
+ * The public API surface returned by `initNodeTestSuite()`.
21314
+ */
21315
+ interface NodeTestSuite {
21316
+ /**
21317
+ * Creates a test function compatible with `node:test`.
21318
+ * Pass the result to `test()` from `node:test`.
21319
+ *
21320
+ * @param config - Eval configuration (input, expected, scorers, etc.)
21321
+ * @param fn - The test function. Its return value is logged as output and passed to scorers.
21322
+ * @returns A function accepting a test context `t` from `node:test`.
21323
+ */
21324
+ eval(config: EvalConfig, fn: (context: EvalContext) => unknown | Promise<unknown>): (t: MinimalTestContext) => Promise<void>;
21325
+ /**
21326
+ * Flush the experiment: summarize results and send data to Braintrust.
21327
+ * Called automatically if `after` was provided in the config.
21328
+ */
21329
+ flush(): Promise<void>;
21330
+ }
21331
+
21332
+ /**
21333
+ * Creates a new Node.js test suite with Braintrust experiment tracking.
21334
+ *
21335
+ * @example
21336
+ * ```typescript
21337
+ * import { test, describe, after } from 'node:test';
21338
+ * import { initNodeTestSuite } from 'braintrust';
21339
+ *
21340
+ * describe('My Tests', () => {
21341
+ * const suite = initNodeTestSuite({ projectName: 'my-project', after });
21342
+ *
21343
+ * test('my eval', suite.eval(
21344
+ * { input: 'hello', expected: 'world', scorers: [myScorer] },
21345
+ * async ({ input }) => {
21346
+ * return await myFunction(input);
21347
+ * }
21348
+ * ));
21349
+ * });
21350
+ * ```
21351
+ */
21352
+ declare function initNodeTestSuite(config: NodeTestSuiteConfig): NodeTestSuite;
21353
+
20959
21354
  interface BuildContext {
20960
21355
  getFunctionId(functionObj: unknown): Promise<FunctionIdType>;
20961
21356
  }
@@ -21088,6 +21483,14 @@ declare namespace graphFramework {
21088
21483
  }
21089
21484
 
21090
21485
  type GenericFunction<Input, Output> = ((input: Input) => Output) | ((input: Input) => Promise<Output>);
21486
+ interface BaseFnOpts {
21487
+ name: string;
21488
+ slug: string;
21489
+ description: string;
21490
+ ifExists: IfExistsType;
21491
+ tags?: string[];
21492
+ metadata?: Record<string, unknown>;
21493
+ }
21091
21494
 
21092
21495
  type SpanRecord = any;
21093
21496
  /**
@@ -26501,6 +26904,18 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
26501
26904
  enabled_tools?: string[] | null | undefined;
26502
26905
  }> | null | undefined;
26503
26906
  } | undefined;
26907
+ }>, z.ZodObject<{
26908
+ type: z.ZodLiteral<"model">;
26909
+ default: z.ZodOptional<z.ZodString>;
26910
+ description: z.ZodOptional<z.ZodString>;
26911
+ }, "strip", z.ZodTypeAny, {
26912
+ type: "model";
26913
+ description?: string | undefined;
26914
+ default?: string | undefined;
26915
+ }, {
26916
+ type: "model";
26917
+ description?: string | undefined;
26918
+ default?: string | undefined;
26504
26919
  }>, z.ZodObject<{
26505
26920
  type: z.ZodLiteral<"data">;
26506
26921
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -28903,6 +29318,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
28903
29318
  enabled_tools?: string[] | null | undefined;
28904
29319
  }> | null | undefined;
28905
29320
  } | undefined;
29321
+ }>, z.ZodObject<{
29322
+ type: z.ZodLiteral<"model">;
29323
+ default: z.ZodOptional<z.ZodString>;
29324
+ description: z.ZodOptional<z.ZodString>;
29325
+ }, "strip", z.ZodTypeAny, {
29326
+ type: "model";
29327
+ description?: string | undefined;
29328
+ default?: string | undefined;
29329
+ }, {
29330
+ type: "model";
29331
+ description?: string | undefined;
29332
+ default?: string | undefined;
28906
29333
  }>, z.ZodObject<{
28907
29334
  type: z.ZodLiteral<"data">;
28908
29335
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -29175,6 +29602,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
29175
29602
  enabled_tools?: string[] | null | undefined;
29176
29603
  }> | null | undefined;
29177
29604
  } | undefined;
29605
+ } | {
29606
+ type: "model";
29607
+ description?: string | undefined;
29608
+ default?: string | undefined;
29178
29609
  } | {
29179
29610
  type: "data";
29180
29611
  schema: Record<string, unknown>;
@@ -29437,6 +29868,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
29437
29868
  enabled_tools?: string[] | null | undefined;
29438
29869
  }> | null | undefined;
29439
29870
  } | undefined;
29871
+ } | {
29872
+ type: "model";
29873
+ description?: string | undefined;
29874
+ default?: string | undefined;
29440
29875
  } | {
29441
29876
  type: "data";
29442
29877
  schema: Record<string, unknown>;
@@ -31739,6 +32174,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
31739
32174
  enabled_tools?: string[] | null | undefined;
31740
32175
  }> | null | undefined;
31741
32176
  } | undefined;
32177
+ }>, z.ZodObject<{
32178
+ type: z.ZodLiteral<"model">;
32179
+ default: z.ZodOptional<z.ZodString>;
32180
+ description: z.ZodOptional<z.ZodString>;
32181
+ }, "strip", z.ZodTypeAny, {
32182
+ type: "model";
32183
+ description?: string | undefined;
32184
+ default?: string | undefined;
32185
+ }, {
32186
+ type: "model";
32187
+ description?: string | undefined;
32188
+ default?: string | undefined;
31742
32189
  }>, z.ZodObject<{
31743
32190
  type: z.ZodLiteral<"data">;
31744
32191
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -32016,6 +32463,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32016
32463
  enabled_tools?: string[] | null | undefined;
32017
32464
  }> | null | undefined;
32018
32465
  } | undefined;
32466
+ } | {
32467
+ type: "model";
32468
+ description?: string | undefined;
32469
+ default?: string | undefined;
32019
32470
  } | {
32020
32471
  type: "data";
32021
32472
  schema: Record<string, unknown>;
@@ -32291,6 +32742,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32291
32742
  enabled_tools?: string[] | null | undefined;
32292
32743
  }> | null | undefined;
32293
32744
  } | undefined;
32745
+ } | {
32746
+ type: "model";
32747
+ description?: string | undefined;
32748
+ default?: string | undefined;
32294
32749
  } | {
32295
32750
  type: "data";
32296
32751
  schema: Record<string, unknown>;
@@ -32556,6 +33011,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32556
33011
  enabled_tools?: string[] | null | undefined;
32557
33012
  }> | null | undefined;
32558
33013
  } | undefined;
33014
+ } | {
33015
+ type: "model";
33016
+ description?: string | undefined;
33017
+ default?: string | undefined;
32559
33018
  } | {
32560
33019
  type: "data";
32561
33020
  schema: Record<string, unknown>;
@@ -32831,6 +33290,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32831
33290
  enabled_tools?: string[] | null | undefined;
32832
33291
  }> | null | undefined;
32833
33292
  } | undefined;
33293
+ } | {
33294
+ type: "model";
33295
+ description?: string | undefined;
33296
+ default?: string | undefined;
32834
33297
  } | {
32835
33298
  type: "data";
32836
33299
  schema: Record<string, unknown>;
@@ -35209,6 +35672,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
35209
35672
  enabled_tools?: string[] | null | undefined;
35210
35673
  }> | null | undefined;
35211
35674
  } | undefined;
35675
+ }>, z.ZodObject<{
35676
+ type: z.ZodLiteral<"model">;
35677
+ default: z.ZodOptional<z.ZodString>;
35678
+ description: z.ZodOptional<z.ZodString>;
35679
+ }, "strip", z.ZodTypeAny, {
35680
+ type: "model";
35681
+ description?: string | undefined;
35682
+ default?: string | undefined;
35683
+ }, {
35684
+ type: "model";
35685
+ description?: string | undefined;
35686
+ default?: string | undefined;
35212
35687
  }>, z.ZodObject<{
35213
35688
  type: z.ZodLiteral<"data">;
35214
35689
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -35481,6 +35956,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
35481
35956
  enabled_tools?: string[] | null | undefined;
35482
35957
  }> | null | undefined;
35483
35958
  } | undefined;
35959
+ } | {
35960
+ type: "model";
35961
+ description?: string | undefined;
35962
+ default?: string | undefined;
35484
35963
  } | {
35485
35964
  type: "data";
35486
35965
  schema: Record<string, unknown>;
@@ -35743,6 +36222,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
35743
36222
  enabled_tools?: string[] | null | undefined;
35744
36223
  }> | null | undefined;
35745
36224
  } | undefined;
36225
+ } | {
36226
+ type: "model";
36227
+ description?: string | undefined;
36228
+ default?: string | undefined;
35746
36229
  } | {
35747
36230
  type: "data";
35748
36231
  schema: Record<string, unknown>;
@@ -38045,6 +38528,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38045
38528
  enabled_tools?: string[] | null | undefined;
38046
38529
  }> | null | undefined;
38047
38530
  } | undefined;
38531
+ }>, z.ZodObject<{
38532
+ type: z.ZodLiteral<"model">;
38533
+ default: z.ZodOptional<z.ZodString>;
38534
+ description: z.ZodOptional<z.ZodString>;
38535
+ }, "strip", z.ZodTypeAny, {
38536
+ type: "model";
38537
+ description?: string | undefined;
38538
+ default?: string | undefined;
38539
+ }, {
38540
+ type: "model";
38541
+ description?: string | undefined;
38542
+ default?: string | undefined;
38048
38543
  }>, z.ZodObject<{
38049
38544
  type: z.ZodLiteral<"data">;
38050
38545
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -38322,6 +38817,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38322
38817
  enabled_tools?: string[] | null | undefined;
38323
38818
  }> | null | undefined;
38324
38819
  } | undefined;
38820
+ } | {
38821
+ type: "model";
38822
+ description?: string | undefined;
38823
+ default?: string | undefined;
38325
38824
  } | {
38326
38825
  type: "data";
38327
38826
  schema: Record<string, unknown>;
@@ -38597,6 +39096,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38597
39096
  enabled_tools?: string[] | null | undefined;
38598
39097
  }> | null | undefined;
38599
39098
  } | undefined;
39099
+ } | {
39100
+ type: "model";
39101
+ description?: string | undefined;
39102
+ default?: string | undefined;
38600
39103
  } | {
38601
39104
  type: "data";
38602
39105
  schema: Record<string, unknown>;
@@ -38862,6 +39365,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38862
39365
  enabled_tools?: string[] | null | undefined;
38863
39366
  }> | null | undefined;
38864
39367
  } | undefined;
39368
+ } | {
39369
+ type: "model";
39370
+ description?: string | undefined;
39371
+ default?: string | undefined;
38865
39372
  } | {
38866
39373
  type: "data";
38867
39374
  schema: Record<string, unknown>;
@@ -39137,6 +39644,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39137
39644
  enabled_tools?: string[] | null | undefined;
39138
39645
  }> | null | undefined;
39139
39646
  } | undefined;
39647
+ } | {
39648
+ type: "model";
39649
+ description?: string | undefined;
39650
+ default?: string | undefined;
39140
39651
  } | {
39141
39652
  type: "data";
39142
39653
  schema: Record<string, unknown>;
@@ -39151,14 +39662,6 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39151
39662
  }>>;
39152
39663
  type EvaluatorDefinitions = z.infer<typeof evaluatorDefinitionsSchema>;
39153
39664
 
39154
- interface BaseFnOpts {
39155
- name: string;
39156
- slug: string;
39157
- description: string;
39158
- ifExists: IfExistsType;
39159
- metadata?: Record<string, unknown>;
39160
- }
39161
-
39162
39665
  type NameOrId = {
39163
39666
  name: string;
39164
39667
  } | {
@@ -39249,6 +39752,7 @@ declare class CodeFunction<Input, Output, Fn extends GenericFunction<Input, Outp
39249
39752
  readonly parameters?: z.ZodSchema<Input>;
39250
39753
  readonly returns?: z.ZodSchema<Output>;
39251
39754
  readonly ifExists?: IfExistsType;
39755
+ readonly tags?: string[];
39252
39756
  readonly metadata?: Record<string, unknown>;
39253
39757
  constructor(project: Project, opts: Omit<CodeOpts<Input, Output, Fn>, "name" | "slug"> & {
39254
39758
  name: string;
@@ -39268,6 +39772,7 @@ declare class CodePrompt {
39268
39772
  readonly id?: string;
39269
39773
  readonly functionType?: FunctionTypeEnumType;
39270
39774
  readonly toolFunctions: (SavedFunctionIdType | GenericCodeFunction)[];
39775
+ readonly tags?: string[];
39271
39776
  readonly metadata?: Record<string, unknown>;
39272
39777
  constructor(project: Project, prompt: PromptDataType, toolFunctions: (SavedFunctionIdType | GenericCodeFunction)[], opts: Omit<PromptOpts<false, false, false, false>, "name" | "slug"> & {
39273
39778
  name: string;
@@ -39335,6 +39840,7 @@ interface FunctionEvent {
39335
39840
  function_data: z.infer<typeof FunctionData>;
39336
39841
  function_type?: FunctionTypeEnumType;
39337
39842
  if_exists?: IfExistsType;
39843
+ tags?: string[];
39338
39844
  metadata?: Record<string, unknown>;
39339
39845
  }
39340
39846
  declare class ProjectNameIdMap {
@@ -39876,8 +40382,11 @@ type _exports_ReadonlyAttachment = ReadonlyAttachment;
39876
40382
  declare const _exports_ReadonlyAttachment: typeof ReadonlyAttachment;
39877
40383
  type _exports_ReadonlyExperiment = ReadonlyExperiment;
39878
40384
  declare const _exports_ReadonlyExperiment: typeof ReadonlyExperiment;
40385
+ type _exports_RegisterSandboxOptions = RegisterSandboxOptions;
40386
+ type _exports_RegisterSandboxResult = RegisterSandboxResult;
39879
40387
  declare const _exports_Reporter: typeof Reporter;
39880
40388
  type _exports_ReporterBody<EvalReport> = ReporterBody<EvalReport>;
40389
+ type _exports_SandboxConfig = SandboxConfig;
39881
40390
  type _exports_ScoreSummary = ScoreSummary;
39882
40391
  type _exports_ScorerBuilder = ScorerBuilder;
39883
40392
  declare const _exports_ScorerBuilder: typeof ScorerBuilder;
@@ -39933,6 +40442,7 @@ declare const _exports_initDataset: typeof initDataset;
39933
40442
  declare const _exports_initExperiment: typeof initExperiment;
39934
40443
  declare const _exports_initFunction: typeof initFunction;
39935
40444
  declare const _exports_initLogger: typeof initLogger;
40445
+ declare const _exports_initNodeTestSuite: typeof initNodeTestSuite;
39936
40446
  declare const _exports_invoke: typeof invoke;
39937
40447
  declare const _exports_isTemplateFormat: typeof isTemplateFormat;
39938
40448
  declare const _exports_loadParameters: typeof loadParameters;
@@ -39953,6 +40463,7 @@ declare const _exports_promptDefinitionSchema: typeof promptDefinitionSchema;
39953
40463
  declare const _exports_promptDefinitionToPromptData: typeof promptDefinitionToPromptData;
39954
40464
  declare const _exports_promptDefinitionWithToolsSchema: typeof promptDefinitionWithToolsSchema;
39955
40465
  declare const _exports_registerOtelFlush: typeof registerOtelFlush;
40466
+ declare const _exports_registerSandbox: typeof registerSandbox;
39956
40467
  declare const _exports_registerTemplatePlugin: typeof registerTemplatePlugin;
39957
40468
  declare const _exports_renderMessage: typeof renderMessage;
39958
40469
  declare const _exports_renderPromptParams: typeof renderPromptParams;
@@ -39987,7 +40498,7 @@ declare const _exports_wrapOpenAIv4: typeof wrapOpenAIv4;
39987
40498
  declare const _exports_wrapTraced: typeof wrapTraced;
39988
40499
  declare const _exports_wrapVitest: typeof wrapVitest;
39989
40500
  declare namespace _exports {
39990
- 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, _exports_Reporter as Reporter, type _exports_ReporterBody as ReporterBody, 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_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_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_wrapTraced as wrapTraced, _exports_wrapVitest as wrapVitest };
40501
+ 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_wrapTraced as wrapTraced, _exports_wrapVitest as wrapVitest };
39991
40502
  }
39992
40503
 
39993
- 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, Reporter, type ReporterBody, 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, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, 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, wrapTraced, wrapVitest };
40504
+ 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, wrapTraced, wrapVitest };