braintrust 3.12.0 → 3.14.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 (55) hide show
  1. package/dev/dist/index.d.mts +31 -14
  2. package/dev/dist/index.d.ts +31 -14
  3. package/dev/dist/index.js +919 -485
  4. package/dev/dist/index.mjs +480 -46
  5. package/dist/apply-auto-instrumentation.js +204 -174
  6. package/dist/apply-auto-instrumentation.mjs +35 -5
  7. package/dist/auto-instrumentations/bundler/esbuild.cjs +226 -1
  8. package/dist/auto-instrumentations/bundler/esbuild.mjs +3 -2
  9. package/dist/auto-instrumentations/bundler/next.cjs +226 -1
  10. package/dist/auto-instrumentations/bundler/next.mjs +4 -3
  11. package/dist/auto-instrumentations/bundler/rollup.cjs +226 -1
  12. package/dist/auto-instrumentations/bundler/rollup.mjs +3 -2
  13. package/dist/auto-instrumentations/bundler/vite.cjs +226 -1
  14. package/dist/auto-instrumentations/bundler/vite.mjs +3 -2
  15. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +9 -0
  16. package/dist/auto-instrumentations/bundler/webpack.cjs +226 -1
  17. package/dist/auto-instrumentations/bundler/webpack.mjs +4 -3
  18. package/dist/auto-instrumentations/{chunk-2DPA74KK.mjs → chunk-E5DUYJWK.mjs} +1 -0
  19. package/dist/auto-instrumentations/chunk-J57YF7WS.mjs +208 -0
  20. package/dist/auto-instrumentations/{chunk-AFXRW7I7.mjs → chunk-OTUQ7KH5.mjs} +1 -1
  21. package/dist/auto-instrumentations/chunk-QFMACSOL.mjs +280 -0
  22. package/dist/auto-instrumentations/{chunk-73BZUKVI.mjs → chunk-XKAAVWT6.mjs} +24 -2
  23. package/dist/auto-instrumentations/hook.mjs +7981 -7
  24. package/dist/auto-instrumentations/index.cjs +1 -0
  25. package/dist/auto-instrumentations/index.mjs +1 -1
  26. package/dist/auto-instrumentations/loader/cjs-patch.cjs +194 -4
  27. package/dist/auto-instrumentations/loader/cjs-patch.mjs +13 -27
  28. package/dist/auto-instrumentations/loader/esm-hook.mjs +24 -10
  29. package/dist/browser.d.mts +274 -30
  30. package/dist/browser.d.ts +274 -30
  31. package/dist/browser.js +407 -48
  32. package/dist/browser.mjs +407 -48
  33. package/dist/{chunk-BW4DF4CY.js → chunk-NKD77KGB.js} +180 -1
  34. package/dist/{chunk-MSLBGITU.mjs → chunk-NU2GSPHX.mjs} +180 -1
  35. package/dist/cli.js +494 -94
  36. package/dist/edge-light.d.mts +1 -1
  37. package/dist/edge-light.d.ts +1 -1
  38. package/dist/edge-light.js +407 -48
  39. package/dist/edge-light.mjs +407 -48
  40. package/dist/index.d.mts +274 -30
  41. package/dist/index.d.ts +274 -30
  42. package/dist/index.js +1267 -857
  43. package/dist/index.mjs +465 -55
  44. package/dist/instrumentation/index.d.mts +47 -11
  45. package/dist/instrumentation/index.d.ts +47 -11
  46. package/dist/instrumentation/index.js +116 -26
  47. package/dist/instrumentation/index.mjs +116 -26
  48. package/dist/workerd.d.mts +1 -1
  49. package/dist/workerd.d.ts +1 -1
  50. package/dist/workerd.js +407 -48
  51. package/dist/workerd.mjs +407 -48
  52. package/package.json +3 -23
  53. package/util/dist/index.d.mts +3 -1
  54. package/util/dist/index.d.ts +3 -1
  55. package/dist/auto-instrumentations/chunk-MWZXZQUO.mjs +0 -81
package/dist/browser.d.ts CHANGED
@@ -13504,7 +13504,7 @@ declare const ObjectReference$1: z.ZodObject<{
13504
13504
  created?: string | null | undefined;
13505
13505
  _xact_id?: string | null | undefined;
13506
13506
  }>;
