braintrust 3.3.0 → 3.5.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 (60) hide show
  1. package/README.md +52 -67
  2. package/dev/dist/index.d.mts +98 -14
  3. package/dev/dist/index.d.ts +98 -14
  4. package/dev/dist/index.js +2751 -1463
  5. package/dev/dist/index.mjs +2383 -1095
  6. package/dist/auto-instrumentations/bundler/esbuild.cjs +476 -31
  7. package/dist/auto-instrumentations/bundler/esbuild.d.mts +2 -2
  8. package/dist/auto-instrumentations/bundler/esbuild.d.ts +2 -2
  9. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  10. package/dist/auto-instrumentations/bundler/rollup.cjs +476 -31
  11. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  12. package/dist/auto-instrumentations/bundler/vite.cjs +476 -31
  13. package/dist/auto-instrumentations/bundler/vite.d.mts +2 -2
  14. package/dist/auto-instrumentations/bundler/vite.d.ts +2 -2
  15. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  16. package/dist/auto-instrumentations/bundler/webpack.cjs +476 -31
  17. package/dist/auto-instrumentations/bundler/webpack.d.mts +2 -2
  18. package/dist/auto-instrumentations/bundler/webpack.d.ts +2 -2
  19. package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
  20. package/dist/auto-instrumentations/chunk-DQTPSXJB.mjs +733 -0
  21. package/dist/auto-instrumentations/chunk-EVUKFMHG.mjs +41 -0
  22. package/dist/auto-instrumentations/{chunk-OLOPGWTJ.mjs → chunk-F3TJZ3Z2.mjs} +1 -1
  23. package/dist/auto-instrumentations/chunk-VLEJ5AEK.mjs +41 -0
  24. package/dist/auto-instrumentations/hook.mjs +540 -37
  25. package/dist/auto-instrumentations/index.cjs +476 -31
  26. package/dist/auto-instrumentations/index.d.mts +5 -5
  27. package/dist/auto-instrumentations/index.d.ts +5 -5
  28. package/dist/auto-instrumentations/index.mjs +1 -1
  29. package/dist/auto-instrumentations/loader/cjs-patch.cjs +32 -10
  30. package/dist/auto-instrumentations/loader/cjs-patch.mjs +10 -5
  31. package/dist/auto-instrumentations/loader/esm-hook.mjs +11 -12
  32. package/dist/auto-instrumentations/loader/get-package-version.cjs +28 -8
  33. package/dist/auto-instrumentations/loader/get-package-version.d.mts +2 -1
  34. package/dist/auto-instrumentations/loader/get-package-version.d.ts +2 -1
  35. package/dist/auto-instrumentations/loader/get-package-version.mjs +3 -1
  36. package/dist/browser.d.mts +806 -306
  37. package/dist/browser.d.ts +806 -306
  38. package/dist/browser.js +3235 -2317
  39. package/dist/browser.mjs +3235 -2317
  40. package/dist/cli.js +2672 -1347
  41. package/dist/edge-light.d.mts +1 -1
  42. package/dist/edge-light.d.ts +1 -1
  43. package/dist/edge-light.js +3035 -2087
  44. package/dist/edge-light.mjs +3035 -2087
  45. package/dist/index.d.mts +806 -306
  46. package/dist/index.d.ts +806 -306
  47. package/dist/index.js +3570 -2654
  48. package/dist/index.mjs +3235 -2319
  49. package/dist/instrumentation/index.d.mts +16 -22
  50. package/dist/instrumentation/index.d.ts +16 -22
  51. package/dist/instrumentation/index.js +2241 -1077
  52. package/dist/instrumentation/index.mjs +2241 -1077
  53. package/dist/workerd.d.mts +1 -1
  54. package/dist/workerd.d.ts +1 -1
  55. package/dist/workerd.js +3035 -2087
  56. package/dist/workerd.mjs +3035 -2087
  57. package/package.json +26 -7
  58. package/dist/auto-instrumentations/chunk-KVX7OFPD.mjs +0 -288
  59. package/dist/auto-instrumentations/chunk-XDBPUTVE.mjs +0 -22
  60. package/dist/auto-instrumentations/chunk-ZEC7BCL4.mjs +0 -22
package/dist/browser.d.ts CHANGED
@@ -1,5 +1,22 @@
1
1
  import { z } from 'zod/v3';
2
2
 
3
+ declare const ResponseFormatJsonSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ schema: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodString]>>;
7
+ strict: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ name: string;
10
+ description?: string | undefined;
11
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
12
+ strict?: boolean | null | undefined;
13
+ }, {
14
+ name: string;
15
+ description?: string | undefined;
16
+ schema?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
17
+ strict?: boolean | null | undefined;
18
+ }>;
19
+ type ResponseFormatJsonSchemaType = z.infer<typeof ResponseFormatJsonSchema>;
3
20
  declare const AnyModelParams: z.ZodObject<{
4
21
  temperature: z.ZodOptional<z.ZodNumber>;
5
22
  top_p: z.ZodOptional<z.ZodNumber>;
@@ -3269,21 +3286,21 @@ declare const GraphEdge: z.ZodObject<{
3269
3286
  node: string;
3270
3287
  variable: string;
3271
3288
  };
3289
+ purpose: "data" | "messages" | "control";
3272
3290
  target: {
3273
3291
  node: string;
3274
3292
  variable: string;
3275
3293
  };
3276
- purpose: "data" | "messages" | "control";
3277
3294
  }, {
3278
3295
  source: {
3279
3296
  node: string;
3280
3297
  variable: string;
3281
3298
  };
3299
+ purpose: "data" | "messages" | "control";
3282
3300
  target: {
3283
3301
  node: string;
3284
3302
  variable: string;
3285
3303
  };
3286
- purpose: "data" | "messages" | "control";
3287
3304
  }>;
3288
3305
  type GraphEdgeType = z.infer<typeof GraphEdge>;
3289
3306
  declare const GraphData: z.ZodObject<{
@@ -4340,21 +4357,21 @@ declare const GraphData: z.ZodObject<{
4340
4357
  node: string;
4341
4358
  variable: string;
4342
4359
  };
4360
+ purpose: "data" | "messages" | "control";
4343
4361
  target: {
4344
4362
  node: string;
4345
4363
  variable: string;
4346
4364
  };
4347
- purpose: "data" | "messages" | "control";
4348
4365
  }, {
4349
4366
  source: {
4350
4367
  node: string;
4351
4368
  variable: string;
4352
4369
  };
4370
+ purpose: "data" | "messages" | "control";
4353
4371
  target: {
4354
4372
  node: string;
4355
4373
  variable: string;
4356
4374
  };
4357
- purpose: "data" | "messages" | "control";
4358
4375
  }>>;
4359
4376
  }, "strip", z.ZodTypeAny, {
4360
4377
  type: "graph";
@@ -4520,11 +4537,11 @@ declare const GraphData: z.ZodObject<{
4520
4537
  node: string;
4521
4538
  variable: string;
4522
4539
  };
4540
+ purpose: "data" | "messages" | "control";
4523
4541
  target: {
4524
4542
  node: string;
4525
4543
  variable: string;
4526
4544
  };
4527
- purpose: "data" | "messages" | "control";
4528
4545
  }>;
4529
4546
  }, {
4530
4547
  type: "graph";
@@ -4690,11 +4707,11 @@ declare const GraphData: z.ZodObject<{
4690
4707
  node: string;
4691
4708
  variable: string;
4692
4709
  };
4710
+ purpose: "data" | "messages" | "control";
4693
4711
  target: {
4694
4712
  node: string;
4695
4713
  variable: string;
4696
4714
  };
4697
- purpose: "data" | "messages" | "control";
4698
4715
  }>;
4699
4716
  }>;
4700
4717
  type GraphDataType = z.infer<typeof GraphData>;
@@ -6057,21 +6074,21 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6057
6074
  node: string;
6058
6075
  variable: string;
6059
6076
  };
6077
+ purpose: "data" | "messages" | "control";
6060
6078
  target: {
6061
6079
  node: string;
6062
6080
  variable: string;
6063
6081
  };
6064
- purpose: "data" | "messages" | "control";
6065
6082
  }, {
6066
6083
  source: {
6067
6084
  node: string;
6068
6085
  variable: string;
6069
6086
  };
6087
+ purpose: "data" | "messages" | "control";
6070
6088
  target: {
6071
6089
  node: string;
6072
6090
  variable: string;
6073
6091
  };
6074
- purpose: "data" | "messages" | "control";
6075
6092
  }>>;
6076
6093
  }, "strip", z.ZodTypeAny, {
6077
6094
  type: "graph";
@@ -6237,11 +6254,11 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6237
6254
  node: string;
6238
6255
  variable: string;
6239
6256
  };
6257
+ purpose: "data" | "messages" | "control";
6240
6258
  target: {
6241
6259
  node: string;
6242
6260
  variable: string;
6243
6261
  };
6244
- purpose: "data" | "messages" | "control";
6245
6262
  }>;
6246
6263
  }, {
6247
6264
  type: "graph";
@@ -6407,11 +6424,11 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6407
6424
  node: string;
6408
6425
  variable: string;
6409
6426
  };
6427
+ purpose: "data" | "messages" | "control";
6410
6428
  target: {
6411
6429
  node: string;
6412
6430
  variable: string;
6413
6431
  };
6414
- purpose: "data" | "messages" | "control";
6415
6432
  }>;
6416
6433
  }>, z.ZodObject<{
6417
6434
  type: z.ZodLiteral<"remote_eval">;
@@ -8579,6 +8596,7 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
8579
8596
  runtime: "node" | "python" | "browser" | "quickjs";
8580
8597
  }>;
8581
8598
  code: z.ZodString;
8599
+ function_type: z.ZodOptional<z.ZodIntersection<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>, z.ZodUnknown>>;
8582
8600
  name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
8583
8601
  }, "strip", z.ZodTypeAny, {
8584
8602
  code: string;
@@ -8587,6 +8605,7 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
8587
8605
  runtime: "node" | "python" | "browser" | "quickjs";
8588
8606
  };
8589
8607
  name?: string | null | undefined;
