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
package/NOTICE CHANGED
@@ -18,3 +18,9 @@ licenses/import-in-the-middle/NOTICE.
18
18
  This package also includes a modified fork of require-in-the-middle 8.0.1.
19
19
  require-in-the-middle is licensed under the MIT License.
20
20
  See licenses/require-in-the-middle/LICENSE.
21
+
22
+ The global instrumentation hook runtime is adapted from the Node.js
23
+ diagnostics_channel TracingChannel implementation.
24
+ Copyright Node.js contributors. All rights reserved.
25
+ It is licensed under the MIT License.
26
+ See licenses/node-diagnostics-channel/LICENSE.
@@ -4534,6 +4534,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4534
4534
  naming_model?: string | undefined;
4535
4535
  }>>;
4536
4536
  disable_reconciliation: z.ZodOptional<z.ZodBoolean>;
4537
+ reconcile_mode: z.ZodOptional<z.ZodEnum<["evolve", "names_only"]>>;
4537
4538
  distance_threshold: z.ZodOptional<z.ZodNumber>;
4538
4539
  btql_filter: z.ZodOptional<z.ZodString>;
4539
4540
  automation_btql_filter: z.ZodOptional<z.ZodString>;
@@ -4556,6 +4557,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4556
4557
  naming_model?: string | undefined;
4557
4558
  } | undefined;
4558
4559
  disable_reconciliation?: boolean | undefined;
4560
+ reconcile_mode?: "evolve" | "names_only" | undefined;
4559
4561
  distance_threshold?: number | undefined;
4560
4562
  automation_btql_filter?: string | undefined;
4561
4563
  }, {
@@ -4577,6 +4579,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4577
4579
  naming_model?: string | undefined;
4578
4580
  } | undefined;
4579
4581
  disable_reconciliation?: boolean | undefined;
4582
+ reconcile_mode?: "evolve" | "names_only" | undefined;
4580
4583
  distance_threshold?: number | undefined;
4581
4584
  automation_btql_filter?: string | undefined;
4582
4585
  }>;
@@ -4601,6 +4604,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4601
4604
  naming_model?: string | undefined;
4602
4605
  } | undefined;
4603
4606
  disable_reconciliation?: boolean | undefined;
4607
+ reconcile_mode?: "evolve" | "names_only" | undefined;
4604
4608
  distance_threshold?: number | undefined;
4605
4609
  automation_btql_filter?: string | undefined;
4606
4610
  };
@@ -4626,6 +4630,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4626
4630
  naming_model?: string | undefined;
4627
4631
  } | undefined;
4628
4632
  disable_reconciliation?: boolean | undefined;
4633
+ reconcile_mode?: "evolve" | "names_only" | undefined;
4629
4634
  distance_threshold?: number | undefined;
4630
4635
  automation_btql_filter?: string | undefined;
4631
4636
  };
@@ -4670,6 +4675,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4670
4675
  naming_model?: string | undefined;
4671
4676
  } | undefined;
4672
4677
  disable_reconciliation?: boolean | undefined;
4678
+ reconcile_mode?: "evolve" | "names_only" | undefined;
4673
4679
  distance_threshold?: number | undefined;
4674
4680
  automation_btql_filter?: string | undefined;
4675
4681
  };
@@ -4714,6 +4720,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4714
4720
  naming_model?: string | undefined;
4715
4721
  } | undefined;
4716
4722
  disable_reconciliation?: boolean | undefined;
4723
+ reconcile_mode?: "evolve" | "names_only" | undefined;
4717
4724
  distance_threshold?: number | undefined;
4718
4725
  automation_btql_filter?: string | undefined;
4719
4726
  };
@@ -4796,6 +4803,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4796
4803
  naming_model?: string | undefined;
4797
4804
  }>>;
4798
4805
  disable_reconciliation: z.ZodOptional<z.ZodBoolean>;
4806
+ reconcile_mode: z.ZodOptional<z.ZodEnum<["evolve", "names_only"]>>;
4799
4807
  distance_threshold: z.ZodOptional<z.ZodNumber>;
4800
4808
  btql_filter: z.ZodOptional<z.ZodString>;
4801
4809
  automation_btql_filter: z.ZodOptional<z.ZodString>;
@@ -4818,6 +4826,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4818
4826
  naming_model?: string | undefined;
4819
4827
  } | undefined;
4820
4828
  disable_reconciliation?: boolean | undefined;
4829
+ reconcile_mode?: "evolve" | "names_only" | undefined;
4821
4830
  distance_threshold?: number | undefined;
4822
4831
  automation_btql_filter?: string | undefined;
4823
4832
  }, {
@@ -4839,6 +4848,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
4839
4848
  naming_model?: string | undefined;
4840
4849
  } | undefined;
