braintrust 3.24.0 → 3.26.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 (80) hide show
  1. package/NOTICE +6 -0
  2. package/dev/dist/index.d.mts +135 -2
  3. package/dev/dist/index.d.ts +135 -2
  4. package/dev/dist/index.js +4426 -2040
  5. package/dev/dist/index.mjs +3594 -1208
  6. package/dist/apply-auto-instrumentation.js +445 -403
  7. package/dist/apply-auto-instrumentation.mjs +249 -207
  8. package/dist/auto-instrumentations/bundler/esbuild.cjs +1449 -799
  9. package/dist/auto-instrumentations/bundler/esbuild.d.mts +4 -4
  10. package/dist/auto-instrumentations/bundler/esbuild.d.ts +4 -4
  11. package/dist/auto-instrumentations/bundler/esbuild.mjs +5 -8
  12. package/dist/auto-instrumentations/bundler/next.cjs +1448 -818
  13. package/dist/auto-instrumentations/bundler/next.mjs +6 -29
  14. package/dist/auto-instrumentations/bundler/rollup.cjs +1449 -799
  15. package/dist/auto-instrumentations/bundler/rollup.d.mts +4 -4
  16. package/dist/auto-instrumentations/bundler/rollup.d.ts +4 -4
  17. package/dist/auto-instrumentations/bundler/rollup.mjs +5 -8
  18. package/dist/auto-instrumentations/bundler/vite.cjs +1449 -799
  19. package/dist/auto-instrumentations/bundler/vite.d.mts +4 -4
  20. package/dist/auto-instrumentations/bundler/vite.d.ts +4 -4
  21. package/dist/auto-instrumentations/bundler/vite.mjs +5 -8
  22. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +1602 -728
  23. package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +20 -12
  24. package/dist/auto-instrumentations/bundler/webpack.cjs +1449 -799
  25. package/dist/auto-instrumentations/bundler/webpack.d.mts +4 -4
  26. package/dist/auto-instrumentations/bundler/webpack.d.ts +4 -4
  27. package/dist/auto-instrumentations/bundler/webpack.mjs +5 -4
  28. package/dist/auto-instrumentations/{chunk-GSZHTAQW.mjs → chunk-6E22MYSW.mjs} +194 -93
  29. package/dist/auto-instrumentations/{chunk-VT6DDNKM.mjs → chunk-AKKPLXTP.mjs} +631 -194
  30. package/dist/auto-instrumentations/chunk-NRE4QUQR.mjs +509 -0
  31. package/dist/auto-instrumentations/{chunk-BURMPO7L.mjs → chunk-V5LEODRX.mjs} +2 -6
  32. package/dist/auto-instrumentations/{chunk-M6DLIJ2Z.mjs → chunk-XYN63IG5.mjs} +124 -194
  33. package/dist/auto-instrumentations/{chunk-F43DNLPD.mjs → chunk-XZHHE4Y3.mjs} +646 -510
  34. package/dist/auto-instrumentations/hook.mjs +894 -657
  35. package/dist/auto-instrumentations/index.cjs +1125 -490
  36. package/dist/auto-instrumentations/index.d.mts +6 -2
  37. package/dist/auto-instrumentations/index.d.ts +6 -2
  38. package/dist/auto-instrumentations/index.mjs +6 -1
  39. package/dist/auto-instrumentations/loader/cjs-patch.cjs +492 -195
  40. package/dist/auto-instrumentations/loader/cjs-patch.d.mts +2 -2
  41. package/dist/auto-instrumentations/loader/cjs-patch.d.ts +2 -2
  42. package/dist/auto-instrumentations/loader/cjs-patch.mjs +3 -2
  43. package/dist/auto-instrumentations/loader/esm-hook.mjs +1 -1
  44. package/dist/auto-instrumentations/plugin-B-aZh7EP.d.ts +30 -0
  45. package/dist/auto-instrumentations/plugin-Bnj4E_6B.d.mts +30 -0
  46. package/dist/auto-instrumentations/{types-RNPaKi9o.d.mts → types-C1fVeiCp.d.mts} +1 -1
  47. package/dist/auto-instrumentations/{types-RNPaKi9o.d.ts → types-C1fVeiCp.d.ts} +1 -1
  48. package/dist/browser.d.mts +824 -197
  49. package/dist/browser.d.ts +824 -197
  50. package/dist/browser.js +3897 -1228
  51. package/dist/browser.mjs +3897 -1228
  52. package/dist/chunk-PN7EWK66.mjs +1784 -0
  53. package/dist/{chunk-SU6EHKJV.js → chunk-VRZZQPAA.js} +3289 -1577
  54. package/dist/chunk-VYNNEKSA.js +1784 -0
  55. package/dist/{chunk-XE5FS7QY.mjs → chunk-XIZOM2HO.mjs} +2470 -758
  56. package/dist/cli.js +3596 -1211
  57. package/dist/edge-light.d.mts +1 -1
  58. package/dist/edge-light.d.ts +1 -1
  59. package/dist/edge-light.js +3897 -1231
  60. package/dist/edge-light.mjs +3897 -1231
  61. package/dist/index.d.mts +824 -197
  62. package/dist/index.d.ts +824 -197
  63. package/dist/index.js +750 -445
  64. package/dist/index.mjs +334 -29
  65. package/dist/instrumentation/index.d.mts +135 -6
  66. package/dist/instrumentation/index.d.ts +135 -6
  67. package/dist/instrumentation/index.js +3696 -1257
  68. package/dist/instrumentation/index.mjs +3696 -1257
  69. package/dist/vitest-evals-reporter.js +16 -16
  70. package/dist/vitest-evals-reporter.mjs +2 -2
  71. package/dist/workerd.d.mts +1 -1
  72. package/dist/workerd.d.ts +1 -1
  73. package/dist/workerd.js +3897 -1231
  74. package/dist/workerd.mjs +3897 -1231
  75. package/licenses/node-diagnostics-channel/LICENSE +19 -0
  76. package/package.json +34 -35
  77. package/dist/auto-instrumentations/plugin-D0KHwSJv.d.mts +0 -44
  78. package/dist/auto-instrumentations/plugin-G6fgxk1b.d.ts +0 -44
  79. package/dist/chunk-7AUY2XWX.js +0 -1090
  80. package/dist/chunk-7F6GCRHH.mjs +0 -1090
