braintrust 3.7.1 → 3.9.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 (57) hide show
  1. package/dev/dist/index.d.mts +228 -5
  2. package/dev/dist/index.d.ts +228 -5
  3. package/dev/dist/index.js +6259 -1261
  4. package/dev/dist/index.mjs +6161 -1163
  5. package/dist/auto-instrumentations/bundler/esbuild.cjs +995 -55
  6. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  7. package/dist/auto-instrumentations/bundler/rollup.cjs +995 -55
  8. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/vite.cjs +995 -55
  10. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  11. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +995 -55
  12. package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +11 -9
  13. package/dist/auto-instrumentations/bundler/webpack.cjs +995 -55
  14. package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
  15. package/dist/auto-instrumentations/{chunk-NY4CGTN6.mjs → chunk-G7F6HZGE.mjs} +9 -1
  16. package/dist/auto-instrumentations/{chunk-EVUKFMHG.mjs → chunk-ITP7RAUY.mjs} +21 -3
  17. package/dist/auto-instrumentations/chunk-KIMMUFAK.mjs +1781 -0
  18. package/dist/auto-instrumentations/{chunk-VLEJ5AEK.mjs → chunk-P5YLNB2A.mjs} +21 -3
  19. package/dist/auto-instrumentations/hook.mjs +1206 -82
  20. package/dist/auto-instrumentations/index.cjs +1161 -55
  21. package/dist/auto-instrumentations/index.d.mts +22 -1
  22. package/dist/auto-instrumentations/index.d.ts +22 -1
  23. package/dist/auto-instrumentations/index.mjs +172 -1
  24. package/dist/auto-instrumentations/loader/cjs-patch.cjs +34 -6
  25. package/dist/auto-instrumentations/loader/cjs-patch.d.mts +1 -0
  26. package/dist/auto-instrumentations/loader/cjs-patch.d.ts +1 -0
  27. package/dist/auto-instrumentations/loader/cjs-patch.mjs +15 -5
  28. package/dist/auto-instrumentations/loader/esm-hook.mjs +10 -4
  29. package/dist/auto-instrumentations/loader/get-package-version.cjs +20 -2
  30. package/dist/auto-instrumentations/loader/get-package-version.mjs +1 -1
  31. package/dist/browser.d.mts +501 -18
  32. package/dist/browser.d.ts +501 -18
  33. package/dist/browser.js +6985 -1211
  34. package/dist/browser.mjs +6985 -1211
  35. package/dist/cli.js +6160 -1133
  36. package/dist/edge-light.d.mts +1 -1
  37. package/dist/edge-light.d.ts +1 -1
  38. package/dist/edge-light.js +16054 -10191
  39. package/dist/edge-light.mjs +16054 -10191
  40. package/dist/index.d.mts +501 -18
  41. package/dist/index.d.ts +501 -18
  42. package/dist/index.js +7144 -1370
  43. package/dist/index.mjs +6985 -1211
  44. package/dist/instrumentation/index.d.mts +17 -0
  45. package/dist/instrumentation/index.d.ts +17 -0
  46. package/dist/instrumentation/index.js +5929 -1053
  47. package/dist/instrumentation/index.mjs +5929 -1053
  48. package/dist/workerd.d.mts +1 -1
  49. package/dist/workerd.d.ts +1 -1
  50. package/dist/workerd.js +16054 -10191
  51. package/dist/workerd.mjs +16054 -10191
  52. package/package.json +13 -8
  53. package/util/dist/index.d.mts +42 -1
  54. package/util/dist/index.d.ts +42 -1
  55. package/util/dist/index.js +5 -1
  56. package/util/dist/index.mjs +4 -0
  57. package/dist/auto-instrumentations/chunk-YCKND42U.mjs +0 -839
@@ -237,8 +237,13 @@ interface BraintrustPluginConfig {
237
237
  aisdk?: boolean;
238
238
  google?: boolean;
239
239
  googleGenAI?: boolean;
240
+ huggingface?: boolean;
240
241
  claudeAgentSDK?: boolean;
241
242
  openrouter?: boolean;
243
+ openrouterAgent?: boolean;
244
+ mistral?: boolean;
245
+ googleADK?: boolean;
246
+ cohere?: boolean;
242
247
  };
243
248
  }
244
249
  /**
@@ -250,6 +255,9 @@ interface BraintrustPluginConfig {
250
255
  * - Claude Agent SDK (agent interactions)
251
256
  * - Vercel AI SDK (generateText, streamText, etc.)
252
257
  * - Google GenAI SDK
258
+ * - HuggingFace Inference SDK
259
+ * - Mistral SDK
260
+ * - Cohere SDK
253
261
  *
254
262
  * The plugin is automatically enabled when the Braintrust library is loaded.
255
263
  * Individual integrations can be disabled via configuration.
@@ -261,7 +269,12 @@ declare class BraintrustPlugin extends BasePlugin {
261
269
  private aiSDKPlugin;
262
270
  private claudeAgentSDKPlugin;
263
271
  private googleGenAIPlugin;
272
+ private huggingFacePlugin;
264
273
  private openRouterPlugin;
274
+ private openRouterAgentPlugin;
275
+ private mistralPlugin;
276
+ private googleADKPlugin;
277
+ private coherePlugin;
265
278
  constructor(config?: BraintrustPluginConfig);
266
279
  protected onEnable(): void;
267
280
  protected onDisable(): void;
@@ -284,8 +297,12 @@ interface InstrumentationConfig {
284
297
  vercel?: boolean;
285
298
  aisdk?: boolean;
286
299
  google?: boolean;
300
+ huggingface?: boolean;
287
301
  claudeAgentSDK?: boolean;
288
302
  openrouter?: boolean;
303
+ openrouterAgent?: boolean;
304
+ mistral?: boolean;
305
+ cohere?: boolean;
289
306
  };
290
307
  }
291
308
  /**
@@ -237,8 +237,13 @@ interface BraintrustPluginConfig {
237
237
  aisdk?: boolean;
238
238
  google?: boolean;
239
239
  googleGenAI?: boolean;
240
+ huggingface?: boolean;
240
241
  claudeAgentSDK?: boolean;
241
242
  openrouter?: boolean;
243
+ openrouterAgent?: boolean;
244
+ mistral?: boolean;
245
+ googleADK?: boolean;
246
+ cohere?: boolean;
242
247
  };
243
248
  }
244
249
  /**
@@ -250,6 +255,9 @@ interface BraintrustPluginConfig {
250
255
  * - Claude Agent SDK (agent interactions)
251
256
  * - Vercel AI SDK (generateText, streamText, etc.)
252
257
  * - Google GenAI SDK
258
+ * - HuggingFace Inference SDK
259
+ * - Mistral SDK
260
+ * - Cohere SDK
253
261
  *
254
262
  * The plugin is automatically enabled when the Braintrust library is loaded.
255
263
  * Individual integrations can be disabled via configuration.
@@ -261,7 +269,12 @@ declare class BraintrustPlugin extends BasePlugin {
261
269
  private aiSDKPlugin;
262
270
  private claudeAgentSDKPlugin;
263
271
  private googleGenAIPlugin;
272
+ private huggingFacePlugin;
264
273
  private openRouterPlugin;
274
+ private openRouterAgentPlugin;
275
+ private mistralPlugin;
276
+ private googleADKPlugin;
277
+ private coherePlugin;
265
278
  constructor(config?: BraintrustPluginConfig);
266
279
  protected onEnable(): void;
267
280
  protected onDisable(): void;
@@ -284,8 +297,12 @@ interface InstrumentationConfig {
284
297
  vercel?: boolean;
285
298
  aisdk?: boolean;
286
299
  google?: boolean;
300
+ huggingface?: boolean;
287
301
  claudeAgentSDK?: boolean;
288
302
  openrouter?: boolean;
303
+ openrouterAgent?: boolean;
304
+ mistral?: boolean;
305
+ cohere?: boolean;
289
306
  };
290
307
  }
291
308
  /**