4841
4850
  disable_reconciliation?: boolean | undefined;
4851
+ reconcile_mode?: "evolve" | "names_only" | undefined;
4842
4852
  distance_threshold?: number | undefined;
4843
4853
  automation_btql_filter?: string | undefined;
4844
4854
  }>, z.ZodUnknown>]>;
@@ -5917,6 +5927,7 @@ declare const PromptData: z.ZodObject<{
5917
5927
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
5918
5928
  }, z.ZodTypeAny, "passthrough">>]>>;
5919
5929
  position: z.ZodOptional<z.ZodString>;
5930
+ endpoint_name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
5920
5931
  }, "strip", z.ZodTypeAny, {
5921
5932
  params?: z.objectOutputType<{
5922
5933
  use_cache: z.ZodOptional<z.ZodBoolean>;
@@ -6037,6 +6048,7 @@ declare const PromptData: z.ZodObject<{
6037
6048
  }, z.ZodTypeAny, "passthrough"> | undefined;
6038
6049
  model?: string | undefined;
6039
6050
  position?: string | undefined;
6051
+ endpoint_name?: string | null | undefined;
6040
6052
  }, {
6041
6053
  params?: z.objectInputType<{
6042
6054
  use_cache: z.ZodOptional<z.ZodBoolean>;
@@ -6157,6 +6169,7 @@ declare const PromptData: z.ZodObject<{
6157
6169
  }, z.ZodTypeAny, "passthrough"> | undefined;
6158
6170
  model?: string | undefined;
6159
6171
  position?: string | undefined;
6172
+ endpoint_name?: string | null | undefined;
6160
6173
  }>, z.ZodNull]>>;
6161
6174
  parser: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
6162
6175
  type: z.ZodLiteral<"llm_classifier">;
@@ -6180,6 +6193,31 @@ declare const PromptData: z.ZodObject<{
6180
6193
  allow_no_match?: boolean | undefined;
6181
6194
  allow_skip?: boolean | undefined;
6182
6195
  }>, z.ZodNull]>>;
6196
+ preprocessor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
6197
+ type: z.ZodLiteral<"function">;
6198
+ id: z.ZodString;
6199
+ version: z.ZodOptional<z.ZodString>;
6200
+ }, "strip", z.ZodTypeAny, {
6201
+ id: string;
6202
+ type: "function";
6203
+ version?: string | undefined;
6204
+ }, {
6205
+ id: string;
6206
+ type: "function";
6207
+ version?: string | undefined;
6208
+ }>, z.ZodObject<{
6209
+ type: z.ZodLiteral<"global">;
6210
+ name: z.ZodString;
6211
+ function_type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"preprocessor">>>;
6212
+ }, "strip", z.ZodTypeAny, {
6213
+ type: "global";
6214
+ name: string;
6215
+ function_type: "preprocessor";
6216
+ }, {
6217
+ type: "global";
6218
+ name: string;
6219
+ function_type?: "preprocessor" | undefined;
6220
+ }>, z.ZodNull]>>;
6183
6221
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
6184
6222
  type: z.ZodLiteral<"function">;
6185
6223
  id: z.ZodString;
@@ -6371,6 +6409,7 @@ declare const PromptData: z.ZodObject<{
6371
6409
  }, z.ZodTypeAny, "passthrough"> | undefined;
6372
6410
  model?: string | undefined;
6373
6411
  position?: string | undefined;
6412
+ endpoint_name?: string | null | undefined;
6374
6413
  } | null | undefined;
6375
6414
  prompt?: {
6376
6415
  type: "chat";
@@ -6502,6 +6541,15 @@ declare const PromptData: z.ZodObject<{
6502
6541
  name: string;
6503
6542
  function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
6504
6543
  })[] | null | undefined;
6544
+ preprocessor?: {
6545
+ id: string;
6546
+ type: "function";
6547
+ version?: string | undefined;
6548
+ } | {
6549
+ type: "global";
6550
+ name: string;
6551
+ function_type: "preprocessor";
6552
+ } | null | undefined;
6505
6553
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
6506
6554
  mcp?: Record<string, {
6507
6555
  id: string;
@@ -6635,6 +6683,7 @@ declare const PromptData: z.ZodObject<{
6635
6683
  }, z.ZodTypeAny, "passthrough"> | undefined;
6636
6684
  model?: string | undefined;
6637
6685
  position?: string | undefined;
6686
+ endpoint_name?: string | null | undefined;
6638
6687
  } | null | undefined;
6639
6688
  prompt?: {
6640
6689
  type: "chat";
@@ -6766,6 +6815,15 @@ declare const PromptData: z.ZodObject<{
6766
6815
  name: string;
6767
6816
  function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
6768
6817
  })[] | null | undefined;