13507
- type ObjectReferenceType = z.infer<typeof ObjectReference$1>;
13507
+ type ObjectReferenceType$1 = z.infer<typeof ObjectReference$1>;
13508
13508
  declare const Prompt$1: z.ZodObject<{
13509
13509
  id: z.ZodString;
13510
13510
  _xact_id: z.ZodString;
@@ -16037,6 +16037,7 @@ interface Common {
16037
16037
  getRepoInfo: (settings?: GitMetadataSettingsType) => Promise<RepoInfoType | undefined>;
16038
16038
  getPastNAncestors: (n?: number, remote?: string) => Promise<string[]>;
16039
16039
  getEnv: (name: string) => string | undefined;
16040
+ getBraintrustApiKey: () => Promise<string | undefined>;
16040
16041
  getCallerLocation: () => CallerLocation | undefined;
16041
16042
  newAsyncLocalStorage: <T>() => IsoAsyncLocalStorage<T>;
16042
16043
  newTracingChannel: <M = any>(nameOrChannels: string | IsoTracingChannelCollection<M>) => IsoTracingChannel<M>;
@@ -16223,6 +16224,7 @@ declare const ObjectReference: z.ZodObject<{
16223
16224
  created?: string | null | undefined;
16224
16225
  _xact_id?: string | null | undefined;
16225
16226
  }>;
16227
+ type ObjectReferenceType = z.infer<typeof ObjectReference>;
16226
16228
 
16227
16229
  type IdField = {
16228
16230
  id: string;
@@ -16243,7 +16245,7 @@ type OtherExperimentLogFields = {
16243
16245
  metadata: Record<string, unknown>;
16244
16246
  metrics: Record<string, unknown>;
16245
16247
  datasetRecordId: string;
16246
- origin: z.infer<typeof ObjectReference>;
16248
+ origin: ObjectReferenceType;
16247
16249
  span_attributes: Record<string, unknown>;
16248
16250
  [ASYNC_SCORING_CONTROL_FIELD]: AsyncScoringControlType;
16249
16251
  [MERGE_PATHS_FIELD]: string[][];
@@ -16296,6 +16298,7 @@ type DatasetEvent = {
16296
16298
  tags?: string[];
16297
16299
  metadata?: unknown;
16298
16300
  created?: string;
16301
+ origin?: ObjectReferenceType;
16299
16302
  id: string;
16300
16303
  dataset_id: string;
16301
16304
  } & ({
@@ -16757,17 +16760,15 @@ interface PromptKey {
16757
16760
  id?: string;
16758
16761
  }
16759
16762
  /**
16760
- * A two-layer cache for Braintrust prompts with both in-memory and filesystem storage.
16763
+ * A configurable cache for Braintrust prompts with optional in-memory and filesystem storage.
16761
16764
  *
16762
- * This cache implements either a one or two-layer caching strategy:
16763
- * 1. A fast in-memory LRU cache for frequently accessed prompts.
16764
- * 2. An optional persistent filesystem-based cache that serves as a backing store.
16765
+ * This cache can use either layer independently, both layers together, or no layers.
16765
16766
  */
16766
16767
  declare class PromptCache {
16767
- private readonly memoryCache;
16768
+ private readonly memoryCache?;
16768
16769
  private readonly diskCache?;
16769
16770
  constructor(options: {
16770
- memoryCache: LRUCache<string, Prompt>;
16771
+ memoryCache?: LRUCache<string, Prompt>;
16771
16772
  diskCache?: DiskCache<Prompt>;
16772
16773
  });
16773
16774
  /**
@@ -16794,10 +16795,10 @@ interface ParametersKey {
16794
16795
  id?: string;
16795
16796
  }
16796
16797
  declare class ParametersCache {
16797
- private readonly memoryCache;
16798
+ private readonly memoryCache?;
16798
16799
  private readonly diskCache?;
16799
16800
  constructor(options: {
16800
- memoryCache: LRUCache<string, RemoteEvalParameters>;
16801
+ memoryCache?: LRUCache<string, RemoteEvalParameters>;
16801
16802
  diskCache?: DiskCache<RemoteEvalParameters>;
16802
16803
  });
16803
16804
  get(key: ParametersKey): Promise<RemoteEvalParameters | undefined>;
@@ -16817,9 +16818,15 @@ declare class ParametersCache {
16817
16818
  interface CachedSpan {
16818
16819
  input?: unknown;
16819
16820
  output?: unknown;
16821
+ expected?: unknown;
16822
+ error?: unknown;
16823
+ scores?: Record<string, unknown>;
16824
+ metrics?: Record<string, unknown>;
16820
16825
  metadata?: Record<string, unknown>;
16826
+ tags?: string[];
16821
16827
  span_id: string;
16822
16828
  span_parents?: string[];
16829
+ is_root?: boolean | null;
16823
16830
  span_attributes?: {
16824
16831
  name?: string;
16825
16832
  type?: string;
@@ -19182,6 +19189,13 @@ declare abstract class BaseAttachment {
19182
19189
  abstract data(): Promise<Blob>;
19183
19190
  abstract debugInfo(): Record<string, unknown>;
19184
19191
  }
19192
+ type DatasetPipelineDeferredJSONAttachmentHook = (data: unknown, options?: {
19193
+ filename?: string;
19194
+ pretty?: boolean;
19195
+ }) => object;
19196
+ declare global {
19197
+ var __BT_DATASET_PIPELINE_DEFER_JSON_ATTACHMENT__: DatasetPipelineDeferredJSONAttachmentHook | undefined;
19198
+ }
19185
19199
  /**
19186
19200
  * Represents an attachment to be uploaded and the associated metadata.
19187
19201
  * `Attachment` objects can be inserted anywhere in an event, allowing you to
@@ -19712,7 +19726,7 @@ type InitializedExperiment<IsOpen extends boolean | undefined> = IsOpen extends
19712
19726
  * @param options.baseExperiment An optional experiment name to use as a base. If specified, the new experiment will be summarized and compared to this experiment. Otherwise, it will pick an experiment by finding the closest ancestor on the default (e.g. main) branch.
19713
19727
  * @param options.isPublic An optional parameter to control whether the experiment is publicly visible to anybody with the link or privately visible to only members of the organization. Defaults to private.
19714
19728
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
19715
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. If no API key is specified, will prompt the user to login.
19729
+ * @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.
19716
19730
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
19717
19731
  * @param options.metadata (Optional) A dictionary with additional data about the test example, model outputs, or just about anything else that's relevant, that you can use to help find and analyze examples later. For example, you could log the `prompt`, example's `id`, or anything else that would be useful to slice/dice later. The values in `metadata` can be any JSON-serializable type, but its keys must be strings.
19718
19732
  * @param options.gitMetadataSettings (Optional) Settings for collecting git metadata. By default, Braintrust collects the git metadata fields allowed by your organization's git metadata settings. If those settings are absent, git metadata is not collected unless this option is set.
@@ -19774,7 +19788,7 @@ type FullInitDatasetOptions<IsLegacyDataset extends boolean> = {
19774
19788
  * @param options.snapshotName Pin the dataset to the version captured by this named snapshot. If `environment` is also provided, `snapshotName` takes precedence.
19775
19789
  * @param options.environment Pin the dataset to the version tagged with this environment slug.
19776
19790
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
19777
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. If no API key is specified, will prompt the user to login.
19791
+ * @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.
19778
19792
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
19779
19793
  * @param options.projectId The id of the project to create the dataset in. This takes precedence over `project` if specified.
19780
19794
  * @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.
@@ -19811,8 +19825,8 @@ type InitLoggerOptions<IsAsyncFlush> = FullLoginOptions & {
19811
19825
  * @param options.projectId The id of the project to log into. This takes precedence over projectName if specified.
19812
19826
  * @param options.asyncFlush If true, will log asynchronously in the background. Otherwise, will log synchronously. (true by default)
19813
19827
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
19814
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. If no API
19815
- * key is specified, will prompt the user to login.
19828
+ * @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,
19829
+ * 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.
19816
19830
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
19817
19831
  * @param options.forceLogin Login again, even if you have already logged in (by default, the logger will not login if you are already logged in)
19818
19832
  * @param options.debugLogLevel Enables internal Braintrust SDK troubleshooting output. Use `"error"`, `"warn"`, `"info"`, or `"debug"` to choose an explicit level, or `false` to explicitly disable it. If omitted, the SDK stays silent unless `BRAINTRUST_DEBUG_LOG_LEVEL` is set.
@@ -19878,8 +19892,8 @@ type LoadParametersByProjectIdWithEnvOptions = LoadParametersBaseOptions & {
19878
19892
  * @param options.defaults (Optional) A dictionary of default values to use when rendering the prompt. Prompt values will override these defaults.
19879
19893
  * @param options.noTrace If true, do not include logging metadata for this prompt when build() is called.
19880
19894
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
19881
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. If no API
19882
- * key is specified, will prompt the user to login.
19895
+ * @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,
19896
+ * 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.
19883
19897
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
19884
19898
  * @returns The prompt object.
19885
19899
  * @throws If the prompt is not found.
@@ -19905,7 +19919,7 @@ declare function loadPrompt({ projectName, projectId, slug, version, environment
19905
19919
  * @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.
19906
19920
  * @param options.id The id of specific parameters to load. If specified, this takes precedence over all other parameters (project and slug).
19907
19921
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
19908
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable.
19922
+ * @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.
19909
19923
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
19910
19924
  * @returns The parameters object.
19911
19925
  * @throws If the parameters are not found.
@@ -19935,7 +19949,7 @@ interface LoginOptions {
19935
19949
  */
19936
19950
  appUrl?: string;
19937
19951
  /**
19938
- * The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable.
19952
+ * 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.
19939
19953
  */
19940
19954
  apiKey?: string;
19941
19955
  /**
@@ -19993,8 +20007,8 @@ declare function setMaskingFunction(maskingFunction: ((value: unknown) => unknow
19993
20007
  *
19994
20008
  * @param options Options for configuring login().
19995
20009
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
19996
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. If no API
19997
- * key is specified, will prompt the user to login.
20010
+ * @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,
20011
+ * 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.
19998
20012
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
19999
20013
  * @param options.forceLogin Login again, even if you have already logged in (by default, this function will exit quickly if you have already logged in)
20000
20014
  */
@@ -20438,17 +20452,19 @@ declare class Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY
20438
20452
  * about anything else that's relevant, that you can use to help find and analyze examples later. For example, you could log the
20439
20453
  * `prompt`, example's `id`, or anything else that would be useful to slice/dice later. The values in `metadata` can be any
20440
20454
  * JSON-serializable type, but its keys must be strings.
20455
+ * @param event.origin (Optional) a reference to the source object this dataset record was derived from.
20441
20456
  * @param event.id (Optional) a unique identifier for the event. If you don't provide one, Braintrust will generate one for you.
20442
20457
  * @param event.output: (Deprecated) The output of your application. Use `expected` instead.
20443
20458
  * @returns The `id` of the logged record.
20444
20459
  */
20445
- insert({ input, expected, metadata, tags, id, output, }: {
20460
+ insert({ input, expected, metadata, tags, id, output, origin, }: {
20446
20461
  readonly input?: unknown;
20447
20462
  readonly expected?: unknown;
20448
20463
  readonly tags?: string[];
20449
20464
  readonly metadata?: Record<string, unknown>;
20450
20465
  readonly id?: string;
20451
20466
  readonly output?: unknown;
20467
+ readonly origin?: ObjectReferenceType$1;
20452
20468
  }): string;
20453
20469
  /**
20454
20470
  * Update fields of a single record in the dataset. The updated fields will be batched and uploaded behind the scenes.
@@ -21520,7 +21536,121 @@ declare function BraintrustMiddleware(config?: MiddlewareConfig): LanguageModelV
21520
21536
  declare function wrapAnthropic<T extends object>(anthropic: T): T;
21521
21537
 
21522
21538
  /**
21523
- * @deprecated This wrapper has been removed. The function now returns the agent unchanged.
21539
+ * Braintrust integration for `@mastra/core`'s observability pipeline.
21540
+ *
21541
+ * Mastra ships a public `ObservabilityExporter` extension contract documented
21542
+ * at https://mastra.ai/docs/observability/tracing/exporters/braintrust . This
21543
+ * file implements that contract: every Mastra `TracingEvent` (one of
21544
+ * SPAN_STARTED / SPAN_UPDATED / SPAN_ENDED) is translated into a Braintrust
21545
+ * span, parented via the Mastra-supplied `parentSpanId`.
21546
+ *
21547
+ * Two integration paths:
21548
+ * - **Manual**: `new Mastra({ observability: new Observability({ configs: {
21549
+ * default: { exporters: [new BraintrustObservabilityExporter()] } } }) })`
21550
+ * - **Auto** (under `node --import braintrust/hook.mjs`): the loader patches
21551
+ * `@mastra/core`'s `dist/mastra/index.{js,cjs}` to wrap `Mastra` so it
21552
+ * calls `defaultInstance.registerExporter(exporter)` after construction.
21553
+ *
21554
+ * Minimum supported Mastra version: 1.20.0 (when `Mastra.prototype.register`
21555
+ * `Exporter` and `ObservabilityInstance.registerExporter` were added). The
21556
+ * exporter itself works as a manual integration on any Mastra version that
21557
+ * accepts an `ObservabilityExporter`.
21558
+ */
21559
+ /** Subset of Mastra's `AnyExportedSpan` that we consume — vendored to avoid a
21560
+ * hard dependency on `@mastra/core` types. Fields match `SpanData<SpanType>`
21561
+ * in `@mastra/core/observability`. */
21562
+ interface MastraExportedSpan {
21563
+ id: string;
21564
+ traceId: string;
21565
+ name: string;
21566
+ type: string;
21567
+ startTime: Date | string | number;
21568
+ endTime?: Date | string | number;
21569
+ parentSpanId?: string;
21570
+ isRootSpan?: boolean;
21571
+ isEvent?: boolean;
21572
+ isInternal?: boolean;
21573
+ entityType?: string;
21574
+ entityId?: string;
21575
+ entityName?: string;
21576
+ attributes?: Record<string, unknown>;
21577
+ metadata?: Record<string, unknown>;
21578
+ tags?: string[];
21579
+ input?: unknown;
21580
+ output?: unknown;
21581
+ errorInfo?: {
21582
+ message: string;
21583
+ id?: string;
21584
+ name?: string;
21585
+ stack?: string;
21586
+ domain?: string;
21587
+ category?: string;
21588
+ details?: Record<string, unknown>;
21589
+ };
21590
+ requestContext?: Record<string, unknown>;
21591
+ }
21592
+ interface MastraTracingEvent {
21593
+ type: "span_started" | "span_updated" | "span_ended";
21594
+ exportedSpan: MastraExportedSpan;
21595
+ }
21596
+ /** Subset of the `ObservabilityExporter` contract from `@mastra/core`. */
21597
+ interface MastraObservabilityExporter {
21598
+ name: string;
21599
+ init?(options: unknown): void;
21600
+ __setLogger?(logger: unknown): void;
21601
+ exportTracingEvent(event: MastraTracingEvent): Promise<void>;
21602
+ flush(): Promise<void>;
21603
+ shutdown(): Promise<void>;
21604
+ }
21605
+ /**
21606
+ * Translates Mastra `TracingEvent`s into Braintrust spans.
21607
+ *
21608
+ * Construct one instance per `Observability` config (Mastra holds onto it for
21609
+ * the process lifetime). Safe to register on multiple Mastra instances, but
21610
+ * each instance maintains its own span map keyed by Mastra `spanId`.
21611
+ */
21612
+ declare class BraintrustObservabilityExporter implements MastraObservabilityExporter {
21613
+ readonly name = "braintrust";
21614
+ private readonly spans;
21615
+ private capturedParent;
21616
+ constructor();
21617
+ exportTracingEvent(event: MastraTracingEvent): Promise<void>;
21618
+ flush(): Promise<void>;
21619
+ shutdown(): Promise<void>;
21620
+ private onStart;
21621
+ private onUpdate;
21622
+ private onEnd;
21623
+ private logPayload;
21624
+ }
21625
+ /**
21626
+ * @deprecated Mastra is now instrumented through its own `ObservabilityExporter`
21627
+ * contract instead of by wrapping the agent. This function does nothing and
21628
+ * will be removed in the next major release.
21629
+ *
21630
+ * To capture Mastra spans in Braintrust, do one of:
21631
+ *
21632
+ * - **Auto-instrumentation**: run your app with
21633
+ * `node --import braintrust/hook.mjs`. The loader installs
21634
+ * `BraintrustObservabilityExporter` into every `new Mastra(...)`
21635
+ * automatically.
21636
+ * - **Manual wiring**: pass the exporter yourself:
21637
+ *
21638
+ * ```ts
21639
+ * import { Mastra } from "@mastra/core";
21640
+ * import { Observability } from "@mastra/observability";
21641
+ * import { BraintrustObservabilityExporter } from "braintrust";
21642
+ *
21643
+ * const mastra = new Mastra({
21644
+ * observability: new Observability({
21645
+ * configs: {
21646
+ * default: {
21647
+ * serviceName: "my-service",
21648
+ * exporters: [new BraintrustObservabilityExporter()],
21649
+ * },
21650
+ * },
21651
+ * }),
21652
+ * });
21653
+ * ```
21524
21654
  */
21525
21655
  declare function wrapMastraAgent<T>(agent: T, _options?: {
21526
21656
  name?: string;
@@ -22310,7 +22440,7 @@ declare class SpanFetcher extends ObjectFetcher<SpanRecord> {
22310
22440
  private readonly rootSpanId;
22311
22441
  private readonly _state;
22312
22442
  private readonly spanTypeFilter?;
22313
- constructor(objectType: "experiment" | "project_logs" | "playground_logs", _objectId: string, rootSpanId: string, _state: BraintrustState, spanTypeFilter?: string[] | undefined);
22443
+ constructor(objectType: "experiment" | "project_logs" | "playground_logs", _objectId: string, rootSpanId: string, _state: BraintrustState, spanTypeFilter?: string[] | undefined, includeScorers?: boolean);
22314
22444
  private static buildFilter;
22315
22445
  get id(): Promise<string>;
22316
22446
  protected getState(): Promise<BraintrustState>;
@@ -22347,8 +22477,9 @@ declare class CachedSpanFetcher {
22347
22477
  private fetchFn;
22348
22478
  constructor(objectType: "experiment" | "project_logs" | "playground_logs", objectId: string, rootSpanId: string, getState: () => Promise<BraintrustState>);
22349
22479
  constructor(fetchFn: SpanFetchFn);
22350
- getSpans({ spanType }?: {
22480
+ getSpans({ spanType, includeScorers, }?: {
22351
22481
  spanType?: string[];
22482
+ includeScorers?: boolean;
22352
22483
  }): Promise<SpanData[]>;
22353
22484
  private fetchSpans;
22354
22485
  private getFromCache;
@@ -22364,6 +22495,10 @@ interface GetThreadOptions {
22364
22495
  */
22365
22496
  preprocessor?: string;
22366
22497
  }
22498
+ interface GetSpansOptions {
22499
+ spanType?: string[];
22500
+ includeScorers?: boolean;
22501
+ }
22367
22502
  /**
22368
22503
  * Interface for trace objects that can be used by scorers.
22369
22504
  * Both the SDK's LocalTrace class and the API wrapper's WrapperTrace implement this.
@@ -22374,9 +22509,7 @@ interface Trace {
22374
22509
  object_id: string;
22375
22510
  root_span_id: string;
22376
22511
  };
22377
- getSpans(options?: {
22378
- spanType?: string[];
22379
- }): Promise<SpanData[]>;
22512
+ getSpans(options?: GetSpansOptions): Promise<SpanData[]>;
22380
22513
  /**
22381
22514
  * Get the thread (preprocessed messages) for this trace.
22382
22515
  * Uses the project default preprocessor, falling back to the global "thread" preprocessor.
@@ -40866,7 +40999,7 @@ type EvalClassifier<Input, Output, Expected, Metadata extends BaseMetadata = Def
40866
40999
  type EvalResult<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalCase<Input, Expected, Metadata> & {
40867
41000
  output: Output;
40868
41001
  error: unknown;
40869
- origin?: ObjectReferenceType;
41002
+ origin?: ObjectReferenceType$1;
40870
41003
  scores: Record<string, number | null>;
40871
41004
  classifications?: Record<string, ClassificationItem[]>;
40872
41005
  };
@@ -41129,6 +41262,112 @@ type ScoreAccumulator = {
41129
41262
  declare function buildLocalSummary(evaluator: EvaluatorDef<any, any, any, any>, results: EvalResult<any, any, any, any>[], precomputedScores?: ScoreAccumulator): ExperimentSummary;
41130
41263
  declare function reportFailures<Input, Output, Expected, Metadata extends BaseMetadata>(evaluator: EvaluatorDef<Input, Output, Expected, Metadata>, failingResults: EvalResult<Input, Output, Expected, Metadata>[], { verbose, jsonl }: ReporterOpts): void;
41131
41264
 
41265
+ type DatasetPipelineRow = {
41266
+ input?: unknown;
41267
+ output?: unknown;
41268
+ expected?: unknown;
41269
+ tags?: string[];
41270
+ metadata?: Record<string, unknown>;
41271
+ id?: string;
41272
+ };
41273
+ type DatasetPipelineTransformResult = DatasetPipelineRow | DatasetPipelineRow[] | null | undefined;
41274
+ type DatasetPipelineDefinition<Scope extends "span" | "trace"> = {
41275
+ /** The name of the dataset pipeline as it will show up in Braintrust */
41276
+ name?: string;
41277
+ /** Information about what spans/traces should be passed into the dataset pipeline. */
41278
+ source: {
41279
+ /** What project to take spans/traces from. Has precedence over `projectName`. */
41280
+ projectId?: string;
41281
+ /** What project to take spans/traces from. */
41282
+ projectName?: string;
41283
+ /** What organization to take spans/traces from. */
41284
+ orgName?: string;
41285
+ /** An optional BTQL filter to filter spans by. Not providing this filter means all spans/traces are eligible for the pipeline. */
41286
+ filter?: string;
41287
+ /**
41288
+ * Whether to pass exclusively spans or entire traces to the pipeline. Affects the transform input arguments.
41289
+ *
41290
+ * Defaults to: `"span"`
41291
+ */
41292
+ scope?: Scope;
41293
+ };
41294
+ /**
41295
+ * A transformation function that either receives a span or a trace, depending on what scope was defined in the `source.scope` option.
41296
+ *
41297
+ * Can return one or more new rows for the target dataset, or `null`/`undefined` if no new row should be inserted.
41298
+ */
41299
+ transform: (transformInput: Scope extends "span" ? {
41300
+ id: string;
41301
+ input: unknown;
41302
+ output: unknown;
41303
+ expected: unknown;
41304
+ metadata?: Record<string, unknown>;
41305
+ trace: Trace;
41306
+ } : {
41307
+ trace: Trace;
41308
+ }) => DatasetPipelineTransformResult | Promise<DatasetPipelineTransformResult>;
41309
+ /** Information about the target dataset */
41310
+ target: {
41311
+ /** Id of the project where the dataset currently lives or should be created or updated. */
41312
+ projectId?: string;
41313
+ /** Name of the project where the dataset currently lives or should be created or updated. */
41314
+ projectName?: string;
41315
+ /** Organization name of the project where the dataset currently lives or should be created or updated. */
41316
+ orgName?: string;
41317
+ /** Name of the dataset. Either the current name or new name if the dataset is created or updated. */
41318
+ datasetName: string;
41319
+ /** Description of the dataset when the dataset is created or updated. */
41320
+ description?: string;
41321
+ /** Metadata of the dataset when the dataset is created or updated. */
41322
+ metadata?: Record<string, unknown>;
41323
+ };
41324
+ };
41325
+ /**
41326
+ * This is the interface for pipelines that is exposed to `bt`
41327
+ */
41328
+ type DatasetPipelineBtDefinition = {
41329
+ name?: string;
41330
+ source: {
41331
+ projectId?: string;
41332
+ projectName?: string;
41333
+ orgName?: string;
41334
+ filter?: string;
41335
+ scope: "span" | "trace";
41336
+ };
41337
+ transform: (transformInput: {
41338
+ id: string;
41339
+ input: unknown;
41340
+ output: unknown;
41341
+ expected: unknown;
41342
+ metadata?: Record<string, unknown>;
41343
+ trace: Trace;
41344
+ } | {
41345
+ trace: Trace;
41346
+ }) => DatasetPipelineTransformResult | Promise<DatasetPipelineTransformResult>;
41347
+ target: {
41348
+ projectId?: string;
41349
+ projectName?: string;
41350
+ orgName?: string;
41351
+ datasetName: string;
41352
+ description?: string;
41353
+ metadata?: Record<string, unknown>;
41354
+ };
41355
+ };
41356
+ declare global {
41357
+ var __braintrust_dataset_pipelines: DatasetPipelineBtDefinition[] | undefined;
41358
+ }
41359
+ /**
41360
+ * Creates a runnable dataset pipeline.
41361
+ *
41362
+ * Dataset pipelines can be used to take trace data stored in Braintrust, filter and transform it, and directly feed it back into a Braintrust dataset.
41363
+ *
41364
+ * You can run a dataset pipeline with the `bt` CLI using `bt datasets pipeline run some-file-path.ts --limit 100`.
41365
+ * The limit option controls how many spans/traces (depending on the `definition.source.scope` option) are discovered for the pipeline.
41366
+ *
41367
+ * @experimental - The API for this function is not yet stabilized and may change or be removed across non-major versions. Functionality is not guaranteed.
41368
+ */
41369
+ declare function DatasetPipeline<Scope extends "span" | "trace">(definition: DatasetPipelineDefinition<Scope>): void;
41370
+
41132
41371
  interface InstrumentationIntegrationsConfig {
41133
41372
  openai?: boolean;
41134
41373
  anthropic?: boolean;
@@ -41142,6 +41381,7 @@ interface InstrumentationIntegrationsConfig {
41142
41381
  cursor?: boolean;
41143
41382
  cursorSDK?: boolean;
41144
41383
  flue?: boolean;
41384
+ mastra?: boolean;
41145
41385
  openAIAgents?: boolean;
41146
41386
  openrouter?: boolean;
41147
41387
  openrouterAgent?: boolean;
@@ -41213,6 +41453,8 @@ type exports$1_BaseMetadata = BaseMetadata;
41213
41453
  type exports$1_BraintrustLangChainCallbackHandler<IsAsyncFlush extends boolean = true> = BraintrustLangChainCallbackHandler<IsAsyncFlush>;
41214
41454
  declare const exports$1_BraintrustLangChainCallbackHandler: typeof BraintrustLangChainCallbackHandler;
41215
41455
  declare const exports$1_BraintrustMiddleware: typeof BraintrustMiddleware;
41456
+ type exports$1_BraintrustObservabilityExporter = BraintrustObservabilityExporter;
41457
+ declare const exports$1_BraintrustObservabilityExporter: typeof BraintrustObservabilityExporter;
41216
41458
  type exports$1_BraintrustState = BraintrustState;
41217
41459
  declare const exports$1_BraintrustState: typeof BraintrustState;
41218
41460
  type exports$1_BraintrustStream = BraintrustStream;
@@ -41240,6 +41482,7 @@ declare const exports$1_DEFAULT_MAX_REQUEST_SIZE: typeof DEFAULT_MAX_REQUEST_SIZ
41240
41482
  type exports$1_DataSummary = DataSummary;
41241
41483
  type exports$1_Dataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = Dataset<IsLegacyDataset>;
41242
41484
  declare const exports$1_Dataset: typeof Dataset;
41485
+ declare const exports$1_DatasetPipeline: typeof DatasetPipeline;
41243
41486
  type exports$1_DatasetRecord<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET> = DatasetRecord<IsLegacyDataset>;
41244
41487
  type exports$1_DatasetRestorePreviewResult = DatasetRestorePreviewResult;
41245
41488
  type exports$1_DatasetRestoreResult = DatasetRestoreResult;
@@ -41310,6 +41553,7 @@ declare const exports$1_LoginInvalidOrgError: typeof LoginInvalidOrgError;
41310
41553
  type exports$1_LoginOptions = LoginOptions;
41311
41554
  type exports$1_Logs3OverflowInputRow = Logs3OverflowInputRow;
41312
41555
  type exports$1_Logs3OverflowUpload = Logs3OverflowUpload;
41556
+ type exports$1_MastraObservabilityExporter = MastraObservabilityExporter;
41313
41557
  type exports$1_MetricSummary = MetricSummary;
41314
41558
  declare const exports$1_NOOP_SPAN: typeof NOOP_SPAN;
41315
41559
  declare const exports$1_NOOP_SPAN_PERMALINK: typeof NOOP_SPAN_PERMALINK;
@@ -41469,7 +41713,7 @@ declare const exports$1_wrapOpenRouterAgent: typeof wrapOpenRouterAgent;
41469
41713
  declare const exports$1_wrapTraced: typeof wrapTraced;
41470
41714
  declare const exports$1_wrapVitest: typeof wrapVitest;
41471
41715
  declare namespace exports$1 {
41472
- 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_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, exports$1_BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME as BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, type exports$1_BackgroundLoggerOpts as BackgroundLoggerOpts, exports$1_BaseAttachment as BaseAttachment, exports$1_BaseExperiment as BaseExperiment, type exports$1_BaseMetadata as BaseMetadata, exports$1_BraintrustLangChainCallbackHandler as BraintrustLangChainCallbackHandler, exports$1_BraintrustMiddleware as BraintrustMiddleware, 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, 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_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, 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_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_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, 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, 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, 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, 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_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports$1_buildLocalSummary as buildLocalSummary, 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_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports$1_devNullWritableStream as devNullWritableStream, exports$1_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports$1_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, 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_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_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports$1_wrapCohere as wrapCohere, exports$1_wrapCopilotClient as wrapCopilotClient, exports$1_wrapCursorSDK as wrapCursorSDK, exports$1_wrapFlueContext as wrapFlueContext, exports$1_wrapFlueSession as wrapFlueSession, 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_wrapMastraAgent as wrapMastraAgent, exports$1_wrapMistral as wrapMistral, 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_wrapTraced as wrapTraced, exports$1_wrapVitest as wrapVitest };
41716
+ 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_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, exports$1_BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME as BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, type exports$1_BackgroundLoggerOpts as BackgroundLoggerOpts, exports$1_BaseAttachment as BaseAttachment, exports$1_BaseExperiment as BaseExperiment, type exports$1_BaseMetadata as BaseMetadata, 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_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, 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_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, 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, 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, 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, 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_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports$1_buildLocalSummary as buildLocalSummary, 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_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports$1_devNullWritableStream as devNullWritableStream, exports$1_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports$1_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, 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_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_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports$1_wrapCohere as wrapCohere, exports$1_wrapCopilotClient as wrapCopilotClient, exports$1_wrapCursorSDK as wrapCursorSDK, exports$1_wrapFlueContext as wrapFlueContext, exports$1_wrapFlueSession as wrapFlueSession, 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_wrapMastraAgent as wrapMastraAgent, exports$1_wrapMistral as wrapMistral, 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_wrapTraced as wrapTraced, exports$1_wrapVitest as wrapVitest };
41473
41717
  }
41474
41718
 
41475
- export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustLangChainCallbackHandler, BraintrustMiddleware, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, type DatasetRecord, type DatasetRestorePreviewResult, type DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalClassifier, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, type LangChainCallbackHandlerOptions, LazyValue, type LoadPromptOptions, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, braintrustStreamChunkSchema, buildLocalSummary, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports$1 as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapClaudeAgentSDK, wrapCohere, wrapCopilotClient, wrapCursorSDK, wrapFlueContext, wrapFlueSession, wrapGenkit, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAICodexSDK, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };
41719
+ export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, 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, 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, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MastraObservabilityExporter, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, braintrustStreamChunkSchema, buildLocalSummary, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports$1 as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapClaudeAgentSDK, wrapCohere, wrapCopilotClient, wrapCursorSDK, wrapFlueContext, wrapFlueSession, wrapGenkit, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAICodexSDK, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };