braintrust 3.28.0 → 3.30.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 (54) hide show
  1. package/README.md +1 -1
  2. package/dev/dist/index.d.mts +356 -7
  3. package/dev/dist/index.d.ts +356 -7
  4. package/dev/dist/index.js +2679 -1828
  5. package/dev/dist/index.mjs +1862 -1011
  6. package/dist/apply-auto-instrumentation.js +298 -265
  7. package/dist/apply-auto-instrumentation.mjs +85 -52
  8. package/dist/auto-instrumentations/bundler/esbuild.cjs +56 -6
  9. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  10. package/dist/auto-instrumentations/bundler/next.cjs +56 -6
  11. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  12. package/dist/auto-instrumentations/bundler/rollup.cjs +56 -6
  13. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  14. package/dist/auto-instrumentations/bundler/vite.cjs +56 -6
  15. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  16. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +56 -6
  17. package/dist/auto-instrumentations/bundler/webpack.cjs +56 -6
  18. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  19. package/dist/auto-instrumentations/{chunk-26PKVUKB.mjs → chunk-LW4HDHXT.mjs} +12 -4
  20. package/dist/auto-instrumentations/{chunk-HD35AM3M.mjs → chunk-OXINGIEZ.mjs} +1 -1
  21. package/dist/auto-instrumentations/{chunk-NP7V4XB2.mjs → chunk-U64OYU4Q.mjs} +45 -3
  22. package/dist/auto-instrumentations/hook.mjs +967 -136
  23. package/dist/auto-instrumentations/index.cjs +45 -3
  24. package/dist/auto-instrumentations/index.mjs +1 -1
  25. package/dist/browser.d.mts +893 -24
  26. package/dist/browser.d.ts +893 -24
  27. package/dist/browser.js +2795 -1136
  28. package/dist/browser.mjs +2795 -1136
  29. package/dist/{chunk-BBE7SNRV.js → chunk-2XDW3UCG.js} +155 -23
  30. package/dist/{chunk-UPFNQCGB.mjs → chunk-BU6SM54N.mjs} +1830 -1045
  31. package/dist/{chunk-ZHUHZWFY.mjs → chunk-N3JKQ3D3.mjs} +152 -20
  32. package/dist/{chunk-OBBWQW6K.js → chunk-TWCDSYJN.js} +2890 -2105
  33. package/dist/cli.js +5976 -1348
  34. package/dist/edge-light.d.mts +1 -1
  35. package/dist/edge-light.d.ts +1 -1
  36. package/dist/edge-light.js +2795 -1136
  37. package/dist/edge-light.mjs +2795 -1136
  38. package/dist/index.d.mts +893 -24
  39. package/dist/index.d.ts +893 -24
  40. package/dist/index.js +1448 -699
  41. package/dist/index.mjs +848 -99
  42. package/dist/instrumentation/index.d.mts +563 -9
  43. package/dist/instrumentation/index.d.ts +563 -9
  44. package/dist/instrumentation/index.js +2794 -989
  45. package/dist/instrumentation/index.mjs +2794 -989
  46. package/dist/vitest-evals-reporter.js +16 -16
  47. package/dist/vitest-evals-reporter.mjs +2 -2
  48. package/dist/workerd.d.mts +1 -1
  49. package/dist/workerd.d.ts +1 -1
  50. package/dist/workerd.js +2795 -1136
  51. package/dist/workerd.mjs +2795 -1136
  52. package/package.json +1 -1
  53. package/util/dist/index.d.mts +42 -0
  54. package/util/dist/index.d.ts +42 -0
@@ -10044,6 +10044,15 @@ declare const PromptData: z.ZodObject<{
10044
10044
  type: "global";
10045
10045
  name: string;
10046
10046
  function_type?: "preprocessor" | undefined;
10047
+ }>, z.ZodObject<{
10048
+ type: z.ZodLiteral<"inline">;
10049
+ code: z.ZodString;
10050
+ }, "strip", z.ZodTypeAny, {
10051
+ code: string;
10052
+ type: "inline";
10053
+ }, {
10054
+ code: string;
10055
+ type: "inline";
10047
10056
  }>, z.ZodNull]>>;
10048
10057
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
10049
10058
  type: z.ZodLiteral<"function">;
@@ -10354,6 +10363,9 @@ declare const PromptData: z.ZodObject<{
10354
10363
  type: "global";
10355
10364
  name: string;
10356
10365
  function_type: "preprocessor";
10366
+ } | {
10367
+ code: string;
10368
+ type: "inline";
10357
10369
  } | null | undefined;
10358
10370
  origin?: {
10359
10371
  project_id?: string | undefined;
@@ -10628,6 +10640,9 @@ declare const PromptData: z.ZodObject<{
10628
10640
  type: "global";
10629
10641
  name: string;
10630
10642
  function_type?: "preprocessor" | undefined;
10643
+ } | {
10644
+ code: string;
10645
+ type: "inline";
10631
10646
  } | null | undefined;
10632
10647
  origin?: {
10633
10648
  project_id?: string | undefined;
@@ -12103,6 +12118,15 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12103
12118
  type: "global";
12104
12119
  name: string;
12105
12120
  function_type?: "preprocessor" | undefined;
12121
+ }>, z.ZodObject<{
12122
+ type: z.ZodLiteral<"inline">;
12123
+ code: z.ZodString;
12124
+ }, "strip", z.ZodTypeAny, {
12125
+ code: string;
12126
+ type: "inline";
12127
+ }, {
12128
+ code: string;
12129
+ type: "inline";
12106
12130
  }>, z.ZodNull]>>;
12107
12131
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
12108
12132
  type: z.ZodLiteral<"function">;
@@ -12413,6 +12437,9 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12413
12437
  type: "global";
12414
12438
  name: string;
12415
12439
  function_type: "preprocessor";
12440
+ } | {
12441
+ code: string;
12442
+ type: "inline";
12416
12443
  } | null | undefined;
12417
12444
  origin?: {
12418
12445
  project_id?: string | undefined;
@@ -12687,6 +12714,9 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12687
12714
  type: "global";
12688
12715
  name: string;
12689
12716
  function_type?: "preprocessor" | undefined;
12717
+ } | {
12718
+ code: string;
12719
+ type: "inline";
12690
12720
  } | null | undefined;
12691
12721
  origin?: {
12692
12722
  project_id?: string | undefined;
@@ -12971,6 +13001,9 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12971
13001
  type: "global";
12972
13002
  name: string;
12973
13003
  function_type: "preprocessor";
13004
+ } | {
13005
+ code: string;
13006
+ type: "inline";
12974
13007
  } | null | undefined;
12975
13008
  origin?: {
12976
13009
  project_id?: string | undefined;
@@ -13252,6 +13285,9 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
13252
13285
  type: "global";
13253
13286
  name: string;
13254
13287
  function_type?: "preprocessor" | undefined;
13288
+ } | {
13289
+ code: string;
13290
+ type: "inline";
13255
13291
  } | null | undefined;
13256
13292
  origin?: {
13257
13293
  project_id?: string | undefined;
@@ -14654,6 +14690,15 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14654
14690
  type: "global";
14655
14691
  name: string;
14656
14692
  function_type?: "preprocessor" | undefined;
14693
+ }>, z.ZodObject<{
14694
+ type: z.ZodLiteral<"inline">;
14695
+ code: z.ZodString;
14696
+ }, "strip", z.ZodTypeAny, {
14697
+ code: string;
14698
+ type: "inline";
14699
+ }, {
14700
+ code: string;
14701
+ type: "inline";
14657
14702
  }>, z.ZodNull]>>;
14658
14703
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
14659
14704
  type: z.ZodLiteral<"function">;
@@ -14964,6 +15009,9 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14964
15009
  type: "global";
14965
15010
  name: string;
14966
15011
  function_type: "preprocessor";
15012
+ } | {
15013
+ code: string;
15014
+ type: "inline";
14967
15015
  } | null | undefined;
14968
15016
  origin?: {
14969
15017
  project_id?: string | undefined;
@@ -15238,6 +15286,9 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
15238
15286
  type: "global";
15239
15287
  name: string;
15240
15288
  function_type?: "preprocessor" | undefined;
15289
+ } | {
15290
+ code: string;
15291
+ type: "inline";
15241
15292
  } | null | undefined;
15242
15293
  origin?: {
15243
15294
  project_id?: string | undefined;
@@ -15517,6 +15568,9 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
15517
15568
  type: "global";
15518
15569
  name: string;
15519
15570
  function_type: "preprocessor";
15571
+ } | {
15572
+ code: string;
15573
+ type: "inline";
15520
15574
  } | null | undefined;
15521
15575
  origin?: {
15522
15576
  project_id?: string | undefined;
@@ -15794,6 +15848,9 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
15794
15848
  type: "global";
15795
15849
  name: string;
15796
15850
  function_type?: "preprocessor" | undefined;
15851
+ } | {
15852
+ code: string;
15853
+ type: "inline";
15797
15854
  } | null | undefined;
15798
15855
  origin?: {
15799
15856
  project_id?: string | undefined;
@@ -17244,6 +17301,15 @@ declare const Prompt$1: z.ZodObject<{
17244
17301
  type: "global";
17245
17302
  name: string;
17246
17303
  function_type?: "preprocessor" | undefined;
17304
+ }>, z.ZodObject<{
17305
+ type: z.ZodLiteral<"inline">;
17306
+ code: z.ZodString;
17307
+ }, "strip", z.ZodTypeAny, {
17308
+ code: string;
17309
+ type: "inline";
17310
+ }, {
17311
+ code: string;
17312
+ type: "inline";
17247
17313
  }>, z.ZodNull]>>;
17248
17314
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
17249
17315
  type: z.ZodLiteral<"function">;
@@ -17554,6 +17620,9 @@ declare const Prompt$1: z.ZodObject<{
17554
17620
  type: "global";
17555
17621
  name: string;
17556
17622
  function_type: "preprocessor";
17623
+ } | {
17624
+ code: string;
17625
+ type: "inline";
17557
17626
  } | null | undefined;
