braintrust 3.27.0 → 3.28.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 (53) hide show
  1. package/dev/dist/index.d.mts +519 -186
  2. package/dev/dist/index.d.ts +519 -186
  3. package/dev/dist/index.js +1837 -1009
  4. package/dev/dist/index.mjs +1172 -344
  5. package/dist/apply-auto-instrumentation.js +262 -210
  6. package/dist/apply-auto-instrumentation.mjs +54 -2
  7. package/dist/auto-instrumentations/bundler/esbuild.cjs +81 -2
  8. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/next.cjs +81 -2
  10. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  11. package/dist/auto-instrumentations/bundler/rollup.cjs +81 -2
  12. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  13. package/dist/auto-instrumentations/bundler/vite.cjs +81 -2
  14. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  15. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +81 -2
  16. package/dist/auto-instrumentations/bundler/webpack.cjs +81 -2
  17. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  18. package/dist/auto-instrumentations/{chunk-XEYKUBLY.mjs → chunk-26PKVUKB.mjs} +80 -2
  19. package/dist/auto-instrumentations/{chunk-BW33ULMW.mjs → chunk-HD35AM3M.mjs} +1 -1
  20. package/dist/auto-instrumentations/{chunk-ZNHTSSGI.mjs → chunk-NP7V4XB2.mjs} +2 -1
  21. package/dist/auto-instrumentations/hook.mjs +236 -30
  22. package/dist/auto-instrumentations/index.cjs +2 -1
  23. package/dist/auto-instrumentations/index.mjs +1 -1
  24. package/dist/browser.d.mts +628 -53
  25. package/dist/browser.d.ts +628 -53
  26. package/dist/browser.js +2301 -284
  27. package/dist/browser.mjs +2301 -284
  28. package/dist/{chunk-MF7NU6BT.js → chunk-BBE7SNRV.js} +34 -4
  29. package/dist/{chunk-QRHGVBKU.js → chunk-OBBWQW6K.js} +1799 -1023
  30. package/dist/{chunk-YKD22IMR.mjs → chunk-UPFNQCGB.mjs} +966 -190
  31. package/dist/{chunk-CZM5JIQL.mjs → chunk-ZHUHZWFY.mjs} +33 -3
  32. package/dist/cli.js +1224 -398
  33. package/dist/edge-light.d.mts +1 -1
  34. package/dist/edge-light.d.ts +1 -1
  35. package/dist/edge-light.js +2301 -284
  36. package/dist/edge-light.mjs +2301 -284
  37. package/dist/index.d.mts +1212 -637
  38. package/dist/index.d.ts +1212 -637
  39. package/dist/index.js +1880 -590
  40. package/dist/index.mjs +1450 -160
  41. package/dist/instrumentation/index.d.mts +190 -6
  42. package/dist/instrumentation/index.d.ts +190 -6
  43. package/dist/instrumentation/index.js +823 -116
  44. package/dist/instrumentation/index.mjs +823 -116
  45. package/dist/vitest-evals-reporter.js +16 -16
  46. package/dist/vitest-evals-reporter.mjs +2 -2
  47. package/dist/workerd.d.mts +1 -1
  48. package/dist/workerd.d.ts +1 -1
  49. package/dist/workerd.js +2301 -284
  50. package/dist/workerd.mjs +2301 -284
  51. package/package.json +2 -3
  52. package/util/dist/index.d.mts +1545 -100
  53. package/util/dist/index.d.ts +1545 -100
@@ -1218,7 +1218,10 @@ var envIntegrationAliases = {
1218
1218
  "langchain-js": "langchain",
1219
1219
  "@langchain": "langchain",
1220
1220
  langgraph: "langgraph",
1221
- langsmith: "langsmith"
1221
+ langsmith: "langsmith",
1222
+ voyage: "voyageai",
1223
+ "voyage-ai": "voyageai",
1224
+ voyageai: "voyageai"
1222
1225
  };
1223
1226
  function readDisabledInstrumentationEnvConfig(disabledList) {
1224
1227
  const integrations = {};
@@ -1369,7 +1372,8 @@ var INSTRUMENTATION_NAMES = {
1369
1372
  OPENROUTER: "openrouter",
1370
1373
  OPENROUTER_AGENT: "openrouter-agent",
1371
1374
  PI_CODING_AGENT: "pi-coding-agent",
1372
- STRANDS_AGENT_SDK: "strands-agent-sdk"
1375
+ STRANDS_AGENT_SDK: "strands-agent-sdk",
1376
+ VOYAGEAI: "voyageai"
1373
1377
  };
1374
1378
 
1375
1379
  // src/instrumentation/plugins/ai-sdk-channels.ts
@@ -4760,6 +4764,77 @@ var strandsAgentSDKConfigs = [
4760
4764
  }
4761
4765
  ];
4762
4766
 
4767
+ // src/instrumentation/plugins/voyageai-channels.ts
4768
+ var voyageAIChannels = defineChannels(
4769
+ "voyageai",
4770
+ {
4771
+ embed: channel({
4772
+ channelName: "embed",
4773
+ kind: "async"
4774
+ }),
4775
+ multimodalEmbed: channel({
4776
+ channelName: "multimodalEmbed",
4777
+ kind: "async"
4778
+ }),
4779
+ rerank: channel({
4780
+ channelName: "rerank",
4781
+ kind: "async"
4782
+ }),
4783
+ contextualizedEmbed: channel({
4784
+ channelName: "contextualizedEmbed",
4785
+ kind: "async"
4786
+ })
4787
+ },
4788
+ { instrumentationName: INSTRUMENTATION_NAMES.VOYAGEAI }
4789
+ );
4790
+
4791
+ // src/auto-instrumentations/configs/voyageai.ts
4792
+ var GENERATED_CLIENT_MODULES = [
4793
+ "dist/cjs/Client.js",
4794
+ "dist/esm/Client.mjs"
4795
+ ];
4796
+ var generatedClientOperations = [
4797
+ {
4798
+ channelName: voyageAIChannels.embed.channelName,
4799
+ methodName: "embed",
4800
+ versionRange: ">=0.2.0 <1.0.0"
4801
+ },
4802
+ {
4803
+ channelName: voyageAIChannels.multimodalEmbed.channelName,
4804
+ methodName: "multimodalEmbed",
4805
+ versionRange: ">=0.2.0 <1.0.0"
4806
+ },
4807
+ {
4808
+ channelName: voyageAIChannels.rerank.channelName,
4809
+ methodName: "rerank",
4810
+ versionRange: ">=0.2.0 <1.0.0"
4811
+ },
4812
+ {
4813
+ channelName: voyageAIChannels.contextualizedEmbed.channelName,
4814
+ methodName: "contextualizedEmbed",
4815
+ versionRange: ">=0.2.0 <1.0.0"
4816
+ }
4817
+ ];
4818
+ var voyageAIConfigs = [
4819
+ ...GENERATED_CLIENT_MODULES.flatMap(
4820
+ (filePath) => generatedClientOperations.map(
4821
+ ({ channelName, methodName, versionRange: versionRange2 }) => ({
4822
+ channelName,
4823
+ module: {
4824
+ name: "voyageai",
4825
+ versionRange: versionRange2,
4826
+ filePath
4827
+ },
4828
+ functionQuery: {
4829
+ className: "VoyageAIClient",
4830
+ methodName,
4831
+ kind: "Async"
4832
+ }
4833
+ })
4834
+ )
4835
+ )
4836
+ ];
4837
+
4763
4838
  // src/auto-instrumentations/configs/all.ts
4764
4839
  var defaultInstrumentationConfigGroups = [
4765
4840
  { integrations: ["openai"], configs: openaiConfigs },
@@ -4839,6 +4914,10 @@ var defaultInstrumentationConfigGroups = [
4839
4914
  {
4840
4915
  integrations: ["flue"],
4841
4916
  configs: flueConfigs
4917
+ },
4918
+ {
4919
+ integrations: ["voyageai"],
4920
+ configs: voyageAIConfigs
4842
4921
  }
4843
4922
  // Note: `@mastra/core` is not listed here because its instrumentation
4844
4923
  // doesn't go through the AST `code-transformer` matcher — Mastra's
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  braintrustWebpackPlugin,
3
3
  webpackPlugin
4
- } from "../chunk-BW33ULMW.mjs";
5
- import "../chunk-XEYKUBLY.mjs";
6
- import "../chunk-ZNHTSSGI.mjs";
4
+ } from "../chunk-HD35AM3M.mjs";
5
+ import "../chunk-26PKVUKB.mjs";
6
+ import "../chunk-NP7V4XB2.mjs";
7
7
  import "../chunk-I55G56ZL.mjs";
8
8
  import "../chunk-JPUFNW7X.mjs";
9
9
  import "../chunk-P5YLNB2A.mjs";