8608
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8590
8609
  }, {
8591
8610
  code: string;
8592
8611
  inline_context: {
@@ -8594,6 +8613,7 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
8594
8613
  runtime: "node" | "python" | "browser" | "quickjs";
8595
8614
  };
8596
8615
  name?: string | null | undefined;
8616
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8597
8617
  }>, z.ZodObject<{
8598
8618
  inline_prompt: z.ZodOptional<z.ZodObject<{
8599
8619
  prompt: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -15705,6 +15725,47 @@ interface IsoAsyncLocalStorage<T> {
15705
15725
  run<R>(store: T | undefined, callback: () => R): R;
15706
15726
  getStore(): T | undefined;
15707
15727
  }
15728
+ type IsoMessageFunction<M = any, N extends string | symbol = string> = (message: M, name: N) => void;
15729
+ type IsoTransformFunction<M, S> = (message: M) => S;
15730
+ /**
15731
+ * Channel interface matching the shared node:diagnostics_channel and dc-browser API.
15732
+ */
15733
+ interface IsoChannel<M = any, N extends string | symbol = string> {
15734
+ readonly name: N;
15735
+ readonly hasSubscribers: boolean;
15736
+ subscribe(subscription: IsoMessageFunction<M, N>): void;
15737
+ unsubscribe(subscription: IsoMessageFunction<M, N>): boolean;
15738
+ bindStore<T>(store: IsoAsyncLocalStorage<T>, transform?: IsoTransformFunction<M, T>): void;
15739
+ unbindStore<T>(store: IsoAsyncLocalStorage<T>): boolean;
15740
+ publish(message: M): void;
15741
+ runStores<F extends (...args: any[]) => any>(message: M, fn: F, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
15742
+ }
15743
+ /**
15744
+ * TracingChannel interface matching both node:diagnostics_channel and dc-browser.
15745
+ * A composite of the five tracing subchannels used to instrument sync/async operations.
15746
+ */
15747
+ interface IsoTracingChannelCollection<M = any> {
15748
+ readonly start?: IsoChannel<M>;
15749
+ readonly end?: IsoChannel<M>;
15750
+ readonly asyncStart?: IsoChannel<M>;
15751
+ readonly asyncEnd?: IsoChannel<M>;
15752
+ readonly error?: IsoChannel<M>;
15753
+ }
15754
+ interface IsoTracingChannel<M = any> extends IsoTracingChannelCollection<M> {
15755
+ readonly hasSubscribers: boolean;
15756
+ subscribe(handlers: IsoChannelHandlers<M>): void;
15757
+ unsubscribe(handlers: IsoChannelHandlers<M>): boolean;
15758
+ 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>(fn: F, message?: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): Promise<Awaited<ReturnType<F>>>;
15760
+ traceCallback<F extends (...args: any[]) => any>(fn: F, position?: number, message?: M, thisArg?: ThisParameterType<F>, ...args: Parameters<F>): ReturnType<F>;
15761
+ }
15762
+ interface IsoChannelHandlers<M = any> {
15763
+ start?: (context: M, name: string) => void;
15764
+ end?: (context: M, name: string) => void;
15765
+ asyncStart?: (context: M, name: string) => void;
15766
+ asyncEnd?: (context: M, name: string) => void;
15767
+ error?: (context: M, name: string) => void;
15768
+ }
15708
15769
  interface Common {
15709
15770
  buildType: "browser" | "browser-js" | "node" | "edge-light" | "workerd" | "unknown";
15710
15771
  getRepoInfo: (settings?: GitMetadataSettingsType) => Promise<RepoInfoType | undefined>;
@@ -15712,6 +15773,7 @@ interface Common {
15712
15773
  getEnv: (name: string) => string | undefined;
15713
15774
  getCallerLocation: () => CallerLocation | undefined;
15714
15775
  newAsyncLocalStorage: <T>() => IsoAsyncLocalStorage<T>;
15776
+ newTracingChannel: <M = any>(nameOrChannels: string | IsoTracingChannelCollection<M>) => IsoTracingChannel<M>;
15715
15777
  processOn: (event: string, handler: (code: any) => void) => void;
15716
15778
  hash?: (data: string) => string;
15717
15779
  basename: (filepath: string) => string;
@@ -15740,6 +15802,10 @@ interface Common {
15740
15802
  }
15741
15803
  declare const iso: Common;
15742
15804
 
15805
+ type DebugLogLevel = "error" | "warn" | "info" | "debug";
15806
+ type DebugLogLevelOption = DebugLogLevel | false | undefined;
15807
+ declare function resetDebugLoggerForTests(): void;
15808
+
15743
15809
  /**
15744
15810
  * Abstract base class for ID generators
15745
15811
  */
@@ -17502,6 +17568,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
17502
17568
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
17503
17569
  }, z.ZodTypeAny, "passthrough">>]>>;
17504
17570
  templateFormat: z.ZodOptional<z.ZodEnum<["mustache", "nunjucks", "none"]>>;
17571
+ environments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
17505
17572
  }, "strip", z.ZodTypeAny, {
17506
17573
  model: string;
17507
17574
  params?: z.objectOutputType<{
@@ -17622,6 +17689,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
17622
17689
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
17623
17690
  }, z.ZodTypeAny, "passthrough"> | undefined;
17624
17691
  templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
17692
+ environments?: string[] | undefined;
17625
17693
  }, {
17626
17694
  model: string;
17627
17695
  params?: z.objectInputType<{
@@ -17742,6 +17810,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
17742
17810
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
17743
17811
  }, z.ZodTypeAny, "passthrough"> | undefined;
17744
17812
  templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
17813
+ environments?: string[] | undefined;
17745
17814
  }>>, z.ZodObject<{
17746
17815
  tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
17747
17816
  type: z.ZodLiteral<"function">;
@@ -18013,6 +18082,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
18013
18082
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
18014
18083
  }, z.ZodTypeAny, "passthrough"> | undefined;
18015
18084
  templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
18085
+ environments?: string[] | undefined;
18016
18086
  }) & {
18017
18087
  tools?: {
18018
18088
  function: {
@@ -18237,6 +18307,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
18237
18307
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
18238
18308
  }, z.ZodTypeAny, "passthrough"> | undefined;
18239
18309
  templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
18310
+ environments?: string[] | undefined;
18240
18311
  }) & {
18241
18312
  tools?: {
18242
18313
  function: {
@@ -18248,11 +18319,25 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
18248
18319
  type: "function";
18249
18320
  }[] | undefined;
18250
18321
  }) | undefined;
18322
+ }>, z.ZodObject<{
18323
+ type: z.ZodLiteral<"model">;
18324
+ default: z.ZodOptional<z.ZodString>;
18325
+ description: z.ZodOptional<z.ZodString>;
18326
+ }, "strip", z.ZodTypeAny, {
18327
+ type: "model";
18328
+ description?: string | undefined;
18329
+ default?: string | undefined;
18330
+ }, {
18331
+ type: "model";
18332
+ description?: string | undefined;
18333
+ default?: string | undefined;
18251
18334
  }>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>>;
18252
18335
  type EvalParameters = z.infer<typeof evalParametersSchema>;
18253
18336
  type InferParameterValue<T> = T extends {
18254
18337
  type: "prompt";
18255
- } ? Prompt : T extends z.ZodType ? z.infer<T> : never;
18338
+ } ? Prompt : T extends {
18339
+ type: "model";
18340
+ } ? string : T extends z.ZodType ? z.infer<T> : never;
18256
18341
  type InferParameters<T extends EvalParameters> = {
18257
18342
  [K in keyof T]: InferParameterValue<T[K]>;
18258
18343
  };
@@ -18538,6 +18623,8 @@ declare const loginSchema: z.ZodObject<{
18538
18623
  collect: "some" | "none" | "all";
18539
18624
  fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
18540
18625
  }>>>;
18626
+ debugLogLevel: z.ZodOptional<z.ZodEnum<["error", "warn", "info", "debug"]>>;
18627
+ debugLogLevelDisabled: z.ZodOptional<z.ZodBoolean>;
18541
18628
  }, "strict", z.ZodTypeAny, {
18542
18629
  appUrl: string;
18543
18630
  appPublicUrl: string;
@@ -18550,6 +18637,8 @@ declare const loginSchema: z.ZodObject<{
18550
18637
  collect: "some" | "none" | "all";
18551
18638
  fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
18552
18639
  } | null | undefined;
18640
+ debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
18641
+ debugLogLevelDisabled?: boolean | undefined;
18553
18642
  }, {
18554
18643
  appUrl: string;
18555
18644
  appPublicUrl: string;
@@ -18562,6 +18651,8 @@ declare const loginSchema: z.ZodObject<{
18562
18651
  collect: "some" | "none" | "all";
18563
18652
  fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
18564
18653
  } | null | undefined;
18654
+ debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
18655
+ debugLogLevelDisabled?: boolean | undefined;
18565
18656
  }>;
18566
18657
  type SerializedBraintrustState = z.infer<typeof loginSchema>;