6818
+ preprocessor?: {
6819
+ id: string;
6820
+ type: "function";
6821
+ version?: string | undefined;
6822
+ } | {
6823
+ type: "global";
6824
+ name: string;
6825
+ function_type?: "preprocessor" | undefined;
6826
+ } | null | undefined;
6769
6827
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
6770
6828
  mcp?: Record<string, {
6771
6829
  id: string;
@@ -7898,6 +7956,7 @@ declare const Prompt$1: z.ZodObject<{
7898
7956
  reasoning_budget: z.ZodOptional<z.ZodNumber>;
7899
7957
  }, z.ZodTypeAny, "passthrough">>]>>;
7900
7958
  position: z.ZodOptional<z.ZodString>;
7959
+ endpoint_name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
7901
7960
  }, "strip", z.ZodTypeAny, {
7902
7961
  params?: z.objectOutputType<{
7903
7962
  use_cache: z.ZodOptional<z.ZodBoolean>;
@@ -8018,6 +8077,7 @@ declare const Prompt$1: z.ZodObject<{
8018
8077
  }, z.ZodTypeAny, "passthrough"> | undefined;
8019
8078
  model?: string | undefined;
8020
8079
  position?: string | undefined;
8080
+ endpoint_name?: string | null | undefined;
8021
8081
  }, {
8022
8082
  params?: z.objectInputType<{
8023
8083
  use_cache: z.ZodOptional<z.ZodBoolean>;
@@ -8138,6 +8198,7 @@ declare const Prompt$1: z.ZodObject<{
8138
8198
  }, z.ZodTypeAny, "passthrough"> | undefined;
8139
8199
  model?: string | undefined;
8140
8200
  position?: string | undefined;
8201
+ endpoint_name?: string | null | undefined;
8141
8202
  }>, z.ZodNull]>>;
8142
8203
  parser: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
8143
8204
  type: z.ZodLiteral<"llm_classifier">;
@@ -8161,6 +8222,31 @@ declare const Prompt$1: z.ZodObject<{
8161
8222
  allow_no_match?: boolean | undefined;
8162
8223
  allow_skip?: boolean | undefined;
8163
8224
  }>, z.ZodNull]>>;
8225
+ preprocessor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
8226
+ type: z.ZodLiteral<"function">;
8227
+ id: z.ZodString;
8228
+ version: z.ZodOptional<z.ZodString>;
8229
+ }, "strip", z.ZodTypeAny, {
8230
+ id: string;
8231
+ type: "function";
8232
+ version?: string | undefined;
8233
+ }, {
8234
+ id: string;
8235
+ type: "function";
8236
+ version?: string | undefined;
8237
+ }>, z.ZodObject<{
8238
+ type: z.ZodLiteral<"global">;
8239
+ name: z.ZodString;
8240
+ function_type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"preprocessor">>>;
8241
+ }, "strip", z.ZodTypeAny, {
8242
+ type: "global";
8243
+ name: string;
8244
+ function_type: "preprocessor";
8245
+ }, {
8246
+ type: "global";
8247
+ name: string;
8248
+ function_type?: "preprocessor" | undefined;
8249
+ }>, z.ZodNull]>>;
8164
8250
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
8165
8251
  type: z.ZodLiteral<"function">;
8166
8252
  id: z.ZodString;
@@ -8352,6 +8438,7 @@ declare const Prompt$1: z.ZodObject<{
8352
8438
  }, z.ZodTypeAny, "passthrough"> | undefined;
8353
8439
  model?: string | undefined;
8354
8440
  position?: string | undefined;
8441
+ endpoint_name?: string | null | undefined;
8355
8442
  } | null | undefined;
8356
8443
  prompt?: {
8357
8444
  type: "chat";
@@ -8483,6 +8570,15 @@ declare const Prompt$1: z.ZodObject<{
8483
8570
  name: string;
8484
8571
  function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
8485
8572
  })[] | null | undefined;
8573
+ preprocessor?: {
8574
+ id: string;
8575
+ type: "function";
8576
+ version?: string | undefined;
8577
+ } | {
8578
+ type: "global";
8579
+ name: string;
8580
+ function_type: "preprocessor";
8581
+ } | null | undefined;
8486
8582
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
8487
8583
  mcp?: Record<string, {
8488
8584
  id: string;
@@ -8616,6 +8712,7 @@ declare const Prompt$1: z.ZodObject<{
8616
8712
  }, z.ZodTypeAny, "passthrough"> | undefined;
8617
8713
  model?: string | undefined;
8618
8714
  position?: string | undefined;
8715
+ endpoint_name?: string | null | undefined;
8619
8716
  } | null | undefined;