17558
17627
  origin?: {
17559
17628
  project_id?: string | undefined;
@@ -17828,6 +17897,9 @@ declare const Prompt$1: z.ZodObject<{
17828
17897
  type: "global";
17829
17898
  name: string;
17830
17899
  function_type?: "preprocessor" | undefined;
17900
+ } | {
17901
+ code: string;
17902
+ type: "inline";
17831
17903
  } | null | undefined;
17832
17904
  origin?: {
17833
17905
  project_id?: string | undefined;
@@ -18119,6 +18191,9 @@ declare const Prompt$1: z.ZodObject<{
18119
18191
  type: "global";
18120
18192
  name: string;
18121
18193
  function_type: "preprocessor";
18194
+ } | {
18195
+ code: string;
18196
+ type: "inline";
18122
18197
  } | null | undefined;
18123
18198
  origin?: {
18124
18199
  project_id?: string | undefined;
@@ -18407,6 +18482,9 @@ declare const Prompt$1: z.ZodObject<{
18407
18482
  type: "global";
18408
18483
  name: string;
18409
18484
  function_type?: "preprocessor" | undefined;
18485
+ } | {
18486
+ code: string;
18487
+ type: "inline";
18410
18488
  } | null | undefined;
18411
18489
  origin?: {
18412
18490
  project_id?: string | undefined;
@@ -18671,7 +18749,6 @@ declare const registerTemplatePlugin: (plugin: TemplateRendererPlugin) => void;
18671
18749
  declare const getTemplateRenderer: (name: string) => TemplateRenderer | undefined;
18672
18750
 
18673
18751
  interface GlobalHookAsyncLocalStorage<T> {
18674
- enterWith(store: T): void;
18675
18752
  run<R>(store: T | undefined, callback: () => R): R;
18676
18753
  getStore(): T | undefined;
18677
18754
  }
@@ -18930,6 +19007,14 @@ interface PromptKey {
18930
19007
  */
18931
19008
  id?: string;
18932
19009
  }
19010
+ type PromptMemoryCacheEntry = {
19011
+ value: Prompt;
19012
+ resolvedOrgIdentity?: string;
19013
+ };
19014
+ type PromptDiskCacheEntry = {
19015
+ value: ReturnType<Prompt["_internalSerializeForCache"]>;
19016
+ resolvedOrgIdentity?: string;
19017
+ };
18933
19018
  /**
18934
19019
  * A configurable cache for Braintrust prompts with optional in-memory and filesystem storage.
18935
19020
  *
@@ -18938,10 +19023,19 @@ interface PromptKey {
18938
19023
  declare class PromptCache {
18939
19024
  private readonly memoryCache?;
18940
19025
  private readonly diskCache?;
19026
+ private readonly namespace?;
19027
+ private readonly expectedResolvedOrgIdentity?;
18941
19028
  constructor(options: {
18942
- memoryCache?: LRUCache<string, Prompt>;
18943
- diskCache?: DiskCache<Prompt>;
19029
+ memoryCache?: LRUCache<string, PromptMemoryCacheEntry>;
19030
+ diskCache?: DiskCache<PromptDiskCacheEntry>;
19031
+ namespace?: string;
19032
+ expectedResolvedOrgIdentity?: string;
18944
19033
  });
19034
+ /**
19035
+ * Returns a cache view that shares the same storage layers but isolates all
19036
+ * entries under the provided namespace.
19037
+ */
19038
+ withNamespace(namespace: string, expectedResolvedOrgIdentity?: string): PromptCache;
18945
19039
  /**
18946
19040
  * Retrieves a prompt from the cache.
18947
19041
  * First checks the in-memory LRU cache, then falls back to checking the disk cache if available.
@@ -18965,13 +19059,26 @@ interface ParametersKey {
18965
19059
  projectName?: string;
18966
19060
  id?: string;
18967
19061
  }
19062
+ type ParametersMemoryCacheEntry = {
19063
+ value: RemoteEvalParameters;
19064
+ resolvedOrgIdentity?: string;
19065
+ };
19066
+ type ParametersDiskCacheEntry = {
19067
+ value: ReturnType<RemoteEvalParameters["_internalSerializeForCache"]>;
19068
+ resolvedOrgIdentity?: string;
19069
+ };
18968
19070
  declare class ParametersCache {
18969
19071
  private readonly memoryCache?;
18970
19072
  private readonly diskCache?;
19073
+ private readonly namespace?;
19074
+ private readonly expectedResolvedOrgIdentity?;
18971
19075
  constructor(options: {
18972
- memoryCache?: LRUCache<string, RemoteEvalParameters>;
18973
- diskCache?: DiskCache<RemoteEvalParameters>;
19076
+ memoryCache?: LRUCache<string, ParametersMemoryCacheEntry>;
19077
+ diskCache?: DiskCache<ParametersDiskCacheEntry>;
19078
+ namespace?: string;
19079
+ expectedResolvedOrgIdentity?: string;
18974
19080
  });
19081
+ withNamespace(namespace: string, expectedResolvedOrgIdentity?: string): ParametersCache;
18975
19082
  get(key: ParametersKey): Promise<RemoteEvalParameters | undefined>;
18976
19083
  set(key: ParametersKey, value: RemoteEvalParameters): Promise<void>;
18977
19084
  }
@@ -21373,8 +21480,17 @@ declare const loginSchema: z.ZodObject<{
21373
21480
  debugLogLevelDisabled?: boolean | undefined;
21374
21481
  }>;
21375
21482
  type SerializedBraintrustState = z.infer<typeof loginSchema>;
21483
+ type ResolvedLoaderLoginOptions = Required<Pick<LoginOptions, "apiKey" | "appUrl" | "fetch">> & Pick<LoginOptions, "orgName"> & {
21484
+ forceLogin?: boolean;
21485
+ credentialCacheNamespace: string;
21486
+ existingState?: BraintrustState;
21487
+ };
21488
+ type LoaderCacheViews = {
21489
+ promptCache: PromptCache;
21490
+ parametersCache: ParametersCache;
21491
+ };
21492
+ type LoaderRequestState = Pick<BraintrustState, "appUrl" | "orgId" | "apiConn">;
21376
21493
  declare class BraintrustState {
21377
- private loginParams;
21378
21494
  id: string;
21379
21495
  currentExperiment: Experiment | undefined;
21380
21496
  currentLogger: Logger<false> | undefined;
@@ -21405,12 +21521,23 @@ declare class BraintrustState {
21405
21521
  private _otelFlushCallback;
21406
21522
  spanOriginEnvironment: SpanOriginEnvironment | undefined;
21407
21523
  private traceContextSigningSecret;
21524
+ private loaderLoginCache;
21525
+ private readonly loginParams;
21526
+ private activeLoginOrgNameSelector;
21408
21527
  constructor(loginParams: LoginOptions);
21409
21528
  /** @internal */
21410
21529
  _internalSetTraceContextSigningSecret(secret: string | undefined): void;
21411
21530
  /** @internal */
21412
21531
  _internalGetTraceContextSigningSecret(): string | undefined;
21413
21532
  resetLoginInfo(): void;
21533
+ /** @internal */
21534
+ _internalResolveLoaderLoginOptions({ apiKey, appUrl, orgName, fetch, forceLogin, }: Pick<LoginOptions, "apiKey" | "appUrl" | "orgName" | "fetch"> & {
21535
+ forceLogin?: boolean;
21536
+ }): Promise<ResolvedLoaderLoginOptions>;
21537
+ /** @internal */
21538
+ _internalGetLoaderCacheViews(loginOptions: ResolvedLoaderLoginOptions, requestState?: LoaderRequestState): LoaderCacheViews;
21539
+ /** @internal */
21540
+ _internalGetLoaderState({ apiKey, appUrl, orgName, fetch, forceLogin, existingState, }: ResolvedLoaderLoginOptions): Promise<LoaderRequestState>;
21414
21541
  resetIdGenState(): void;
21415
21542
  [RESET_CONTEXT_MANAGER_STATE](): void;
21416
21543
  get idGenerator(): IDGenerator;
@@ -21480,14 +21607,16 @@ declare class FailedHTTPResponse extends Error {
21480
21607
  status: number;
21481
21608
  text: string;
21482
21609
  data: string;
21483
- constructor(status: number, text: string, data: string);
21610
+ readonly cause?: unknown;
21611
+ constructor(status: number, text: string, data: string, cause?: unknown);
21484
21612
  }
21485
21613
  declare class HTTPConnection {
21614
+ private readonly classifyTransportErrors;
21486
21615
  base_url: string;
21487
21616
  token: string | null;
21488
21617
  headers: Record<string, string>;
21489
21618
  fetch: typeof globalThis.fetch;
21490
- constructor(base_url: string, fetch: typeof globalThis.fetch);
21619
+ constructor(base_url: string, fetch: typeof globalThis.fetch, classifyTransportErrors?: boolean);
21491
21620
  setFetch(fetch: typeof globalThis.fetch): void;
21492
21621
  ping(): Promise<boolean>;
21493
21622
  make_long_lived(): void;
@@ -22141,6 +22270,7 @@ declare global {
22141
22270
  }
22142
22271
  type InitDatasetOptions<IsLegacyDataset extends boolean> = FullLoginOptions & {
22143
22272
  dataset?: string;
22273
+ datasetId?: string;
22144
22274
  description?: string;
22145
22275
  version?: string;
22146
22276
  environment?: string;
@@ -22154,22 +22284,23 @@ type FullInitDatasetOptions<IsLegacyDataset extends boolean> = {
22154
22284
  project?: string;
22155
22285
  } & InitDatasetOptions<IsLegacyDataset>;
22156
22286
  /**
22157
- * Create a new dataset in a specified project. If the project does not exist, it will be created.
22287
+ * Initialize a dataset by name or ID. When initializing by name, the dataset and its project will be created if they do not exist.
22158
22288
  *
22159
22289
  * @param options Options for configuring initDataset().
22160
- * @param options.project The name of the project to create the dataset in. Must specify at least one of `project` or `projectId`.
22161
- * @param options.dataset The name of the dataset to create. If not specified, a name will be generated automatically.
22162
- * @param options.description An optional description of the dataset.
22290
+ * @param options.project The name of the project to create the dataset in. Must specify at least one of `project` or `projectId` unless `datasetId` is provided.
22291
+ * @param options.dataset The name of the dataset to create. If not specified, a name will be generated automatically. Ignored if `datasetId` is provided.
22292
+ * @param options.datasetId The ID of an existing dataset. Takes precedence over `dataset` and does not require `project` or `projectId`.
22293
+ * @param options.description An optional description when initializing a dataset by name. Cannot be used with `datasetId`.
22163
22294
  * @param options.version Pin the dataset to a specific version xact_id. If `snapshotName` or `environment` are also provided, `version` takes precedence.
22164
22295
  * @param options.snapshotName Pin the dataset to the version captured by this named snapshot. If `environment` is also provided, `snapshotName` takes precedence.
22165
22296
  * @param options.environment Pin the dataset to the version tagged with this environment slug.
22166
22297
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
22167
22298
  * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
22168
22299
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
22169
- * @param options.projectId The id of the project to create the dataset in. This takes precedence over `project` if specified.
22170
- * @param options.metadata A dictionary with additional data about the dataset. The values in `metadata` can be any JSON-serializable type, but its keys must be strings.
22300
+ * @param options.projectId The id of the project to create the dataset in. This takes precedence over `project` if specified and is not required when `datasetId` is provided.
22301
+ * @param options.metadata A dictionary with additional data when initializing a dataset by name. Cannot be used with `datasetId`. The values in `metadata` can be any JSON-serializable type, but its keys must be strings.
22171
22302
  * @param options.useOutput (Deprecated) If true, records will be fetched from this dataset in the legacy format, with the "expected" field renamed to "output". This option will be removed in a future version of Braintrust.
22172
- * @returns The newly created Dataset.
22303
+ * @returns The initialized Dataset.
22173
22304
  */
22174
22305
  declare function initDataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET>(options: Readonly<FullInitDatasetOptions<IsLegacyDataset>>): Dataset<IsLegacyDataset>;
22175
22306
  /**
@@ -22269,7 +22400,7 @@ type LoadParametersByProjectIdWithEnvOptions = LoadParametersBaseOptions & {
22269
22400
  * @param options.defaults (Optional) A dictionary of default values to use when rendering the prompt. Prompt values will override these defaults.
22270
22401
  * @param options.noTrace If true, do not include logging metadata for this prompt when build() is called.
22271
22402
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
22272
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js,
22403
+ * @param options.apiKey The API key to use for this request, independently of any existing global login. If the parameter is not specified, will use an existing login or try the `BRAINTRUST_API_KEY` environment variable. In Node.js,
22273
22404
  * if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
22274
22405
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
22275
22406
  * @returns The prompt object.
@@ -22296,7 +22427,7 @@ declare function loadPrompt({ projectName, projectId, slug, version, environment
22296
22427
  * @param options.environment Fetch the version of the parameters assigned to the specified environment (e.g. "production", "staging"). If both `version` and `environment` are provided, `version` takes precedence.
22297
22428
  * @param options.id The id of specific parameters to load. If specified, this takes precedence over all other parameters (project and slug).
22298
22429
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
22299
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories.
22430
+ * @param options.apiKey The API key to use for this request, independently of any existing global login. If the parameter is not specified, will use an existing login or try the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories.
22300
22431
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
22301
22432
  * @returns The parameters object.
22302
22433
  * @throws If the parameters are not found.
@@ -23075,6 +23206,251 @@ declare class Prompt<HasId extends boolean = true, HasVersion extends boolean =
23075
23206
  }): PromptBlockDataType;
23076
23207
  private getParsedPromptData;
23077
23208
  static isPrompt(data: unknown): data is Prompt<boolean, boolean>;
23209
+ /** @internal */
23210
+ _internalSerializeForCache(): {
23211
+ metadata: {
23212
+ id: string;
23213
+ created: string;
23214
+ project_id: string;
23215
+ _xact_id: string;
23216
+ prompt_session_id: string;
23217
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
23218
+ tags?: string[] | null | undefined;
23219
+ _pagination_key?: string | null | undefined;
23220
+ completion?: unknown;
23221
+ prompt_data?: unknown;
23222
+ function_data?: unknown;
23223
+ prompt_session_data?: unknown;
23224
+ object_data?: unknown;
23225
+ } | PromptRowWithId<HasId, HasVersion>;
23226
+ defaults: Partial<Omit<z.objectOutputType<{
23227
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23228
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23229
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23230
+ temperature: z.ZodOptional<z.ZodNumber>;
23231
+ top_p: z.ZodOptional<z.ZodNumber>;
23232
+ max_tokens: z.ZodOptional<z.ZodNumber>;
23233
+ max_completion_tokens: z.ZodOptional<z.ZodNumber>;
23234
+ frequency_penalty: z.ZodOptional<z.ZodNumber>;
23235
+ presence_penalty: z.ZodOptional<z.ZodNumber>;
23236
+ response_format: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
23237
+ type: z.ZodLiteral<"json_object">;
23238
+ }, "strip", z.ZodTypeAny, {
23239
+ type: "json_object";
23240
+ }, {
23241
+ type: "json_object";
23242
+ }>, z.ZodObject<{
23243
+ type: z.ZodLiteral<"json_schema">;
23244
+ json_schema: z.ZodObject<{
23245
+ name: z.ZodString;
23246
+ description: z.ZodOptional<z.ZodString>;
23247
+ schema: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodString]>>;
23248
+ strict: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
23249
+ }, "strip", z.ZodTypeAny, {
23250
+ name: string;
23251
+ description?: string | undefined;
23252
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23253
+ strict?: boolean | null | undefined;
23254
+ }, {
23255
+ name: string;
23256
+ description?: string | undefined;
23257
+ schema?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23258
+ strict?: boolean | null | undefined;
23259
+ }>;
23260
+ }, "strip", z.ZodTypeAny, {
23261
+ type: "json_schema";
23262
+ json_schema: {
23263
+ name: string;
23264
+ description?: string | undefined;
23265
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23266
+ strict?: boolean | null | undefined;
23267
+ };
23268
+ }, {
23269
+ type: "json_schema";
23270
+ json_schema: {
23271
+ name: string;
23272
+ description?: string | undefined;
23273
+ schema?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23274
+ strict?: boolean | null | undefined;
23275
+ };
23276
+ }>, z.ZodObject<{
23277
+ type: z.ZodLiteral<"text">;
23278
+ }, "strip", z.ZodTypeAny, {
23279
+ type: "text";
23280
+ }, {
23281
+ type: "text";
23282
+ }>, z.ZodNull]>>;
23283
+ tool_choice: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{
23284
+ type: z.ZodLiteral<"function">;
23285
+ function: z.ZodObject<{
23286
+ name: z.ZodString;
23287
+ }, "strip", z.ZodTypeAny, {
23288
+ name: string;
23289
+ }, {
23290
+ name: string;
23291
+ }>;
23292
+ }, "strip", z.ZodTypeAny, {
23293
+ function: {
23294
+ name: string;
23295
+ };
23296
+ type: "function";
23297
+ }, {
23298
+ function: {
23299
+ name: string;
23300
+ };
23301
+ type: "function";
23302
+ }>]>>;
23303
+ function_call: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"none">, z.ZodObject<{
23304
+ name: z.ZodString;
23305
+ }, "strip", z.ZodTypeAny, {
23306
+ name: string;
23307
+ }, {
23308
+ name: string;
23309
+ }>]>>;
23310
+ n: z.ZodOptional<z.ZodNumber>;
23311
+ stop: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23312
+ reasoning_effort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high"]>>;
23313
+ verbosity: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
23314
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
23315
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23316
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23317
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23318
+ max_tokens: z.ZodNumber;
23319
+ temperature: z.ZodNumber;
23320
+ top_p: z.ZodOptional<z.ZodNumber>;
23321
+ top_k: z.ZodOptional<z.ZodNumber>;
23322
+ stop_sequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23323
+ max_tokens_to_sample: z.ZodOptional<z.ZodNumber>;
23324
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
23325
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23326
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23327
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23328
+ temperature: z.ZodOptional<z.ZodNumber>;
23329
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
23330
+ topP: z.ZodOptional<z.ZodNumber>;
23331
+ topK: z.ZodOptional<z.ZodNumber>;
23332
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
23333
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23334
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23335
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23336
+ temperature: z.ZodOptional<z.ZodNumber>;
23337
+ topK: z.ZodOptional<z.ZodNumber>;
23338
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
23339
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23340
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23341
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23342
+ }, z.ZodTypeAny, "passthrough"> | undefined, "response_format" | "reasoning_effort" | "use_cache"> & Omit<{
23343
+ max_tokens: number;
23344
+ temperature?: number | undefined;
23345
+ top_p?: number | undefined;
23346
+ max_completion_tokens?: number | undefined;
23347
+ frequency_penalty?: number | undefined;
23348
+ presence_penalty?: number | undefined;
23349
+ response_format?: {
23350
+ type: "json_object";
23351
+ } | {
23352
+ type: "json_schema";
23353
+ json_schema: {
23354
+ name: string;
23355
+ description?: string | undefined;
23356
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23357
+ strict?: boolean | null | undefined;
23358
+ };
23359
+ } | {
23360
+ type: "text";
23361
+ } | null | undefined;
23362
+ tool_choice?: "auto" | "none" | "required" | {
23363
+ function: {
23364
+ name: string;
23365
+ };
23366
+ type: "function";
23367
+ } | undefined;
23368
+ function_call?: "auto" | "none" | {
23369
+ name: string;
23370
+ } | undefined;
23371
+ n?: number | undefined;
23372
+ stop?: string[] | undefined;
23373
+ reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | undefined;
23374
+ verbosity?: "low" | "medium" | "high" | undefined;
23375
+ top_k?: number | undefined;
23376
+ stop_sequences?: string[] | undefined;
23377
+ reasoning_enabled?: boolean | undefined;
23378
+ reasoning_budget?: number | undefined;
23379
+ max_tokens_to_sample?: number | undefined;
23380
+ maxOutputTokens?: number | undefined;
23381
+ topP?: number | undefined;
23382
+ topK?: number | undefined;
23383
+ use_cache?: boolean | undefined;
23384
+ }, "response_format" | "reasoning_effort" | "use_cache"> & {
23385
+ reasoning_effort?: CompiledPromptReasoningEffort;
23386
+ response_format?: {
23387
+ type: "json_object";
23388
+ } | {
23389
+ type: "text";
23390
+ } | (Omit<{
23391
+ type: "json_schema";
23392
+ json_schema: {
23393
+ name: string;
23394
+ description?: string | undefined;
23395
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23396
+ strict?: boolean | null | undefined;
23397
+ };
23398
+ }, "json_schema"> & {
23399
+ json_schema: Omit<{
23400
+ name: string;
23401
+ description?: string | undefined;
23402
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23403
+ strict?: boolean | null | undefined;
23404
+ }, "schema"> & {
23405
+ schema?: Record<string, unknown> | undefined;
23406
+ };
23407
+ }) | undefined;
23408
+ model: string;
23409
+ } & {
23410
+ max_tokens: number;
23411
+ temperature?: number | undefined;
23412
+ top_p?: number | undefined;
23413
+ max_completion_tokens?: number | undefined;
23414
+ frequency_penalty?: number | undefined;
23415
+ presence_penalty?: number | undefined;
23416
+ response_format?: {
23417
+ type: "json_object";
23418
+ } | {
23419
+ type: "json_schema";
23420
+ json_schema: {
23421
+ name: string;
23422
+ description?: string | undefined;
23423
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23424
+ strict?: boolean | null | undefined;
23425
+ };
23426
+ } | {
23427
+ type: "text";
23428
+ } | null | undefined;
23429
+ tool_choice?: "auto" | "none" | "required" | {
23430
+ function: {
23431
+ name: string;
23432
+ };
23433
+ type: "function";
23434
+ } | undefined;
23435
+ function_call?: "auto" | "none" | {
23436
+ name: string;
23437
+ } | undefined;
23438
+ n?: number | undefined;
23439
+ stop?: string[] | undefined;
23440
+ reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | undefined;
23441
+ verbosity?: "low" | "medium" | "high" | undefined;
23442
+ top_k?: number | undefined;
23443
+ stop_sequences?: string[] | undefined;
23444
+ reasoning_enabled?: boolean | undefined;
23445
+ reasoning_budget?: number | undefined;
23446
+ max_tokens_to_sample?: number | undefined;
23447
+ maxOutputTokens?: number | undefined;
23448
+ topP?: number | undefined;
23449
+ topK?: number | undefined;
23450
+ use_cache?: boolean | undefined;
23451
+ } & ChatPrompt & CompletionPrompt>;
23452
+ noTrace: boolean;
23453
+ };
23078
23454
  static fromPromptData(name: string, promptData: PromptDataType): Prompt<false, false>;
23079
23455
  }