@@ -1,4 +1,4 @@
1
- import { I as InstrumentationConfig } from '../types-RNPaKi9o.mjs';
1
+ import { I as InstrumentationConfig } from '../types-C1fVeiCp.mjs';
2
2
 
3
3
  /**
4
4
  * CJS module patcher for auto-instrumentation.
@@ -16,7 +16,7 @@ declare class ModulePatch {
16
16
  /**
17
17
  * Patches the Node.js module class method that is responsible for compiling code.
18
18
  * If a module is found that has an instrumentator, it will transform the code before compiling it
19
- * with tracing channel methods.
19
+ * with global hook calls.
20
20
  */
21
21
  patch(): void;
22
22
  /**
@@ -1,4 +1,4 @@
1
- import { I as InstrumentationConfig } from '../types-RNPaKi9o.js';
1
+ import { I as InstrumentationConfig } from '../types-C1fVeiCp.js';
2
2
 
3
3
  /**
4
4
  * CJS module patcher for auto-instrumentation.
@@ -16,7 +16,7 @@ declare class ModulePatch {
16
16
  /**
17
17
  * Patches the Node.js module class method that is responsible for compiling code.
18
18
  * If a module is found that has an instrumentator, it will transform the code before compiling it
19
- * with tracing channel methods.
19
+ * with global hook calls.
20
20
  */
21
21
  patch(): void;