18567
18658
  declare class BraintrustState {
@@ -18582,6 +18673,8 @@ declare class BraintrustState {
18582
18673
  proxyUrl: string | null;
18583
18674
  loggedIn: boolean;
18584
18675
  gitMetadataSettings?: GitMetadataSettingsType;
18676
+ debugLogLevel?: DebugLogLevel;
18677
+ private debugLogLevelConfigured;
18585
18678
  fetch: typeof globalThis.fetch;
18586
18679
  private _appConn;
18587
18680
  private _apiConn;
@@ -18612,6 +18705,9 @@ declare class BraintrustState {
18612
18705
  static deserialize(serialized: unknown, opts?: LoginOptions): BraintrustState;
18613
18706
  setFetch(fetch: typeof globalThis.fetch): void;
18614
18707
  setMaskingFunction(maskingFunction: ((value: unknown) => unknown) | null): void;
18708
+ setDebugLogLevel(option: DebugLogLevelOption): void;
18709
+ getDebugLogLevel(): DebugLogLevel | undefined;
18710
+ hasDebugLogLevelOverride(): boolean;
18615
18711
  login(loginParams: LoginOptions & {
18616
18712
  forceLogin?: boolean;
18617
18713
  }): Promise<void>;
@@ -19200,10 +19296,15 @@ interface DatasetRef {
19200
19296
  id: string;
19201
19297
  version?: string;
19202
19298
  }
19299
+ interface ParametersRef {
19300
+ id: string;
19301
+ version?: string;
19302
+ }
19203
19303
  type InitOptions<IsOpen extends boolean> = FullLoginOptions & {
19204
19304
  experiment?: string;
19205
19305
  description?: string;
19206
19306
  dataset?: AnyDataset | DatasetRef;
19307
+ parameters?: ParametersRef | RemoteEvalParameters<boolean, boolean>;
19207
19308
  update?: boolean;
19208
19309
  baseExperiment?: string;
19209
19310
  isPublic?: boolean;
@@ -19330,6 +19431,7 @@ type InitLoggerOptions<IsAsyncFlush> = FullLoginOptions & {
19330
19431
  * key is specified, will prompt the user to login.
19331
19432
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
19332
19433
  * @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)
19434
+ * @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
19435
  * @param setCurrent If true (the default), set the global current-experiment to the newly-created one.
19334
19436
  * @returns The newly created Logger.
19335
19437
  */
@@ -19473,6 +19575,19 @@ interface LoginOptions {
19473
19575
  * server. Defaults to false.
19474
19576
  */
19475
19577
  disableSpanCache?: boolean;
19578
+ /**
19579
+ * Controls internal Braintrust SDK troubleshooting output.
19580
+ *
19581
+ * Use `"error"`, `"warn"`, `"info"`, or `"debug"` to control how much
19582
+ * internal SDK troubleshooting output is emitted. Use `false` to explicitly
19583
+ * disable this output.
19584
+ *
19585
+ * When omitted, the SDK remains silent unless
19586
+ * `BRAINTRUST_DEBUG_LOG_LEVEL` is set to `"error"`, `"warn"`, `"info"`, or
19587
+ * `"debug"`. This option only affects local console output; it does not
19588
+ * change what data is logged to Braintrust.
19589
+ */
19590
+ debugLogLevel?: DebugLogLevel | false;
19476
19591
  }
19477
19592
  type FullLoginOptions = LoginOptions & {
19478
19593
  forceLogin?: boolean;
@@ -19971,7 +20086,18 @@ declare class Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY
19971
20086
  close(): Promise<string>;
19972
20087
  static isDataset(data: unknown): data is Dataset;
19973
20088
  }
19974
- type CompiledPromptParams = Omit<NonNullable<PromptDataType["options"]>["params"], "use_cache"> & {
20089
+ type CompiledPromptResponseFormat = Exclude<AnyModelParamsType["response_format"], null> extends infer ResponseFormat ? ResponseFormat extends {
20090
+ type: "json_schema";
20091
+ json_schema: infer JsonSchema;
20092
+ } ? Omit<ResponseFormat, "json_schema"> & {
20093
+ json_schema: Omit<Extract<JsonSchema, ResponseFormatJsonSchemaType>, "schema"> & {
20094
+ schema?: Record<string, unknown>;
20095
+ };
20096
+ } : ResponseFormat : never;
20097
+ type CompiledPromptReasoningEffort = Exclude<AnyModelParamsType["reasoning_effort"], "none">;
20098
+ type CompiledPromptParams = Omit<NonNullable<PromptDataType["options"]>["params"], "use_cache" | "response_format" | "reasoning_effort"> & Omit<AnyModelParamsType, "use_cache" | "response_format" | "reasoning_effort"> & {
20099
+ reasoning_effort?: CompiledPromptReasoningEffort;
20100
+ response_format?: CompiledPromptResponseFormat;
19975
20101
  model: NonNullable<NonNullable<PromptDataType["options"]>["model"]>;
19976
20102
  };
19977
20103
  type ChatPrompt = {
@@ -20183,6 +20309,7 @@ declare const _exportsForTestingOnly: {
20183
20309
  deepCopyEvent: typeof deepCopyEvent;
20184
20310
  useTestBackgroundLogger: typeof useTestBackgroundLogger;
20185
20311
  clearTestBackgroundLogger: typeof clearTestBackgroundLogger;
20312
+ resetDebugLoggerForTests: typeof resetDebugLoggerForTests;
20186
20313
  simulateLoginForTests: typeof simulateLoginForTests;
20187
20314
  simulateLogoutForTests: typeof simulateLogoutForTests;
20188
20315
  setInitialTestState: typeof setInitialTestState;
@@ -20674,24 +20801,167 @@ declare function initFunction({ projectName, slug, version, state, }: {
20674
20801
  state?: BraintrustState;
20675
20802
  }): (input: any) => Promise<any>;
20676
20803
 
20677
- interface BetaLike {
20678
- chat: {
20679
- completions: {
20680
- stream: any;
20681
- };
20682
- };
20683
- embeddings: any;
20804
+ declare const LEGACY_CACHED_HEADER = "x-cached";
20805
+ declare const X_CACHED_HEADER = "x-bt-cached";
20806
+ declare function parseCachedHeader(value: string | null | undefined): number | undefined;
20807
+
20808
+ /**
20809
+ * Vendored types for the OpenAI SDK which our wrapper and instrumentation consume.
20810
+ *
20811
+ * Should never be exposed to users of the SDK!
20812
+ */
20813
+ interface OpenAIAPIPromise<T> extends Promise<T> {
20814
+ withResponse(): Promise<OpenAIWithResponse<T>>;
20815
+ }
20816
+ interface OpenAIWithResponse<T> {
20817
+ data: T;
20818
+ response: Response;
20819
+ }
20820
+ interface OpenAIChatCreateParams {
20821
+ messages: unknown;
20822
+ stream?: boolean | null;
20823
+ [key: string]: unknown;
20824
+ }
20825
+ interface OpenAIEmbeddingCreateParams {
20826
+ input: unknown;
20827
+ [key: string]: unknown;
20828
+ }
20829
+ interface OpenAIModerationCreateParams {
20830
+ input: unknown;
20831
+ [key: string]: unknown;
20832
+ }
20833
+ interface OpenAIResponseCreateParams {
20834
+ input?: unknown;
20835
+ stream?: boolean | null;
20836
+ [key: string]: unknown;
20837
+ }
20838
+ interface OpenAIUsage {
20839
+ total_tokens?: number;
20840
+ prompt_tokens?: number;
20841
+ completion_tokens?: number;
20842
+ input_tokens?: number;
20843
+ output_tokens?: number;
20844
+ cached?: number;
20845
+ input_tokens_details?: Record<string, number>;
20846
+ output_tokens_details?: Record<string, number>;
20847
+ [key: string]: number | Record<string, number> | undefined;
20848
+ }
20849
+ interface OpenAIChatToolFunction {
20850
+ arguments: string;
20851
+ name?: string;
20852
+ [key: string]: unknown;
20853
+ }
20854
+ interface OpenAIChatToolCall {
20855
+ id?: string;
20856
+ type?: string;
20857
+ function: OpenAIChatToolFunction;
20858
+ [key: string]: unknown;
20859
+ }
20860
+ interface OpenAIChatMessage {
20861
+ role?: string;
20862
+ content?: unknown;
20863
+ tool_calls?: OpenAIChatToolCall[];
20864
+ [key: string]: unknown;
20865
+ }
20866
+ interface OpenAIChatChoice {
20867
+ index: number;
20868
+ message: OpenAIChatMessage;
20869
+ finish_reason?: string | null;
20870
+ logprobs?: unknown;
20871
+ [key: string]: unknown;
20872
+ }
20873
+ interface OpenAIChatCompletion {
20874
+ choices: OpenAIChatChoice[];
20875
+ usage?: OpenAIUsage;
20876
+ [key: string]: unknown;
20877
+ }
20878
+ interface OpenAIChatDelta {
20879
+ role?: string;
20880
+ content?: string;
20881
+ tool_calls?: OpenAIChatToolCall[];
20882
+ finish_reason?: string | null;
20883
+ [key: string]: unknown;
20884
+ }
20885
+ interface OpenAIChatChunkChoice {
20886
+ delta?: OpenAIChatDelta;
20887
+ finish_reason?: string | null;
20888
+ [key: string]: unknown;
20889
+ }
20890
+ interface OpenAIChatCompletionChunk {
20891
+ choices?: OpenAIChatChunkChoice[];
20892
+ usage?: OpenAIUsage;
20893
+ [key: string]: unknown;
20894
+ }
20895
+ type OpenAIChatStream = AsyncIterable<OpenAIChatCompletionChunk>;
20896
+ interface OpenAIEmbeddingResponse {
20897
+ data?: Array<{
20898
+ embedding?: number[];
20899
+ [key: string]: unknown;
20900
+ }>;
20901
+ usage?: OpenAIUsage;
20902
+ [key: string]: unknown;
20903
+ }
20904
+ interface OpenAIModerationResponse {
20905
+ results?: unknown[];
20906
+ usage?: OpenAIUsage;
20907
+ [key: string]: unknown;
20908
+ }
20909
+ interface OpenAIResponse {
20910
+ output?: unknown;
20911
+ usage?: OpenAIUsage;
20912
+ [key: string]: unknown;
20913
+ }
20914
+ interface OpenAIResponseCompletedEvent {
20915
+ type: "response.completed";
20916
+ response: OpenAIResponse;
20917
+ }
20918
+ type OpenAIResponseStreamEvent = OpenAIResponseCompletedEvent | {
20919
+ type: string;
20920
+ response?: OpenAIResponse;
20921
+ [key: string]: unknown;
20922
+ };
20923
+ type OpenAIResponseStream = AsyncIterable<OpenAIResponseStreamEvent>;
20924
+ interface OpenAISyncStream {
20925
+ [key: string]: unknown;
20926
+ }
20927
+ interface OpenAIChatCompletions {
20928
+ create: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion | OpenAIChatStream>;
20929
+ parse?: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion>;
20930
+ stream?: (params: OpenAIChatCreateParams, options?: unknown) => OpenAISyncStream;
20684
20931
  }
20685
- interface ChatLike {
20686
- completions: any;
20932
+ interface OpenAIChatCompletionsWithParsing extends OpenAIChatCompletions {
20933
+ parse: (params: OpenAIChatCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIChatCompletion>;
20934
+ stream: (params: OpenAIChatCreateParams, options?: unknown) => OpenAISyncStream;
20687
20935
  }
20688
- interface OpenAILike {
20689
- chat: ChatLike;
20690
- embeddings: any;
20691
- moderations: any;
20692
- beta?: BetaLike;
20693
- responses?: any;
20936
+ interface OpenAIChat {
20937
+ completions: OpenAIChatCompletions;
20694
20938
  }
20939
+ interface OpenAIChatWithParsing {
20940
+ completions: OpenAIChatCompletionsWithParsing;
20941
+ }
20942
+ interface OpenAIBeta {
20943
+ chat: OpenAIChatWithParsing;
20944
+ }
20945
+ interface OpenAIEmbeddings {
20946
+ create: (params: OpenAIEmbeddingCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIEmbeddingResponse>;
20947
+ }
20948
+ interface OpenAIModerations {
20949
+ create: (params: OpenAIModerationCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIModerationResponse>;
20950
+ }
20951
+ interface OpenAIResponses {
20952
+ create: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse | OpenAIResponseStream>;
20953
+ parse?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAIAPIPromise<OpenAIResponse>;
20954
+ stream?: (params: OpenAIResponseCreateParams, options?: unknown) => OpenAISyncStream;
20955
+ }
20956
+
20957
+ interface OpenAIV4Client {
20958
+ chat: OpenAIChat;
20959
+ embeddings: OpenAIEmbeddings;
20960
+ moderations: OpenAIModerations;
20961
+ beta?: OpenAIBeta;
20962
+ responses?: OpenAIResponses;
20963
+ }
20964
+
20695
20965
  declare global {
20696
20966
  var __inherited_braintrust_wrap_openai: ((openai: any) => any) | undefined;
20697
20967
  }
@@ -20700,16 +20970,14 @@ declare global {
20700
20970
  * not configured, nothing will be traced. If this is not an `OpenAI` object, this function is
20701
20971
  * a no-op.
20702
20972
  *
20703
- * Currently, this supports both the `v4` and `v5` API.
20973
+ * Currently, this supports the `v4`, `v5`, and `v6` API.
20704
20974
  *
20705
20975
  * @param openai
20706
20976
  * @returns The wrapped `OpenAI` object.
20707
20977
  */
20708
20978
  declare function wrapOpenAI<T extends object>(openai: T): T;
20979
+ type OpenAILike = OpenAIV4Client;
20709
20980
  declare function wrapOpenAIv4<T extends OpenAILike>(openai: T): T;
20710
- declare const LEGACY_CACHED_HEADER = "x-cached";
20711
- declare const X_CACHED_HEADER = "x-bt-cached";
20712
- declare function parseCachedHeader(value: string | null | undefined): number | undefined;
20713
20981
 
20714
20982
  interface WrapAISDKOptions {
20715
20983
  denyOutputPaths?: string[];
@@ -20874,6 +21142,24 @@ type ScorerFunction<Output = unknown> = (args: {
20874
21142
  input?: unknown;
20875
21143
  metadata?: Record<string, unknown>;
20876
21144
  }) => Score | Promise<Score> | number | null | Array<Score>;
21145
+ type ProgressEvent = {
21146
+ type: "suite_start";
21147
+ suiteName: string;
21148
+ } | {
21149
+ type: "test_start";
21150
+ testName: string;
21151
+ } | {
21152
+ type: "test_complete";
21153
+ testName: string;
21154
+ passed: boolean;
21155
+ duration: number;
21156
+ } | {
21157
+ type: "suite_complete";
21158
+ suiteName: string;
21159
+ passed: number;
21160
+ failed: number;
21161
+ };
21162
+
20877
21163
  interface BraintrustTestConfig {
20878
21164
  input?: unknown;
20879
21165
  expected?: unknown;
@@ -20955,23 +21241,6 @@ interface BraintrustVitest<VitestContext = unknown, ExpectType extends (...args:
20955
21241
  displaySummary?: boolean;
20956
21242
  }) => Promise<void>;
20957
21243
  }
20958
- type ProgressEvent = {
20959
- type: "suite_start";
20960
- suiteName: string;
20961
- } | {
20962
- type: "test_start";
20963
- testName: string;
20964
- } | {
20965
- type: "test_complete";
20966
- testName: string;
20967
- passed: boolean;
20968
- duration: number;
20969
- } | {
20970
- type: "suite_complete";
20971
- suiteName: string;
20972
- passed: number;
20973
- failed: number;
20974
- };
20975
21244
  interface WrapperConfig {
20976
21245
  projectName?: string;
20977
21246
  /**
@@ -21036,6 +21305,115 @@ interface WrapperConfig {
21036
21305
  */
21037
21306
  declare function wrapVitest<VitestContext = unknown, ExpectType extends (...args: unknown[]) => unknown = (...args: unknown[]) => unknown>(vitestMethods: VitestMethods<VitestContext, ExpectType>, config?: WrapperConfig): BraintrustVitest<VitestContext, ExpectType>;
21038
21307
 
21308
+ /** Progress events emitted by the node-test integration. */
21309
+ type NodeTestProgressEvent = {
21310
+ type: "test_start";
21311
+ testName: string;
21312
+ } | {
21313
+ type: "test_complete";
21314
+ testName: string;
21315
+ passed: boolean;
21316
+ duration: number;
21317
+ };
21318
+ /**
21319
+ * Minimal test context interface compatible with node:test's TestContext.
21320
+ * We only use `name` from the context, making this compatible with any
21321
+ * test runner that provides a `{ name?: string }` context object.
21322
+ */
21323
+ interface MinimalTestContext {
21324
+ name?: string;
21325
+ }
21326
+ /**
21327
+ * Configuration for `initNodeTestSuite()`.
21328
+ */
21329
+ interface NodeTestSuiteConfig {
21330
+ /** Project name for the Braintrust experiment. */
21331
+ projectName: string;
21332
+ /** Optional experiment name. Defaults to a timestamp-based name. */
21333
+ experimentName?: string;
21334
+ /**
21335
+ * If true, displays a formatted experiment summary after flushing.
21336
+ * Defaults to true.
21337
+ */
21338
+ displaySummary?: boolean;
21339
+ /**
21340
+ * Pass `after` from `node:test` to auto-register a flush hook.
21341
+ * When provided, `suite.flush()` is called automatically after all tests.
21342
+ */
21343
+ after?: (fn: () => void | Promise<void>) => void;
21344
+ /**
21345
+ * Callback for real-time progress events.
21346
+ * Emits `test_start` and `test_complete` events.
21347
+ */
21348
+ onProgress?: (event: NodeTestProgressEvent) => void;
21349
+ }
21350
+ /**
21351
+ * Configuration for a single eval test case.
21352
+ */
21353
+ interface EvalConfig {
21354
+ /** Test input data, logged to the span. */
21355
+ input?: unknown;
21356
+ /** Expected output, passed to scorers. */
21357
+ expected?: unknown;
21358
+ /** Custom metadata, logged to the span. */
21359
+ metadata?: Record<string, unknown>;
21360
+ /** Tags for organizing test cases. */
21361
+ tags?: string[];
21362
+ /** Scorer functions to evaluate the output. */
21363
+ scorers?: ScorerFunction[];
21364
+ /** Override span name (defaults to `t.name`, then `"unnamed test"`). */
21365
+ name?: string;
21366
+ }
21367
+ /**
21368
+ * Context passed to the eval test function.
21369
+ */
21370
+ interface EvalContext {
21371
+ input: unknown;
21372
+ expected?: unknown;
21373
+ metadata?: Record<string, unknown>;
21374
+ }
21375
+ /**
21376
+ * The public API surface returned by `initNodeTestSuite()`.
21377
+ */
21378
+ interface NodeTestSuite {
21379
+ /**
21380
+ * Creates a test function compatible with `node:test`.
21381
+ * Pass the result to `test()` from `node:test`.
21382
+ *
21383
+ * @param config - Eval configuration (input, expected, scorers, etc.)
21384
+ * @param fn - The test function. Its return value is logged as output and passed to scorers.
21385
+ * @returns A function accepting a test context `t` from `node:test`.
21386
+ */
21387
+ eval(config: EvalConfig, fn: (context: EvalContext) => unknown | Promise<unknown>): (t: MinimalTestContext) => Promise<void>;
21388
+ /**
21389
+ * Flush the experiment: summarize results and send data to Braintrust.
21390
+ * Called automatically if `after` was provided in the config.
21391
+ */
21392
+ flush(): Promise<void>;
21393
+ }
21394
+
21395
+ /**
21396
+ * Creates a new Node.js test suite with Braintrust experiment tracking.
21397
+ *
21398
+ * @example
21399
+ * ```typescript
21400
+ * import { test, describe, after } from 'node:test';
21401
+ * import { initNodeTestSuite } from 'braintrust';
21402
+ *
21403
+ * describe('My Tests', () => {
21404
+ * const suite = initNodeTestSuite({ projectName: 'my-project', after });
21405
+ *
21406
+ * test('my eval', suite.eval(
21407
+ * { input: 'hello', expected: 'world', scorers: [myScorer] },
21408
+ * async ({ input }) => {
21409
+ * return await myFunction(input);
21410
+ * }
21411
+ * ));
21412
+ * });
21413
+ * ```
21414
+ */
21415
+ declare function initNodeTestSuite(config: NodeTestSuiteConfig): NodeTestSuite;
21416
+
21039
21417
  interface BuildContext {
21040
21418
  getFunctionId(functionObj: unknown): Promise<FunctionIdType>;
21041
21419
  }
@@ -21168,6 +21546,14 @@ declare namespace graphFramework {
21168
21546
  }
21169
21547
 
21170
21548
  type GenericFunction<Input, Output> = ((input: Input) => Output) | ((input: Input) => Promise<Output>);
21549
+ interface BaseFnOpts {
21550
+ name: string;
21551
+ slug: string;
21552
+ description: string;
21553
+ ifExists: IfExistsType;
21554
+ tags?: string[];
21555
+ metadata?: Record<string, unknown>;
21556
+ }
21171
21557
 
21172
21558
  type SpanRecord = any;
21173
21559
  /**
@@ -22797,6 +23183,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
22797
23183
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
22798
23184
  }, z.ZodTypeAny, "passthrough">>]>>;
22799
23185
  templateFormat: z.ZodOptional<z.ZodEnum<["mustache", "nunjucks", "none"]>>;
23186
+ environments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
22800
23187
  }, "strip", z.ZodTypeAny, {
22801
23188
  model: string;
22802
23189
  params?: z.objectOutputType<{
@@ -22917,6 +23304,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
22917
23304
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
22918
23305
  }, z.ZodTypeAny, "passthrough"> | undefined;
22919
23306
  templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
23307
+ environments?: string[] | undefined;
22920
23308
  }, {
22921
23309
  model: string;
22922
23310
  params?: z.objectInputType<{
@@ -23037,6 +23425,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
23037
23425
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
23038
23426
  }, z.ZodTypeAny, "passthrough"> | undefined;
23039
23427
  templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
23428
+ environments?: string[] | undefined;
23040
23429
  }>>;
23041
23430
  type PromptDefinition = z.infer<typeof promptDefinitionSchema>;
23042
23431
  declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
@@ -23985,6 +24374,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
23985
24374
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
23986
24375
  }, z.ZodTypeAny, "passthrough">>]>>;
23987
24376
  templateFormat: z.ZodOptional<z.ZodEnum<["mustache", "nunjucks", "none"]>>;
24377
+ environments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23988
24378
  }, "strip", z.ZodTypeAny, {
23989
24379
  model: string;
23990
24380
  params?: z.objectOutputType<{
@@ -24105,6 +24495,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
24105
24495
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
24106
24496
  }, z.ZodTypeAny, "passthrough"> | undefined;
24107
24497
  templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
24498
+ environments?: string[] | undefined;
24108
24499
  }, {
24109
24500
  model: string;
24110
24501
  params?: z.objectInputType<{
@@ -24225,6 +24616,7 @@ declare const promptDefinitionWithToolsSchema: z.ZodIntersection<z.ZodIntersecti
24225
24616
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
24226
24617
  }, z.ZodTypeAny, "passthrough"> | undefined;
24227
24618
  templateFormat?: "none" | "mustache" | "nunjucks" | undefined;
24619
+ environments?: string[] | undefined;
24228
24620
  }>>, z.ZodObject<{
24229
24621
  tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
24230
24622
  type: z.ZodLiteral<"function">;
@@ -26581,6 +26973,18 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
26581
26973
  enabled_tools?: string[] | null | undefined;
26582
26974
  }> | null | undefined;
26583
26975
  } | undefined;
26976
+ }>, z.ZodObject<{
26977
+ type: z.ZodLiteral<"model">;
26978
+ default: z.ZodOptional<z.ZodString>;
26979
+ description: z.ZodOptional<z.ZodString>;
26980
+ }, "strip", z.ZodTypeAny, {
26981
+ type: "model";
26982
+ description?: string | undefined;
26983
+ default?: string | undefined;
26984
+ }, {
26985
+ type: "model";
26986
+ description?: string | undefined;
26987
+ default?: string | undefined;
26584
26988
  }>, z.ZodObject<{
26585
26989
  type: z.ZodLiteral<"data">;
26586
26990
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -28983,6 +29387,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
28983
29387
  enabled_tools?: string[] | null | undefined;
28984
29388
  }> | null | undefined;
28985
29389
  } | undefined;
29390
+ }>, z.ZodObject<{
29391
+ type: z.ZodLiteral<"model">;
29392
+ default: z.ZodOptional<z.ZodString>;
29393
+ description: z.ZodOptional<z.ZodString>;
29394
+ }, "strip", z.ZodTypeAny, {
29395
+ type: "model";
29396
+ description?: string | undefined;
29397
+ default?: string | undefined;
29398
+ }, {
29399
+ type: "model";
29400
+ description?: string | undefined;
29401
+ default?: string | undefined;
28986
29402
  }>, z.ZodObject<{
28987
29403
  type: z.ZodLiteral<"data">;
28988
29404
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -29255,6 +29671,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
29255
29671
  enabled_tools?: string[] | null | undefined;
29256
29672
  }> | null | undefined;
29257
29673
  } | undefined;
29674
+ } | {
29675
+ type: "model";
29676
+ description?: string | undefined;
29677
+ default?: string | undefined;
29258
29678
  } | {
29259
29679
  type: "data";
29260
29680
  schema: Record<string, unknown>;
@@ -29517,6 +29937,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
29517
29937
  enabled_tools?: string[] | null | undefined;
29518
29938
  }> | null | undefined;
29519
29939
  } | undefined;
29940
+ } | {
29941
+ type: "model";
29942
+ description?: string | undefined;
29943
+ default?: string | undefined;
29520
29944
  } | {
29521
29945
  type: "data";
29522
29946
  schema: Record<string, unknown>;
@@ -31819,6 +32243,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
31819
32243
  enabled_tools?: string[] | null | undefined;
31820
32244
  }> | null | undefined;
31821
32245
  } | undefined;
32246
+ }>, z.ZodObject<{
32247
+ type: z.ZodLiteral<"model">;
32248
+ default: z.ZodOptional<z.ZodString>;
32249
+ description: z.ZodOptional<z.ZodString>;
32250
+ }, "strip", z.ZodTypeAny, {
32251
+ type: "model";
32252
+ description?: string | undefined;
32253
+ default?: string | undefined;
32254
+ }, {
32255
+ type: "model";
32256
+ description?: string | undefined;
32257
+ default?: string | undefined;
31822
32258
  }>, z.ZodObject<{
31823
32259
  type: z.ZodLiteral<"data">;
31824
32260
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -32096,6 +32532,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32096
32532
  enabled_tools?: string[] | null | undefined;
32097
32533
  }> | null | undefined;
32098
32534
  } | undefined;
32535
+ } | {
32536
+ type: "model";
32537
+ description?: string | undefined;
32538
+ default?: string | undefined;
32099
32539
  } | {
32100
32540
  type: "data";
32101
32541
  schema: Record<string, unknown>;
@@ -32371,6 +32811,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32371
32811
  enabled_tools?: string[] | null | undefined;
32372
32812
  }> | null | undefined;
32373
32813
  } | undefined;
32814
+ } | {
32815
+ type: "model";
32816
+ description?: string | undefined;
32817
+ default?: string | undefined;
32374
32818
  } | {
32375
32819
  type: "data";
32376
32820
  schema: Record<string, unknown>;
@@ -32636,6 +33080,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32636
33080
  enabled_tools?: string[] | null | undefined;
32637
33081
  }> | null | undefined;
32638
33082
  } | undefined;
33083
+ } | {
33084
+ type: "model";
33085
+ description?: string | undefined;
33086
+ default?: string | undefined;
32639
33087
  } | {
32640
33088
  type: "data";
32641
33089
  schema: Record<string, unknown>;
@@ -32911,6 +33359,10 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32911
33359
  enabled_tools?: string[] | null | undefined;
32912
33360
  }> | null | undefined;
32913
33361
  } | undefined;
33362
+ } | {
33363
+ type: "model";
33364
+ description?: string | undefined;
33365
+ default?: string | undefined;
32914
33366
  } | {
32915
33367
  type: "data";
32916
33368
  schema: Record<string, unknown>;
@@ -35289,6 +35741,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
35289
35741
  enabled_tools?: string[] | null | undefined;
35290
35742
  }> | null | undefined;
35291
35743
  } | undefined;
35744
+ }>, z.ZodObject<{
35745
+ type: z.ZodLiteral<"model">;
35746
+ default: z.ZodOptional<z.ZodString>;
35747
+ description: z.ZodOptional<z.ZodString>;
35748
+ }, "strip", z.ZodTypeAny, {
35749
+ type: "model";
35750
+ description?: string | undefined;
35751
+ default?: string | undefined;
35752
+ }, {
35753
+ type: "model";
35754
+ description?: string | undefined;
35755
+ default?: string | undefined;
35292
35756
  }>, z.ZodObject<{
35293
35757
  type: z.ZodLiteral<"data">;
35294
35758
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -35561,6 +36025,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
35561
36025
  enabled_tools?: string[] | null | undefined;
35562
36026
  }> | null | undefined;
35563
36027
  } | undefined;
36028
+ } | {
36029
+ type: "model";
36030
+ description?: string | undefined;
36031
+ default?: string | undefined;
35564
36032
  } | {
35565
36033
  type: "data";
35566
36034
  schema: Record<string, unknown>;
@@ -35823,6 +36291,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
35823
36291
  enabled_tools?: string[] | null | undefined;
35824
36292
  }> | null | undefined;
35825
36293
  } | undefined;
36294
+ } | {
36295
+ type: "model";
36296
+ description?: string | undefined;
36297
+ default?: string | undefined;
35826
36298
  } | {
35827
36299
  type: "data";
35828
36300
  schema: Record<string, unknown>;
@@ -38125,6 +38597,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38125
38597
  enabled_tools?: string[] | null | undefined;
38126
38598
  }> | null | undefined;
38127
38599
  } | undefined;
38600
+ }>, z.ZodObject<{
38601
+ type: z.ZodLiteral<"model">;
38602
+ default: z.ZodOptional<z.ZodString>;
38603
+ description: z.ZodOptional<z.ZodString>;
38604
+ }, "strip", z.ZodTypeAny, {
38605
+ type: "model";
38606
+ description?: string | undefined;
38607
+ default?: string | undefined;
38608
+ }, {
38609
+ type: "model";
38610
+ description?: string | undefined;
38611
+ default?: string | undefined;
38128
38612
  }>, z.ZodObject<{
38129
38613
  type: z.ZodLiteral<"data">;
38130
38614
  schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -38402,6 +38886,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38402
38886
  enabled_tools?: string[] | null | undefined;
38403
38887
  }> | null | undefined;
38404
38888
  } | undefined;
38889
+ } | {
38890
+ type: "model";
38891
+ description?: string | undefined;
38892
+ default?: string | undefined;
38405
38893
  } | {
38406
38894
  type: "data";
38407
38895
  schema: Record<string, unknown>;
@@ -38677,6 +39165,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38677
39165
  enabled_tools?: string[] | null | undefined;
38678
39166
  }> | null | undefined;
38679
39167
  } | undefined;
39168
+ } | {
39169
+ type: "model";
39170
+ description?: string | undefined;
39171
+ default?: string | undefined;
38680
39172
  } | {
38681
39173
  type: "data";
38682
39174
  schema: Record<string, unknown>;
@@ -38942,6 +39434,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
38942
39434
  enabled_tools?: string[] | null | undefined;
38943
39435
  }> | null | undefined;
38944
39436
  } | undefined;
39437
+ } | {
39438
+ type: "model";
39439
+ description?: string | undefined;
39440
+ default?: string | undefined;
38945
39441
  } | {
38946
39442
  type: "data";
38947
39443
  schema: Record<string, unknown>;
@@ -39217,6 +39713,10 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39217
39713
  enabled_tools?: string[] | null | undefined;
39218
39714
  }> | null | undefined;
39219
39715
  } | undefined;
39716
+ } | {
39717
+ type: "model";
39718
+ description?: string | undefined;
39719
+ default?: string | undefined;
39220
39720
  } | {
39221
39721
  type: "data";
39222
39722
  schema: Record<string, unknown>;
@@ -39231,14 +39731,6 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39231
39731
  }>>;
39232
39732
  type EvaluatorDefinitions = z.infer<typeof evaluatorDefinitionsSchema>;
39233
39733
 
39234
- interface BaseFnOpts {
39235
- name: string;
39236
- slug: string;
39237
- description: string;
39238
- ifExists: IfExistsType;
39239
- metadata?: Record<string, unknown>;
39240
- }
39241
-
39242
39734
  type NameOrId = {
39243
39735
  name: string;
39244
39736
  } | {
@@ -39329,6 +39821,7 @@ declare class CodeFunction<Input, Output, Fn extends GenericFunction<Input, Outp
39329
39821
  readonly parameters?: z.ZodSchema<Input>;
39330
39822
  readonly returns?: z.ZodSchema<Output>;
39331
39823
  readonly ifExists?: IfExistsType;
39824
+ readonly tags?: string[];
39332
39825
  readonly metadata?: Record<string, unknown>;
39333
39826
  constructor(project: Project, opts: Omit<CodeOpts<Input, Output, Fn>, "name" | "slug"> & {
39334
39827
  name: string;
@@ -39348,7 +39841,9 @@ declare class CodePrompt {
39348
39841
  readonly id?: string;
39349
39842
  readonly functionType?: FunctionTypeEnumType;
39350
39843
  readonly toolFunctions: (SavedFunctionIdType | GenericCodeFunction)[];
39844
+ readonly tags?: string[];
39351
39845
  readonly metadata?: Record<string, unknown>;
39846
+ readonly environmentSlugs?: string[];
39352
39847
  constructor(project: Project, prompt: PromptDataType, toolFunctions: (SavedFunctionIdType | GenericCodeFunction)[], opts: Omit<PromptOpts<false, false, false, false>, "name" | "slug"> & {
39353
39848
  name: string;
39354
39849
  slug: string;
@@ -39415,7 +39910,11 @@ interface FunctionEvent {
39415
39910
  function_data: z.infer<typeof FunctionData>;
39416
39911
  function_type?: FunctionTypeEnumType;
39417
39912
  if_exists?: IfExistsType;
39913
+ tags?: string[];
39418
39914
  metadata?: Record<string, unknown>;
39915
+ environments?: {
39916
+ slug: string;
39917
+ }[];
39419
39918
  }
39420
39919
  declare class ProjectNameIdMap {
39421
39920
  private nameToId;
@@ -39823,255 +40322,256 @@ interface InstrumentationConfig {
39823
40322
  */
39824
40323
  declare function configureInstrumentation(config: InstrumentationConfig): void;
39825
40324
 
39826
- type _exports_AnyDataset = AnyDataset;
39827
- type _exports_Attachment = Attachment;
39828
- declare const _exports_Attachment: typeof Attachment;
39829
- type _exports_AttachmentParams = AttachmentParams;
39830
- declare const _exports_AttachmentReference: typeof AttachmentReference;
39831
- type _exports_BackgroundLoggerOpts = BackgroundLoggerOpts;
39832
- type _exports_BaseAttachment = BaseAttachment;
39833
- declare const _exports_BaseAttachment: typeof BaseAttachment;
39834
- declare const _exports_BaseExperiment: typeof BaseExperiment;
39835
- type _exports_BaseMetadata = BaseMetadata;
39836
- declare const _exports_BraintrustMiddleware: typeof BraintrustMiddleware;
39837
- type _exports_BraintrustState = BraintrustState;
39838
- declare const _exports_BraintrustState: typeof BraintrustState;
39839
- type _exports_BraintrustStream = BraintrustStream;
39840
- declare const _exports_BraintrustStream: typeof BraintrustStream;
39841
- type _exports_BraintrustStreamChunk = BraintrustStreamChunk;
39842
- type _exports_CachedSpanFetcher = CachedSpanFetcher;
39843
- declare const _exports_CachedSpanFetcher: typeof CachedSpanFetcher;
39844
- type _exports_ChatPrompt = ChatPrompt;
39845
- type _exports_CodeFunction<Input, Output, Fn extends GenericFunction<Input, Output>> = CodeFunction<Input, Output, Fn>;
39846
- declare const _exports_CodeFunction: typeof CodeFunction;
39847
- type _exports_CodeOpts<Params, Returns, Fn extends GenericFunction<Params, Returns>> = CodeOpts<Params, Returns, Fn>;
39848
- type _exports_CodePrompt = CodePrompt;
39849
- declare const _exports_CodePrompt: typeof CodePrompt;
39850
- type _exports_CommentEvent = CommentEvent;
39851
- type _exports_CompiledPrompt<Flavor extends "chat" | "completion"> = CompiledPrompt<Flavor>;
39852
- type _exports_CompiledPromptParams = CompiledPromptParams;
39853
- type _exports_CompletionPrompt = CompletionPrompt;
39854
- type _exports_ContextManager = ContextManager;
39855
- declare const _exports_ContextManager: typeof ContextManager;
39856
- type _exports_ContextParentSpanIds = ContextParentSpanIds;
39857
- type _exports_CreateProjectOpts = CreateProjectOpts;
39858
- declare const _exports_DEFAULT_FETCH_BATCH_SIZE: typeof DEFAULT_FETCH_BATCH_SIZE;
39859
- declare const _exports_DEFAULT_MAX_REQUEST_SIZE: typeof DEFAULT_MAX_REQUEST_SIZE;
39860
- type _exports_DataSummary = DataSummary;
39861
- type _exports_Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = Dataset<IsLegacyDataset>;
39862
- declare const _exports_Dataset: typeof Dataset;
39863
- type _exports_DatasetRecord<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = DatasetRecord<IsLegacyDataset>;
39864
- type _exports_DatasetSummary = DatasetSummary;
39865
- type _exports_DefaultMetadataType = DefaultMetadataType;
39866
- type _exports_DefaultPromptArgs = DefaultPromptArgs;
39867
- declare const _exports_ERR_PERMALINK: typeof ERR_PERMALINK;
39868
- type _exports_EndSpanArgs = EndSpanArgs;
39869
- declare const _exports_Eval: typeof Eval;
39870
- type _exports_EvalCase<Input, Expected, Metadata> = EvalCase<Input, Expected, Metadata>;
39871
- type _exports_EvalHooks<Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters> = EvalHooks<Expected, Metadata, Parameters>;
39872
- type _exports_EvalParameterSerializedSchema = EvalParameterSerializedSchema;
39873
- type _exports_EvalParameters = EvalParameters;
39874
- type _exports_EvalResult<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalResult<Input, Output, Expected, Metadata>;
39875
- type _exports_EvalResultWithSummary<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalResultWithSummary<Input, Output, Expected, Metadata>;
39876
- declare const _exports_EvalResultWithSummary: typeof EvalResultWithSummary;
39877
- type _exports_EvalScorer<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalScorer<Input, Output, Expected, Metadata>;
39878
- type _exports_EvalScorerArgs<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalScorerArgs<Input, Output, Expected, Metadata>;
39879
- type _exports_EvalTask<Input, Output, Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters> = EvalTask<Input, Output, Expected, Metadata, Parameters>;
39880
- type _exports_Evaluator<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters> = Evaluator<Input, Output, Expected, Metadata, Parameters>;
39881
- type _exports_EvaluatorDef<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters> = EvaluatorDef<Input, Output, Expected, Metadata, Parameters>;
39882
- type _exports_EvaluatorDefinition = EvaluatorDefinition;
39883
- type _exports_EvaluatorDefinitions = EvaluatorDefinitions;
39884
- type _exports_EvaluatorFile = EvaluatorFile;
39885
- type _exports_EvaluatorManifest = EvaluatorManifest;
39886
- type _exports_Experiment = Experiment;
39887
- declare const _exports_Experiment: typeof Experiment;
39888
- type _exports_ExperimentLogFullArgs = ExperimentLogFullArgs;
39889
- type _exports_ExperimentLogPartialArgs = ExperimentLogPartialArgs;
39890
- type _exports_ExperimentSummary = ExperimentSummary;
39891
- type _exports_Exportable = Exportable;
39892
- type _exports_ExternalAttachment = ExternalAttachment;
39893
- declare const _exports_ExternalAttachment: typeof ExternalAttachment;
39894
- type _exports_ExternalAttachmentParams = ExternalAttachmentParams;
39895
- type _exports_FailedHTTPResponse = FailedHTTPResponse;
39896
- declare const _exports_FailedHTTPResponse: typeof FailedHTTPResponse;
39897
- type _exports_FullInitDatasetOptions<IsLegacyDataset extends boolean> = FullInitDatasetOptions<IsLegacyDataset>;
39898
- type _exports_FullInitOptions<IsOpen extends boolean> = FullInitOptions<IsOpen>;
39899
- type _exports_FullLoginOptions = FullLoginOptions;
39900
- type _exports_FunctionEvent = FunctionEvent;
39901
- type _exports_GetThreadOptions = GetThreadOptions;
39902
- type _exports_IDGenerator = IDGenerator;
39903
- declare const _exports_IDGenerator: typeof IDGenerator;
39904
- type _exports_IdField = IdField;
39905
- type _exports_InitDatasetOptions<IsLegacyDataset extends boolean> = InitDatasetOptions<IsLegacyDataset>;
39906
- type _exports_InitLoggerOptions<IsAsyncFlush> = InitLoggerOptions<IsAsyncFlush>;
39907
- type _exports_InitOptions<IsOpen extends boolean> = InitOptions<IsOpen>;
39908
- type _exports_InputField = InputField;
39909
- type _exports_InstrumentationConfig = InstrumentationConfig;
39910
- type _exports_InvokeFunctionArgs<Input, Output, Stream extends boolean = false> = InvokeFunctionArgs<Input, Output, Stream>;
39911
- type _exports_InvokeReturn<Stream extends boolean, Output> = InvokeReturn<Stream, Output>;
39912
- type _exports_JSONAttachment = JSONAttachment;
39913
- declare const _exports_JSONAttachment: typeof JSONAttachment;
39914
- declare const _exports_LEGACY_CACHED_HEADER: typeof LEGACY_CACHED_HEADER;
39915
- declare const _exports_LOGS3_OVERFLOW_REFERENCE_TYPE: typeof LOGS3_OVERFLOW_REFERENCE_TYPE;
39916
- type _exports_LazyValue<T> = LazyValue<T>;
39917
- declare const _exports_LazyValue: typeof LazyValue;
39918
- type _exports_LoadPromptOptions = LoadPromptOptions;
39919
- type _exports_LogCommentFullArgs = LogCommentFullArgs;
39920
- type _exports_LogFeedbackFullArgs = LogFeedbackFullArgs;
39921
- type _exports_LogOptions<IsAsyncFlush> = LogOptions<IsAsyncFlush>;
39922
- type _exports_Logger<IsAsyncFlush extends boolean> = Logger<IsAsyncFlush>;
39923
- declare const _exports_Logger: typeof Logger;
39924
- type _exports_LoginInvalidOrgError = LoginInvalidOrgError;
39925
- declare const _exports_LoginInvalidOrgError: typeof LoginInvalidOrgError;
39926
- type _exports_LoginOptions = LoginOptions;
39927
- type _exports_Logs3OverflowInputRow = Logs3OverflowInputRow;
39928
- type _exports_Logs3OverflowUpload = Logs3OverflowUpload;
39929
- type _exports_MetricSummary = MetricSummary;
39930
- declare const _exports_NOOP_SPAN: typeof NOOP_SPAN;
39931
- declare const _exports_NOOP_SPAN_PERMALINK: typeof NOOP_SPAN_PERMALINK;
39932
- type _exports_NoopSpan = NoopSpan;
39933
- declare const _exports_NoopSpan: typeof NoopSpan;
39934
- type _exports_ObjectFetcher<RecordType> = ObjectFetcher<RecordType>;
39935
- declare const _exports_ObjectFetcher: typeof ObjectFetcher;
39936
- type _exports_ObjectMetadata = ObjectMetadata;
39937
- type _exports_OtherExperimentLogFields = OtherExperimentLogFields;
39938
- type _exports_ParametersSource = ParametersSource;
39939
- type _exports_ParentExperimentIds = ParentExperimentIds;
39940
- type _exports_ParentProjectLogIds = ParentProjectLogIds;
39941
- type _exports_Project = Project;
39942
- declare const _exports_Project: typeof Project;
39943
- type _exports_ProjectNameIdMap = ProjectNameIdMap;
39944
- declare const _exports_ProjectNameIdMap: typeof ProjectNameIdMap;
39945
- type _exports_PromiseUnless<B, R> = PromiseUnless<B, R>;
39946
- type _exports_Prompt<HasId extends boolean = true, HasVersion extends boolean = true> = Prompt<HasId, HasVersion>;
39947
- declare const _exports_Prompt: typeof Prompt;
39948
- type _exports_PromptBuilder = PromptBuilder;
39949
- declare const _exports_PromptBuilder: typeof PromptBuilder;
39950
- type _exports_PromptContents = PromptContents;
39951
- type _exports_PromptDefinition = PromptDefinition;
39952
- type _exports_PromptDefinitionWithTools = PromptDefinitionWithTools;
39953
- type _exports_PromptOpts<HasId extends boolean, HasVersion extends boolean, HasTools extends boolean = true, HasNoTrace extends boolean = true> = PromptOpts<HasId, HasVersion, HasTools, HasNoTrace>;
39954
- type _exports_PromptRowWithId<HasId extends boolean = true, HasVersion extends boolean = true> = PromptRowWithId<HasId, HasVersion>;
39955
- type _exports_ReadonlyAttachment = ReadonlyAttachment;
39956
- declare const _exports_ReadonlyAttachment: typeof ReadonlyAttachment;
39957
- type _exports_ReadonlyExperiment = ReadonlyExperiment;
39958
- declare const _exports_ReadonlyExperiment: typeof ReadonlyExperiment;
39959
- type _exports_RegisterSandboxOptions = RegisterSandboxOptions;
39960
- type _exports_RegisterSandboxResult = RegisterSandboxResult;
39961
- declare const _exports_Reporter: typeof Reporter;
39962
- type _exports_ReporterBody<EvalReport> = ReporterBody<EvalReport>;
39963
- type _exports_SandboxConfig = SandboxConfig;
39964
- type _exports_ScoreSummary = ScoreSummary;
39965
- type _exports_ScorerBuilder = ScorerBuilder;
39966
- declare const _exports_ScorerBuilder: typeof ScorerBuilder;
39967
- type _exports_ScorerOpts<Output, Input, Params, Returns, Fn extends GenericFunction<Exact<Params, ScorerArgs<Output, Input>>, Returns>> = ScorerOpts<Output, Input, Params, Returns, Fn>;
39968
- type _exports_SerializedBraintrustState = SerializedBraintrustState;
39969
- type _exports_SetCurrentArg = SetCurrentArg;
39970
- type _exports_Span = Span;
39971
- type _exports_SpanContext = SpanContext;
39972
- type _exports_SpanData = SpanData;
39973
- type _exports_SpanFetcher = SpanFetcher;
39974
- declare const _exports_SpanFetcher: typeof SpanFetcher;
39975
- type _exports_SpanImpl = SpanImpl;
39976
- declare const _exports_SpanImpl: typeof SpanImpl;
39977
- type _exports_StartSpanArgs = StartSpanArgs;
39978
- type _exports_TemplateFormat = TemplateFormat;
39979
- type _exports_TemplateRenderer = TemplateRenderer;
39980
- type _exports_TemplateRendererPlugin = TemplateRendererPlugin;
39981
- type _exports_TestBackgroundLogger = TestBackgroundLogger;
39982
- declare const _exports_TestBackgroundLogger: typeof TestBackgroundLogger;
39983
- type _exports_ToolBuilder = ToolBuilder;
39984
- declare const _exports_ToolBuilder: typeof ToolBuilder;
39985
- type _exports_Trace = Trace;
39986
- type _exports_UUIDGenerator = UUIDGenerator;
39987
- declare const _exports_UUIDGenerator: typeof UUIDGenerator;
39988
- type _exports_WithTransactionId<R> = WithTransactionId<R>;
39989
- declare const _exports_X_CACHED_HEADER: typeof X_CACHED_HEADER;
39990
- declare const _exports__exportsForTestingOnly: typeof _exportsForTestingOnly;
39991
- declare const _exports__internalGetGlobalState: typeof _internalGetGlobalState;
39992
- declare const _exports__internalSetInitialState: typeof _internalSetInitialState;
39993
- declare const _exports_addAzureBlobHeaders: typeof addAzureBlobHeaders;
39994
- declare const _exports_braintrustStreamChunkSchema: typeof braintrustStreamChunkSchema;
39995
- declare const _exports_buildLocalSummary: typeof buildLocalSummary;
39996
- declare const _exports_configureInstrumentation: typeof configureInstrumentation;
39997
- declare const _exports_constructLogs3OverflowRequest: typeof constructLogs3OverflowRequest;
39998
- declare const _exports_createFinalValuePassThroughStream: typeof createFinalValuePassThroughStream;
39999
- declare const _exports_currentExperiment: typeof currentExperiment;
40000
- declare const _exports_currentLogger: typeof currentLogger;
40001
- declare const _exports_currentSpan: typeof currentSpan;
40002
- declare const _exports_deepCopyEvent: typeof deepCopyEvent;
40003
- declare const _exports_defaultErrorScoreHandler: typeof defaultErrorScoreHandler;
40004
- declare const _exports_deserializePlainStringAsJSON: typeof deserializePlainStringAsJSON;
40005
- declare const _exports_devNullWritableStream: typeof devNullWritableStream;
40006
- declare const _exports_evaluatorDefinitionSchema: typeof evaluatorDefinitionSchema;
40007
- declare const _exports_evaluatorDefinitionsSchema: typeof evaluatorDefinitionsSchema;
40008
- declare const _exports_flush: typeof flush;
40009
- declare const _exports_getContextManager: typeof getContextManager;
40010
- declare const _exports_getIdGenerator: typeof getIdGenerator;
40011
- declare const _exports_getPromptVersions: typeof getPromptVersions;
40012
- declare const _exports_getSpanParentObject: typeof getSpanParentObject;
40013
- declare const _exports_getTemplateRenderer: typeof getTemplateRenderer;
40014
- declare const _exports_init: typeof init;
40015
- declare const _exports_initDataset: typeof initDataset;
40016
- declare const _exports_initExperiment: typeof initExperiment;
40017
- declare const _exports_initFunction: typeof initFunction;
40018
- declare const _exports_initLogger: typeof initLogger;
40019
- declare const _exports_invoke: typeof invoke;
40020
- declare const _exports_isTemplateFormat: typeof isTemplateFormat;
40021
- declare const _exports_loadParameters: typeof loadParameters;
40022
- declare const _exports_loadPrompt: typeof loadPrompt;
40023
- declare const _exports_log: typeof log;
40024
- declare const _exports_logError: typeof logError;
40025
- declare const _exports_login: typeof login;
40026
- declare const _exports_loginToState: typeof loginToState;
40027
- declare const _exports_logs3OverflowUploadSchema: typeof logs3OverflowUploadSchema;
40028
- declare const _exports_newId: typeof newId;
40029
- declare const _exports_parseCachedHeader: typeof parseCachedHeader;
40030
- declare const _exports_parseTemplateFormat: typeof parseTemplateFormat;
40031
- declare const _exports_permalink: typeof permalink;
40032
- declare const _exports_pickLogs3OverflowObjectIds: typeof pickLogs3OverflowObjectIds;
40033
- declare const _exports_projects: typeof projects;
40034
- declare const _exports_promptContentsSchema: typeof promptContentsSchema;
40035
- declare const _exports_promptDefinitionSchema: typeof promptDefinitionSchema;
40036
- declare const _exports_promptDefinitionToPromptData: typeof promptDefinitionToPromptData;
40037
- declare const _exports_promptDefinitionWithToolsSchema: typeof promptDefinitionWithToolsSchema;
40038
- declare const _exports_registerOtelFlush: typeof registerOtelFlush;
40039
- declare const _exports_registerSandbox: typeof registerSandbox;
40040
- declare const _exports_registerTemplatePlugin: typeof registerTemplatePlugin;
40041
- declare const _exports_renderMessage: typeof renderMessage;
40042
- declare const _exports_renderPromptParams: typeof renderPromptParams;
40043
- declare const _exports_renderTemplateContent: typeof renderTemplateContent;
40044
- declare const _exports_reportFailures: typeof reportFailures;
40045
- declare const _exports_runEvaluator: typeof runEvaluator;
40046
- declare const _exports_setFetch: typeof setFetch;
40047
- declare const _exports_setMaskingFunction: typeof setMaskingFunction;
40048
- declare const _exports_spanComponentsToObjectId: typeof spanComponentsToObjectId;
40049
- declare const _exports_startSpan: typeof startSpan;
40050
- declare const _exports_summarize: typeof summarize;
40051
- declare const _exports_templateRegistry: typeof templateRegistry;
40052
- declare const _exports_traceable: typeof traceable;
40053
- declare const _exports_traced: typeof traced;
40054
- declare const _exports_updateSpan: typeof updateSpan;
40055
- declare const _exports_uploadLogs3OverflowPayload: typeof uploadLogs3OverflowPayload;
40056
- declare const _exports_utf8ByteLength: typeof utf8ByteLength;
40057
- declare const _exports_withCurrent: typeof withCurrent;
40058
- declare const _exports_withDataset: typeof withDataset;
40059
- declare const _exports_withExperiment: typeof withExperiment;
40060
- declare const _exports_withLogger: typeof withLogger;
40061
- declare const _exports_withParent: typeof withParent;
40062
- declare const _exports_wrapAISDK: typeof wrapAISDK;
40063
- declare const _exports_wrapAISDKModel: typeof wrapAISDKModel;
40064
- declare const _exports_wrapAgentClass: typeof wrapAgentClass;
40065
- declare const _exports_wrapAnthropic: typeof wrapAnthropic;
40066
- declare const _exports_wrapClaudeAgentSDK: typeof wrapClaudeAgentSDK;
40067
- declare const _exports_wrapGoogleGenAI: typeof wrapGoogleGenAI;
40068
- declare const _exports_wrapMastraAgent: typeof wrapMastraAgent;
40069
- declare const _exports_wrapOpenAI: typeof wrapOpenAI;
40070
- declare const _exports_wrapOpenAIv4: typeof wrapOpenAIv4;
40071
- declare const _exports_wrapTraced: typeof wrapTraced;
40072
- declare const _exports_wrapVitest: typeof wrapVitest;
40073
- declare namespace _exports {
40074
- 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_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 };
40325
+ type exports_AnyDataset = AnyDataset;
40326
+ type exports_Attachment = Attachment;
40327
+ declare const exports_Attachment: typeof Attachment;
40328
+ type exports_AttachmentParams = AttachmentParams;
40329
+ declare const exports_AttachmentReference: typeof AttachmentReference;
40330
+ type exports_BackgroundLoggerOpts = BackgroundLoggerOpts;
40331
+ type exports_BaseAttachment = BaseAttachment;
40332
+ declare const exports_BaseAttachment: typeof BaseAttachment;
40333
+ declare const exports_BaseExperiment: typeof BaseExperiment;
40334
+ type exports_BaseMetadata = BaseMetadata;
40335
+ declare const exports_BraintrustMiddleware: typeof BraintrustMiddleware;
40336
+ type exports_BraintrustState = BraintrustState;
40337
+ declare const exports_BraintrustState: typeof BraintrustState;
40338
+ type exports_BraintrustStream = BraintrustStream;
40339
+ declare const exports_BraintrustStream: typeof BraintrustStream;
40340
+ type exports_BraintrustStreamChunk = BraintrustStreamChunk;
40341
+ type exports_CachedSpanFetcher = CachedSpanFetcher;
40342
+ declare const exports_CachedSpanFetcher: typeof CachedSpanFetcher;
40343
+ type exports_ChatPrompt = ChatPrompt;
40344
+ type exports_CodeFunction<Input, Output, Fn extends GenericFunction<Input, Output>> = CodeFunction<Input, Output, Fn>;
40345
+ declare const exports_CodeFunction: typeof CodeFunction;
40346
+ type exports_CodeOpts<Params, Returns, Fn extends GenericFunction<Params, Returns>> = CodeOpts<Params, Returns, Fn>;
40347
+ type exports_CodePrompt = CodePrompt;
40348
+ declare const exports_CodePrompt: typeof CodePrompt;
40349
+ type exports_CommentEvent = CommentEvent;
40350
+ type exports_CompiledPrompt<Flavor extends "chat" | "completion"> = CompiledPrompt<Flavor>;
40351
+ type exports_CompiledPromptParams = CompiledPromptParams;
40352
+ type exports_CompletionPrompt = CompletionPrompt;
40353
+ type exports_ContextManager = ContextManager;
40354
+ declare const exports_ContextManager: typeof ContextManager;
40355
+ type exports_ContextParentSpanIds = ContextParentSpanIds;
40356
+ type exports_CreateProjectOpts = CreateProjectOpts;
40357
+ declare const exports_DEFAULT_FETCH_BATCH_SIZE: typeof DEFAULT_FETCH_BATCH_SIZE;
40358
+ declare const exports_DEFAULT_MAX_REQUEST_SIZE: typeof DEFAULT_MAX_REQUEST_SIZE;
40359
+ type exports_DataSummary = DataSummary;
40360
+ type exports_Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = Dataset<IsLegacyDataset>;
40361
+ declare const exports_Dataset: typeof Dataset;
40362
+ type exports_DatasetRecord<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = DatasetRecord<IsLegacyDataset>;
40363
+ type exports_DatasetSummary = DatasetSummary;
40364
+ type exports_DefaultMetadataType = DefaultMetadataType;
40365
+ type exports_DefaultPromptArgs = DefaultPromptArgs;
40366
+ declare const exports_ERR_PERMALINK: typeof ERR_PERMALINK;
40367
+ type exports_EndSpanArgs = EndSpanArgs;
40368
+ declare const exports_Eval: typeof Eval;
40369
+ type exports_EvalCase<Input, Expected, Metadata> = EvalCase<Input, Expected, Metadata>;
40370
+ type exports_EvalHooks<Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters> = EvalHooks<Expected, Metadata, Parameters>;
40371
+ type exports_EvalParameterSerializedSchema = EvalParameterSerializedSchema;
40372
+ type exports_EvalParameters = EvalParameters;
40373
+ type exports_EvalResult<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalResult<Input, Output, Expected, Metadata>;
40374
+ type exports_EvalResultWithSummary<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalResultWithSummary<Input, Output, Expected, Metadata>;
40375
+ declare const exports_EvalResultWithSummary: typeof EvalResultWithSummary;
40376
+ type exports_EvalScorer<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalScorer<Input, Output, Expected, Metadata>;
40377
+ type exports_EvalScorerArgs<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalScorerArgs<Input, Output, Expected, Metadata>;
40378
+ type exports_EvalTask<Input, Output, Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters> = EvalTask<Input, Output, Expected, Metadata, Parameters>;
40379
+ type exports_Evaluator<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters> = Evaluator<Input, Output, Expected, Metadata, Parameters>;
40380
+ type exports_EvaluatorDef<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters> = EvaluatorDef<Input, Output, Expected, Metadata, Parameters>;
40381
+ type exports_EvaluatorDefinition = EvaluatorDefinition;
40382
+ type exports_EvaluatorDefinitions = EvaluatorDefinitions;
40383
+ type exports_EvaluatorFile = EvaluatorFile;
40384
+ type exports_EvaluatorManifest = EvaluatorManifest;
40385
+ type exports_Experiment = Experiment;
40386
+ declare const exports_Experiment: typeof Experiment;
40387
+ type exports_ExperimentLogFullArgs = ExperimentLogFullArgs;
40388
+ type exports_ExperimentLogPartialArgs = ExperimentLogPartialArgs;
40389
+ type exports_ExperimentSummary = ExperimentSummary;
40390
+ type exports_Exportable = Exportable;
40391
+ type exports_ExternalAttachment = ExternalAttachment;
40392
+ declare const exports_ExternalAttachment: typeof ExternalAttachment;
40393
+ type exports_ExternalAttachmentParams = ExternalAttachmentParams;
40394
+ type exports_FailedHTTPResponse = FailedHTTPResponse;
40395
+ declare const exports_FailedHTTPResponse: typeof FailedHTTPResponse;
40396
+ type exports_FullInitDatasetOptions<IsLegacyDataset extends boolean> = FullInitDatasetOptions<IsLegacyDataset>;
40397
+ type exports_FullInitOptions<IsOpen extends boolean> = FullInitOptions<IsOpen>;
40398
+ type exports_FullLoginOptions = FullLoginOptions;
40399
+ type exports_FunctionEvent = FunctionEvent;
40400
+ type exports_GetThreadOptions = GetThreadOptions;
40401
+ type exports_IDGenerator = IDGenerator;
40402
+ declare const exports_IDGenerator: typeof IDGenerator;
40403
+ type exports_IdField = IdField;
40404
+ type exports_InitDatasetOptions<IsLegacyDataset extends boolean> = InitDatasetOptions<IsLegacyDataset>;
40405
+ type exports_InitLoggerOptions<IsAsyncFlush> = InitLoggerOptions<IsAsyncFlush>;
40406
+ type exports_InitOptions<IsOpen extends boolean> = InitOptions<IsOpen>;
40407
+ type exports_InputField = InputField;
40408
+ type exports_InstrumentationConfig = InstrumentationConfig;
40409
+ type exports_InvokeFunctionArgs<Input, Output, Stream extends boolean = false> = InvokeFunctionArgs<Input, Output, Stream>;
40410
+ type exports_InvokeReturn<Stream extends boolean, Output> = InvokeReturn<Stream, Output>;
40411
+ type exports_JSONAttachment = JSONAttachment;
40412
+ declare const exports_JSONAttachment: typeof JSONAttachment;
40413
+ declare const exports_LEGACY_CACHED_HEADER: typeof LEGACY_CACHED_HEADER;
40414
+ declare const exports_LOGS3_OVERFLOW_REFERENCE_TYPE: typeof LOGS3_OVERFLOW_REFERENCE_TYPE;
40415
+ type exports_LazyValue<T> = LazyValue<T>;
40416
+ declare const exports_LazyValue: typeof LazyValue;
40417
+ type exports_LoadPromptOptions = LoadPromptOptions;
40418
+ type exports_LogCommentFullArgs = LogCommentFullArgs;
40419
+ type exports_LogFeedbackFullArgs = LogFeedbackFullArgs;
40420
+ type exports_LogOptions<IsAsyncFlush> = LogOptions<IsAsyncFlush>;
40421
+ type exports_Logger<IsAsyncFlush extends boolean> = Logger<IsAsyncFlush>;
40422
+ declare const exports_Logger: typeof Logger;
40423
+ type exports_LoginInvalidOrgError = LoginInvalidOrgError;
40424
+ declare const exports_LoginInvalidOrgError: typeof LoginInvalidOrgError;
40425
+ type exports_LoginOptions = LoginOptions;
40426
+ type exports_Logs3OverflowInputRow = Logs3OverflowInputRow;
40427
+ type exports_Logs3OverflowUpload = Logs3OverflowUpload;
40428
+ type exports_MetricSummary = MetricSummary;
40429
+ declare const exports_NOOP_SPAN: typeof NOOP_SPAN;
40430
+ declare const exports_NOOP_SPAN_PERMALINK: typeof NOOP_SPAN_PERMALINK;
40431
+ type exports_NoopSpan = NoopSpan;
40432
+ declare const exports_NoopSpan: typeof NoopSpan;
40433
+ type exports_ObjectFetcher<RecordType> = ObjectFetcher<RecordType>;
40434
+ declare const exports_ObjectFetcher: typeof ObjectFetcher;
40435
+ type exports_ObjectMetadata = ObjectMetadata;
40436
+ type exports_OtherExperimentLogFields = OtherExperimentLogFields;
40437
+ type exports_ParametersSource = ParametersSource;
40438
+ type exports_ParentExperimentIds = ParentExperimentIds;
40439
+ type exports_ParentProjectLogIds = ParentProjectLogIds;
40440
+ type exports_Project = Project;
40441
+ declare const exports_Project: typeof Project;
40442
+ type exports_ProjectNameIdMap = ProjectNameIdMap;
40443
+ declare const exports_ProjectNameIdMap: typeof ProjectNameIdMap;
40444
+ type exports_PromiseUnless<B, R> = PromiseUnless<B, R>;
40445
+ type exports_Prompt<HasId extends boolean = true, HasVersion extends boolean = true> = Prompt<HasId, HasVersion>;
40446
+ declare const exports_Prompt: typeof Prompt;
40447
+ type exports_PromptBuilder = PromptBuilder;
40448
+ declare const exports_PromptBuilder: typeof PromptBuilder;
40449
+ type exports_PromptContents = PromptContents;
40450
+ type exports_PromptDefinition = PromptDefinition;
40451
+ type exports_PromptDefinitionWithTools = PromptDefinitionWithTools;
40452
+ type exports_PromptOpts<HasId extends boolean, HasVersion extends boolean, HasTools extends boolean = true, HasNoTrace extends boolean = true> = PromptOpts<HasId, HasVersion, HasTools, HasNoTrace>;
40453
+ type exports_PromptRowWithId<HasId extends boolean = true, HasVersion extends boolean = true> = PromptRowWithId<HasId, HasVersion>;
40454
+ type exports_ReadonlyAttachment = ReadonlyAttachment;
40455
+ declare const exports_ReadonlyAttachment: typeof ReadonlyAttachment;
40456
+ type exports_ReadonlyExperiment = ReadonlyExperiment;
40457
+ declare const exports_ReadonlyExperiment: typeof ReadonlyExperiment;
40458
+ type exports_RegisterSandboxOptions = RegisterSandboxOptions;
40459
+ type exports_RegisterSandboxResult = RegisterSandboxResult;
40460
+ declare const exports_Reporter: typeof Reporter;
40461
+ type exports_ReporterBody<EvalReport> = ReporterBody<EvalReport>;
40462
+ type exports_SandboxConfig = SandboxConfig;
40463
+ type exports_ScoreSummary = ScoreSummary;
40464
+ type exports_ScorerBuilder = ScorerBuilder;
40465
+ declare const exports_ScorerBuilder: typeof ScorerBuilder;
40466
+ type exports_ScorerOpts<Output, Input, Params, Returns, Fn extends GenericFunction<Exact<Params, ScorerArgs<Output, Input>>, Returns>> = ScorerOpts<Output, Input, Params, Returns, Fn>;
40467
+ type exports_SerializedBraintrustState = SerializedBraintrustState;
40468
+ type exports_SetCurrentArg = SetCurrentArg;
40469
+ type exports_Span = Span;
40470
+ type exports_SpanContext = SpanContext;
40471
+ type exports_SpanData = SpanData;
40472
+ type exports_SpanFetcher = SpanFetcher;
40473
+ declare const exports_SpanFetcher: typeof SpanFetcher;
40474
+ type exports_SpanImpl = SpanImpl;
40475
+ declare const exports_SpanImpl: typeof SpanImpl;
40476
+ type exports_StartSpanArgs = StartSpanArgs;
40477
+ type exports_TemplateFormat = TemplateFormat;
40478
+ type exports_TemplateRenderer = TemplateRenderer;
40479
+ type exports_TemplateRendererPlugin = TemplateRendererPlugin;
40480
+ type exports_TestBackgroundLogger = TestBackgroundLogger;
40481
+ declare const exports_TestBackgroundLogger: typeof TestBackgroundLogger;
40482
+ type exports_ToolBuilder = ToolBuilder;
40483
+ declare const exports_ToolBuilder: typeof ToolBuilder;
40484
+ type exports_Trace = Trace;
40485
+ type exports_UUIDGenerator = UUIDGenerator;
40486
+ declare const exports_UUIDGenerator: typeof UUIDGenerator;
40487
+ type exports_WithTransactionId<R> = WithTransactionId<R>;
40488
+ declare const exports_X_CACHED_HEADER: typeof X_CACHED_HEADER;
40489
+ declare const exports__exportsForTestingOnly: typeof _exportsForTestingOnly;
40490
+ declare const exports__internalGetGlobalState: typeof _internalGetGlobalState;
40491
+ declare const exports__internalSetInitialState: typeof _internalSetInitialState;
40492
+ declare const exports_addAzureBlobHeaders: typeof addAzureBlobHeaders;
40493
+ declare const exports_braintrustStreamChunkSchema: typeof braintrustStreamChunkSchema;
40494
+ declare const exports_buildLocalSummary: typeof buildLocalSummary;
40495
+ declare const exports_configureInstrumentation: typeof configureInstrumentation;
40496
+ declare const exports_constructLogs3OverflowRequest: typeof constructLogs3OverflowRequest;
40497
+ declare const exports_createFinalValuePassThroughStream: typeof createFinalValuePassThroughStream;
40498
+ declare const exports_currentExperiment: typeof currentExperiment;
40499
+ declare const exports_currentLogger: typeof currentLogger;
40500
+ declare const exports_currentSpan: typeof currentSpan;
40501
+ declare const exports_deepCopyEvent: typeof deepCopyEvent;
40502
+ declare const exports_defaultErrorScoreHandler: typeof defaultErrorScoreHandler;
40503
+ declare const exports_deserializePlainStringAsJSON: typeof deserializePlainStringAsJSON;
40504
+ declare const exports_devNullWritableStream: typeof devNullWritableStream;
40505
+ declare const exports_evaluatorDefinitionSchema: typeof evaluatorDefinitionSchema;
40506
+ declare const exports_evaluatorDefinitionsSchema: typeof evaluatorDefinitionsSchema;
40507
+ declare const exports_flush: typeof flush;
40508
+ declare const exports_getContextManager: typeof getContextManager;
40509
+ declare const exports_getIdGenerator: typeof getIdGenerator;
40510
+ declare const exports_getPromptVersions: typeof getPromptVersions;
40511
+ declare const exports_getSpanParentObject: typeof getSpanParentObject;
40512
+ declare const exports_getTemplateRenderer: typeof getTemplateRenderer;
40513
+ declare const exports_init: typeof init;
40514
+ declare const exports_initDataset: typeof initDataset;
40515
+ declare const exports_initExperiment: typeof initExperiment;
40516
+ declare const exports_initFunction: typeof initFunction;
40517
+ declare const exports_initLogger: typeof initLogger;
40518
+ declare const exports_initNodeTestSuite: typeof initNodeTestSuite;
40519
+ declare const exports_invoke: typeof invoke;
40520
+ declare const exports_isTemplateFormat: typeof isTemplateFormat;
40521
+ declare const exports_loadParameters: typeof loadParameters;
40522
+ declare const exports_loadPrompt: typeof loadPrompt;
40523
+ declare const exports_log: typeof log;
40524
+ declare const exports_logError: typeof logError;
40525
+ declare const exports_login: typeof login;
40526
+ declare const exports_loginToState: typeof loginToState;
40527
+ declare const exports_logs3OverflowUploadSchema: typeof logs3OverflowUploadSchema;
40528
+ declare const exports_newId: typeof newId;
40529
+ declare const exports_parseCachedHeader: typeof parseCachedHeader;
40530
+ declare const exports_parseTemplateFormat: typeof parseTemplateFormat;
40531
+ declare const exports_permalink: typeof permalink;
40532
+ declare const exports_pickLogs3OverflowObjectIds: typeof pickLogs3OverflowObjectIds;
40533
+ declare const exports_projects: typeof projects;
40534
+ declare const exports_promptContentsSchema: typeof promptContentsSchema;
40535
+ declare const exports_promptDefinitionSchema: typeof promptDefinitionSchema;
40536
+ declare const exports_promptDefinitionToPromptData: typeof promptDefinitionToPromptData;
40537
+ declare const exports_promptDefinitionWithToolsSchema: typeof promptDefinitionWithToolsSchema;
40538
+ declare const exports_registerOtelFlush: typeof registerOtelFlush;
40539
+ declare const exports_registerSandbox: typeof registerSandbox;
40540
+ declare const exports_registerTemplatePlugin: typeof registerTemplatePlugin;
40541
+ declare const exports_renderMessage: typeof renderMessage;
40542
+ declare const exports_renderPromptParams: typeof renderPromptParams;
40543
+ declare const exports_renderTemplateContent: typeof renderTemplateContent;
40544
+ declare const exports_reportFailures: typeof reportFailures;
40545
+ declare const exports_runEvaluator: typeof runEvaluator;
40546
+ declare const exports_setFetch: typeof setFetch;
40547
+ declare const exports_setMaskingFunction: typeof setMaskingFunction;
40548
+ declare const exports_spanComponentsToObjectId: typeof spanComponentsToObjectId;
40549
+ declare const exports_startSpan: typeof startSpan;
40550
+ declare const exports_summarize: typeof summarize;
40551
+ declare const exports_templateRegistry: typeof templateRegistry;
40552
+ declare const exports_traceable: typeof traceable;
40553
+ declare const exports_traced: typeof traced;
40554
+ declare const exports_updateSpan: typeof updateSpan;
40555
+ declare const exports_uploadLogs3OverflowPayload: typeof uploadLogs3OverflowPayload;
40556
+ declare const exports_utf8ByteLength: typeof utf8ByteLength;
40557
+ declare const exports_withCurrent: typeof withCurrent;
40558
+ declare const exports_withDataset: typeof withDataset;
40559
+ declare const exports_withExperiment: typeof withExperiment;
40560
+ declare const exports_withLogger: typeof withLogger;
40561
+ declare const exports_withParent: typeof withParent;
40562
+ declare const exports_wrapAISDK: typeof wrapAISDK;
40563
+ declare const exports_wrapAISDKModel: typeof wrapAISDKModel;
40564
+ declare const exports_wrapAgentClass: typeof wrapAgentClass;
40565
+ declare const exports_wrapAnthropic: typeof wrapAnthropic;
40566
+ declare const exports_wrapClaudeAgentSDK: typeof wrapClaudeAgentSDK;
40567
+ declare const exports_wrapGoogleGenAI: typeof wrapGoogleGenAI;
40568
+ declare const exports_wrapMastraAgent: typeof wrapMastraAgent;
40569
+ declare const exports_wrapOpenAI: typeof wrapOpenAI;
40570
+ declare const exports_wrapOpenAIv4: typeof wrapOpenAIv4;
40571
+ declare const exports_wrapTraced: typeof wrapTraced;
40572
+ declare const exports_wrapVitest: typeof wrapVitest;
40573
+ declare namespace exports {
40574
+ 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 };
40075
40575
  }
40076
40576
 
40077
- 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, 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 };
40577
+ 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 };