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.
- package/dev/dist/index.d.mts +4 -1
- package/dev/dist/index.d.ts +4 -1
- package/dev/dist/index.js +28 -7
- package/dev/dist/index.mjs +28 -7
- package/dist/apply-auto-instrumentation.js +216 -216
- package/dist/apply-auto-instrumentation.mjs +1 -1
- package/dist/auto-instrumentations/bundler/next.cjs +9 -3
- package/dist/auto-instrumentations/bundler/next.mjs +9 -3
- package/dist/auto-instrumentations/hook.mjs +3 -1
- package/dist/browser.d.mts +481 -478
- package/dist/browser.d.ts +481 -478
- package/dist/browser.js +30 -9
- package/dist/browser.mjs +30 -9
- package/dist/{chunk-2XDW3UCG.js → chunk-4AQGZS6X.js} +1 -1
- package/dist/{chunk-BU6SM54N.mjs → chunk-AJT4FR25.mjs} +17 -6
- package/dist/{chunk-N3JKQ3D3.mjs → chunk-CE3BLB2L.mjs} +1 -1
- package/dist/{chunk-TWCDSYJN.js → chunk-V32LW47Z.js} +535 -524
- package/dist/cli.js +29 -8
- package/dist/edge-light.js +30 -9
- package/dist/edge-light.mjs +30 -9
- package/dist/index.d.mts +481 -478
- package/dist/index.d.ts +481 -478
- package/dist/index.js +460 -450
- package/dist/index.mjs +15 -5
- package/dist/instrumentation/index.js +17 -6
- package/dist/instrumentation/index.mjs +17 -6
- package/dist/vitest-evals-reporter.js +16 -16
- package/dist/vitest-evals-reporter.mjs +2 -2
- package/dist/workerd.js +30 -9
- package/dist/workerd.mjs +30 -9
- package/package.json +1 -1
|
@@ -5361,7 +5361,14 @@ function wrapNextjsConfigWithBraintrust(nextConfig) {
|
|
|
5361
5361
|
}
|
|
5362
5362
|
function createConfigObject(nextConfig) {
|
|
5363
5363
|
const config = { ...nextConfig ?? {} };
|
|
5364
|
-
const
|
|
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
|
|
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.
|
|
4979
|
+
var SDK_VERSION = true ? "3.31.0" : "0.0.0";
|
|
4978
4980
|
function withSpanInstrumentationName(args, instrumentationName) {
|
|
4979
4981
|
return {
|
|
4980
4982
|
...args,
|