22
22
  /**
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  applySpecialCasePatch,
3
3
  create
4
- } from "../chunk-M6DLIJ2Z.mjs";
4
+ } from "../chunk-XYN63IG5.mjs";
5
+ import "../chunk-NRE4QUQR.mjs";
5
6
  import {
6
7
  getPackageName,
7
8
  getPackageVersion
@@ -28,7 +29,7 @@ var ModulePatch = class {
28
29
  /**
29
30
  * Patches the Node.js module class method that is responsible for compiling code.
30
31
  * If a module is found that has an instrumentator, it will transform the code before compiling it
31
- * with tracing channel methods.
32
+ * with global hook calls.
32
33
  */
33
34
  patch() {
34
35
  const self = this;
@@ -4,7 +4,7 @@ import {
4
4
  getPackageName,
5
5
  getPackageVersion,
6
6
  isSpecialCaseTarget
7
- } from "../chunk-VT6DDNKM.mjs";
7
+ } from "../chunk-AKKPLXTP.mjs";
8
8
 
9
9
  // src/auto-instrumentations/loader/esm-hook.mts
10
10
  import { readFile } from "fs/promises";
@@ -0,0 +1,30 @@
1
+ import { I as InstrumentationConfig } from './types-C1fVeiCp.js';
2
+
3
+ interface BundlerPluginOptions {
4
+ /**
5
+ * Additional instrumentation configs to apply
6
+ */
7
+ instrumentations?: InstrumentationConfig[];
8
+ /**
9
+ * Whether the transformed source will run in a browser or edge-like
10
+ * environment.
11
+ *
12
+ * Global instrumentation hooks are runtime-independent. This option only
13
+ * prevents the Node-specific Mastra source patch from entering the bundle.
14
+ *
15
+ * @default false
16
+ */
17
+ browser?: boolean;
18
+ /**
19
+ * Marks transformed source as targeting a browser or edge-like environment.
20
+ *
21
+ * This retains the previous browser-target behavior of the option. Global
22
+ * instrumentation hooks are runtime-independent, so no diagnostics-channel
23
+ * compatibility shim is injected.
24
+ *
25
+ * @deprecated Use `browser` instead.
26
+ */
27
+ useDiagnosticChannelCompatShim?: boolean;
28
+ }
29
+
30
+ export type { BundlerPluginOptions as B };
@@ -0,0 +1,30 @@
1
+ import { I as InstrumentationConfig } from './types-C1fVeiCp.mjs';
2
+
3
+ interface BundlerPluginOptions {
4
+ /**
5
+ * Additional instrumentation configs to apply
6
+ */
7
+ instrumentations?: InstrumentationConfig[];
8
+ /**
9
+ * Whether the transformed source will run in a browser or edge-like
10
+ * environment.
11
+ *
12
+ * Global instrumentation hooks are runtime-independent. This option only
13
+ * prevents the Node-specific Mastra source patch from entering the bundle.
14
+ *
15
+ * @default false
16
+ */
17
+ browser?: boolean;
18
+ /**
19
+ * Marks transformed source as targeting a browser or edge-like environment.
20
+ *
21
+ * This retains the previous browser-target behavior of the option. Global
22
+ * instrumentation hooks are runtime-independent, so no diagnostics-channel
23
+ * compatibility shim is injected.
24
+ *
25
+ * @deprecated Use `browser` instead.
26
+ */
27
+ useDiagnosticChannelCompatShim?: boolean;
28
+ }
29
+
30
+ export type { BundlerPluginOptions as B };
@@ -32,7 +32,7 @@ type FunctionQuery = (FunctionQueryBase & {
32
32
  */
33
33
  interface InstrumentationConfig {
34
34
  /**
35
- * The name of the diagnostics channel to publish to.
35
+ * The name of the global instrumentation hook to invoke.
36
36
  */
37
37
  channelName: string;
38
38
  /**
@@ -32,7 +32,7 @@ type FunctionQuery = (FunctionQueryBase & {
32
32
  */
33
33
  interface InstrumentationConfig {
34
34
  /**
35
- * The name of the diagnostics channel to publish to.
35
+ * The name of the global instrumentation hook to invoke.
36
36
  */
37
37
  channelName: string;
38
38
  /**