23080
23456
  declare class RemoteEvalParameters<HasId extends boolean = true, HasVersion extends boolean = true, T extends Record<string, unknown> = Record<string, unknown>> {
@@ -23088,6 +23464,24 @@ declare class RemoteEvalParameters<HasId extends boolean = true, HasVersion exte
23088
23464
  get version(): HasVersion extends true ? TransactionId : TransactionId | undefined;
23089
23465
  get schema(): Record<string, unknown>;
23090
23466
  get data(): T;
23467
+ /** @internal */
23468
+ _internalSerializeForCache(): {
23469
+ metadata: {
23470
+ id: string;
23471
+ project_id: string;
23472
+ name: string;
23473
+ slug: string;
23474
+ function_type: "parameters";
23475
+ _xact_id: string;
23476
+ function_data: {
23477
+ type: "parameters";
23478
+ __schema: Record<string, unknown>;
23479
+ data?: Record<string, unknown> | undefined;
23480
+ };
23481
+ description?: string | null | undefined;
23482
+ metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
23483
+ };
23484
+ };
23091
23485
  validate(data: unknown): boolean;
23092
23486
  static isParameters(x: unknown): x is RemoteEvalParameters<boolean, boolean, Record<string, unknown>>;
23093
23487
  }
@@ -23285,6 +23679,117 @@ interface RegisterSandboxResult {
23285
23679
  */
23286
23680
  declare function registerSandbox(options: RegisterSandboxOptions): Promise<RegisterSandboxResult>;
23287
23681
 
23682
+ type OpenAIBatchJSONL = string | Iterable<unknown> | AsyncIterable<unknown>;
23683
+ type OpenAIBatchFileContent = OpenAIBatchJSONL | Response;
23684
+ type OpenAIBatchFile = OpenAIBatchFileContent | PromiseLike<OpenAIBatchFileContent>;
23685
+ interface OpenAIFileLike {
23686
+ id: string;
23687
+ [key: string]: unknown;
23688
+ }
23689
+ interface OpenAIBatchLike {
23690
+ id: string;
23691
+ endpoint: string;
23692
+ input_file_id: string;
23693
+ status: string;
23694
+ created_at?: number | null;
23695
+ in_progress_at?: number | null;
23696
+ completed_at?: number | null;
23697
+ failed_at?: number | null;
23698
+ expired_at?: number | null;
23699
+ cancelled_at?: number | null;
23700
+ request_counts?: {
23701
+ completed?: number;
23702
+ failed?: number;
23703
+ total?: number;
23704
+ } | null;
23705
+ [key: string]: unknown;
23706
+ }
23707
+ type OpenAIEnhancedResponse<T> = {
23708
+ response: Response;
23709
+ data: T;
23710
+ request_id?: string | null;
23711
+ };
23712
+ interface OpenAIAPIPromise$1<T> extends Promise<T> {
23713
+ withResponse(): Promise<OpenAIEnhancedResponse<T>>;
23714
+ asResponse(): Promise<Response>;
23715
+ }
23716
+ interface OpenAIFilesResource<TParams, TFile, TOptions> {
23717
+ create(params: TParams, options?: TOptions): OpenAIAPIPromise$1<TFile>;
23718
+ }
23719
+ interface OpenAIBatchesResource<TBatch, TOptions> {
23720
+ retrieve(batchId: string, options?: TOptions): OpenAIAPIPromise$1<TBatch>;
23721
+ }
23722
+ interface CompleteOpenAIBatchTraceArgs {
23723
+ inputFileId: string;
23724
+ inputFileContent: OpenAIBatchFile;
23725
+ outputFileContent?: OpenAIBatchFile;
23726
+ errorFileContent?: OpenAIBatchFile;
23727
+ }
23728
+
23729
+ /**
23730
+ * Wrap `openai.files.create` to trace an OpenAI Batch input file upload.
23731
+ *
23732
+ * Pass the `openai.files` resource, then call the returned function with the
23733
+ * same arguments as `openai.files.create`. Files whose purpose is not `batch`
23734
+ * are passed through without tracing. Blob and Response uploads are copied for
23735
+ * tracing; async-iterable uploads (including Node file streams) are teed so the
23736
+ * exact bytes still flow to OpenAI while Braintrust reads a separate branch.
23737
+ *
23738
+ * The returned input file ID identifies the trace. Each request span is
23739
+ * identified by that file ID and its JSONL `custom_id`, so use every traced
23740
+ * input file for only one OpenAI Batch.
23741
+ *
23742
+ * @example
23743
+ * ```ts
23744
+ * const inputFile = await openaiFilesCreateTraced(openai.files)({
23745
+ * file: createReadStream("batch.jsonl"),
23746
+ * purpose: "batch",
23747
+ * });
23748
+ * ```
23749
+ */
23750
+ declare function openaiFilesCreateTraced<TParams, TFile extends OpenAIFileLike, TOptions = unknown>(files: OpenAIFilesResource<TParams, TFile, TOptions>): (params: TParams, options?: TOptions) => OpenAIAPIPromise$1<TFile>;
23751
+ /**
23752
+ * Wrap `openai.batches.retrieve` to update an OpenAI Batch trace with the
23753
+ * server-recorded lifecycle timestamps and close its spans at a terminal
23754
+ * status.
23755
+ *
23756
+ * Pass the `openai.batches` resource, then call the returned function with the
23757
+ * same arguments as `openai.batches.retrieve`. The Batch must use an input file
23758
+ * previously uploaded through `openaiFilesCreateTraced` in this process.
23759
+ *
23760
+ * @example
23761
+ * ```ts
23762
+ * const batch = await openaiBatchesRetrieveTraced(openai.batches)(batchId);
23763
+ * ```
23764
+ */
23765
+ declare function openaiBatchesRetrieveTraced<TBatch extends OpenAIBatchLike, TOptions = unknown>(batches: OpenAIBatchesResource<TBatch, TOptions>): (batchId: string, options?: TOptions) => OpenAIAPIPromise$1<TBatch>;
23766
+ /**
23767
+ * Add result data to spans created by `openaiFilesCreateTraced`.
23768
+ *
23769
+ * This helper performs no OpenAI API requests. Pass the input file ID and the
23770
+ * input, output, and error contents returned by `openai.files.content`, or pass
23771
+ * JSONL strings/iterables directly. Response bodies are consumed. Call
23772
+ * `openaiBatchesRetrieveTraced` first when exact OpenAI lifecycle timestamps
23773
+ * are available.
23774
+ *
23775
+ * @example
23776
+ * ```ts
23777
+ * const outputFileContent = batch.output_file_id
23778
+ * ? await openai.files.content(batch.output_file_id)
23779
+ * : undefined;
23780
+ * const errorFileContent = batch.error_file_id
23781
+ * ? await openai.files.content(batch.error_file_id)
23782
+ * : undefined;
23783
+ * await completeOpenAIBatchTrace({
23784
+ * inputFileId: batch.input_file_id,
23785
+ * inputFileContent: await openai.files.content(batch.input_file_id),
23786
+ * outputFileContent,
23787
+ * errorFileContent,
23788
+ * });
23789
+ * ```
23790
+ */
23791
+ declare function completeOpenAIBatchTrace(args: CompleteOpenAIBatchTraceArgs): Promise<void>;
23792
+
23288
23793
  declare function isTemplateFormat(v: unknown): v is TemplateFormat;
23289
23794
  declare function parseTemplateFormat(value: unknown, defaultFormat?: TemplateFormat): TemplateFormat;
23290
23795
  declare function renderTemplateContent(template: string, variables: Record<string, unknown>, escape: (v: unknown) => string, options: {
@@ -23703,10 +24208,12 @@ declare function parseCachedHeader(value: string | null | undefined): number | u
23703
24208
  */
23704
24209
  interface OpenAIAPIPromise<T> extends Promise<T> {
23705
24210
  withResponse(): Promise<OpenAIWithResponse<T>>;
24211
+ asResponse(): Promise<Response>;
23706
24212
  }
23707
24213
  interface OpenAIWithResponse<T> {
23708
24214
  data: T;
23709
24215
  response: Response;
24216
+ request_id?: string | null;
23710
24217
  }
23711
24218
  interface OpenAIChatCreateParams {
23712
24219
  messages: unknown;
@@ -23746,12 +24253,24 @@ interface OpenAIChatToolFunction {
23746
24253
  name?: string;
23747
24254
  [key: string]: unknown;
23748
24255
  }
24256
+ interface OpenAIChatToolFunctionDelta {
24257
+ arguments?: string;
24258
+ name?: string;
24259
+ [key: string]: unknown;
24260
+ }
23749
24261
  interface OpenAIChatToolCall {
23750
24262
  id?: string;
23751
24263
  type?: string;
23752
24264
  function: OpenAIChatToolFunction;
23753
24265
  [key: string]: unknown;
23754
24266
  }
24267
+ interface OpenAIChatToolCallDelta {
24268
+ index: number;
24269
+ id?: string;
24270
+ type?: string;
24271
+ function?: OpenAIChatToolFunctionDelta;
24272
+ [key: string]: unknown;
24273
+ }
23755
24274
  interface OpenAIChatMessage {
23756
24275
  role?: string;
23757
24276
  content?: unknown;
@@ -23787,11 +24306,12 @@ interface OpenAIChatDelta {
23787
24306
  role?: string;
23788
24307
  content?: string;
23789
24308
  refusal?: string;
23790
- tool_calls?: OpenAIChatToolCall[];
24309
+ tool_calls?: OpenAIChatToolCallDelta[];
23791
24310
  finish_reason?: string | null;
23792
24311
  [key: string]: unknown;
23793
24312
  }
23794
24313
  interface OpenAIChatChunkChoice {
24314
+ index: number;
23795
24315
  delta?: OpenAIChatDelta;
23796
24316
  finish_reason?: string | null;
23797
24317
  logprobs?: OpenAIChatLogprobs | null;
@@ -24348,7 +24868,7 @@ type EveModelMessage = EveSystemModelMessage | {
24348
24868
  readonly role: "tool";
24349
24869
  };
24350
24870
  interface EveInstrumentationModelInput {
24351
- readonly instructions?: string | readonly EveSystemModelMessage[];
24871
+ readonly instructions?: string | EveSystemModelMessage | readonly EveSystemModelMessage[];
24352
24872
  readonly messages: readonly EveModelMessage[];
24353
24873
  }
24354
24874
  interface EveInstrumentationStepStartedEventInput {
@@ -24377,6 +24897,198 @@ interface EveInstrumentationDefinition {
24377
24897
  readonly recordOutputs?: boolean;
24378
24898
  readonly setup?: (context: EveInstrumentationSetupContext) => void;
24379
24899
  }
24900
+ /**
24901
+ * Vendored types for Eve's instrumentation-provider API, introduced in
24902
+ * eve@0.34.0. Keep this limited to lifecycle events consumed by Braintrust.
24903
+ */
24904
+ interface EveProviderSetupContext {
24905
+ readonly agentName: string;
24906
+ readonly environment?: "development" | "preview" | "production";
24907
+ readonly evaluation?: {
24908
+ readonly runId: string;
24909
+ };
24910
+ readonly frameworkVersion?: string;
24911
+ }
24912
+ interface EveProviderState {
24913
+ get(): EveJsonValue | undefined;
24914
+ set(value: EveJsonValue | undefined): void;
24915
+ }
24916
+ interface EveProviderContext {
24917
+ readonly state: EveProviderState;
24918
+ }
24919
+ interface EveInstrumentationAttemptScope {
24920
+ readonly attemptId: string;
24921
+ readonly attemptIndex: number;
24922
+ readonly functionId?: string;
24923
+ readonly rootSessionId?: string;
24924
+ readonly sessionId: string;
24925
+ readonly stepIndex: number;
24926
+ readonly turnId: string;
24927
+ }
24928
+ interface EveInstrumentationParentLineage {
24929
+ readonly callId: string;
24930
+ readonly sessionId: string;
24931
+ readonly subagentName?: string;
24932
+ readonly turnId: string;
24933
+ }
24934
+ interface EveInstrumentationTraceContext {
24935
+ readonly isRemote?: boolean;
24936
+ readonly spanId: string;
24937
+ readonly traceFlags: number;
24938
+ readonly traceId: string;
24939
+ }
24940
+ interface EveProviderTurnStartedEvent {
24941
+ readonly idempotencyKey: string;
24942
+ readonly parentLineage?: EveInstrumentationParentLineage;
24943
+ readonly parentTraceContext?: EveInstrumentationTraceContext;
24944
+ readonly rootSessionId: string;
24945
+ readonly sequence: number;
24946
+ readonly sessionId: string;
24947
+ readonly turnId: string;
24948
+ readonly type: "turn.started";
24949
+ }
24950
+ type EveProviderTurnTerminalEvent = {
24951
+ readonly idempotencyKey: string;
24952
+ readonly sessionId: string;
24953
+ readonly turnId: string;
24954
+ readonly type: "turn.cancelled" | "turn.completed";
24955
+ } | {
24956
+ readonly error?: unknown;
24957
+ readonly idempotencyKey: string;
24958
+ readonly sessionId: string;
24959
+ readonly turnId: string;
24960
+ readonly type: "turn.failed";
24961
+ };
24962
+ interface EveProviderModelCallStartedEvent {
24963
+ readonly idempotencyKey: string;
24964
+ readonly input?: EveInstrumentationModelInput;
24965
+ readonly model: {
24966
+ readonly modelId: string;
24967
+ readonly provider: string;
24968
+ };
24969
+ readonly scope: EveInstrumentationAttemptScope;
24970
+ readonly type: "model.call.started";
24971
+ }
24972
+ type EveProviderContentPart = {
24973
+ readonly text: string;
24974
+ readonly type: "text";
24975
+ } | {
24976
+ readonly text: string;
24977
+ readonly type: "reasoning";
24978
+ } | {
24979
+ readonly callId: string;
24980
+ readonly input: unknown;
24981
+ readonly toolName: string;
24982
+ readonly type: "tool-call";
24983
+ } | {
24984
+ readonly callId: string;
24985
+ readonly input: unknown;
24986
+ readonly output: unknown;
24987
+ readonly toolName: string;
24988
+ readonly type: "tool-result";
24989
+ } | {
24990
+ readonly callId: string;
24991
+ readonly error: unknown;
24992
+ readonly input: unknown;
24993
+ readonly toolName: string;
24994
+ readonly type: "tool-error";
24995
+ };
24996
+ interface EveProviderUsage {
24997
+ readonly inputTokenDetails?: {
24998
+ readonly cacheReadTokens?: number;
24999
+ readonly cacheWriteTokens?: number;
25000
+ };
25001
+ readonly inputTokens?: number;
25002
+ readonly outputTokens?: number;
25003
+ }
25004
+ type EveProviderModelCallTerminalEvent = {
25005
+ readonly content?: readonly EveProviderContentPart[];
25006
+ readonly finishReason: string;
25007
+ readonly idempotencyKey: string;
25008
+ readonly scope: EveInstrumentationAttemptScope;
25009
+ readonly type: "model.call.completed";
25010
+ readonly usage: EveProviderUsage;
25011
+ } | {
25012
+ readonly error?: unknown;
25013
+ readonly idempotencyKey: string;
25014
+ readonly scope: EveInstrumentationAttemptScope;
25015
+ readonly type: "model.call.failed";
25016
+ };
25017
+ type EveProviderActionKind = "load-skill" | "remote-agent-call" | "subagent-call" | "tool-call";
25018
+ interface EveProviderActionStartedEvent {
25019
+ readonly callId: string;
25020
+ readonly idempotencyKey: string;
25021
+ readonly input?: unknown;
25022
+ readonly kind: EveProviderActionKind;
25023
+ readonly name: string;
25024
+ readonly scope: EveInstrumentationAttemptScope;
25025
+ readonly type: "action.started";
25026
+ }
25027
+ type EveProviderActionTerminalEvent = {
25028
+ readonly acceptedAtMs?: number;
25029
+ readonly idempotencyKey: string;
25030
+ readonly outcome: "completed";
25031
+ readonly output: {
25032
+ readonly output?: unknown;
25033
+ readonly type: "result";
25034
+ } | {
25035
+ readonly error?: unknown;
25036
+ readonly type: "error";
25037
+ };
25038
+ readonly scope: EveInstrumentationAttemptScope;
25039
+ readonly type: "action.completed";
25040
+ readonly usage?: EveProviderUsage;
25041
+ } | {
25042
+ readonly acceptedAtMs?: number;
25043
+ readonly error?: unknown;
25044
+ readonly errorCode?: string;
25045
+ readonly idempotencyKey: string;
25046
+ readonly outcome: "abandoned" | "cancelled" | "failed" | "rejected";
25047
+ readonly scope: EveInstrumentationAttemptScope;
25048
+ readonly type: "action.failed";
25049
+ };
25050
+ type EveProviderStepAttemptTerminalEvent = {
25051
+ readonly error?: unknown;
25052
+ readonly idempotencyKey: string;
25053
+ readonly scope: EveInstrumentationAttemptScope;
25054
+ readonly type: "step.attempt.completed" | "step.attempt.failed";
25055
+ };
25056
+ type EveProviderHandler<TEvent> = (event: TEvent, context: EveProviderContext) => void | PromiseLike<void>;
25057
+ type EveChannelAudience = "private" | "public" | "unknown";
25058
+ interface EveTraceCaptureContext {
25059
+ readonly agentName?: string;
25060
+ readonly audience: EveChannelAudience;
25061
+ readonly channelType?: string;
25062
+ }
25063
+ type EveTracePolicyDecision = {
25064
+ readonly emit: false;
25065
+ } | {
25066
+ readonly emit: true;
25067
+ readonly recordInputs: boolean;
25068
+ readonly recordOutputs: boolean;
25069
+ };
25070
+ type EveTraceCapturePolicy = (trace: EveTraceCaptureContext) => EveTracePolicyDecision | boolean;
25071
+ interface EveProviderDefinition {
25072
+ readonly capture?: "content" | "metadata";
25073
+ readonly tracePolicy?: EveTraceCapturePolicy;
25074
+ readonly events?: {
25075
+ readonly "action.completed"?: EveProviderHandler<EveProviderActionTerminalEvent>;
25076
+ readonly "action.failed"?: EveProviderHandler<EveProviderActionTerminalEvent>;
25077
+ readonly "action.started"?: EveProviderHandler<EveProviderActionStartedEvent>;
25078
+ readonly "model.call.completed"?: EveProviderHandler<EveProviderModelCallTerminalEvent>;
25079
+ readonly "model.call.failed"?: EveProviderHandler<EveProviderModelCallTerminalEvent>;
25080
+ readonly "model.call.started"?: EveProviderHandler<EveProviderModelCallStartedEvent>;
25081
+ readonly "step.attempt.completed"?: EveProviderHandler<EveProviderStepAttemptTerminalEvent>;
25082
+ readonly "step.attempt.failed"?: EveProviderHandler<EveProviderStepAttemptTerminalEvent>;
25083
+ readonly "turn.cancelled"?: EveProviderHandler<EveProviderTurnTerminalEvent>;
25084
+ readonly "turn.completed"?: EveProviderHandler<EveProviderTurnTerminalEvent>;
25085
+ readonly "turn.failed"?: EveProviderHandler<EveProviderTurnTerminalEvent>;
25086
+ readonly "turn.started"?: EveProviderHandler<EveProviderTurnStartedEvent>;
25087
+ };
25088
+ readonly flush?: () => void | PromiseLike<void>;
25089
+ readonly setup?: (context: EveProviderSetupContext) => void | PromiseLike<void>;
25090
+ readonly shutdown?: () => void | PromiseLike<void>;
25091
+ }
24380
25092
 
24381
25093
  type EveStateHandle<T> = {
24382
25094
  get(): T;
@@ -24388,7 +25100,20 @@ declare function braintrustEveHook(options: {
24388
25100
  defineState: EveDefineState;
24389
25101
  metadata?: Record<string, unknown>;
24390
25102
  }): EveHookDefinition;
24391
- /** Eve instrumentation helper for logger setup and durable LLM input capture. */
25103
+
25104
+ type EveProviderInstrumentationOptions = {
25105
+ metadata?: Record<string, unknown>;
25106
+ setup?: EveProviderDefinition["setup"];
25107
+ };
25108
+ /**
25109
+ * Braintrust instrumentation for Eve.
25110
+ *
25111
+ * Pass `defineState` when using Eve's legacy authored instrumentation API.
25112
+ * With Eve 0.34+, omit `defineState` to use the instrumentation-provider
25113
+ * lifecycle and enable `experimental.instrumentationProviders` on the agent.
25114
+ * The result is ready to export directly from the instrumentation module.
25115
+ */
25116
+ declare function braintrustEveInstrumentation(options: EveProviderInstrumentationOptions): EveProviderDefinition;
24392
25117
  declare function braintrustEveInstrumentation(options: {
24393
25118
  defineState: EveDefineState;
24394
25119
  setup?: EveInstrumentationDefinition["setup"];
@@ -24593,8 +25318,8 @@ declare function wrapPiCodingAgentSDK<T>(sdk: T): T;
24593
25318
  declare function wrapCloudflareAgent<T>(Agent: T): T;
24594
25319
 
24595
25320
  /**
24596
- * Wraps the Strands Agent SDK with Braintrust tracing. The wrapper emits
24597
- * diagnostics-channel events; the Strands plugin owns span lifecycle.
25321
+ * Wraps the Strands Agent SDK with Braintrust tracing. The wrapper invokes
25322
+ * typed instrumentation channels; the Strands plugin owns span lifecycle.
24598
25323
  */
24599
25324
  declare function wrapStrandsAgentSDK<T>(sdk: T): T;
24600
25325
 
@@ -30292,6 +31017,15 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30292
31017
  type: "global";
30293
31018
  name: string;
30294
31019
  function_type?: "preprocessor" | undefined;
31020
+ }>, z.ZodObject<{
31021
+ type: z.ZodLiteral<"inline">;
31022
+ code: z.ZodString;
31023
+ }, "strip", z.ZodTypeAny, {
31024
+ code: string;
31025
+ type: "inline";
31026
+ }, {
31027
+ code: string;
31028
+ type: "inline";
30295
31029
  }>, z.ZodNull]>>;
30296
31030
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
30297
31031
  type: z.ZodLiteral<"function">;
@@ -30602,6 +31336,9 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30602
31336
  type: "global";
30603
31337
  name: string;
30604
31338
  function_type: "preprocessor";
31339
+ } | {
31340
+ code: string;
31341
+ type: "inline";
30605
31342
  } | null | undefined;
30606
31343
  origin?: {
30607
31344
  project_id?: string | undefined;
@@ -30876,6 +31613,9 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30876
31613
  type: "global";
30877
31614
  name: string;
30878
31615
  function_type?: "preprocessor" | undefined;
31616
+ } | {
31617
+ code: string;
31618
+ type: "inline";
30879
31619
  } | null | undefined;
30880
31620
  origin?: {
30881
31621
  project_id?: string | undefined;
@@ -31155,6 +31895,9 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
31155
31895
  type: "global";
31156
31896
  name: string;
31157
31897
  function_type: "preprocessor";
31898
+ } | {
31899
+ code: string;
31900
+ type: "inline";
31158
31901
  } | null | undefined;
31159
31902
  origin?: {
31160
31903
  project_id?: string | undefined;
@@ -31433,6 +32176,9 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
31433
32176
  type: "global";
31434
32177
  name: string;
31435
32178
  function_type?: "preprocessor" | undefined;
32179
+ } | {
32180
+ code: string;
32181
+ type: "inline";
31436
32182
  } | null | undefined;
31437
32183
  origin?: {
31438
32184
  project_id?: string | undefined;
@@ -32955,6 +33701,15 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32955
33701
  type: "global";
32956
33702
  name: string;
32957
33703
  function_type?: "preprocessor" | undefined;
33704
+ }>, z.ZodObject<{
33705
+ type: z.ZodLiteral<"inline">;
33706
+ code: z.ZodString;
33707
+ }, "strip", z.ZodTypeAny, {
33708
+ code: string;
33709
+ type: "inline";
33710
+ }, {
33711
+ code: string;
33712
+ type: "inline";
32958
33713
  }>, z.ZodNull]>>;
32959
33714
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
32960
33715
  type: z.ZodLiteral<"function">;
@@ -33265,6 +34020,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33265
34020
  type: "global";
33266
34021
  name: string;
33267
34022
  function_type: "preprocessor";
34023
+ } | {
34024
+ code: string;
34025
+ type: "inline";
33268
34026
  } | null | undefined;
33269
34027
  origin?: {
33270
34028
  project_id?: string | undefined;
@@ -33539,6 +34297,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33539
34297
  type: "global";
33540
34298
  name: string;
33541
34299
  function_type?: "preprocessor" | undefined;
34300
+ } | {
34301
+ code: string;
34302
+ type: "inline";
33542
34303
  } | null | undefined;
33543
34304
  origin?: {
33544
34305
  project_id?: string | undefined;
@@ -33818,6 +34579,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33818
34579
  type: "global";
33819
34580
  name: string;
33820
34581
  function_type: "preprocessor";
34582
+ } | {
34583
+ code: string;
34584
+ type: "inline";
33821
34585
  } | null | undefined;
33822
34586
  origin?: {
33823
34587
  project_id?: string | undefined;
@@ -34096,6 +34860,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
34096
34860
  type: "global";
34097
34861
  name: string;
34098
34862
  function_type?: "preprocessor" | undefined;
34863
+ } | {
34864
+ code: string;
34865
+ type: "inline";
34099
34866
  } | null | undefined;
34100
34867
  origin?: {
34101
34868
  project_id?: string | undefined;
@@ -34405,6 +35172,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
34405
35172
  type: "global";
34406
35173
  name: string;
34407
35174
  function_type: "preprocessor";
35175
+ } | {
35176
+ code: string;
35177
+ type: "inline";
34408
35178
  } | null | undefined;
34409
35179
  origin?: {
34410
35180
  project_id?: string | undefined;
@@ -34696,6 +35466,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
34696
35466
  type: "global";
34697
35467
  name: string;
34698
35468
  function_type?: "preprocessor" | undefined;
35469
+ } | {
35470
+ code: string;
35471
+ type: "inline";
34699
35472
  } | null | undefined;
34700
35473
  origin?: {
34701
35474
  project_id?: string | undefined;
@@ -36110,6 +36883,15 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36110
36883
  type: "global";
36111
36884
  name: string;
36112
36885
  function_type?: "preprocessor" | undefined;
36886
+ }>, z.ZodObject<{
36887
+ type: z.ZodLiteral<"inline">;
36888
+ code: z.ZodString;
36889
+ }, "strip", z.ZodTypeAny, {
36890
+ code: string;
36891
+ type: "inline";
36892
+ }, {
36893
+ code: string;
36894
+ type: "inline";
36113
36895
  }>, z.ZodNull]>>;
36114
36896
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
36115
36897
  type: z.ZodLiteral<"function">;
@@ -36420,6 +37202,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36420
37202
  type: "global";
36421
37203
  name: string;
36422
37204
  function_type: "preprocessor";
37205
+ } | {
37206
+ code: string;
37207
+ type: "inline";
36423
37208
  } | null | undefined;
36424
37209
  origin?: {
36425
37210
  project_id?: string | undefined;
@@ -36694,6 +37479,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36694
37479
  type: "global";
36695
37480
  name: string;
36696
37481
  function_type?: "preprocessor" | undefined;
37482
+ } | {
37483
+ code: string;
37484
+ type: "inline";
36697
37485
  } | null | undefined;
36698
37486
  origin?: {
36699
37487
  project_id?: string | undefined;
@@ -36973,6 +37761,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36973
37761
  type: "global";
36974
37762
  name: string;
36975
37763
  function_type: "preprocessor";
37764
+ } | {
37765
+ code: string;
37766
+ type: "inline";
36976
37767
  } | null | undefined;
36977
37768
  origin?: {
36978
37769
  project_id?: string | undefined;
@@ -37251,6 +38042,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37251
38042
  type: "global";
37252
38043
  name: string;
37253
38044
  function_type?: "preprocessor" | undefined;
38045
+ } | {
38046
+ code: string;
38047
+ type: "inline";
37254
38048
  } | null | undefined;
37255
38049
  origin?: {
37256
38050
  project_id?: string | undefined;
@@ -37572,6 +38366,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37572
38366
  type: "global";
37573
38367
  name: string;
37574
38368
  function_type: "preprocessor";
38369
+ } | {
38370
+ code: string;
38371
+ type: "inline";
37575
38372
  } | null | undefined;
37576
38373
  origin?: {
37577
38374
  project_id?: string | undefined;
@@ -37876,6 +38673,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37876
38673
  type: "global";
37877
38674
  name: string;
37878
38675
  function_type: "preprocessor";
38676
+ } | {
38677
+ code: string;
38678
+ type: "inline";
37879
38679
  } | null | undefined;
37880
38680
  origin?: {
37881
38681
  project_id?: string | undefined;
@@ -38173,6 +38973,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
38173
38973
  type: "global";
38174
38974
  name: string;
38175
38975
  function_type?: "preprocessor" | undefined;
38976
+ } | {
38977
+ code: string;
38978
+ type: "inline";
38176
38979
  } | null | undefined;
38177
38980
  origin?: {
38178
38981
  project_id?: string | undefined;
@@ -38477,6 +39280,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
38477
39280
  type: "global";
38478
39281
  name: string;
38479
39282
  function_type?: "preprocessor" | undefined;
39283
+ } | {
39284
+ code: string;
39285
+ type: "inline";
38480
39286
  } | null | undefined;
38481
39287
  origin?: {
38482
39288
  project_id?: string | undefined;
@@ -39970,6 +40776,15 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39970
40776
  type: "global";
39971
40777
  name: string;
39972
40778
  function_type?: "preprocessor" | undefined;
40779
+ }>, z.ZodObject<{
40780
+ type: z.ZodLiteral<"inline">;
40781
+ code: z.ZodString;
40782
+ }, "strip", z.ZodTypeAny, {
40783
+ code: string;
40784
+ type: "inline";
40785
+ }, {
40786
+ code: string;
40787
+ type: "inline";
39973
40788
  }>, z.ZodNull]>>;
39974
40789
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
39975
40790
  type: z.ZodLiteral<"function">;
@@ -40280,6 +41095,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40280
41095
  type: "global";
40281
41096
  name: string;
40282
41097
  function_type: "preprocessor";
41098
+ } | {
41099
+ code: string;
41100
+ type: "inline";
40283
41101
  } | null | undefined;
40284
41102
  origin?: {
40285
41103
  project_id?: string | undefined;
@@ -40554,6 +41372,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40554
41372
  type: "global";
40555
41373
  name: string;
40556
41374
  function_type?: "preprocessor" | undefined;
41375
+ } | {
41376
+ code: string;
41377
+ type: "inline";
40557
41378
  } | null | undefined;
40558
41379
  origin?: {
40559
41380
  project_id?: string | undefined;
@@ -40833,6 +41654,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40833
41654
  type: "global";
40834
41655
  name: string;
40835
41656
  function_type: "preprocessor";
41657
+ } | {
41658
+ code: string;
41659
+ type: "inline";
40836
41660
  } | null | undefined;
40837
41661
  origin?: {
40838
41662
  project_id?: string | undefined;
@@ -41111,6 +41935,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
41111
41935
  type: "global";
41112
41936
  name: string;
41113
41937
  function_type?: "preprocessor" | undefined;
41938
+ } | {
41939
+ code: string;
41940
+ type: "inline";
41114
41941
  } | null | undefined;
41115
41942
  origin?: {
41116
41943
  project_id?: string | undefined;
@@ -41420,6 +42247,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
41420
42247
  type: "global";
41421
42248
  name: string;
41422
42249
  function_type: "preprocessor";
42250
+ } | {
42251
+ code: string;
42252
+ type: "inline";
41423
42253
  } | null | undefined;
41424
42254
  origin?: {
41425
42255
  project_id?: string | undefined;
@@ -41711,6 +42541,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
41711
42541
  type: "global";
41712
42542
  name: string;
41713
42543
  function_type?: "preprocessor" | undefined;
42544
+ } | {
42545
+ code: string;
42546
+ type: "inline";
41714
42547
  } | null | undefined;
41715
42548
  origin?: {
41716
42549
  project_id?: string | undefined;
@@ -43125,6 +43958,15 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43125
43958
  type: "global";
43126
43959
  name: string;
43127
43960
  function_type?: "preprocessor" | undefined;
43961
+ }>, z.ZodObject<{
43962
+ type: z.ZodLiteral<"inline">;
43963
+ code: z.ZodString;
43964
+ }, "strip", z.ZodTypeAny, {
43965
+ code: string;
43966
+ type: "inline";
43967
+ }, {
43968
+ code: string;
43969
+ type: "inline";
43128
43970
  }>, z.ZodNull]>>;