8620
8717
  prompt?: {
8621
8718
  type: "chat";
@@ -8747,6 +8844,15 @@ declare const Prompt$1: z.ZodObject<{
8747
8844
  name: string;
8748
8845
  function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
8749
8846
  })[] | null | undefined;
8847
+ preprocessor?: {
8848
+ id: string;
8849
+ type: "function";
8850
+ version?: string | undefined;
8851
+ } | {
8852
+ type: "global";
8853
+ name: string;
8854
+ function_type?: "preprocessor" | undefined;
8855
+ } | null | undefined;
8750
8856
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
8751
8857
  mcp?: Record<string, {
8752
8858
  id: string;
@@ -8896,6 +9002,7 @@ declare const Prompt$1: z.ZodObject<{
8896
9002
  }, z.ZodTypeAny, "passthrough"> | undefined;
8897
9003
  model?: string | undefined;
8898
9004
  position?: string | undefined;
9005
+ endpoint_name?: string | null | undefined;
8899
9006
  } | null | undefined;
8900
9007
  prompt?: {
8901
9008
  type: "chat";
@@ -9027,6 +9134,15 @@ declare const Prompt$1: z.ZodObject<{
9027
9134
  name: string;
9028
9135
  function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
9029
9136
  })[] | null | undefined;
9137
+ preprocessor?: {
9138
+ id: string;
9139
+ type: "function";
9140
+ version?: string | undefined;
9141
+ } | {
9142
+ type: "global";
9143
+ name: string;
9144
+ function_type: "preprocessor";
9145
+ } | null | undefined;
9030
9146
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
9031
9147
  mcp?: Record<string, {
9032
9148
  id: string;
@@ -9174,6 +9290,7 @@ declare const Prompt$1: z.ZodObject<{
9174
9290
  }, z.ZodTypeAny, "passthrough"> | undefined;
9175
9291
  model?: string | undefined;
9176
9292
  position?: string | undefined;
9293
+ endpoint_name?: string | null | undefined;
9177
9294
  } | null | undefined;
9178
9295
  prompt?: {
9179
9296
  type: "chat";
@@ -9305,6 +9422,15 @@ declare const Prompt$1: z.ZodObject<{
9305
9422
  name: string;
9306
9423
  function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
9307
9424
  })[] | null | undefined;
9425
+ preprocessor?: {
9426
+ id: string;
9427
+ type: "function";
9428
+ version?: string | undefined;
9429
+ } | {
9430
+ type: "global";
9431
+ name: string;
9432
+ function_type?: "preprocessor" | undefined;
9433
+ } | null | undefined;
9308
9434
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
9309
9435
  mcp?: Record<string, {
9310
9436
  id: string;
@@ -9532,12 +9658,14 @@ declare class LazyValue<T> {
9532
9658
 
9533
9659
  type TemplateFormat = "mustache" | "nunjucks" | "none";
9534
9660
 
9535
- interface IsoAsyncLocalStorage<T> {
9661
+ interface GlobalHookAsyncLocalStorage<T> {
9536
9662
  enterWith(store: T): void;
9537
9663
  run<R>(store: T | undefined, callback: () => R): R;
9538
9664
  getStore(): T | undefined;
9539
9665
  }
9540
9666
 
9667
+ type IsoAsyncLocalStorage<T> = GlobalHookAsyncLocalStorage<T>;
9668
+
9541
9669
  /**
9542
9670
  * Options for configuring an LRUCache instance.
9543
9671
  */
@@ -12012,7 +12140,7 @@ declare abstract class ContextManager {
12012
12140
  abstract runInContext<R>(span: Span, callback: () => R): R;
12013
12141
  abstract getCurrentSpan(): Span | undefined;
12014
12142
  /**
12015
- * Returns the value to store in the ALS bound to a TracingChannel's start event.
12143
+ * Returns the value to store in the ALS bound to a global hook's start event.
12016
12144
  * In default mode this is the Span itself; in OTEL mode it is the OTEL Context
12017
12145
  * containing the span so that OTEL's own ALS stores a proper Context object.
12018
12146
  */
@@ -12139,7 +12267,12 @@ declare class BraintrustState {
12139
12267
  private _contextManager;
12140
12268
  private _otelFlushCallback;
12141
12269
  spanOriginEnvironment: SpanOriginEnvironment | undefined;
12270
+ private traceContextSigningSecret;
12142
12271
  constructor(loginParams: LoginOptions);
12272
+ /** @internal */
12273
+ _internalSetTraceContextSigningSecret(secret: string | undefined): void;
12274
+ /** @internal */
12275
+ _internalGetTraceContextSigningSecret(): string | undefined;
12143
12276
  resetLoginInfo(): void;
12144
12277
  resetIdGenState(): void;
12145
12278
  [RESET_CONTEXT_MANAGER_STATE](): void;