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.
- package/NOTICE +6 -0
- package/dev/dist/index.d.mts +135 -2
- package/dev/dist/index.d.ts +135 -2
- package/dev/dist/index.js +4426 -2040
- package/dev/dist/index.mjs +3594 -1208
- package/dist/apply-auto-instrumentation.js +445 -403
- package/dist/apply-auto-instrumentation.mjs +249 -207
- package/dist/auto-instrumentations/bundler/esbuild.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/esbuild.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/esbuild.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/esbuild.mjs +5 -8
- package/dist/auto-instrumentations/bundler/next.cjs +1448 -818
- package/dist/auto-instrumentations/bundler/next.mjs +6 -29
- package/dist/auto-instrumentations/bundler/rollup.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/rollup.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/rollup.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/rollup.mjs +5 -8
- package/dist/auto-instrumentations/bundler/vite.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/vite.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/vite.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/vite.mjs +5 -8
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +1602 -728
- package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +20 -12
- package/dist/auto-instrumentations/bundler/webpack.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/webpack.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/webpack.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/webpack.mjs +5 -4
- package/dist/auto-instrumentations/{chunk-GSZHTAQW.mjs → chunk-6E22MYSW.mjs} +194 -93
- package/dist/auto-instrumentations/{chunk-VT6DDNKM.mjs → chunk-AKKPLXTP.mjs} +631 -194
- package/dist/auto-instrumentations/chunk-NRE4QUQR.mjs +509 -0
- package/dist/auto-instrumentations/{chunk-BURMPO7L.mjs → chunk-V5LEODRX.mjs} +2 -6
- package/dist/auto-instrumentations/{chunk-M6DLIJ2Z.mjs → chunk-XYN63IG5.mjs} +124 -194
- package/dist/auto-instrumentations/{chunk-F43DNLPD.mjs → chunk-XZHHE4Y3.mjs} +646 -510
- package/dist/auto-instrumentations/hook.mjs +894 -657
- package/dist/auto-instrumentations/index.cjs +1125 -490
- package/dist/auto-instrumentations/index.d.mts +6 -2
- package/dist/auto-instrumentations/index.d.ts +6 -2
- package/dist/auto-instrumentations/index.mjs +6 -1
- package/dist/auto-instrumentations/loader/cjs-patch.cjs +492 -195
- package/dist/auto-instrumentations/loader/cjs-patch.d.mts +2 -2
- package/dist/auto-instrumentations/loader/cjs-patch.d.ts +2 -2
- package/dist/auto-instrumentations/loader/cjs-patch.mjs +3 -2
- package/dist/auto-instrumentations/loader/esm-hook.mjs +1 -1
- package/dist/auto-instrumentations/plugin-B-aZh7EP.d.ts +30 -0
- package/dist/auto-instrumentations/plugin-Bnj4E_6B.d.mts +30 -0
- package/dist/auto-instrumentations/{types-RNPaKi9o.d.mts → types-C1fVeiCp.d.mts} +1 -1
- package/dist/auto-instrumentations/{types-RNPaKi9o.d.ts → types-C1fVeiCp.d.ts} +1 -1
- package/dist/browser.d.mts +824 -197
- package/dist/browser.d.ts +824 -197
- package/dist/browser.js +3897 -1228
- package/dist/browser.mjs +3897 -1228
- package/dist/chunk-PN7EWK66.mjs +1784 -0
- package/dist/{chunk-SU6EHKJV.js → chunk-VRZZQPAA.js} +3289 -1577
- package/dist/chunk-VYNNEKSA.js +1784 -0
- package/dist/{chunk-XE5FS7QY.mjs → chunk-XIZOM2HO.mjs} +2470 -758
- package/dist/cli.js +3596 -1211
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +3897 -1231
- package/dist/edge-light.mjs +3897 -1231
- package/dist/index.d.mts +824 -197
- package/dist/index.d.ts +824 -197
- package/dist/index.js +750 -445
- package/dist/index.mjs +334 -29
- package/dist/instrumentation/index.d.mts +135 -6
- package/dist/instrumentation/index.d.ts +135 -6
- package/dist/instrumentation/index.js +3696 -1257
- package/dist/instrumentation/index.mjs +3696 -1257
- package/dist/vitest-evals-reporter.js +16 -16
- package/dist/vitest-evals-reporter.mjs +2 -2
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +3897 -1231
- package/dist/workerd.mjs +3897 -1231
- package/licenses/node-diagnostics-channel/LICENSE +19 -0
- package/package.json +34 -35
- package/dist/auto-instrumentations/plugin-D0KHwSJv.d.mts +0 -44
- package/dist/auto-instrumentations/plugin-G6fgxk1b.d.ts +0 -44
- package/dist/chunk-7AUY2XWX.js +0 -1090
- package/dist/chunk-7F6GCRHH.mjs +0 -1090
|
@@ -3044,6 +3044,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3044
3044
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
3045
3045
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
3046
3046
|
position: z.ZodOptional<z.ZodString>;
|
|
3047
|
+
endpoint_name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
3047
3048
|
}, "strip", z.ZodTypeAny, {
|
|
3048
3049
|
params?: z.objectOutputType<{
|
|
3049
3050
|
use_cache: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3164,6 +3165,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3164
3165
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3165
3166
|
model?: string | undefined;
|
|
3166
3167
|
position?: string | undefined;
|
|
3168
|
+
endpoint_name?: string | null | undefined;
|
|
3167
3169
|
}, {
|
|
3168
3170
|
params?: z.objectInputType<{
|
|
3169
3171
|
use_cache: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3284,6 +3286,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3284
3286
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3285
3287
|
model?: string | undefined;
|
|
3286
3288
|
position?: string | undefined;
|
|
3289
|
+
endpoint_name?: string | null | undefined;
|
|
3287
3290
|
}>, z.ZodNull]>>;
|
|
3288
3291
|
parser: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
3289
3292
|
type: z.ZodLiteral<"llm_classifier">;
|
|
@@ -3307,6 +3310,31 @@ declare const PromptData: z.ZodObject<{
|
|
|
3307
3310
|
allow_no_match?: boolean | undefined;
|
|
3308
3311
|
allow_skip?: boolean | undefined;
|
|
3309
3312
|
}>, z.ZodNull]>>;
|
|
3313
|
+
preprocessor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
3314
|
+
type: z.ZodLiteral<"function">;
|
|
3315
|
+
id: z.ZodString;
|
|
3316
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3317
|
+
}, "strip", z.ZodTypeAny, {
|
|
3318
|
+
type: "function";
|
|
3319
|
+
id: string;
|
|
3320
|
+
version?: string | undefined;
|
|
3321
|
+
}, {
|
|
3322
|
+
type: "function";
|
|
3323
|
+
id: string;
|
|
3324
|
+
version?: string | undefined;
|
|
3325
|
+
}>, z.ZodObject<{
|
|
3326
|
+
type: z.ZodLiteral<"global">;
|
|
3327
|
+
name: z.ZodString;
|
|
3328
|
+
function_type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"preprocessor">>>;
|
|
3329
|
+
}, "strip", z.ZodTypeAny, {
|
|
3330
|
+
type: "global";
|
|
3331
|
+
name: string;
|
|
3332
|
+
function_type: "preprocessor";
|
|
3333
|
+
}, {
|
|
3334
|
+
type: "global";
|
|
3335
|
+
name: string;
|
|
3336
|
+
function_type?: "preprocessor" | undefined;
|
|
3337
|
+
}>, z.ZodNull]>>;
|
|
3310
3338
|
tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
3311
3339
|
type: z.ZodLiteral<"function">;
|
|
3312
3340
|
id: z.ZodString;
|
|
@@ -3498,6 +3526,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3498
3526
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3499
3527
|
model?: string | undefined;
|
|
3500
3528
|
position?: string | undefined;
|
|
3529
|
+
endpoint_name?: string | null | undefined;
|
|
3501
3530
|
} | null | undefined;
|
|
3502
3531
|
prompt?: {
|
|
3503
3532
|
type: "chat";
|
|
@@ -3607,6 +3636,15 @@ declare const PromptData: z.ZodObject<{
|
|
|
3607
3636
|
type: "completion";
|
|
3608
3637
|
content: string;
|
|
3609
3638
|
} | null | undefined;
|
|
3639
|
+
preprocessor?: {
|
|
3640
|
+
type: "function";
|
|
3641
|
+
id: string;
|
|
3642
|
+
version?: string | undefined;
|
|
3643
|
+
} | {
|
|
3644
|
+
type: "global";
|
|
3645
|
+
name: string;
|
|
3646
|
+
function_type: "preprocessor";
|
|
3647
|
+
} | null | undefined;
|
|
3610
3648
|
origin?: {
|
|
3611
3649
|
project_id?: string | undefined;
|
|
3612
3650
|
prompt_id?: string | undefined;
|
|
@@ -3762,6 +3800,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3762
3800
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3763
3801
|
model?: string | undefined;
|
|
3764
3802
|
position?: string | undefined;
|
|
3803
|
+
endpoint_name?: string | null | undefined;
|
|
3765
3804
|
} | null | undefined;
|
|
3766
3805
|
prompt?: {
|
|
3767
3806
|
type: "chat";
|
|
@@ -3871,6 +3910,15 @@ declare const PromptData: z.ZodObject<{
|
|
|
3871
3910
|
type: "completion";
|
|
3872
3911
|
content: string;
|
|
3873
3912
|
} | null | undefined;
|
|
3913
|
+
preprocessor?: {
|
|
3914
|
+
type: "function";
|
|
3915
|
+
id: string;
|
|
3916
|
+
version?: string | undefined;
|
|
3917
|
+
} | {
|
|
3918
|
+
type: "global";
|
|
3919
|
+
name: string;
|
|
3920
|
+
function_type?: "preprocessor" | undefined;
|
|
3921
|
+
} | null | undefined;
|
|
3874
3922
|
origin?: {
|
|
3875
3923
|
project_id?: string | undefined;
|
|
3876
3924
|
prompt_id?: string | undefined;
|
|
@@ -5023,6 +5071,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5023
5071
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
5024
5072
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
5025
5073
|
position: z.ZodOptional<z.ZodString>;
|
|
5074
|
+
endpoint_name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
5026
5075
|
}, "strip", z.ZodTypeAny, {
|
|
5027
5076
|
params?: z.objectOutputType<{
|
|
5028
5077
|
use_cache: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5143,6 +5192,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5143
5192
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5144
5193
|
model?: string | undefined;
|
|
5145
5194
|
position?: string | undefined;
|
|
5195
|
+
endpoint_name?: string | null | undefined;
|
|
5146
5196
|
}, {
|
|
5147
5197
|
params?: z.objectInputType<{
|
|
5148
5198
|
use_cache: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5263,6 +5313,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5263
5313
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5264
5314
|
model?: string | undefined;
|
|
5265
5315
|
position?: string | undefined;
|
|
5316
|
+
endpoint_name?: string | null | undefined;
|
|
5266
5317
|
}>, z.ZodNull]>>;
|
|
5267
5318
|
parser: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
5268
5319
|
type: z.ZodLiteral<"llm_classifier">;
|
|
@@ -5286,6 +5337,31 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5286
5337
|
allow_no_match?: boolean | undefined;
|
|
5287
5338
|
allow_skip?: boolean | undefined;
|
|
5288
5339
|
}>, z.ZodNull]>>;
|
|
5340
|
+
preprocessor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
5341
|
+
type: z.ZodLiteral<"function">;
|
|
5342
|
+
id: z.ZodString;
|
|
5343
|
+
version: z.ZodOptional<z.ZodString>;
|
|
5344
|
+
}, "strip", z.ZodTypeAny, {
|
|
5345
|
+
type: "function";
|
|
5346
|
+
id: string;
|
|
5347
|
+
version?: string | undefined;
|
|
5348
|
+
}, {
|
|
5349
|
+
type: "function";
|
|
5350
|
+
id: string;
|
|
5351
|
+
version?: string | undefined;
|
|
5352
|
+
}>, z.ZodObject<{
|
|
5353
|
+
type: z.ZodLiteral<"global">;
|
|
5354
|
+
name: z.ZodString;
|
|
5355
|
+
function_type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"preprocessor">>>;
|
|
5356
|
+
}, "strip", z.ZodTypeAny, {
|
|
5357
|
+
type: "global";
|
|
5358
|
+
name: string;
|
|
5359
|
+
function_type: "preprocessor";
|
|
5360
|
+
}, {
|
|
5361
|
+
type: "global";
|
|
5362
|
+
name: string;
|
|
5363
|
+
function_type?: "preprocessor" | undefined;
|
|
5364
|
+
}>, z.ZodNull]>>;
|
|
5289
5365
|
tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
5290
5366
|
type: z.ZodLiteral<"function">;
|
|
5291
5367
|
id: z.ZodString;
|
|
@@ -5477,6 +5553,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5477
5553
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5478
5554
|
model?: string | undefined;
|
|
5479
5555
|
position?: string | undefined;
|
|
5556
|
+
endpoint_name?: string | null | undefined;
|
|
5480
5557
|
} | null | undefined;
|
|
5481
5558
|
prompt?: {
|
|
5482
5559
|
type: "chat";
|
|
@@ -5586,6 +5663,15 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5586
5663
|
type: "completion";
|
|
5587
5664
|
content: string;
|
|
5588
5665
|
} | null | undefined;
|
|
5666
|
+
preprocessor?: {
|
|
5667
|
+
type: "function";
|
|
5668
|
+
id: string;
|
|
5669
|
+
version?: string | undefined;
|
|
5670
|
+
} | {
|
|
5671
|
+
type: "global";
|
|
5672
|
+
name: string;
|
|
5673
|
+
function_type: "preprocessor";
|
|
5674
|
+
} | null | undefined;
|
|
5589
5675
|
origin?: {
|
|
5590
5676
|
project_id?: string | undefined;
|
|
5591
5677
|
prompt_id?: string | undefined;
|
|
@@ -5741,6 +5827,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5741
5827
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5742
5828
|
model?: string | undefined;
|
|
5743
5829
|
position?: string | undefined;
|
|
5830
|
+
endpoint_name?: string | null | undefined;
|
|
5744
5831
|
} | null | undefined;
|
|
5745
5832
|
prompt?: {
|
|
5746
5833
|
type: "chat";
|
|
@@ -5850,6 +5937,15 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5850
5937
|
type: "completion";
|
|
5851
5938
|
content: string;
|
|
5852
5939
|
} | null | undefined;
|
|
5940
|
+
preprocessor?: {
|
|
5941
|
+
type: "function";
|
|
5942
|
+
id: string;
|
|
5943
|
+
version?: string | undefined;
|
|
5944
|
+
} | {
|
|
5945
|
+
type: "global";
|
|
5946
|
+
name: string;
|
|
5947
|
+
function_type?: "preprocessor" | undefined;
|
|
5948
|
+
} | null | undefined;
|
|
5853
5949
|
origin?: {
|
|
5854
5950
|
project_id?: string | undefined;
|
|
5855
5951
|
prompt_id?: string | undefined;
|
|
@@ -6022,6 +6118,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
6022
6118
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
6023
6119
|
model?: string | undefined;
|
|
6024
6120
|
position?: string | undefined;
|
|
6121
|
+
endpoint_name?: string | null | undefined;
|
|
6025
6122
|
} | null | undefined;
|
|
6026
6123
|
prompt?: {
|
|
6027
6124
|
type: "chat";
|
|
@@ -6131,6 +6228,15 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
6131
6228
|
type: "completion";
|
|
6132
6229
|
content: string;
|
|
6133
6230
|
} | null | undefined;
|
|
6231
|
+
preprocessor?: {
|
|
6232
|
+
type: "function";
|
|
6233
|
+
id: string;
|
|
6234
|
+
version?: string | undefined;
|
|
6235
|
+
} | {
|
|
6236
|
+
type: "global";
|
|
6237
|
+
name: string;
|
|
6238
|
+
function_type: "preprocessor";
|
|
6239
|
+
} | null | undefined;
|
|
6134
6240
|
origin?: {
|
|
6135
6241
|
project_id?: string | undefined;
|
|
6136
6242
|
prompt_id?: string | undefined;
|
|
@@ -6300,6 +6406,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
6300
6406
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
6301
6407
|
model?: string | undefined;
|
|
6302
6408
|
position?: string | undefined;
|
|
6409
|
+
endpoint_name?: string | null | undefined;
|
|
6303
6410
|
} | null | undefined;
|
|
6304
6411
|
prompt?: {
|
|
6305
6412
|
type: "chat";
|
|
@@ -6409,6 +6516,15 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
6409
6516
|
type: "completion";
|
|
6410
6517
|
content: string;
|
|
6411
6518
|
} | null | undefined;
|
|
6519
|
+
preprocessor?: {
|
|
6520
|
+
type: "function";
|
|
6521
|
+
id: string;
|
|
6522
|
+
version?: string | undefined;
|
|
6523
|
+
} | {
|
|
6524
|
+
type: "global";
|
|
6525
|
+
name: string;
|
|
6526
|
+
function_type?: "preprocessor" | undefined;
|
|
6527
|
+
} | null | undefined;
|
|
6412
6528
|
origin?: {
|
|
6413
6529
|
project_id?: string | undefined;
|
|
6414
6530
|
prompt_id?: string | undefined;
|
|
@@ -6491,12 +6607,12 @@ declare const PromptSessionEvent: z.ZodObject<{
|
|
|
6491
6607
|
}>;
|
|
6492
6608
|
type PromptSessionEventType = z.infer<typeof PromptSessionEvent>;
|
|
6493
6609
|
|
|
6494
|
-
interface
|
|
6610
|
+
interface GlobalHookAsyncLocalStorage<T> {
|
|
6495
6611
|
enterWith(store: T): void;
|
|
6496
6612
|
run<R>(store: T | undefined, callback: () => R): R;
|
|
6497
6613
|
getStore(): T | undefined;
|
|
6498
6614
|
}
|
|
6499
|
-
interface
|
|
6615
|
+
interface GlobalHookHandlers<M = any> {
|
|
6500
6616
|
start?: (context: M, name: string) => void;
|
|
6501
6617
|
end?: (context: M, name: string) => void;
|
|
6502
6618
|
asyncStart?: (context: M, name: string) => void;
|
|
@@ -6504,10 +6620,13 @@ interface IsoChannelHandlers<M = any> {
|
|
|
6504
6620
|
error?: (context: M, name: string) => void;
|
|
6505
6621
|
}
|
|
6506
6622
|
|
|
6623
|
+
type IsoAsyncLocalStorage<T> = GlobalHookAsyncLocalStorage<T>;
|
|
6624
|
+
type IsoChannelHandlers<M = any> = GlobalHookHandlers<M>;
|
|
6625
|
+
|
|
6507
6626
|
/**
|
|
6508
6627
|
* Base class for creating instrumentation plugins.
|
|
6509
6628
|
*
|
|
6510
|
-
* Plugins subscribe to
|
|
6629
|
+
* Plugins subscribe to global instrumentation hook events and convert them
|
|
6511
6630
|
* into spans, logs, or other observability data.
|
|
6512
6631
|
*/
|
|
6513
6632
|
declare abstract class BasePlugin {
|
|
@@ -6593,7 +6712,7 @@ declare abstract class BasePlugin {
|
|
|
6593
6712
|
}
|
|
6594
6713
|
|
|
6595
6714
|
/**
|
|
6596
|
-
* Utilities for
|
|
6715
|
+
* Utilities for instrumentation hook naming and management.
|
|
6597
6716
|
*/
|
|
6598
6717
|
/**
|
|
6599
6718
|
* Channel naming convention: braintrust:{component}:{operation}
|
|
@@ -6692,7 +6811,7 @@ interface AsyncStartEvent<TInput = unknown> extends StartEvent<TInput> {
|
|
|
6692
6811
|
interface AsyncEndEvent<TResult = unknown> extends EndEvent<TResult> {
|
|
6693
6812
|
}
|
|
6694
6813
|
/**
|
|
6695
|
-
* Subscription handlers for a
|
|
6814
|
+
* Subscription handlers for a tracing-compatible global hook.
|
|
6696
6815
|
*
|
|
6697
6816
|
* Common usage pattern:
|
|
6698
6817
|
* - Use start to create spans and extract input
|
|
@@ -6737,6 +6856,7 @@ interface InstrumentationIntegrationsConfig {
|
|
|
6737
6856
|
googleADK?: boolean;
|
|
6738
6857
|
huggingface?: boolean;
|
|
6739
6858
|
claudeAgentSDK?: boolean;
|
|
6859
|
+
cloudflareAIChat?: boolean;
|
|
6740
6860
|
cursor?: boolean;
|
|
6741
6861
|
cursorSDK?: boolean;
|
|
6742
6862
|
flue?: boolean;
|
|
@@ -6755,6 +6875,7 @@ interface InstrumentationIntegrationsConfig {
|
|
|
6755
6875
|
openaiCodexSDK?: boolean;
|
|
6756
6876
|
piCodingAgent?: boolean;
|
|
6757
6877
|
strandsAgentSDK?: boolean;
|
|
6878
|
+
cloudflareAgents?: boolean;
|
|
6758
6879
|
langchain?: boolean;
|
|
6759
6880
|
langgraph?: boolean;
|
|
6760
6881
|
langsmith?: boolean;
|
|
@@ -6798,6 +6919,7 @@ declare class BraintrustPlugin extends BasePlugin {
|
|
|
6798
6919
|
private openAIAgentsPlugin;
|
|
6799
6920
|
private googleGenAIPlugin;
|
|
6800
6921
|
private huggingFacePlugin;
|
|
6922
|
+
private huggingFaceTransformersPlugin;
|
|
6801
6923
|
private openRouterPlugin;
|
|
6802
6924
|
private openRouterAgentPlugin;
|
|
6803
6925
|
private mistralPlugin;
|
|
@@ -6812,6 +6934,8 @@ declare class BraintrustPlugin extends BasePlugin {
|
|
|
6812
6934
|
private langSmithPlugin;
|
|
6813
6935
|
private piCodingAgentPlugin;
|
|
6814
6936
|
private strandsAgentSDKPlugin;
|
|
6937
|
+
private cloudflareAIChatPlugin;
|
|
6938
|
+
private cloudflareAgentsPlugin;
|
|
6815
6939
|
constructor(config?: BraintrustPluginConfig);
|
|
6816
6940
|
protected onEnable(): void;
|
|
6817
6941
|
protected onDisable(): void;
|
|
@@ -7844,7 +7968,7 @@ declare abstract class ContextManager {
|
|
|
7844
7968
|
abstract runInContext<R>(span: Span, callback: () => R): R;
|
|
7845
7969
|
abstract getCurrentSpan(): Span | undefined;
|
|
7846
7970
|
/**
|
|
7847
|
-
* Returns the value to store in the ALS bound to a
|
|
7971
|
+
* Returns the value to store in the ALS bound to a global hook's start event.
|
|
7848
7972
|
* In default mode this is the Span itself; in OTEL mode it is the OTEL Context
|
|
7849
7973
|
* containing the span so that OTEL's own ALS stores a proper Context object.
|
|
7850
7974
|
*/
|
|
@@ -7942,7 +8066,12 @@ declare class BraintrustState {
|
|
|
7942
8066
|
private _contextManager;
|
|
7943
8067
|
private _otelFlushCallback;
|
|
7944
8068
|
spanOriginEnvironment: SpanOriginEnvironment | undefined;
|
|
8069
|
+
private traceContextSigningSecret;
|
|
7945
8070
|
constructor(loginParams: LoginOptions);
|
|
8071
|
+
/** @internal */
|
|
8072
|
+
_internalSetTraceContextSigningSecret(secret: string | undefined): void;
|
|
8073
|
+
/** @internal */
|
|
8074
|
+
_internalGetTraceContextSigningSecret(): string | undefined;
|
|
7946
8075
|
resetLoginInfo(): void;
|
|
7947
8076
|
resetIdGenState(): void;
|
|
7948
8077
|
[RESET_CONTEXT_MANAGER_STATE](): void;
|
|
@@ -3044,6 +3044,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3044
3044
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
3045
3045
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
3046
3046
|
position: z.ZodOptional<z.ZodString>;
|
|
3047
|
+
endpoint_name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
3047
3048
|
}, "strip", z.ZodTypeAny, {
|
|
3048
3049
|
params?: z.objectOutputType<{
|
|
3049
3050
|
use_cache: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3164,6 +3165,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3164
3165
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3165
3166
|
model?: string | undefined;
|
|
3166
3167
|
position?: string | undefined;
|
|
3168
|
+
endpoint_name?: string | null | undefined;
|
|
3167
3169
|
}, {
|
|
3168
3170
|
params?: z.objectInputType<{
|
|
3169
3171
|
use_cache: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3284,6 +3286,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3284
3286
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3285
3287
|
model?: string | undefined;
|
|
3286
3288
|
position?: string | undefined;
|
|
3289
|
+
endpoint_name?: string | null | undefined;
|
|
3287
3290
|
}>, z.ZodNull]>>;
|
|
3288
3291
|
parser: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
3289
3292
|
type: z.ZodLiteral<"llm_classifier">;
|
|
@@ -3307,6 +3310,31 @@ declare const PromptData: z.ZodObject<{
|
|
|
3307
3310
|
allow_no_match?: boolean | undefined;
|
|
3308
3311
|
allow_skip?: boolean | undefined;
|
|
3309
3312
|
}>, z.ZodNull]>>;
|
|
3313
|
+
preprocessor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
3314
|
+
type: z.ZodLiteral<"function">;
|
|
3315
|
+
id: z.ZodString;
|
|
3316
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3317
|
+
}, "strip", z.ZodTypeAny, {
|
|
3318
|
+
type: "function";
|
|
3319
|
+
id: string;
|
|
3320
|
+
version?: string | undefined;
|
|
3321
|
+
}, {
|
|
3322
|
+
type: "function";
|
|
3323
|
+
id: string;
|
|
3324
|
+
version?: string | undefined;
|
|
3325
|
+
}>, z.ZodObject<{
|
|
3326
|
+
type: z.ZodLiteral<"global">;
|
|
3327
|
+
name: z.ZodString;
|
|
3328
|
+
function_type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"preprocessor">>>;
|
|
3329
|
+
}, "strip", z.ZodTypeAny, {
|
|
3330
|
+
type: "global";
|
|
3331
|
+
name: string;
|
|
3332
|
+
function_type: "preprocessor";
|
|
3333
|
+
}, {
|
|
3334
|
+
type: "global";
|
|
3335
|
+
name: string;
|
|
3336
|
+
function_type?: "preprocessor" | undefined;
|
|
3337
|
+
}>, z.ZodNull]>>;
|
|
3310
3338
|
tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
3311
3339
|
type: z.ZodLiteral<"function">;
|
|
3312
3340
|
id: z.ZodString;
|
|
@@ -3498,6 +3526,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3498
3526
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3499
3527
|
model?: string | undefined;
|
|
3500
3528
|
position?: string | undefined;
|
|
3529
|
+
endpoint_name?: string | null | undefined;
|
|
3501
3530
|
} | null | undefined;
|
|
3502
3531
|
prompt?: {
|
|
3503
3532
|
type: "chat";
|
|
@@ -3607,6 +3636,15 @@ declare const PromptData: z.ZodObject<{
|
|
|
3607
3636
|
type: "completion";
|
|
3608
3637
|
content: string;
|
|
3609
3638
|
} | null | undefined;
|
|
3639
|
+
preprocessor?: {
|
|
3640
|
+
type: "function";
|
|
3641
|
+
id: string;
|
|
3642
|
+
version?: string | undefined;
|
|
3643
|
+
} | {
|
|
3644
|
+
type: "global";
|
|
3645
|
+
name: string;
|
|
3646
|
+
function_type: "preprocessor";
|
|
3647
|
+
} | null | undefined;
|
|
3610
3648
|
origin?: {
|
|
3611
3649
|
project_id?: string | undefined;
|
|
3612
3650
|
prompt_id?: string | undefined;
|
|
@@ -3762,6 +3800,7 @@ declare const PromptData: z.ZodObject<{
|
|
|
3762
3800
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
3763
3801
|
model?: string | undefined;
|
|
3764
3802
|
position?: string | undefined;
|
|
3803
|
+
endpoint_name?: string | null | undefined;
|
|
3765
3804
|
} | null | undefined;
|
|
3766
3805
|
prompt?: {
|
|
3767
3806
|
type: "chat";
|
|
@@ -3871,6 +3910,15 @@ declare const PromptData: z.ZodObject<{
|
|
|
3871
3910
|
type: "completion";
|
|
3872
3911
|
content: string;
|
|
3873
3912
|
} | null | undefined;
|
|
3913
|
+
preprocessor?: {
|
|
3914
|
+
type: "function";
|
|
3915
|
+
id: string;
|
|
3916
|
+
version?: string | undefined;
|
|
3917
|
+
} | {
|
|
3918
|
+
type: "global";
|
|
3919
|
+
name: string;
|
|
3920
|
+
function_type?: "preprocessor" | undefined;
|
|
3921
|
+
} | null | undefined;
|
|
3874
3922
|
origin?: {
|
|
3875
3923
|
project_id?: string | undefined;
|
|
3876
3924
|
prompt_id?: string | undefined;
|
|
@@ -5023,6 +5071,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5023
5071
|
reasoning_budget: z.ZodOptional<z.ZodNumber>;
|
|
5024
5072
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
5025
5073
|
position: z.ZodOptional<z.ZodString>;
|
|
5074
|
+
endpoint_name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
5026
5075
|
}, "strip", z.ZodTypeAny, {
|
|
5027
5076
|
params?: z.objectOutputType<{
|
|
5028
5077
|
use_cache: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5143,6 +5192,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5143
5192
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5144
5193
|
model?: string | undefined;
|
|
5145
5194
|
position?: string | undefined;
|
|
5195
|
+
endpoint_name?: string | null | undefined;
|
|
5146
5196
|
}, {
|
|
5147
5197
|
params?: z.objectInputType<{
|
|
5148
5198
|
use_cache: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5263,6 +5313,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5263
5313
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5264
5314
|
model?: string | undefined;
|
|
5265
5315
|
position?: string | undefined;
|
|
5316
|
+
endpoint_name?: string | null | undefined;
|
|
5266
5317
|
}>, z.ZodNull]>>;
|
|
5267
5318
|
parser: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
5268
5319
|
type: z.ZodLiteral<"llm_classifier">;
|
|
@@ -5286,6 +5337,31 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5286
5337
|
allow_no_match?: boolean | undefined;
|
|
5287
5338
|
allow_skip?: boolean | undefined;
|
|
5288
5339
|
}>, z.ZodNull]>>;
|
|
5340
|
+
preprocessor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
5341
|
+
type: z.ZodLiteral<"function">;
|
|
5342
|
+
id: z.ZodString;
|
|
5343
|
+
version: z.ZodOptional<z.ZodString>;
|
|
5344
|
+
}, "strip", z.ZodTypeAny, {
|
|
5345
|
+
type: "function";
|
|
5346
|
+
id: string;
|
|
5347
|
+
version?: string | undefined;
|
|
5348
|
+
}, {
|
|
5349
|
+
type: "function";
|
|
5350
|
+
id: string;
|
|
5351
|
+
version?: string | undefined;
|
|
5352
|
+
}>, z.ZodObject<{
|
|
5353
|
+
type: z.ZodLiteral<"global">;
|
|
5354
|
+
name: z.ZodString;
|
|
5355
|
+
function_type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"preprocessor">>>;
|
|
5356
|
+
}, "strip", z.ZodTypeAny, {
|
|
5357
|
+
type: "global";
|
|
5358
|
+
name: string;
|
|
5359
|
+
function_type: "preprocessor";
|
|
5360
|
+
}, {
|
|
5361
|
+
type: "global";
|
|
5362
|
+
name: string;
|
|
5363
|
+
function_type?: "preprocessor" | undefined;
|
|
5364
|
+
}>, z.ZodNull]>>;
|
|
5289
5365
|
tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
5290
5366
|
type: z.ZodLiteral<"function">;
|
|
5291
5367
|
id: z.ZodString;
|
|
@@ -5477,6 +5553,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5477
5553
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5478
5554
|
model?: string | undefined;
|
|
5479
5555
|
position?: string | undefined;
|
|
5556
|
+
endpoint_name?: string | null | undefined;
|
|
5480
5557
|
} | null | undefined;
|
|
5481
5558
|
prompt?: {
|
|
5482
5559
|
type: "chat";
|
|
@@ -5586,6 +5663,15 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5586
5663
|
type: "completion";
|
|
5587
5664
|
content: string;
|
|
5588
5665
|
} | null | undefined;
|
|
5666
|
+
preprocessor?: {
|
|
5667
|
+
type: "function";
|
|
5668
|
+
id: string;
|
|
5669
|
+
version?: string | undefined;
|
|
5670
|
+
} | {
|
|
5671
|
+
type: "global";
|
|
5672
|
+
name: string;
|
|
5673
|
+
function_type: "preprocessor";
|
|
5674
|
+
} | null | undefined;
|
|
5589
5675
|
origin?: {
|
|
5590
5676
|
project_id?: string | undefined;
|
|
5591
5677
|
prompt_id?: string | undefined;
|
|
@@ -5741,6 +5827,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5741
5827
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
5742
5828
|
model?: string | undefined;
|
|
5743
5829
|
position?: string | undefined;
|
|
5830
|
+
endpoint_name?: string | null | undefined;
|
|
5744
5831
|
} | null | undefined;
|
|
5745
5832
|
prompt?: {
|
|
5746
5833
|
type: "chat";
|
|
@@ -5850,6 +5937,15 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
5850
5937
|
type: "completion";
|
|
5851
5938
|
content: string;
|
|
5852
5939
|
} | null | undefined;
|
|
5940
|
+
preprocessor?: {
|
|
5941
|
+
type: "function";
|
|
5942
|
+
id: string;
|
|
5943
|
+
version?: string | undefined;
|
|
5944
|
+
} | {
|
|
5945
|
+
type: "global";
|
|
5946
|
+
name: string;
|
|
5947
|
+
function_type?: "preprocessor" | undefined;
|
|
5948
|
+
} | null | undefined;
|
|
5853
5949
|
origin?: {
|
|
5854
5950
|
project_id?: string | undefined;
|
|
5855
5951
|
prompt_id?: string | undefined;
|
|
@@ -6022,6 +6118,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
6022
6118
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
6023
6119
|
model?: string | undefined;
|
|
6024
6120
|
position?: string | undefined;
|
|
6121
|
+
endpoint_name?: string | null | undefined;
|
|
6025
6122
|
} | null | undefined;
|
|
6026
6123
|
prompt?: {
|
|
6027
6124
|
type: "chat";
|
|
@@ -6131,6 +6228,15 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
6131
6228
|
type: "completion";
|
|
6132
6229
|
content: string;
|
|
6133
6230
|
} | null | undefined;
|
|
6231
|
+
preprocessor?: {
|
|
6232
|
+
type: "function";
|
|
6233
|
+
id: string;
|
|
6234
|
+
version?: string | undefined;
|
|
6235
|
+
} | {
|
|
6236
|
+
type: "global";
|
|
6237
|
+
name: string;
|
|
6238
|
+
function_type: "preprocessor";
|
|
6239
|
+
} | null | undefined;
|
|
6134
6240
|
origin?: {
|
|
6135
6241
|
project_id?: string | undefined;
|
|
6136
6242
|
prompt_id?: string | undefined;
|
|
@@ -6300,6 +6406,7 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
6300
6406
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
6301
6407
|
model?: string | undefined;
|
|
6302
6408
|
position?: string | undefined;
|
|
6409
|
+
endpoint_name?: string | null | undefined;
|
|
6303
6410
|
} | null | undefined;
|
|
6304
6411
|
prompt?: {
|
|
6305
6412
|
type: "chat";
|
|
@@ -6409,6 +6516,15 @@ declare const Prompt$1: z.ZodObject<{
|
|
|
6409
6516
|
type: "completion";
|
|
6410
6517
|
content: string;
|
|
6411
6518
|
} | null | undefined;
|
|
6519
|
+
preprocessor?: {
|
|
6520
|
+
type: "function";
|
|
6521
|
+
id: string;
|
|
6522
|
+
version?: string | undefined;
|
|
6523
|
+
} | {
|
|
6524
|
+
type: "global";
|
|
6525
|
+
name: string;
|
|
6526
|
+
function_type?: "preprocessor" | undefined;
|
|
6527
|
+
} | null | undefined;
|
|
6412
6528
|
origin?: {
|
|
6413
6529
|
project_id?: string | undefined;
|
|
6414
6530
|
prompt_id?: string | undefined;
|
|
@@ -6491,12 +6607,12 @@ declare const PromptSessionEvent: z.ZodObject<{
|
|
|
6491
6607
|
}>;
|
|
6492
6608
|
type PromptSessionEventType = z.infer<typeof PromptSessionEvent>;
|
|
6493
6609
|
|
|
6494
|
-
interface
|
|
6610
|
+
interface GlobalHookAsyncLocalStorage<T> {
|
|
6495
6611
|
enterWith(store: T): void;
|
|
6496
6612
|
run<R>(store: T | undefined, callback: () => R): R;
|
|
6497
6613
|
getStore(): T | undefined;
|
|
6498
6614
|
}
|
|
6499
|
-
interface
|
|
6615
|
+
interface GlobalHookHandlers<M = any> {
|
|
6500
6616
|
start?: (context: M, name: string) => void;
|
|
6501
6617
|
end?: (context: M, name: string) => void;
|
|
6502
6618
|
asyncStart?: (context: M, name: string) => void;
|
|
@@ -6504,10 +6620,13 @@ interface IsoChannelHandlers<M = any> {
|
|
|
6504
6620
|
error?: (context: M, name: string) => void;
|
|
6505
6621
|
}
|
|
6506
6622
|
|
|
6623
|
+
type IsoAsyncLocalStorage<T> = GlobalHookAsyncLocalStorage<T>;
|
|
6624
|
+
type IsoChannelHandlers<M = any> = GlobalHookHandlers<M>;
|
|
6625
|
+
|
|
6507
6626
|
/**
|
|
6508
6627
|
* Base class for creating instrumentation plugins.
|
|
6509
6628
|
*
|
|
6510
|
-
* Plugins subscribe to
|
|
6629
|
+
* Plugins subscribe to global instrumentation hook events and convert them
|
|
6511
6630
|
* into spans, logs, or other observability data.
|
|
6512
6631
|
*/
|
|
6513
6632
|
declare abstract class BasePlugin {
|
|
@@ -6593,7 +6712,7 @@ declare abstract class BasePlugin {
|
|
|
6593
6712
|
}
|
|
6594
6713
|
|
|
6595
6714
|
/**
|
|
6596
|
-
* Utilities for
|
|
6715
|
+
* Utilities for instrumentation hook naming and management.
|
|
6597
6716
|
*/
|
|
6598
6717
|
/**
|
|
6599
6718
|
* Channel naming convention: braintrust:{component}:{operation}
|
|
@@ -6692,7 +6811,7 @@ interface AsyncStartEvent<TInput = unknown> extends StartEvent<TInput> {
|
|
|
6692
6811
|
interface AsyncEndEvent<TResult = unknown> extends EndEvent<TResult> {
|
|
6693
6812
|
}
|
|
6694
6813
|
/**
|
|
6695
|
-
* Subscription handlers for a
|
|
6814
|
+
* Subscription handlers for a tracing-compatible global hook.
|
|
6696
6815
|
*
|
|
6697
6816
|
* Common usage pattern:
|
|
6698
6817
|
* - Use start to create spans and extract input
|
|
@@ -6737,6 +6856,7 @@ interface InstrumentationIntegrationsConfig {
|
|
|
6737
6856
|
googleADK?: boolean;
|
|
6738
6857
|
huggingface?: boolean;
|
|
6739
6858
|
claudeAgentSDK?: boolean;
|
|
6859
|
+
cloudflareAIChat?: boolean;
|
|
6740
6860
|
cursor?: boolean;
|
|
6741
6861
|
cursorSDK?: boolean;
|
|
6742
6862
|
flue?: boolean;
|
|
@@ -6755,6 +6875,7 @@ interface InstrumentationIntegrationsConfig {
|
|
|
6755
6875
|
openaiCodexSDK?: boolean;
|
|
6756
6876
|
piCodingAgent?: boolean;
|
|
6757
6877
|
strandsAgentSDK?: boolean;
|
|
6878
|
+
cloudflareAgents?: boolean;
|
|
6758
6879
|
langchain?: boolean;
|
|
6759
6880
|
langgraph?: boolean;
|
|
6760
6881
|
langsmith?: boolean;
|
|
@@ -6798,6 +6919,7 @@ declare class BraintrustPlugin extends BasePlugin {
|
|
|
6798
6919
|
private openAIAgentsPlugin;
|
|
6799
6920
|
private googleGenAIPlugin;
|
|
6800
6921
|
private huggingFacePlugin;
|
|
6922
|
+
private huggingFaceTransformersPlugin;
|
|
6801
6923
|
private openRouterPlugin;
|
|
6802
6924
|
private openRouterAgentPlugin;
|
|
6803
6925
|
private mistralPlugin;
|
|
@@ -6812,6 +6934,8 @@ declare class BraintrustPlugin extends BasePlugin {
|
|
|
6812
6934
|
private langSmithPlugin;
|
|
6813
6935
|
private piCodingAgentPlugin;
|
|
6814
6936
|
private strandsAgentSDKPlugin;
|
|
6937
|
+
private cloudflareAIChatPlugin;
|
|
6938
|
+
private cloudflareAgentsPlugin;
|
|
6815
6939
|
constructor(config?: BraintrustPluginConfig);
|
|
6816
6940
|
protected onEnable(): void;
|
|
6817
6941
|
protected onDisable(): void;
|
|
@@ -7844,7 +7968,7 @@ declare abstract class ContextManager {
|
|
|
7844
7968
|
abstract runInContext<R>(span: Span, callback: () => R): R;
|
|
7845
7969
|
abstract getCurrentSpan(): Span | undefined;
|
|
7846
7970
|
/**
|
|
7847
|
-
* Returns the value to store in the ALS bound to a
|
|
7971
|
+
* Returns the value to store in the ALS bound to a global hook's start event.
|
|
7848
7972
|
* In default mode this is the Span itself; in OTEL mode it is the OTEL Context
|
|
7849
7973
|
* containing the span so that OTEL's own ALS stores a proper Context object.
|
|
7850
7974
|
*/
|
|
@@ -7942,7 +8066,12 @@ declare class BraintrustState {
|
|
|
7942
8066
|
private _contextManager;
|
|
7943
8067
|
private _otelFlushCallback;
|
|
7944
8068
|
spanOriginEnvironment: SpanOriginEnvironment | undefined;
|
|
8069
|
+
private traceContextSigningSecret;
|
|
7945
8070
|
constructor(loginParams: LoginOptions);
|
|
8071
|
+
/** @internal */
|
|
8072
|
+
_internalSetTraceContextSigningSecret(secret: string | undefined): void;
|
|
8073
|
+
/** @internal */
|
|
8074
|
+
_internalGetTraceContextSigningSecret(): string | undefined;
|
|
7946
8075
|
resetLoginInfo(): void;
|
|
7947
8076
|
resetIdGenState(): void;
|
|
7948
8077
|
[RESET_CONTEXT_MANAGER_STATE](): void;
|