43129
43971
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
43130
43972
  type: z.ZodLiteral<"function">;
@@ -43435,6 +44277,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43435
44277
  type: "global";
43436
44278
  name: string;
43437
44279
  function_type: "preprocessor";
44280
+ } | {
44281
+ code: string;
44282
+ type: "inline";
43438
44283
  } | null | undefined;
43439
44284
  origin?: {
43440
44285
  project_id?: string | undefined;
@@ -43709,6 +44554,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43709
44554
  type: "global";
43710
44555
  name: string;
43711
44556
  function_type?: "preprocessor" | undefined;
44557
+ } | {
44558
+ code: string;
44559
+ type: "inline";
43712
44560
  } | null | undefined;
43713
44561
  origin?: {
43714
44562
  project_id?: string | undefined;
@@ -43988,6 +44836,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43988
44836
  type: "global";
43989
44837
  name: string;
43990
44838
  function_type: "preprocessor";
44839
+ } | {
44840
+ code: string;
44841
+ type: "inline";
43991
44842
  } | null | undefined;
43992
44843
  origin?: {
43993
44844
  project_id?: string | undefined;
@@ -44266,6 +45117,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44266
45117
  type: "global";
44267
45118
  name: string;
44268
45119
  function_type?: "preprocessor" | undefined;
45120
+ } | {
45121
+ code: string;
45122
+ type: "inline";
44269
45123
  } | null | undefined;