@@ -27,7 +27,7 @@ import {
27
27
  openRouterConfigs,
28
28
  openaiConfigs,
29
29
  piCodingAgentConfigs
30
- } from "./chunk-ZNHTSSGI.mjs";
30
+ } from "./chunk-NP7V4XB2.mjs";
31
31
  import {
32
32
  applySpecialCasePatch,
33
33
  create
@@ -115,7 +115,10 @@ var envIntegrationAliases = {
115
115
  "langchain-js": "langchain",
116
116
  "@langchain": "langchain",
117
117
  langgraph: "langgraph",
118
- langsmith: "langsmith"
118
+ langsmith: "langsmith",
119
+ voyage: "voyageai",
120
+ "voyage-ai": "voyageai",
121
+ voyageai: "voyageai"
119
122
  };
120
123
  function readDisabledInstrumentationEnvConfig(disabledList) {
121
124
  const integrations = {};
@@ -304,6 +307,77 @@ var strandsAgentSDKConfigs = [
304
307
  }
305
308
  ];
306
309
 
310
+ // src/instrumentation/plugins/voyageai-channels.ts
311
+ var voyageAIChannels = defineChannels(
312
+ "voyageai",
313
+ {
314
+ embed: channel({
315
+ channelName: "embed",
316
+ kind: "async"
317
+ }),
318
+ multimodalEmbed: channel({
319
+ channelName: "multimodalEmbed",
320
+ kind: "async"
321
+ }),
322
+ rerank: channel({
323
+ channelName: "rerank",
324
+ kind: "async"
325
+ }),
326
+ contextualizedEmbed: channel({
327
+ channelName: "contextualizedEmbed",
328
+ kind: "async"
329
+ })
330
+ },
331
+ { instrumentationName: INSTRUMENTATION_NAMES.VOYAGEAI }
332
+ );
333
+
334
+ // src/auto-instrumentations/configs/voyageai.ts
335
+ var GENERATED_CLIENT_MODULES = [
336
+ "dist/cjs/Client.js",
337
+ "dist/esm/Client.mjs"
338
+ ];
339
+ var generatedClientOperations = [
340
+ {
341
+ channelName: voyageAIChannels.embed.channelName,
342
+ methodName: "embed",
343
+ versionRange: ">=0.2.0 <1.0.0"
344
+ },
345
+ {
346
+ channelName: voyageAIChannels.multimodalEmbed.channelName,
347
+ methodName: "multimodalEmbed",
348
+ versionRange: ">=0.2.0 <1.0.0"
349
+ },
350
+ {
351
+ channelName: voyageAIChannels.rerank.channelName,
352
+ methodName: "rerank",
353
+ versionRange: ">=0.2.0 <1.0.0"
354
+ },
355
+ {
356
+ channelName: voyageAIChannels.contextualizedEmbed.channelName,
357
+ methodName: "contextualizedEmbed",
358
+ versionRange: ">=0.2.0 <1.0.0"
359
+ }
360
+ ];
361
+ var voyageAIConfigs = [
362
+ ...GENERATED_CLIENT_MODULES.flatMap(
363
+ (filePath) => generatedClientOperations.map(
364
+ ({ channelName, methodName, versionRange }) => ({
365
+ channelName,
366
+ module: {
367
+ name: "voyageai",
368
+ versionRange,
369
+ filePath
370
+ },
371
+ functionQuery: {
372
+ className: "VoyageAIClient",
373
+ methodName,
374
+ kind: "Async"
375
+ }
376
+ })
377
+ )
378
+ )
379
+ ];
380
+
307
381
  // src/auto-instrumentations/configs/all.ts
308
382
  var defaultInstrumentationConfigGroups = [
309
383
  { integrations: ["openai"], configs: openaiConfigs },
@@ -383,6 +457,10 @@ var defaultInstrumentationConfigGroups = [
383
457
  {
384
458
  integrations: ["flue"],
385
459
  configs: flueConfigs
460
+ },
461
+ {
462
+ integrations: ["voyageai"],
463
+ configs: voyageAIConfigs
386
464
  }
387
465
  // Note: `@mastra/core` is not listed here because its instrumentation
388
466
  // doesn't go through the AST `code-transformer` matcher — Mastra's
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unplugin
3
- } from "./chunk-XEYKUBLY.mjs";
3
+ } from "./chunk-26PKVUKB.mjs";
4
4
 
5
5
  // src/auto-instrumentations/bundler/webpack.ts
6
6
  function braintrustWebpackPlugin(options = {}) {
@@ -134,7 +134,8 @@ var INSTRUMENTATION_NAMES = {
134
134
  OPENROUTER: "openrouter",
135
135
  OPENROUTER_AGENT: "openrouter-agent",
136
136
  PI_CODING_AGENT: "pi-coding-agent",
137
- STRANDS_AGENT_SDK: "strands-agent-sdk"
137
+ STRANDS_AGENT_SDK: "strands-agent-sdk",
138
+ VOYAGEAI: "voyageai"
138
139
  };
139
140
 
140
141
  // src/instrumentation/plugins/openai-channels.ts