braintrust 3.30.0 → 3.31.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.
@@ -40,7 +40,7 @@ import {
40
40
  smithyCoreChannels,
41
41
  strandsAgentSDKChannels,
42
42
  voyageAIChannels
43
- } from "./chunk-N3JKQ3D3.mjs";
43
+ } from "./chunk-CE3BLB2L.mjs";
44
44
 
45
45
  // src/node/apply-auto-instrumentation.ts
46
46
  import { register } from "node:module";
@@ -5361,7 +5361,14 @@ function wrapNextjsConfigWithBraintrust(nextConfig) {
5361
5361
  }
5362
5362
  function createConfigObject(nextConfig) {
5363
5363
  const config = { ...nextConfig ?? {} };
5364
- const activeBundler = detectBundler();
5364
+ const nextMajorVersion = getNextMajorVersion();
5365
+ const activeBundler = detectBundler(nextMajorVersion);
5366
+ if (nextMajorVersion !== void 0 && nextMajorVersion < 15) {
5367
+ config.experimental = {
5368
+ ...config.experimental,
5369
+ instrumentationHook: true
5370
+ };
5371
+ }
5365
5372
  if (activeBundler === "turbopack") {
5366
5373
  if (config.turbopack || !config.experimental?.turbo) {
5367
5374
  return {
@@ -5382,7 +5389,7 @@ function createConfigObject(nextConfig) {
5382
5389
  webpack: wrapWebpackConfig(config.webpack)
5383
5390
  };
5384
5391
  }
5385
- function detectBundler() {
5392
+ function detectBundler(nextMajorVersion) {
5386
5393
  if (process.argv.includes("--webpack")) {
5387
5394
  return "webpack";
5388
5395
  }
@@ -5390,7 +5397,6 @@ function detectBundler() {
5390
5397
  if (turbopackEnv && turbopackEnv !== "0" && turbopackEnv !== "false" || process.argv.includes("--turbo") || process.argv.includes("--turbopack")) {
5391
5398
  return "turbopack";
5392
5399
  }
5393
- const nextMajorVersion = getNextMajorVersion();
5394
5400
  if (nextMajorVersion !== void 0 && nextMajorVersion >= 16) {
5395
5401
  return "turbopack";
5396
5402
  }
@@ -29,7 +29,14 @@ function wrapNextjsConfigWithBraintrust(nextConfig) {
29
29
  }
30
30
  function createConfigObject(nextConfig) {
31
31
  const config = { ...nextConfig ?? {} };
32
- const activeBundler = detectBundler();
32
+ const nextMajorVersion = getNextMajorVersion();
33
+ const activeBundler = detectBundler(nextMajorVersion);
34
+ if (nextMajorVersion !== void 0 && nextMajorVersion < 15) {
35
+ config.experimental = {
36
+ ...config.experimental,
37
+ instrumentationHook: true
38
+ };
39
+ }
33
40
  if (activeBundler === "turbopack") {
34
41
  if (config.turbopack || !config.experimental?.turbo) {
35
42
  return {
@@ -50,7 +57,7 @@ function createConfigObject(nextConfig) {
50
57
  webpack: wrapWebpackConfig(config.webpack)
51
58
  };
52
59
  }
53
- function detectBundler() {
60
+ function detectBundler(nextMajorVersion) {
54
61
  if (process.argv.includes("--webpack")) {
55
62
  return "webpack";
56
63
  }
@@ -58,7 +65,6 @@ function detectBundler() {
58
65
  if (turbopackEnv && turbopackEnv !== "0" && turbopackEnv !== "false" || process.argv.includes("--turbo") || process.argv.includes("--turbopack")) {
59
66
  return "turbopack";
60
67
  }
61
- const nextMajorVersion = getNextMajorVersion();
62
68
  if (nextMajorVersion !== void 0 && nextMajorVersion >= 16) {
63
69
  return "turbopack";
64
70
  }
@@ -3120,6 +3120,7 @@ var ProjectSettings = z6.union([
3120
3120
  ]),
3121
3121
  disable_realtime_queries: z6.union([z6.boolean(), z6.null()]),
3122
3122
  monitor_charts_use_metrics_start: z6.union([z6.boolean(), z6.null()]),
3123
+ blind_reviews: z6.union([z6.boolean(), z6.null()]),
3123
3124
  default_preprocessor: NullableSavedFunctionId
3124
3125
  }).partial(),
3125
3126
  z6.null()
@@ -3181,6 +3182,7 @@ var WindowedAutomationConfig = z6.object({
3181
3182
  auto_approve_tools: z6.array(z6.string().min(1)).optional().default([]),
3182
3183
  harness: z6.enum(["native", "codex", "claude-code"]).optional(),
3183
3184
  model: z6.string().min(1).optional(),
3185
+ endpoint_name: z6.string().min(1).optional(),
3184
3186
  reasoning_effort: z6.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional()
3185
3187
  }).optional(),
3186
3188
  actions: z6.array(
@@ -4974,7 +4976,7 @@ var INSTRUMENTATION_NAMES = {
4974
4976
  var INTERNAL_SPAN_INSTRUMENTATION_NAME = /* @__PURE__ */ Symbol.for(
4975
4977
  "braintrust.spanInstrumentationName"
4976
4978
  );
4977
- var SDK_VERSION = true ? "3.30.0" : "0.0.0";
4979
+ var SDK_VERSION = true ? "3.31.0" : "0.0.0";
4978
4980
  function withSpanInstrumentationName(args, instrumentationName) {
4979
4981
  return {
4980
4982
  ...args,