44270
45124
  origin?: {
44271
45125
  project_id?: string | undefined;
@@ -44587,6 +45441,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44587
45441
  type: "global";
44588
45442
  name: string;
44589
45443
  function_type: "preprocessor";
45444
+ } | {
45445
+ code: string;
45446
+ type: "inline";
44590
45447
  } | null | undefined;
44591
45448
  origin?: {
44592
45449
  project_id?: string | undefined;
@@ -44891,6 +45748,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44891
45748
  type: "global";
44892
45749
  name: string;
44893
45750
  function_type: "preprocessor";
45751
+ } | {
45752
+ code: string;
45753
+ type: "inline";
44894
45754
  } | null | undefined;
44895
45755
  origin?: {
44896
45756
  project_id?: string | undefined;
@@ -45188,6 +46048,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
45188
46048
  type: "global";
45189
46049
  name: string;
45190
46050
  function_type?: "preprocessor" | undefined;
46051
+ } | {
46052
+ code: string;
46053
+ type: "inline";
45191
46054
  } | null | undefined;
45192
46055
  origin?: {
45193
46056
  project_id?: string | undefined;
@@ -45492,6 +46355,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
45492
46355
  type: "global";
45493
46356
  name: string;
45494
46357
  function_type?: "preprocessor" | undefined;
46358
+ } | {
46359
+ code: string;
46360
+ type: "inline";
45495
46361
  } | null | undefined;
45496
46362
  origin?: {
45497
46363
  project_id?: string | undefined;
@@ -46979,6 +47845,7 @@ declare const exports$1_braintrustFlueObserver: typeof braintrustFlueObserver;
46979
47845
  declare const exports$1_braintrustStreamChunkSchema: typeof braintrustStreamChunkSchema;
46980
47846
  declare const exports$1_buildLocalSummary: typeof buildLocalSummary;
46981
47847
  declare const exports$1_collectAnthropicSession: typeof collectAnthropicSession;
47848
+ declare const exports$1_completeOpenAIBatchTrace: typeof completeOpenAIBatchTrace;
46982
47849
  declare const exports$1_configureInstrumentation: typeof configureInstrumentation;
46983
47850
  declare const exports$1_constructLogs3OverflowRequest: typeof constructLogs3OverflowRequest;
46984
47851
  declare const exports$1_createFinalValuePassThroughStream: typeof createFinalValuePassThroughStream;
@@ -47016,6 +47883,8 @@ declare const exports$1_login: typeof login;
47016
47883
  declare const exports$1_loginToState: typeof loginToState;
47017
47884
  declare const exports$1_logs3OverflowUploadSchema: typeof logs3OverflowUploadSchema;
47018
47885
  declare const exports$1_newId: typeof newId;
47886
+ declare const exports$1_openaiBatchesRetrieveTraced: typeof openaiBatchesRetrieveTraced;
47887
+ declare const exports$1_openaiFilesCreateTraced: typeof openaiFilesCreateTraced;
47019
47888
  declare const exports$1_parseCachedHeader: typeof parseCachedHeader;
47020
47889
  declare const exports$1_parseTemplateFormat: typeof parseTemplateFormat;
47021
47890
  declare const exports$1_permalink: typeof permalink;
@@ -47084,7 +47953,7 @@ declare const exports$1_wrapTraced: typeof wrapTraced;
47084
47953
  declare const exports$1_wrapVitest: typeof wrapVitest;
47085
47954
  declare const exports$1_wrapVoyageAI: typeof wrapVoyageAI;
47086
47955
  declare namespace exports$1 {
47087
- export { type exports$1_AnyDataset as AnyDataset, exports$1_Attachment as Attachment, type exports$1_AttachmentParams as AttachmentParams, exports$1_AttachmentReference as AttachmentReference, exports$1_BAGGAGE_HEADER as BAGGAGE_HEADER, exports$1_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, exports$1_BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME as BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, exports$1_BRAINTRUST_PARENT_KEY as BRAINTRUST_PARENT_KEY, type exports$1_BackgroundLoggerOpts as BackgroundLoggerOpts, exports$1_BaseAttachment as BaseAttachment, exports$1_BaseExperiment as BaseExperiment, type exports$1_BaseMetadata as BaseMetadata, exports$1_BatchScorer as BatchScorer, exports$1_BatchTask as BatchTask, exports$1_BraintrustLangChainCallbackHandler as BraintrustLangChainCallbackHandler, exports$1_BraintrustMiddleware as BraintrustMiddleware, exports$1_BraintrustObservabilityExporter as BraintrustObservabilityExporter, exports$1_BraintrustState as BraintrustState, exports$1_BraintrustStream as BraintrustStream, type exports$1_BraintrustStreamChunk as BraintrustStreamChunk, exports$1_CachedSpanFetcher as CachedSpanFetcher, type exports$1_ChatPrompt as ChatPrompt, exports$1_CodeFunction as CodeFunction, type exports$1_CodeOpts as CodeOpts, exports$1_CodePrompt as CodePrompt, type exports$1_CommentEvent as CommentEvent, type exports$1_CompiledPrompt as CompiledPrompt, type exports$1_CompiledPromptParams as CompiledPromptParams, type exports$1_CompletionPrompt as CompletionPrompt, exports$1_ContextManager as ContextManager, type exports$1_ContextParentSpanIds as ContextParentSpanIds, type exports$1_CreateProjectOpts as CreateProjectOpts, type exports$1_CurrentSpanStore as CurrentSpanStore, exports$1_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports$1_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports$1_DataSummary as DataSummary, exports$1_Dataset as Dataset, exports$1_DatasetPipeline as DatasetPipeline, type exports$1_DatasetRecord as DatasetRecord, type exports$1_DatasetRestorePreviewResult as DatasetRestorePreviewResult, type exports$1_DatasetRestoreResult as DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type exports$1_DatasetSummary as DatasetSummary, type exports$1_DefaultMetadataType as DefaultMetadataType, type exports$1_DefaultPromptArgs as DefaultPromptArgs, exports$1_DurableEvalMemoryStore as DurableEvalMemoryStore, exports$1_DurableEvalRedisStore as DurableEvalRedisStore, type exports$1_DurableEvalStore as DurableEvalStore, exports$1_ERR_PERMALINK as ERR_PERMALINK, type exports$1_EndSpanArgs as EndSpanArgs, exports$1_Eval as Eval, type exports$1_EvalCase as EvalCase, type exports$1_EvalClassifier as EvalClassifier, type exports$1_EvalHooks as EvalHooks, type exports$1_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports$1_EvalParameters as EvalParameters, type exports$1_EvalResult as EvalResult, exports$1_EvalResultWithSummary as EvalResultWithSummary, type exports$1_EvalScorer as EvalScorer, type exports$1_EvalScorerArgs as EvalScorerArgs, type exports$1_EvalTask as EvalTask, type exports$1_Evaluator as Evaluator, type exports$1_EvaluatorDef as EvaluatorDef, type exports$1_EvaluatorDefinition as EvaluatorDefinition, type exports$1_EvaluatorDefinitions as EvaluatorDefinitions, type exports$1_EvaluatorFile as EvaluatorFile, type exports$1_EvaluatorManifest as EvaluatorManifest, exports$1_Experiment as Experiment, type exports$1_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports$1_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports$1_ExperimentSummary as ExperimentSummary, type exports$1_Exportable as Exportable, exports$1_ExternalAttachment as ExternalAttachment, type exports$1_ExternalAttachmentParams as ExternalAttachmentParams, exports$1_FailedHTTPResponse as FailedHTTPResponse, type exports$1_FullInitDatasetOptions as FullInitDatasetOptions, type exports$1_FullInitOptions as FullInitOptions, type exports$1_FullLoginOptions as FullLoginOptions, type exports$1_FunctionEvent as FunctionEvent, type exports$1_GetThreadOptions as GetThreadOptions, exports$1_IDGenerator as IDGenerator, type exports$1_IdField as IdField, type exports$1_InitDatasetOptions as InitDatasetOptions, type exports$1_InitLoggerOptions as InitLoggerOptions, type exports$1_InitOptions as InitOptions, type exports$1_InputField as InputField, type exports$1_InstrumentationConfig as InstrumentationConfig, type exports$1_InvokeFunctionArgs as InvokeFunctionArgs, type exports$1_InvokeReturn as InvokeReturn, exports$1_JSONAttachment as JSONAttachment, exports$1_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports$1_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, type exports$1_LangChainCallbackHandlerOptions as LangChainCallbackHandlerOptions, exports$1_LazyValue as LazyValue, type exports$1_LoadPromptOptions as LoadPromptOptions, exports$1_LocalTrace as LocalTrace, type exports$1_LogCommentFullArgs as LogCommentFullArgs, type exports$1_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports$1_LogOptions as LogOptions, exports$1_Logger as Logger, exports$1_LoginInvalidOrgError as LoginInvalidOrgError, type exports$1_LoginOptions as LoginOptions, type exports$1_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports$1_Logs3OverflowUpload as Logs3OverflowUpload, type exports$1_MastraObservabilityExporter as MastraObservabilityExporter, type exports$1_MetricSummary as MetricSummary, exports$1_NOOP_SPAN as NOOP_SPAN, exports$1_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports$1_NoopSpan as NoopSpan, exports$1_OTELIDGenerator as OTELIDGenerator, exports$1_ObjectFetcher as ObjectFetcher, type exports$1_ObjectMetadata as ObjectMetadata, type exports$1_OtherExperimentLogFields as OtherExperimentLogFields, type exports$1_ParametersSource as ParametersSource, type exports$1_ParentExperimentIds as ParentExperimentIds, type exports$1_ParentProjectLogIds as ParentProjectLogIds, type exports$1_ParsedTraceparent as ParsedTraceparent, exports$1_Project as Project, exports$1_ProjectNameIdMap as ProjectNameIdMap, type exports$1_PromiseUnless as PromiseUnless, exports$1_Prompt as Prompt, exports$1_PromptBuilder as PromptBuilder, type exports$1_PromptContents as PromptContents, type exports$1_PromptDefinition as PromptDefinition, type exports$1_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports$1_PromptOpts as PromptOpts, type exports$1_PromptRowWithId as PromptRowWithId, type exports$1_PropagatedState as PropagatedState, type exports$1_PropagationContext as PropagationContext, exports$1_ReadonlyAttachment as ReadonlyAttachment, exports$1_ReadonlyExperiment as ReadonlyExperiment, type exports$1_RegisterSandboxOptions as RegisterSandboxOptions, type exports$1_RegisterSandboxResult as RegisterSandboxResult, exports$1_Reporter as Reporter, type exports$1_ReporterBody as ReporterBody, type exports$1_SandboxConfig as SandboxConfig, type exports$1_ScoreSummary as ScoreSummary, exports$1_ScorerBuilder as ScorerBuilder, type exports$1_ScorerOpts as ScorerOpts, type exports$1_SerializedBraintrustState as SerializedBraintrustState, type exports$1_SetCurrentArg as SetCurrentArg, type exports$1_Span as Span, type exports$1_SpanContext as SpanContext, type exports$1_SpanData as SpanData, exports$1_SpanFetcher as SpanFetcher, exports$1_SpanImpl as SpanImpl, type exports$1_StartSpanArgs as StartSpanArgs, exports$1_TRACEPARENT_HEADER as TRACEPARENT_HEADER, exports$1_TRACESTATE_HEADER as TRACESTATE_HEADER, type exports$1_TemplateFormat as TemplateFormat, type exports$1_TemplateRenderer as TemplateRenderer, type exports$1_TemplateRendererPlugin as TemplateRendererPlugin, exports$1_TestBackgroundLogger as TestBackgroundLogger, exports$1_ToolBuilder as ToolBuilder, type exports$1_Trace as Trace, type exports$1_TraceContextCarrier as TraceContextCarrier, type exports$1_TraceContextHeaders as TraceContextHeaders, exports$1_UUIDGenerator as UUIDGenerator, type exports$1_WithTransactionId as WithTransactionId, exports$1_X_CACHED_HEADER as X_CACHED_HEADER, exports$1__exportsForTestingOnly as _exportsForTestingOnly, exports$1__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports$1__internalSetInitialState as _internalSetInitialState, exports$1_addAzureBlobHeaders as addAzureBlobHeaders, exports$1_agentAssertionScorer as agentAssertionScorer, exports$1_braintrustAISDKTelemetry as braintrustAISDKTelemetry, exports$1_braintrustEveHook as braintrustEveHook, exports$1_braintrustEveInstrumentation as braintrustEveInstrumentation, exports$1_braintrustFlueInstrumentation as braintrustFlueInstrumentation, exports$1_braintrustFlueObserver as braintrustFlueObserver, exports$1_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports$1_buildLocalSummary as buildLocalSummary, exports$1_collectAnthropicSession as collectAnthropicSession, exports$1_configureInstrumentation as configureInstrumentation, exports$1_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports$1_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports$1_currentExperiment as currentExperiment, exports$1_currentLogger as currentLogger, exports$1_currentSpan as currentSpan, exports$1_deepCopyEvent as deepCopyEvent, exports$1_defaultErrorScoreHandler as defaultErrorScoreHandler, exports$1_defineDurableEval as defineDurableEval, exports$1_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports$1_devNullWritableStream as devNullWritableStream, exports$1_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports$1_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports$1_extractTraceContextFromHeaders as extractTraceContextFromHeaders, exports$1_flush as flush, exports$1_getContextManager as getContextManager, exports$1_getIdGenerator as getIdGenerator, exports$1_getPromptVersions as getPromptVersions, exports$1_getSpanParentObject as getSpanParentObject, exports$1_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports$1_init as init, exports$1_initDataset as initDataset, exports$1_initExperiment as initExperiment, exports$1_initFunction as initFunction, exports$1_initLogger as initLogger, exports$1_initNodeTestSuite as initNodeTestSuite, exports$1_injectTraceContext as injectTraceContext, exports$1_invoke as invoke, exports$1_isTemplateFormat as isTemplateFormat, exports$1_loadParameters as loadParameters, exports$1_loadPrompt as loadPrompt, exports$1_log as log, exports$1_logError as logError, exports$1_login as login, exports$1_loginToState as loginToState, exports$1_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports$1_newId as newId, exports$1_parseCachedHeader as parseCachedHeader, exports$1_parseTemplateFormat as parseTemplateFormat, exports$1_permalink as permalink, exports$1_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports$1_projects as projects, exports$1_promptContentsSchema as promptContentsSchema, exports$1_promptDefinitionSchema as promptDefinitionSchema, exports$1_promptDefinitionToPromptData as promptDefinitionToPromptData, exports$1_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports$1_registerOtelFlush as registerOtelFlush, exports$1_registerSandbox as registerSandbox, exports$1_registerTemplatePlugin as registerTemplatePlugin, exports$1_renderMessage as renderMessage, exports$1_renderPromptParams as renderPromptParams, exports$1_renderTemplateContent as renderTemplateContent, exports$1_reportFailures as reportFailures, exports$1_runEvaluator as runEvaluator, exports$1_setFetch as setFetch, exports$1_setMaskingFunction as setMaskingFunction, exports$1_spanComponentsToObjectId as spanComponentsToObjectId, exports$1_startSpan as startSpan, exports$1_summarize as summarize, exports$1_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports$1_traceable as traceable, exports$1_traced as traced, exports$1_updateSpan as updateSpan, exports$1_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports$1_utf8ByteLength as utf8ByteLength, exports$1_withCurrent as withCurrent, exports$1_withDataset as withDataset, exports$1_withExperiment as withExperiment, exports$1_withLogger as withLogger, exports$1_withParent as withParent, exports$1_wrapAISDK as wrapAISDK, exports$1_wrapAISDKModel as wrapAISDKModel, exports$1_wrapAgentClass as wrapAgentClass, exports$1_wrapAnthropic as wrapAnthropic, exports$1_wrapBedrockRuntime as wrapBedrockRuntime, exports$1_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports$1_wrapCloudflareAIChat as wrapCloudflareAIChat, exports$1_wrapCloudflareAgent as wrapCloudflareAgent, exports$1_wrapCloudflareThink as wrapCloudflareThink, exports$1_wrapCohere as wrapCohere, exports$1_wrapCopilotClient as wrapCopilotClient, exports$1_wrapCursorSDK as wrapCursorSDK, exports$1_wrapGenkit as wrapGenkit, exports$1_wrapGoogleADK as wrapGoogleADK, exports$1_wrapGoogleGenAI as wrapGoogleGenAI, exports$1_wrapGroq as wrapGroq, exports$1_wrapHuggingFace as wrapHuggingFace, exports$1_wrapHuggingFaceTransformers as wrapHuggingFaceTransformers, exports$1_wrapLangSmithClient as wrapLangSmithClient, exports$1_wrapLangSmithRunTrees as wrapLangSmithRunTrees, exports$1_wrapLangSmithTraceable as wrapLangSmithTraceable, exports$1_wrapMastraAgent as wrapMastraAgent, exports$1_wrapMistral as wrapMistral, exports$1_wrapOllama as wrapOllama, exports$1_wrapOpenAI as wrapOpenAI, exports$1_wrapOpenAICodexSDK as wrapOpenAICodexSDK, exports$1_wrapOpenAIv4 as wrapOpenAIv4, exports$1_wrapOpenRouter as wrapOpenRouter, exports$1_wrapOpenRouterAgent as wrapOpenRouterAgent, exports$1_wrapPiCodingAgentSDK as wrapPiCodingAgentSDK, exports$1_wrapStrandsAgentSDK as wrapStrandsAgentSDK, exports$1_wrapTraced as wrapTraced, exports$1_wrapVitest as wrapVitest, exports$1_wrapVoyageAI as wrapVoyageAI };
47956
+ export { type exports$1_AnyDataset as AnyDataset, exports$1_Attachment as Attachment, type exports$1_AttachmentParams as AttachmentParams, exports$1_AttachmentReference as AttachmentReference, exports$1_BAGGAGE_HEADER as BAGGAGE_HEADER, exports$1_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, exports$1_BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME as BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, exports$1_BRAINTRUST_PARENT_KEY as BRAINTRUST_PARENT_KEY, type exports$1_BackgroundLoggerOpts as BackgroundLoggerOpts, exports$1_BaseAttachment as BaseAttachment, exports$1_BaseExperiment as BaseExperiment, type exports$1_BaseMetadata as BaseMetadata, exports$1_BatchScorer as BatchScorer, exports$1_BatchTask as BatchTask, exports$1_BraintrustLangChainCallbackHandler as BraintrustLangChainCallbackHandler, exports$1_BraintrustMiddleware as BraintrustMiddleware, exports$1_BraintrustObservabilityExporter as BraintrustObservabilityExporter, exports$1_BraintrustState as BraintrustState, exports$1_BraintrustStream as BraintrustStream, type exports$1_BraintrustStreamChunk as BraintrustStreamChunk, exports$1_CachedSpanFetcher as CachedSpanFetcher, type exports$1_ChatPrompt as ChatPrompt, exports$1_CodeFunction as CodeFunction, type exports$1_CodeOpts as CodeOpts, exports$1_CodePrompt as CodePrompt, type exports$1_CommentEvent as CommentEvent, type exports$1_CompiledPrompt as CompiledPrompt, type exports$1_CompiledPromptParams as CompiledPromptParams, type exports$1_CompletionPrompt as CompletionPrompt, exports$1_ContextManager as ContextManager, type exports$1_ContextParentSpanIds as ContextParentSpanIds, type exports$1_CreateProjectOpts as CreateProjectOpts, type exports$1_CurrentSpanStore as CurrentSpanStore, exports$1_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports$1_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports$1_DataSummary as DataSummary, exports$1_Dataset as Dataset, exports$1_DatasetPipeline as DatasetPipeline, type exports$1_DatasetRecord as DatasetRecord, type exports$1_DatasetRestorePreviewResult as DatasetRestorePreviewResult, type exports$1_DatasetRestoreResult as DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type exports$1_DatasetSummary as DatasetSummary, type exports$1_DefaultMetadataType as DefaultMetadataType, type exports$1_DefaultPromptArgs as DefaultPromptArgs, exports$1_DurableEvalMemoryStore as DurableEvalMemoryStore, exports$1_DurableEvalRedisStore as DurableEvalRedisStore, type exports$1_DurableEvalStore as DurableEvalStore, exports$1_ERR_PERMALINK as ERR_PERMALINK, type exports$1_EndSpanArgs as EndSpanArgs, exports$1_Eval as Eval, type exports$1_EvalCase as EvalCase, type exports$1_EvalClassifier as EvalClassifier, type exports$1_EvalHooks as EvalHooks, type exports$1_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports$1_EvalParameters as EvalParameters, type exports$1_EvalResult as EvalResult, exports$1_EvalResultWithSummary as EvalResultWithSummary, type exports$1_EvalScorer as EvalScorer, type exports$1_EvalScorerArgs as EvalScorerArgs, type exports$1_EvalTask as EvalTask, type exports$1_Evaluator as Evaluator, type exports$1_EvaluatorDef as EvaluatorDef, type exports$1_EvaluatorDefinition as EvaluatorDefinition, type exports$1_EvaluatorDefinitions as EvaluatorDefinitions, type exports$1_EvaluatorFile as EvaluatorFile, type exports$1_EvaluatorManifest as EvaluatorManifest, exports$1_Experiment as Experiment, type exports$1_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports$1_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports$1_ExperimentSummary as ExperimentSummary, type exports$1_Exportable as Exportable, exports$1_ExternalAttachment as ExternalAttachment, type exports$1_ExternalAttachmentParams as ExternalAttachmentParams, exports$1_FailedHTTPResponse as FailedHTTPResponse, type exports$1_FullInitDatasetOptions as FullInitDatasetOptions, type exports$1_FullInitOptions as FullInitOptions, type exports$1_FullLoginOptions as FullLoginOptions, type exports$1_FunctionEvent as FunctionEvent, type exports$1_GetThreadOptions as GetThreadOptions, exports$1_IDGenerator as IDGenerator, type exports$1_IdField as IdField, type exports$1_InitDatasetOptions as InitDatasetOptions, type exports$1_InitLoggerOptions as InitLoggerOptions, type exports$1_InitOptions as InitOptions, type exports$1_InputField as InputField, type exports$1_InstrumentationConfig as InstrumentationConfig, type exports$1_InvokeFunctionArgs as InvokeFunctionArgs, type exports$1_InvokeReturn as InvokeReturn, exports$1_JSONAttachment as JSONAttachment, exports$1_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports$1_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, type exports$1_LangChainCallbackHandlerOptions as LangChainCallbackHandlerOptions, exports$1_LazyValue as LazyValue, type exports$1_LoadPromptOptions as LoadPromptOptions, exports$1_LocalTrace as LocalTrace, type exports$1_LogCommentFullArgs as LogCommentFullArgs, type exports$1_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports$1_LogOptions as LogOptions, exports$1_Logger as Logger, exports$1_LoginInvalidOrgError as LoginInvalidOrgError, type exports$1_LoginOptions as LoginOptions, type exports$1_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports$1_Logs3OverflowUpload as Logs3OverflowUpload, type exports$1_MastraObservabilityExporter as MastraObservabilityExporter, type exports$1_MetricSummary as MetricSummary, exports$1_NOOP_SPAN as NOOP_SPAN, exports$1_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports$1_NoopSpan as NoopSpan, exports$1_OTELIDGenerator as OTELIDGenerator, exports$1_ObjectFetcher as ObjectFetcher, type exports$1_ObjectMetadata as ObjectMetadata, type exports$1_OtherExperimentLogFields as OtherExperimentLogFields, type exports$1_ParametersSource as ParametersSource, type exports$1_ParentExperimentIds as ParentExperimentIds, type exports$1_ParentProjectLogIds as ParentProjectLogIds, type exports$1_ParsedTraceparent as ParsedTraceparent, exports$1_Project as Project, exports$1_ProjectNameIdMap as ProjectNameIdMap, type exports$1_PromiseUnless as PromiseUnless, exports$1_Prompt as Prompt, exports$1_PromptBuilder as PromptBuilder, type exports$1_PromptContents as PromptContents, type exports$1_PromptDefinition as PromptDefinition, type exports$1_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports$1_PromptOpts as PromptOpts, type exports$1_PromptRowWithId as PromptRowWithId, type exports$1_PropagatedState as PropagatedState, type exports$1_PropagationContext as PropagationContext, exports$1_ReadonlyAttachment as ReadonlyAttachment, exports$1_ReadonlyExperiment as ReadonlyExperiment, type exports$1_RegisterSandboxOptions as RegisterSandboxOptions, type exports$1_RegisterSandboxResult as RegisterSandboxResult, exports$1_Reporter as Reporter, type exports$1_ReporterBody as ReporterBody, type exports$1_SandboxConfig as SandboxConfig, type exports$1_ScoreSummary as ScoreSummary, exports$1_ScorerBuilder as ScorerBuilder, type exports$1_ScorerOpts as ScorerOpts, type exports$1_SerializedBraintrustState as SerializedBraintrustState, type exports$1_SetCurrentArg as SetCurrentArg, type exports$1_Span as Span, type exports$1_SpanContext as SpanContext, type exports$1_SpanData as SpanData, exports$1_SpanFetcher as SpanFetcher, exports$1_SpanImpl as SpanImpl, type exports$1_StartSpanArgs as StartSpanArgs, exports$1_TRACEPARENT_HEADER as TRACEPARENT_HEADER, exports$1_TRACESTATE_HEADER as TRACESTATE_HEADER, type exports$1_TemplateFormat as TemplateFormat, type exports$1_TemplateRenderer as TemplateRenderer, type exports$1_TemplateRendererPlugin as TemplateRendererPlugin, exports$1_TestBackgroundLogger as TestBackgroundLogger, exports$1_ToolBuilder as ToolBuilder, type exports$1_Trace as Trace, type exports$1_TraceContextCarrier as TraceContextCarrier, type exports$1_TraceContextHeaders as TraceContextHeaders, exports$1_UUIDGenerator as UUIDGenerator, type exports$1_WithTransactionId as WithTransactionId, exports$1_X_CACHED_HEADER as X_CACHED_HEADER, exports$1__exportsForTestingOnly as _exportsForTestingOnly, exports$1__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports$1__internalSetInitialState as _internalSetInitialState, exports$1_addAzureBlobHeaders as addAzureBlobHeaders, exports$1_agentAssertionScorer as agentAssertionScorer, exports$1_braintrustAISDKTelemetry as braintrustAISDKTelemetry, exports$1_braintrustEveHook as braintrustEveHook, exports$1_braintrustEveInstrumentation as braintrustEveInstrumentation, exports$1_braintrustFlueInstrumentation as braintrustFlueInstrumentation, exports$1_braintrustFlueObserver as braintrustFlueObserver, exports$1_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports$1_buildLocalSummary as buildLocalSummary, exports$1_collectAnthropicSession as collectAnthropicSession, exports$1_completeOpenAIBatchTrace as completeOpenAIBatchTrace, exports$1_configureInstrumentation as configureInstrumentation, exports$1_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports$1_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports$1_currentExperiment as currentExperiment, exports$1_currentLogger as currentLogger, exports$1_currentSpan as currentSpan, exports$1_deepCopyEvent as deepCopyEvent, exports$1_defaultErrorScoreHandler as defaultErrorScoreHandler, exports$1_defineDurableEval as defineDurableEval, exports$1_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports$1_devNullWritableStream as devNullWritableStream, exports$1_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports$1_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports$1_extractTraceContextFromHeaders as extractTraceContextFromHeaders, exports$1_flush as flush, exports$1_getContextManager as getContextManager, exports$1_getIdGenerator as getIdGenerator, exports$1_getPromptVersions as getPromptVersions, exports$1_getSpanParentObject as getSpanParentObject, exports$1_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports$1_init as init, exports$1_initDataset as initDataset, exports$1_initExperiment as initExperiment, exports$1_initFunction as initFunction, exports$1_initLogger as initLogger, exports$1_initNodeTestSuite as initNodeTestSuite, exports$1_injectTraceContext as injectTraceContext, exports$1_invoke as invoke, exports$1_isTemplateFormat as isTemplateFormat, exports$1_loadParameters as loadParameters, exports$1_loadPrompt as loadPrompt, exports$1_log as log, exports$1_logError as logError, exports$1_login as login, exports$1_loginToState as loginToState, exports$1_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports$1_newId as newId, exports$1_openaiBatchesRetrieveTraced as openaiBatchesRetrieveTraced, exports$1_openaiFilesCreateTraced as openaiFilesCreateTraced, exports$1_parseCachedHeader as parseCachedHeader, exports$1_parseTemplateFormat as parseTemplateFormat, exports$1_permalink as permalink, exports$1_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports$1_projects as projects, exports$1_promptContentsSchema as promptContentsSchema, exports$1_promptDefinitionSchema as promptDefinitionSchema, exports$1_promptDefinitionToPromptData as promptDefinitionToPromptData, exports$1_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports$1_registerOtelFlush as registerOtelFlush, exports$1_registerSandbox as registerSandbox, exports$1_registerTemplatePlugin as registerTemplatePlugin, exports$1_renderMessage as renderMessage, exports$1_renderPromptParams as renderPromptParams, exports$1_renderTemplateContent as renderTemplateContent, exports$1_reportFailures as reportFailures, exports$1_runEvaluator as runEvaluator, exports$1_setFetch as setFetch, exports$1_setMaskingFunction as setMaskingFunction, exports$1_spanComponentsToObjectId as spanComponentsToObjectId, exports$1_startSpan as startSpan, exports$1_summarize as summarize, exports$1_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports$1_traceable as traceable, exports$1_traced as traced, exports$1_updateSpan as updateSpan, exports$1_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports$1_utf8ByteLength as utf8ByteLength, exports$1_withCurrent as withCurrent, exports$1_withDataset as withDataset, exports$1_withExperiment as withExperiment, exports$1_withLogger as withLogger, exports$1_withParent as withParent, exports$1_wrapAISDK as wrapAISDK, exports$1_wrapAISDKModel as wrapAISDKModel, exports$1_wrapAgentClass as wrapAgentClass, exports$1_wrapAnthropic as wrapAnthropic, exports$1_wrapBedrockRuntime as wrapBedrockRuntime, exports$1_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports$1_wrapCloudflareAIChat as wrapCloudflareAIChat, exports$1_wrapCloudflareAgent as wrapCloudflareAgent, exports$1_wrapCloudflareThink as wrapCloudflareThink, exports$1_wrapCohere as wrapCohere, exports$1_wrapCopilotClient as wrapCopilotClient, exports$1_wrapCursorSDK as wrapCursorSDK, exports$1_wrapGenkit as wrapGenkit, exports$1_wrapGoogleADK as wrapGoogleADK, exports$1_wrapGoogleGenAI as wrapGoogleGenAI, exports$1_wrapGroq as wrapGroq, exports$1_wrapHuggingFace as wrapHuggingFace, exports$1_wrapHuggingFaceTransformers as wrapHuggingFaceTransformers, exports$1_wrapLangSmithClient as wrapLangSmithClient, exports$1_wrapLangSmithRunTrees as wrapLangSmithRunTrees, exports$1_wrapLangSmithTraceable as wrapLangSmithTraceable, exports$1_wrapMastraAgent as wrapMastraAgent, exports$1_wrapMistral as wrapMistral, exports$1_wrapOllama as wrapOllama, exports$1_wrapOpenAI as wrapOpenAI, exports$1_wrapOpenAICodexSDK as wrapOpenAICodexSDK, exports$1_wrapOpenAIv4 as wrapOpenAIv4, exports$1_wrapOpenRouter as wrapOpenRouter, exports$1_wrapOpenRouterAgent as wrapOpenRouterAgent, exports$1_wrapPiCodingAgentSDK as wrapPiCodingAgentSDK, exports$1_wrapStrandsAgentSDK as wrapStrandsAgentSDK, exports$1_wrapTraced as wrapTraced, exports$1_wrapVitest as wrapVitest, exports$1_wrapVoyageAI as wrapVoyageAI };
47088
47957
  }
47089
47958
 
47090
- export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BAGGAGE_HEADER, BRAINTRUST_CURRENT_SPAN_STORE, BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, BRAINTRUST_PARENT_KEY, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BatchScorer, BatchTask, BraintrustLangChainCallbackHandler, BraintrustMiddleware, BraintrustObservabilityExporter, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, DatasetPipeline, type DatasetRecord, type DatasetRestorePreviewResult, type DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, DurableEvalMemoryStore, DurableEvalRedisStore, type DurableEvalStore, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalClassifier, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, type LangChainCallbackHandlerOptions, LazyValue, type LoadPromptOptions, LocalTrace, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MastraObservabilityExporter, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, OTELIDGenerator, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, type ParsedTraceparent, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, type PropagatedState, type PropagationContext, 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, TRACEPARENT_HEADER, TRACESTATE_HEADER, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, type TraceContextCarrier, type TraceContextHeaders, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, agentAssertionScorer, braintrustAISDKTelemetry, braintrustEveHook, braintrustEveInstrumentation, braintrustFlueInstrumentation, braintrustFlueObserver, braintrustStreamChunkSchema, buildLocalSummary, collectAnthropicSession, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports$1 as default, defaultErrorScoreHandler, defineDurableEval, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, extractTraceContextFromHeaders, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, injectTraceContext, 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, wrapBedrockRuntime, wrapClaudeAgentSDK, wrapCloudflareAIChat, wrapCloudflareAgent, wrapCloudflareThink, wrapCohere, wrapCopilotClient, wrapCursorSDK, wrapGenkit, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapHuggingFaceTransformers, wrapLangSmithClient, wrapLangSmithRunTrees, wrapLangSmithTraceable, wrapMastraAgent, wrapMistral, wrapOllama, wrapOpenAI, wrapOpenAICodexSDK, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapPiCodingAgentSDK, wrapStrandsAgentSDK, wrapTraced, wrapVitest, wrapVoyageAI };
47959
+ export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BAGGAGE_HEADER, BRAINTRUST_CURRENT_SPAN_STORE, BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, BRAINTRUST_PARENT_KEY, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BatchScorer, BatchTask, BraintrustLangChainCallbackHandler, BraintrustMiddleware, BraintrustObservabilityExporter, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, DatasetPipeline, type DatasetRecord, type DatasetRestorePreviewResult, type DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, DurableEvalMemoryStore, DurableEvalRedisStore, type DurableEvalStore, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalClassifier, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, type LangChainCallbackHandlerOptions, LazyValue, type LoadPromptOptions, LocalTrace, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MastraObservabilityExporter, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, OTELIDGenerator, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, type ParsedTraceparent, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, type PropagatedState, type PropagationContext, 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, TRACEPARENT_HEADER, TRACESTATE_HEADER, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, type TraceContextCarrier, type TraceContextHeaders, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, agentAssertionScorer, braintrustAISDKTelemetry, braintrustEveHook, braintrustEveInstrumentation, braintrustFlueInstrumentation, braintrustFlueObserver, braintrustStreamChunkSchema, buildLocalSummary, collectAnthropicSession, completeOpenAIBatchTrace, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports$1 as default, defaultErrorScoreHandler, defineDurableEval, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, extractTraceContextFromHeaders, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, injectTraceContext, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, openaiBatchesRetrieveTraced, openaiFilesCreateTraced, 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, wrapBedrockRuntime, wrapClaudeAgentSDK, wrapCloudflareAIChat, wrapCloudflareAgent, wrapCloudflareThink, wrapCohere, wrapCopilotClient, wrapCursorSDK, wrapGenkit, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapHuggingFaceTransformers, wrapLangSmithClient, wrapLangSmithRunTrees, wrapLangSmithTraceable, wrapMastraAgent, wrapMistral, wrapOllama, wrapOpenAI, wrapOpenAICodexSDK, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapPiCodingAgentSDK, wrapStrandsAgentSDK, wrapTraced, wrapVitest, wrapVoyageAI };