braintrust 3.8.0 → 3.9.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 +84 -3
- package/dev/dist/index.d.ts +84 -3
- package/dev/dist/index.js +3687 -691
- package/dev/dist/index.mjs +3399 -403
- package/dist/auto-instrumentations/bundler/esbuild.cjs +575 -2
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/rollup.cjs +575 -2
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +575 -2
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +575 -2
- package/dist/auto-instrumentations/bundler/webpack.cjs +575 -2
- package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
- package/dist/auto-instrumentations/{chunk-MD7W27YH.mjs → chunk-G7F6HZGE.mjs} +5 -1
- package/dist/auto-instrumentations/{chunk-OLBMPZXE.mjs → chunk-KIMMUFAK.mjs} +578 -3
- package/dist/auto-instrumentations/hook.mjs +757 -10
- package/dist/auto-instrumentations/index.cjs +739 -2
- package/dist/auto-instrumentations/index.d.mts +18 -1
- package/dist/auto-instrumentations/index.d.ts +18 -1
- package/dist/auto-instrumentations/index.mjs +168 -1
- package/dist/auto-instrumentations/loader/esm-hook.mjs +2 -1
- package/dist/browser.d.mts +312 -6
- package/dist/browser.d.ts +312 -6
- package/dist/browser.js +5335 -1892
- package/dist/browser.mjs +5335 -1892
- package/dist/cli.js +3514 -489
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +5335 -1892
- package/dist/edge-light.mjs +5335 -1892
- package/dist/index.d.mts +312 -6
- package/dist/index.d.ts +312 -6
- package/dist/index.js +4244 -801
- package/dist/index.mjs +5335 -1892
- package/dist/instrumentation/index.d.mts +10 -0
- package/dist/instrumentation/index.d.ts +10 -0
- package/dist/instrumentation/index.js +3160 -286
- package/dist/instrumentation/index.mjs +3160 -286
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +5335 -1892
- package/dist/workerd.mjs +5335 -1892
- package/package.json +52 -47
- package/util/dist/index.d.mts +42 -1
- package/util/dist/index.d.ts +42 -1
- package/util/dist/index.js +5 -1
- package/util/dist/index.mjs +4 -0
- package/LICENSE +0 -201
package/dist/browser.d.ts
CHANGED
|
@@ -4758,6 +4758,15 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4758
4758
|
}, {
|
|
4759
4759
|
type: "scorer";
|
|
4760
4760
|
index: number;
|
|
4761
|
+
}>, z.ZodObject<{
|
|
4762
|
+
type: z.ZodLiteral<"classifier">;
|
|
4763
|
+
index: z.ZodNumber;
|
|
4764
|
+
}, "strip", z.ZodTypeAny, {
|
|
4765
|
+
type: "classifier";
|
|
4766
|
+
index: number;
|
|
4767
|
+
}, {
|
|
4768
|
+
type: "classifier";
|
|
4769
|
+
index: number;
|
|
4761
4770
|
}>]>;
|
|
4762
4771
|
}, "strip", z.ZodTypeAny, {
|
|
4763
4772
|
type: "experiment";
|
|
@@ -4767,6 +4776,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4767
4776
|
} | {
|
|
4768
4777
|
type: "scorer";
|
|
4769
4778
|
index: number;
|
|
4779
|
+
} | {
|
|
4780
|
+
type: "classifier";
|
|
4781
|
+
index: number;
|
|
4770
4782
|
};
|
|
4771
4783
|
}, {
|
|
4772
4784
|
type: "experiment";
|
|
@@ -4776,6 +4788,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4776
4788
|
} | {
|
|
4777
4789
|
type: "scorer";
|
|
4778
4790
|
index: number;
|
|
4791
|
+
} | {
|
|
4792
|
+
type: "classifier";
|
|
4793
|
+
index: number;
|
|
4779
4794
|
};
|
|
4780
4795
|
}>, z.ZodObject<{
|
|
4781
4796
|
type: z.ZodLiteral<"function">;
|
|
@@ -4848,6 +4863,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4848
4863
|
} | {
|
|
4849
4864
|
type: "scorer";
|
|
4850
4865
|
index: number;
|
|
4866
|
+
} | {
|
|
4867
|
+
type: "classifier";
|
|
4868
|
+
index: number;
|
|
4851
4869
|
};
|
|
4852
4870
|
} | {
|
|
4853
4871
|
type: "function";
|
|
@@ -4880,6 +4898,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4880
4898
|
} | {
|
|
4881
4899
|
type: "scorer";
|
|
4882
4900
|
index: number;
|
|
4901
|
+
} | {
|
|
4902
|
+
type: "classifier";
|
|
4903
|
+
index: number;
|
|
4883
4904
|
};
|
|
4884
4905
|
} | {
|
|
4885
4906
|
type: "function";
|
|
@@ -4947,6 +4968,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4947
4968
|
} | {
|
|
4948
4969
|
type: "scorer";
|
|
4949
4970
|
index: number;
|
|
4971
|
+
} | {
|
|
4972
|
+
type: "classifier";
|
|
4973
|
+
index: number;
|
|
4950
4974
|
};
|
|
4951
4975
|
} | {
|
|
4952
4976
|
type: "function";
|
|
@@ -4992,6 +5016,9 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
|
|
|
4992
5016
|
} | {
|
|
4993
5017
|
type: "scorer";
|
|
4994
5018
|
index: number;
|
|
5019
|
+
} | {
|
|
5020
|
+
type: "classifier";
|
|
5021
|
+
index: number;
|
|
4995
5022
|
};
|
|
4996
5023
|
} | {
|
|
4997
5024
|
type: "function";
|
|
@@ -16106,6 +16133,10 @@ type OtherExperimentLogFields = {
|
|
|
16106
16133
|
error: unknown;
|
|
16107
16134
|
tags: string[];
|
|
16108
16135
|
scores: Record<string, number | null>;
|
|
16136
|
+
classifications?: Record<string, {
|
|
16137
|
+
id: string;
|
|
16138
|
+
label?: string;
|
|
16139
|
+
}[]>;
|
|
16109
16140
|
metadata: Record<string, unknown>;
|
|
16110
16141
|
metrics: Record<string, unknown>;
|
|
16111
16142
|
datasetRecordId: string;
|
|
@@ -16273,6 +16304,42 @@ declare class SpanComponentsV3 {
|
|
|
16273
16304
|
private static fromJsonObj;
|
|
16274
16305
|
}
|
|
16275
16306
|
|
|
16307
|
+
/**
|
|
16308
|
+
* The result returned by a classifier function. Unlike `Score`, `id` is
|
|
16309
|
+
* required and the span will be recorded as a classifier span.
|
|
16310
|
+
*/
|
|
16311
|
+
interface Classification {
|
|
16312
|
+
/**
|
|
16313
|
+
* The name of this classification result. Used as the key in the
|
|
16314
|
+
* `classifications` log record. If omitted, defaults to the classifier
|
|
16315
|
+
* function's name.
|
|
16316
|
+
*/
|
|
16317
|
+
name: string;
|
|
16318
|
+
/**
|
|
16319
|
+
* A machine-readable identifier for the classification outcome
|
|
16320
|
+
* (e.g. `"positive"`, `"negative"`, `"neutral"`). This value is stored
|
|
16321
|
+
* in the log and used for programmatic analysis.
|
|
16322
|
+
*/
|
|
16323
|
+
id: string;
|
|
16324
|
+
/**
|
|
16325
|
+
* An optional human-readable display label for this outcome. If omitted,
|
|
16326
|
+
* defaults to `id`. Use this when you want a friendlier label in the UI
|
|
16327
|
+
* while keeping a stable `id` for programmatic use.
|
|
16328
|
+
*/
|
|
16329
|
+
label?: string;
|
|
16330
|
+
/**
|
|
16331
|
+
* Optional arbitrary metadata to attach to this classification result.
|
|
16332
|
+
*/
|
|
16333
|
+
metadata?: Record<string, unknown>;
|
|
16334
|
+
}
|
|
16335
|
+
/**
|
|
16336
|
+
* The serialized form of a classification stored in the `classifications` log record.
|
|
16337
|
+
*/
|
|
16338
|
+
interface ClassificationItem {
|
|
16339
|
+
id: string;
|
|
16340
|
+
label: string;
|
|
16341
|
+
metadata?: Record<string, unknown>;
|
|
16342
|
+
}
|
|
16276
16343
|
interface Score {
|
|
16277
16344
|
name: string;
|
|
16278
16345
|
score: number | null;
|
|
@@ -19967,6 +20034,7 @@ type EvalCase<Input, Expected, Metadata> = {
|
|
|
19967
20034
|
_xact_id?: TransactionId;
|
|
19968
20035
|
created?: string | null;
|
|
19969
20036
|
upsert_id?: string;
|
|
20037
|
+
trialCount?: number;
|
|
19970
20038
|
} & (Expected extends void ? object : {
|
|
19971
20039
|
expected: Expected;
|
|
19972
20040
|
}) & (Metadata extends void ? object : {
|
|
@@ -21024,14 +21092,27 @@ interface OpenAIChatToolCall {
|
|
|
21024
21092
|
interface OpenAIChatMessage {
|
|
21025
21093
|
role?: string;
|
|
21026
21094
|
content?: unknown;
|
|
21095
|
+
refusal?: string;
|
|
21027
21096
|
tool_calls?: OpenAIChatToolCall[];
|
|
21028
21097
|
[key: string]: unknown;
|
|
21029
21098
|
}
|
|
21099
|
+
interface OpenAIChatTokenLogprob {
|
|
21100
|
+
token?: string;
|
|
21101
|
+
logprob?: number;
|
|
21102
|
+
bytes?: number[] | null;
|
|
21103
|
+
top_logprobs?: OpenAIChatTokenLogprob[];
|
|
21104
|
+
[key: string]: unknown;
|
|
21105
|
+
}
|
|
21106
|
+
interface OpenAIChatLogprobs {
|
|
21107
|
+
content?: OpenAIChatTokenLogprob[] | null;
|
|
21108
|
+
refusal?: OpenAIChatTokenLogprob[] | null;
|
|
21109
|
+
[key: string]: unknown;
|
|
21110
|
+
}
|
|
21030
21111
|
interface OpenAIChatChoice {
|
|
21031
21112
|
index: number;
|
|
21032
21113
|
message: OpenAIChatMessage;
|
|
21033
21114
|
finish_reason?: string | null;
|
|
21034
|
-
logprobs?:
|
|
21115
|
+
logprobs?: OpenAIChatLogprobs | null;
|
|
21035
21116
|
[key: string]: unknown;
|
|
21036
21117
|
}
|
|
21037
21118
|
interface OpenAIChatCompletion {
|
|
@@ -21042,6 +21123,7 @@ interface OpenAIChatCompletion {
|
|
|
21042
21123
|
interface OpenAIChatDelta {
|
|
21043
21124
|
role?: string;
|
|
21044
21125
|
content?: string;
|
|
21126
|
+
refusal?: string;
|
|
21045
21127
|
tool_calls?: OpenAIChatToolCall[];
|
|
21046
21128
|
finish_reason?: string | null;
|
|
21047
21129
|
[key: string]: unknown;
|
|
@@ -21049,6 +21131,7 @@ interface OpenAIChatDelta {
|
|
|
21049
21131
|
interface OpenAIChatChunkChoice {
|
|
21050
21132
|
delta?: OpenAIChatDelta;
|
|
21051
21133
|
finish_reason?: string | null;
|
|
21134
|
+
logprobs?: OpenAIChatLogprobs | null;
|
|
21052
21135
|
[key: string]: unknown;
|
|
21053
21136
|
}
|
|
21054
21137
|
interface OpenAIChatCompletionChunk {
|
|
@@ -21279,6 +21362,178 @@ declare function wrapClaudeAgentSDK<T extends object>(sdk: T): T;
|
|
|
21279
21362
|
*/
|
|
21280
21363
|
declare function wrapGoogleGenAI<T extends Record<string, any>>(googleGenAI: T): T;
|
|
21281
21364
|
|
|
21365
|
+
/**
|
|
21366
|
+
* Wrap a Google ADK module (imported with `import * as adk from '@google/adk'`) to add tracing.
|
|
21367
|
+
* If Braintrust is not configured, nothing will be traced.
|
|
21368
|
+
*
|
|
21369
|
+
* This wraps:
|
|
21370
|
+
* - Runner.runAsync / InMemoryRunner.runAsync — top-level agent execution
|
|
21371
|
+
* - BaseAgent.runAsync (and all subclasses) — individual agent invocations
|
|
21372
|
+
* - BaseTool.runAsync / FunctionTool.runAsync — tool execution
|
|
21373
|
+
*
|
|
21374
|
+
* LLM calls are already traced via the existing @google/genai instrumentation,
|
|
21375
|
+
* since ADK uses GenAI internally.
|
|
21376
|
+
*
|
|
21377
|
+
* @param adkModule The Google ADK module
|
|
21378
|
+
* @returns The wrapped Google ADK module
|
|
21379
|
+
*
|
|
21380
|
+
* @example
|
|
21381
|
+
* ```typescript
|
|
21382
|
+
* import * as adk from '@google/adk';
|
|
21383
|
+
* import { wrapGoogleADK, initLogger } from 'braintrust';
|
|
21384
|
+
*
|
|
21385
|
+
* initLogger({ projectName: 'Your project' });
|
|
21386
|
+
* const { LlmAgent, InMemoryRunner } = wrapGoogleADK(adk);
|
|
21387
|
+
*
|
|
21388
|
+
* const agent = new LlmAgent({ name: 'my_agent', model: 'gemini-2.5-flash' });
|
|
21389
|
+
* const runner = new InMemoryRunner({ agent });
|
|
21390
|
+
* for await (const event of runner.runAsync({ userId: 'u1', sessionId: 's1', newMessage: ... })) {
|
|
21391
|
+
* console.log(event);
|
|
21392
|
+
* }
|
|
21393
|
+
* ```
|
|
21394
|
+
*/
|
|
21395
|
+
declare function wrapGoogleADK<T extends Record<string, any>>(adkModule: T): T;
|
|
21396
|
+
|
|
21397
|
+
interface HuggingFaceRequestOptions {
|
|
21398
|
+
retry_on_error?: boolean;
|
|
21399
|
+
fetch?: typeof fetch;
|
|
21400
|
+
signal?: AbortSignal;
|
|
21401
|
+
includeCredentials?: string | boolean;
|
|
21402
|
+
billTo?: string;
|
|
21403
|
+
[key: string]: unknown;
|
|
21404
|
+
}
|
|
21405
|
+
interface HuggingFaceClientConstructor {
|
|
21406
|
+
new (...args: unknown[]): HuggingFaceClient;
|
|
21407
|
+
}
|
|
21408
|
+
interface HuggingFaceModule {
|
|
21409
|
+
InferenceClient?: HuggingFaceClientConstructor;
|
|
21410
|
+
InferenceClientEndpoint?: HuggingFaceClientConstructor;
|
|
21411
|
+
HfInference?: HuggingFaceClientConstructor;
|
|
21412
|
+
HfInferenceEndpoint?: HuggingFaceClientConstructor;
|
|
21413
|
+
chatCompletion?: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceChatCompletion>;
|
|
21414
|
+
chatCompletionStream?: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceChatCompletionChunk>;
|
|
21415
|
+
textGeneration?: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceTextGenerationOutput>;
|
|
21416
|
+
textGenerationStream?: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceTextGenerationStreamOutput>;
|
|
21417
|
+
featureExtraction?: (params: HuggingFaceFeatureExtractionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceFeatureExtractionOutput>;
|
|
21418
|
+
[key: string]: unknown;
|
|
21419
|
+
}
|
|
21420
|
+
interface HuggingFaceClient {
|
|
21421
|
+
chatCompletion: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceChatCompletion>;
|
|
21422
|
+
chatCompletionStream: (params: HuggingFaceChatCompletionParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceChatCompletionChunk>;
|
|
21423
|
+
textGeneration: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceTextGenerationOutput>;
|
|
21424
|
+
textGenerationStream: (params: HuggingFaceTextGenerationParams, options?: HuggingFaceRequestOptions) => AsyncIterable<HuggingFaceTextGenerationStreamOutput>;
|
|
21425
|
+
featureExtraction: (params: HuggingFaceFeatureExtractionParams, options?: HuggingFaceRequestOptions) => Promise<HuggingFaceFeatureExtractionOutput>;
|
|
21426
|
+
endpoint?: (endpointUrl: string) => HuggingFaceClient;
|
|
21427
|
+
[key: string]: unknown;
|
|
21428
|
+
}
|
|
21429
|
+
interface HuggingFaceChatCompletionParams {
|
|
21430
|
+
messages?: unknown;
|
|
21431
|
+
model?: string;
|
|
21432
|
+
provider?: string;
|
|
21433
|
+
endpointUrl?: string;
|
|
21434
|
+
stream?: boolean;
|
|
21435
|
+
[key: string]: unknown;
|
|
21436
|
+
}
|
|
21437
|
+
interface HuggingFaceTextGenerationParams {
|
|
21438
|
+
inputs?: unknown;
|
|
21439
|
+
model?: string;
|
|
21440
|
+
provider?: string;
|
|
21441
|
+
endpointUrl?: string;
|
|
21442
|
+
stream?: boolean;
|
|
21443
|
+
parameters?: Record<string, unknown>;
|
|
21444
|
+
[key: string]: unknown;
|
|
21445
|
+
}
|
|
21446
|
+
interface HuggingFaceFeatureExtractionParams {
|
|
21447
|
+
inputs?: unknown;
|
|
21448
|
+
model?: string;
|
|
21449
|
+
provider?: string;
|
|
21450
|
+
endpointUrl?: string;
|
|
21451
|
+
dimensions?: number | null;
|
|
21452
|
+
encoding_format?: "float" | "base64";
|
|
21453
|
+
[key: string]: unknown;
|
|
21454
|
+
}
|
|
21455
|
+
interface HuggingFaceUsage {
|
|
21456
|
+
prompt_tokens?: number;
|
|
21457
|
+
completion_tokens?: number;
|
|
21458
|
+
total_tokens?: number;
|
|
21459
|
+
[key: string]: unknown;
|
|
21460
|
+
}
|
|
21461
|
+
interface HuggingFaceChatMessage {
|
|
21462
|
+
role?: string;
|
|
21463
|
+
content?: string | null | unknown[];
|
|
21464
|
+
tool_calls?: unknown;
|
|
21465
|
+
[key: string]: unknown;
|
|
21466
|
+
}
|
|
21467
|
+
interface HuggingFaceChatCompletionChoice {
|
|
21468
|
+
index?: number;
|
|
21469
|
+
message?: HuggingFaceChatMessage;
|
|
21470
|
+
delta?: HuggingFaceChatMessage;
|
|
21471
|
+
finish_reason?: string | null;
|
|
21472
|
+
[key: string]: unknown;
|
|
21473
|
+
}
|
|
21474
|
+
interface HuggingFaceChatCompletion {
|
|
21475
|
+
id?: string;
|
|
21476
|
+
object?: string;
|
|
21477
|
+
model?: string;
|
|
21478
|
+
created?: number;
|
|
21479
|
+
usage?: HuggingFaceUsage;
|
|
21480
|
+
choices?: HuggingFaceChatCompletionChoice[];
|
|
21481
|
+
[key: string]: unknown;
|
|
21482
|
+
}
|
|
21483
|
+
type HuggingFaceChatCompletionChunk = HuggingFaceChatCompletion;
|
|
21484
|
+
interface HuggingFaceTextGenerationToken {
|
|
21485
|
+
id?: number;
|
|
21486
|
+
text?: string;
|
|
21487
|
+
logprob?: number;
|
|
21488
|
+
special?: boolean;
|
|
21489
|
+
[key: string]: unknown;
|
|
21490
|
+
}
|
|
21491
|
+
interface HuggingFaceTextGenerationDetails {
|
|
21492
|
+
finish_reason?: string | null;
|
|
21493
|
+
generated_tokens?: number;
|
|
21494
|
+
prefill?: HuggingFaceTextGenerationToken[];
|
|
21495
|
+
tokens?: HuggingFaceTextGenerationToken[];
|
|
21496
|
+
[key: string]: unknown;
|
|
21497
|
+
}
|
|
21498
|
+
interface HuggingFaceTextGenerationOutput {
|
|
21499
|
+
generated_text?: string | null;
|
|
21500
|
+
details?: HuggingFaceTextGenerationDetails | null;
|
|
21501
|
+
[key: string]: unknown;
|
|
21502
|
+
}
|
|
21503
|
+
interface HuggingFaceTextGenerationChoice {
|
|
21504
|
+
index?: number;
|
|
21505
|
+
text?: string;
|
|
21506
|
+
finish_reason?: string | null;
|
|
21507
|
+
[key: string]: unknown;
|
|
21508
|
+
}
|
|
21509
|
+
interface HuggingFaceTextGenerationStreamOutput {
|
|
21510
|
+
index?: number;
|
|
21511
|
+
token?: HuggingFaceTextGenerationToken;
|
|
21512
|
+
choices?: HuggingFaceTextGenerationChoice[];
|
|
21513
|
+
generated_text?: string | null;
|
|
21514
|
+
details?: HuggingFaceTextGenerationDetails | null;
|
|
21515
|
+
usage?: HuggingFaceUsage;
|
|
21516
|
+
model?: string;
|
|
21517
|
+
object?: string;
|
|
21518
|
+
created?: number;
|
|
21519
|
+
[key: string]: unknown;
|
|
21520
|
+
}
|
|
21521
|
+
type HuggingFaceFeatureExtractionOutput = number[] | number[][] | number[][][];
|
|
21522
|
+
|
|
21523
|
+
/**
|
|
21524
|
+
* Wrap a HuggingFace Inference SDK module or client with Braintrust tracing.
|
|
21525
|
+
*
|
|
21526
|
+
* Supports the LLM and embeddings APIs we intentionally instrument:
|
|
21527
|
+
* - chatCompletion
|
|
21528
|
+
* - chatCompletionStream
|
|
21529
|
+
* - textGeneration
|
|
21530
|
+
* - textGenerationStream
|
|
21531
|
+
* - featureExtraction
|
|
21532
|
+
*/
|
|
21533
|
+
declare function wrapHuggingFace(huggingFace: HuggingFaceModule): HuggingFaceModule;
|
|
21534
|
+
declare function wrapHuggingFace(huggingFace: HuggingFaceClient): HuggingFaceClient;
|
|
21535
|
+
declare function wrapHuggingFace<T>(huggingFace: T): T;
|
|
21536
|
+
|
|
21282
21537
|
/**
|
|
21283
21538
|
* Wrap an @openrouter/agent OpenRouter client so callModel() emits
|
|
21284
21539
|
* diagnostics-channel events consumed by the OpenRouter Agent plugin.
|
|
@@ -21296,6 +21551,12 @@ declare function wrapOpenRouter<T>(openrouter: T): T;
|
|
|
21296
21551
|
*/
|
|
21297
21552
|
declare function wrapMistral<T>(mistral: T): T;
|
|
21298
21553
|
|
|
21554
|
+
/**
|
|
21555
|
+
* Wrap a Cohere client so method calls emit diagnostics-channel events that
|
|
21556
|
+
* Braintrust plugins can consume.
|
|
21557
|
+
*/
|
|
21558
|
+
declare function wrapCohere<T>(cohere: T): T;
|
|
21559
|
+
|
|
21299
21560
|
type ScorerFunction<Output = unknown> = (args: {
|
|
21300
21561
|
output: Output;
|
|
21301
21562
|
expected?: unknown;
|
|
@@ -32438,6 +32699,13 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32438
32699
|
}, {
|
|
32439
32700
|
name: string;
|
|
32440
32701
|
}>, "many">>;
|
|
32702
|
+
classifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32703
|
+
name: z.ZodString;
|
|
32704
|
+
}, "strip", z.ZodTypeAny, {
|
|
32705
|
+
name: string;
|
|
32706
|
+
}, {
|
|
32707
|
+
name: string;
|
|
32708
|
+
}>, "many">>;
|
|
32441
32709
|
}, "strip", z.ZodTypeAny, {
|
|
32442
32710
|
parameters?: Record<string, {
|
|
32443
32711
|
type: "prompt";
|
|
@@ -32986,6 +33254,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
32986
33254
|
scores?: {
|
|
32987
33255
|
name: string;
|
|
32988
33256
|
}[] | undefined;
|
|
33257
|
+
classifiers?: {
|
|
33258
|
+
name: string;
|
|
33259
|
+
}[] | undefined;
|
|
32989
33260
|
}, {
|
|
32990
33261
|
parameters?: Record<string, {
|
|
32991
33262
|
type: "prompt";
|
|
@@ -33534,6 +33805,9 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
|
|
|
33534
33805
|
scores?: {
|
|
33535
33806
|
name: string;
|
|
33536
33807
|
}[] | undefined;
|
|
33808
|
+
classifiers?: {
|
|
33809
|
+
name: string;
|
|
33810
|
+
}[] | undefined;
|
|
33537
33811
|
}>;
|
|
33538
33812
|
type EvaluatorDefinition = z.infer<typeof evaluatorDefinitionSchema>;
|
|
33539
33813
|
declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -38792,6 +39066,13 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
38792
39066
|
}, {
|
|
38793
39067
|
name: string;
|
|
38794
39068
|
}>, "many">>;
|
|
39069
|
+
classifiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39070
|
+
name: z.ZodString;
|
|
39071
|
+
}, "strip", z.ZodTypeAny, {
|
|
39072
|
+
name: string;
|
|
39073
|
+
}, {
|
|
39074
|
+
name: string;
|
|
39075
|
+
}>, "many">>;
|
|
38795
39076
|
}, "strip", z.ZodTypeAny, {
|
|
38796
39077
|
parameters?: Record<string, {
|
|
38797
39078
|
type: "prompt";
|
|
@@ -39340,6 +39621,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
39340
39621
|
scores?: {
|
|
39341
39622
|
name: string;
|
|
39342
39623
|
}[] | undefined;
|
|
39624
|
+
classifiers?: {
|
|
39625
|
+
name: string;
|
|
39626
|
+
}[] | undefined;
|
|
39343
39627
|
}, {
|
|
39344
39628
|
parameters?: Record<string, {
|
|
39345
39629
|
type: "prompt";
|
|
@@ -39888,6 +40172,9 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
39888
40172
|
scores?: {
|
|
39889
40173
|
name: string;
|
|
39890
40174
|
}[] | undefined;
|
|
40175
|
+
classifiers?: {
|
|
40176
|
+
name: string;
|
|
40177
|
+
}[] | undefined;
|
|
39891
40178
|
}>>;
|
|
39892
40179
|
type EvaluatorDefinitions = z.infer<typeof evaluatorDefinitionsSchema>;
|
|
39893
40180
|
|
|
@@ -40178,17 +40465,23 @@ type EvalScorerArgs<Input, Output, Expected, Metadata extends BaseMetadata = Def
|
|
|
40178
40465
|
};
|
|
40179
40466
|
type OneOrMoreScores = Score | number | null | Array<Score>;
|
|
40180
40467
|
type EvalScorer<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = (args: EvalScorerArgs<Input, Output, Expected, Metadata>) => OneOrMoreScores | Promise<OneOrMoreScores>;
|
|
40468
|
+
type OneOrMoreClassifications = Classification | Classification[] | null;
|
|
40469
|
+
type EvalClassifier<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = (args: EvalScorerArgs<Input, Output, Expected, Metadata>) => OneOrMoreClassifications | Promise<OneOrMoreClassifications>;
|
|
40181
40470
|
type EvalResult<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalCase<Input, Expected, Metadata> & {
|
|
40182
40471
|
output: Output;
|
|
40183
|
-
scores: Record<string, number | null>;
|
|
40184
40472
|
error: unknown;
|
|
40185
40473
|
origin?: ObjectReferenceType;
|
|
40474
|
+
scores: Record<string, number | null>;
|
|
40475
|
+
classifications?: Record<string, ClassificationItem[]>;
|
|
40186
40476
|
};
|
|
40187
40477
|
type ErrorScoreHandler = (args: {
|
|
40188
40478
|
rootSpan: Span;
|
|
40189
40479
|
data: EvalCase<any, any, any>;
|
|
40190
40480
|
unhandledScores: string[];
|
|
40191
40481
|
}) => Record<string, number> | undefined | void;
|
|
40482
|
+
/**
|
|
40483
|
+
* Defines an evaluator. At least one of `scores` or `classifiers` must be provided.
|
|
40484
|
+
*/
|
|
40192
40485
|
interface Evaluator<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters> {
|
|
40193
40486
|
/**
|
|
40194
40487
|
* A function that returns a list of inputs, expected outputs, and metadata.
|
|
@@ -40199,9 +40492,16 @@ interface Evaluator<Input, Output, Expected, Metadata extends BaseMetadata = Def
|
|
|
40199
40492
|
*/
|
|
40200
40493
|
task: EvalTask<Input, Output, Expected, Metadata, Parameters>;
|
|
40201
40494
|
/**
|
|
40202
|
-
* A set of functions that take an input, output, and expected value and return a
|
|
40495
|
+
* A set of functions that take an input, output, and expected value and return a {@link Score}.
|
|
40496
|
+
* At least one of `scores` or `classifiers` must be provided.
|
|
40497
|
+
*/
|
|
40498
|
+
scores?: EvalScorer<Input, Output, Expected, Metadata>[];
|
|
40499
|
+
/**
|
|
40500
|
+
* A set of functions that take an input, output, and expected value and return a
|
|
40501
|
+
* {@link Classification}. Results are recorded under the `classifications` column.
|
|
40502
|
+
* At least one of `scores` or `classifiers` must be provided.
|
|
40203
40503
|
*/
|
|
40204
|
-
|
|
40504
|
+
classifiers?: EvalClassifier<Input, Output, Expected, Metadata>[];
|
|
40205
40505
|
/**
|
|
40206
40506
|
* A set of parameters that will be passed to the evaluator.
|
|
40207
40507
|
* Can be:
|
|
@@ -40450,10 +40750,12 @@ interface InstrumentationConfig {
|
|
|
40450
40750
|
vercel?: boolean;
|
|
40451
40751
|
aisdk?: boolean;
|
|
40452
40752
|
google?: boolean;
|
|
40753
|
+
huggingface?: boolean;
|
|
40453
40754
|
claudeAgentSDK?: boolean;
|
|
40454
40755
|
openrouter?: boolean;
|
|
40455
40756
|
openrouterAgent?: boolean;
|
|
40456
40757
|
mistral?: boolean;
|
|
40758
|
+
cohere?: boolean;
|
|
40457
40759
|
};
|
|
40458
40760
|
}
|
|
40459
40761
|
/**
|
|
@@ -40532,6 +40834,7 @@ declare const exports_ERR_PERMALINK: typeof ERR_PERMALINK;
|
|
|
40532
40834
|
type exports_EndSpanArgs = EndSpanArgs;
|
|
40533
40835
|
declare const exports_Eval: typeof Eval;
|
|
40534
40836
|
type exports_EvalCase<Input, Expected, Metadata> = EvalCase<Input, Expected, Metadata>;
|
|
40837
|
+
type exports_EvalClassifier<Input, Output, Expected, Metadata extends BaseMetadata = DefaultMetadataType> = EvalClassifier<Input, Output, Expected, Metadata>;
|
|
40535
40838
|
type exports_EvalHooks<Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters> = EvalHooks<Expected, Metadata, Parameters>;
|
|
40536
40839
|
type exports_EvalParameterSerializedSchema = EvalParameterSerializedSchema;
|
|
40537
40840
|
type exports_EvalParameters = EvalParameters;
|
|
@@ -40729,7 +41032,10 @@ declare const exports_wrapAISDKModel: typeof wrapAISDKModel;
|
|
|
40729
41032
|
declare const exports_wrapAgentClass: typeof wrapAgentClass;
|
|
40730
41033
|
declare const exports_wrapAnthropic: typeof wrapAnthropic;
|
|
40731
41034
|
declare const exports_wrapClaudeAgentSDK: typeof wrapClaudeAgentSDK;
|
|
41035
|
+
declare const exports_wrapCohere: typeof wrapCohere;
|
|
41036
|
+
declare const exports_wrapGoogleADK: typeof wrapGoogleADK;
|
|
40732
41037
|
declare const exports_wrapGoogleGenAI: typeof wrapGoogleGenAI;
|
|
41038
|
+
declare const exports_wrapHuggingFace: typeof wrapHuggingFace;
|
|
40733
41039
|
declare const exports_wrapMastraAgent: typeof wrapMastraAgent;
|
|
40734
41040
|
declare const exports_wrapMistral: typeof wrapMistral;
|
|
40735
41041
|
declare const exports_wrapOpenAI: typeof wrapOpenAI;
|
|
@@ -40739,7 +41045,7 @@ declare const exports_wrapOpenRouterAgent: typeof wrapOpenRouterAgent;
|
|
|
40739
41045
|
declare const exports_wrapTraced: typeof wrapTraced;
|
|
40740
41046
|
declare const exports_wrapVitest: typeof wrapVitest;
|
|
40741
41047
|
declare namespace exports {
|
|
40742
|
-
export { type exports_AnyDataset as AnyDataset, exports_Attachment as Attachment, type exports_AttachmentParams as AttachmentParams, exports_AttachmentReference as AttachmentReference, exports_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, type exports_BackgroundLoggerOpts as BackgroundLoggerOpts, exports_BaseAttachment as BaseAttachment, exports_BaseExperiment as BaseExperiment, type exports_BaseMetadata as BaseMetadata, exports_BraintrustMiddleware as BraintrustMiddleware, exports_BraintrustState as BraintrustState, exports_BraintrustStream as BraintrustStream, type exports_BraintrustStreamChunk as BraintrustStreamChunk, exports_CachedSpanFetcher as CachedSpanFetcher, type exports_ChatPrompt as ChatPrompt, exports_CodeFunction as CodeFunction, type exports_CodeOpts as CodeOpts, exports_CodePrompt as CodePrompt, type exports_CommentEvent as CommentEvent, type exports_CompiledPrompt as CompiledPrompt, type exports_CompiledPromptParams as CompiledPromptParams, type exports_CompletionPrompt as CompletionPrompt, exports_ContextManager as ContextManager, type exports_ContextParentSpanIds as ContextParentSpanIds, type exports_CreateProjectOpts as CreateProjectOpts, type exports_CurrentSpanStore as CurrentSpanStore, exports_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports_DataSummary as DataSummary, exports_Dataset as Dataset, type exports_DatasetRecord as DatasetRecord, type exports_DatasetSummary as DatasetSummary, type exports_DefaultMetadataType as DefaultMetadataType, type exports_DefaultPromptArgs as DefaultPromptArgs, exports_ERR_PERMALINK as ERR_PERMALINK, type exports_EndSpanArgs as EndSpanArgs, exports_Eval as Eval, type exports_EvalCase as EvalCase, type exports_EvalHooks as EvalHooks, type exports_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports_EvalParameters as EvalParameters, type exports_EvalResult as EvalResult, exports_EvalResultWithSummary as EvalResultWithSummary, type exports_EvalScorer as EvalScorer, type exports_EvalScorerArgs as EvalScorerArgs, type exports_EvalTask as EvalTask, type exports_Evaluator as Evaluator, type exports_EvaluatorDef as EvaluatorDef, type exports_EvaluatorDefinition as EvaluatorDefinition, type exports_EvaluatorDefinitions as EvaluatorDefinitions, type exports_EvaluatorFile as EvaluatorFile, type exports_EvaluatorManifest as EvaluatorManifest, exports_Experiment as Experiment, type exports_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports_ExperimentSummary as ExperimentSummary, type exports_Exportable as Exportable, exports_ExternalAttachment as ExternalAttachment, type exports_ExternalAttachmentParams as ExternalAttachmentParams, exports_FailedHTTPResponse as FailedHTTPResponse, type exports_FullInitDatasetOptions as FullInitDatasetOptions, type exports_FullInitOptions as FullInitOptions, type exports_FullLoginOptions as FullLoginOptions, type exports_FunctionEvent as FunctionEvent, type exports_GetThreadOptions as GetThreadOptions, exports_IDGenerator as IDGenerator, type exports_IdField as IdField, type exports_InitDatasetOptions as InitDatasetOptions, type exports_InitLoggerOptions as InitLoggerOptions, type exports_InitOptions as InitOptions, type exports_InputField as InputField, type exports_InstrumentationConfig as InstrumentationConfig, type exports_InvokeFunctionArgs as InvokeFunctionArgs, type exports_InvokeReturn as InvokeReturn, exports_JSONAttachment as JSONAttachment, exports_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, exports_LazyValue as LazyValue, type exports_LoadPromptOptions as LoadPromptOptions, type exports_LogCommentFullArgs as LogCommentFullArgs, type exports_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports_LogOptions as LogOptions, exports_Logger as Logger, exports_LoginInvalidOrgError as LoginInvalidOrgError, type exports_LoginOptions as LoginOptions, type exports_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports_Logs3OverflowUpload as Logs3OverflowUpload, type exports_MetricSummary as MetricSummary, exports_NOOP_SPAN as NOOP_SPAN, exports_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports_NoopSpan as NoopSpan, exports_ObjectFetcher as ObjectFetcher, type exports_ObjectMetadata as ObjectMetadata, type exports_OtherExperimentLogFields as OtherExperimentLogFields, type exports_ParametersSource as ParametersSource, type exports_ParentExperimentIds as ParentExperimentIds, type exports_ParentProjectLogIds as ParentProjectLogIds, exports_Project as Project, exports_ProjectNameIdMap as ProjectNameIdMap, type exports_PromiseUnless as PromiseUnless, exports_Prompt as Prompt, exports_PromptBuilder as PromptBuilder, type exports_PromptContents as PromptContents, type exports_PromptDefinition as PromptDefinition, type exports_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports_PromptOpts as PromptOpts, type exports_PromptRowWithId as PromptRowWithId, exports_ReadonlyAttachment as ReadonlyAttachment, exports_ReadonlyExperiment as ReadonlyExperiment, type exports_RegisterSandboxOptions as RegisterSandboxOptions, type exports_RegisterSandboxResult as RegisterSandboxResult, exports_Reporter as Reporter, type exports_ReporterBody as ReporterBody, type exports_SandboxConfig as SandboxConfig, type exports_ScoreSummary as ScoreSummary, exports_ScorerBuilder as ScorerBuilder, type exports_ScorerOpts as ScorerOpts, type exports_SerializedBraintrustState as SerializedBraintrustState, type exports_SetCurrentArg as SetCurrentArg, type exports_Span as Span, type exports_SpanContext as SpanContext, type exports_SpanData as SpanData, exports_SpanFetcher as SpanFetcher, exports_SpanImpl as SpanImpl, type exports_StartSpanArgs as StartSpanArgs, type exports_TemplateFormat as TemplateFormat, type exports_TemplateRenderer as TemplateRenderer, type exports_TemplateRendererPlugin as TemplateRendererPlugin, exports_TestBackgroundLogger as TestBackgroundLogger, exports_ToolBuilder as ToolBuilder, type exports_Trace as Trace, exports_UUIDGenerator as UUIDGenerator, type exports_WithTransactionId as WithTransactionId, exports_X_CACHED_HEADER as X_CACHED_HEADER, exports__exportsForTestingOnly as _exportsForTestingOnly, exports__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports__internalSetInitialState as _internalSetInitialState, exports_addAzureBlobHeaders as addAzureBlobHeaders, exports_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports_buildLocalSummary as buildLocalSummary, exports_configureInstrumentation as configureInstrumentation, exports_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports_currentExperiment as currentExperiment, exports_currentLogger as currentLogger, exports_currentSpan as currentSpan, exports_deepCopyEvent as deepCopyEvent, exports_defaultErrorScoreHandler as defaultErrorScoreHandler, exports_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports_devNullWritableStream as devNullWritableStream, exports_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports_flush as flush, exports_getContextManager as getContextManager, exports_getIdGenerator as getIdGenerator, exports_getPromptVersions as getPromptVersions, exports_getSpanParentObject as getSpanParentObject, exports_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports_init as init, exports_initDataset as initDataset, exports_initExperiment as initExperiment, exports_initFunction as initFunction, exports_initLogger as initLogger, exports_initNodeTestSuite as initNodeTestSuite, exports_invoke as invoke, exports_isTemplateFormat as isTemplateFormat, exports_loadParameters as loadParameters, exports_loadPrompt as loadPrompt, exports_log as log, exports_logError as logError, exports_login as login, exports_loginToState as loginToState, exports_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports_newId as newId, exports_parseCachedHeader as parseCachedHeader, exports_parseTemplateFormat as parseTemplateFormat, exports_permalink as permalink, exports_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports_projects as projects, exports_promptContentsSchema as promptContentsSchema, exports_promptDefinitionSchema as promptDefinitionSchema, exports_promptDefinitionToPromptData as promptDefinitionToPromptData, exports_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports_registerOtelFlush as registerOtelFlush, exports_registerSandbox as registerSandbox, exports_registerTemplatePlugin as registerTemplatePlugin, exports_renderMessage as renderMessage, exports_renderPromptParams as renderPromptParams, exports_renderTemplateContent as renderTemplateContent, exports_reportFailures as reportFailures, exports_runEvaluator as runEvaluator, exports_setFetch as setFetch, exports_setMaskingFunction as setMaskingFunction, exports_spanComponentsToObjectId as spanComponentsToObjectId, exports_startSpan as startSpan, exports_summarize as summarize, exports_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports_traceable as traceable, exports_traced as traced, exports_updateSpan as updateSpan, exports_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports_utf8ByteLength as utf8ByteLength, exports_withCurrent as withCurrent, exports_withDataset as withDataset, exports_withExperiment as withExperiment, exports_withLogger as withLogger, exports_withParent as withParent, exports_wrapAISDK as wrapAISDK, exports_wrapAISDKModel as wrapAISDKModel, exports_wrapAgentClass as wrapAgentClass, exports_wrapAnthropic as wrapAnthropic, exports_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports_wrapGoogleGenAI as wrapGoogleGenAI, exports_wrapMastraAgent as wrapMastraAgent, exports_wrapMistral as wrapMistral, exports_wrapOpenAI as wrapOpenAI, exports_wrapOpenAIv4 as wrapOpenAIv4, exports_wrapOpenRouter as wrapOpenRouter, exports_wrapOpenRouterAgent as wrapOpenRouterAgent, exports_wrapTraced as wrapTraced, exports_wrapVitest as wrapVitest };
|
|
41048
|
+
export { type exports_AnyDataset as AnyDataset, exports_Attachment as Attachment, type exports_AttachmentParams as AttachmentParams, exports_AttachmentReference as AttachmentReference, exports_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, type exports_BackgroundLoggerOpts as BackgroundLoggerOpts, exports_BaseAttachment as BaseAttachment, exports_BaseExperiment as BaseExperiment, type exports_BaseMetadata as BaseMetadata, exports_BraintrustMiddleware as BraintrustMiddleware, exports_BraintrustState as BraintrustState, exports_BraintrustStream as BraintrustStream, type exports_BraintrustStreamChunk as BraintrustStreamChunk, exports_CachedSpanFetcher as CachedSpanFetcher, type exports_ChatPrompt as ChatPrompt, exports_CodeFunction as CodeFunction, type exports_CodeOpts as CodeOpts, exports_CodePrompt as CodePrompt, type exports_CommentEvent as CommentEvent, type exports_CompiledPrompt as CompiledPrompt, type exports_CompiledPromptParams as CompiledPromptParams, type exports_CompletionPrompt as CompletionPrompt, exports_ContextManager as ContextManager, type exports_ContextParentSpanIds as ContextParentSpanIds, type exports_CreateProjectOpts as CreateProjectOpts, type exports_CurrentSpanStore as CurrentSpanStore, exports_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports_DataSummary as DataSummary, exports_Dataset as Dataset, type exports_DatasetRecord as DatasetRecord, type exports_DatasetSummary as DatasetSummary, type exports_DefaultMetadataType as DefaultMetadataType, type exports_DefaultPromptArgs as DefaultPromptArgs, exports_ERR_PERMALINK as ERR_PERMALINK, type exports_EndSpanArgs as EndSpanArgs, exports_Eval as Eval, type exports_EvalCase as EvalCase, type exports_EvalClassifier as EvalClassifier, type exports_EvalHooks as EvalHooks, type exports_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports_EvalParameters as EvalParameters, type exports_EvalResult as EvalResult, exports_EvalResultWithSummary as EvalResultWithSummary, type exports_EvalScorer as EvalScorer, type exports_EvalScorerArgs as EvalScorerArgs, type exports_EvalTask as EvalTask, type exports_Evaluator as Evaluator, type exports_EvaluatorDef as EvaluatorDef, type exports_EvaluatorDefinition as EvaluatorDefinition, type exports_EvaluatorDefinitions as EvaluatorDefinitions, type exports_EvaluatorFile as EvaluatorFile, type exports_EvaluatorManifest as EvaluatorManifest, exports_Experiment as Experiment, type exports_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports_ExperimentSummary as ExperimentSummary, type exports_Exportable as Exportable, exports_ExternalAttachment as ExternalAttachment, type exports_ExternalAttachmentParams as ExternalAttachmentParams, exports_FailedHTTPResponse as FailedHTTPResponse, type exports_FullInitDatasetOptions as FullInitDatasetOptions, type exports_FullInitOptions as FullInitOptions, type exports_FullLoginOptions as FullLoginOptions, type exports_FunctionEvent as FunctionEvent, type exports_GetThreadOptions as GetThreadOptions, exports_IDGenerator as IDGenerator, type exports_IdField as IdField, type exports_InitDatasetOptions as InitDatasetOptions, type exports_InitLoggerOptions as InitLoggerOptions, type exports_InitOptions as InitOptions, type exports_InputField as InputField, type exports_InstrumentationConfig as InstrumentationConfig, type exports_InvokeFunctionArgs as InvokeFunctionArgs, type exports_InvokeReturn as InvokeReturn, exports_JSONAttachment as JSONAttachment, exports_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, exports_LazyValue as LazyValue, type exports_LoadPromptOptions as LoadPromptOptions, type exports_LogCommentFullArgs as LogCommentFullArgs, type exports_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports_LogOptions as LogOptions, exports_Logger as Logger, exports_LoginInvalidOrgError as LoginInvalidOrgError, type exports_LoginOptions as LoginOptions, type exports_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports_Logs3OverflowUpload as Logs3OverflowUpload, type exports_MetricSummary as MetricSummary, exports_NOOP_SPAN as NOOP_SPAN, exports_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports_NoopSpan as NoopSpan, exports_ObjectFetcher as ObjectFetcher, type exports_ObjectMetadata as ObjectMetadata, type exports_OtherExperimentLogFields as OtherExperimentLogFields, type exports_ParametersSource as ParametersSource, type exports_ParentExperimentIds as ParentExperimentIds, type exports_ParentProjectLogIds as ParentProjectLogIds, exports_Project as Project, exports_ProjectNameIdMap as ProjectNameIdMap, type exports_PromiseUnless as PromiseUnless, exports_Prompt as Prompt, exports_PromptBuilder as PromptBuilder, type exports_PromptContents as PromptContents, type exports_PromptDefinition as PromptDefinition, type exports_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports_PromptOpts as PromptOpts, type exports_PromptRowWithId as PromptRowWithId, exports_ReadonlyAttachment as ReadonlyAttachment, exports_ReadonlyExperiment as ReadonlyExperiment, type exports_RegisterSandboxOptions as RegisterSandboxOptions, type exports_RegisterSandboxResult as RegisterSandboxResult, exports_Reporter as Reporter, type exports_ReporterBody as ReporterBody, type exports_SandboxConfig as SandboxConfig, type exports_ScoreSummary as ScoreSummary, exports_ScorerBuilder as ScorerBuilder, type exports_ScorerOpts as ScorerOpts, type exports_SerializedBraintrustState as SerializedBraintrustState, type exports_SetCurrentArg as SetCurrentArg, type exports_Span as Span, type exports_SpanContext as SpanContext, type exports_SpanData as SpanData, exports_SpanFetcher as SpanFetcher, exports_SpanImpl as SpanImpl, type exports_StartSpanArgs as StartSpanArgs, type exports_TemplateFormat as TemplateFormat, type exports_TemplateRenderer as TemplateRenderer, type exports_TemplateRendererPlugin as TemplateRendererPlugin, exports_TestBackgroundLogger as TestBackgroundLogger, exports_ToolBuilder as ToolBuilder, type exports_Trace as Trace, exports_UUIDGenerator as UUIDGenerator, type exports_WithTransactionId as WithTransactionId, exports_X_CACHED_HEADER as X_CACHED_HEADER, exports__exportsForTestingOnly as _exportsForTestingOnly, exports__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports__internalSetInitialState as _internalSetInitialState, exports_addAzureBlobHeaders as addAzureBlobHeaders, exports_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports_buildLocalSummary as buildLocalSummary, exports_configureInstrumentation as configureInstrumentation, exports_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports_currentExperiment as currentExperiment, exports_currentLogger as currentLogger, exports_currentSpan as currentSpan, exports_deepCopyEvent as deepCopyEvent, exports_defaultErrorScoreHandler as defaultErrorScoreHandler, exports_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports_devNullWritableStream as devNullWritableStream, exports_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports_flush as flush, exports_getContextManager as getContextManager, exports_getIdGenerator as getIdGenerator, exports_getPromptVersions as getPromptVersions, exports_getSpanParentObject as getSpanParentObject, exports_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports_init as init, exports_initDataset as initDataset, exports_initExperiment as initExperiment, exports_initFunction as initFunction, exports_initLogger as initLogger, exports_initNodeTestSuite as initNodeTestSuite, exports_invoke as invoke, exports_isTemplateFormat as isTemplateFormat, exports_loadParameters as loadParameters, exports_loadPrompt as loadPrompt, exports_log as log, exports_logError as logError, exports_login as login, exports_loginToState as loginToState, exports_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports_newId as newId, exports_parseCachedHeader as parseCachedHeader, exports_parseTemplateFormat as parseTemplateFormat, exports_permalink as permalink, exports_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports_projects as projects, exports_promptContentsSchema as promptContentsSchema, exports_promptDefinitionSchema as promptDefinitionSchema, exports_promptDefinitionToPromptData as promptDefinitionToPromptData, exports_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports_registerOtelFlush as registerOtelFlush, exports_registerSandbox as registerSandbox, exports_registerTemplatePlugin as registerTemplatePlugin, exports_renderMessage as renderMessage, exports_renderPromptParams as renderPromptParams, exports_renderTemplateContent as renderTemplateContent, exports_reportFailures as reportFailures, exports_runEvaluator as runEvaluator, exports_setFetch as setFetch, exports_setMaskingFunction as setMaskingFunction, exports_spanComponentsToObjectId as spanComponentsToObjectId, exports_startSpan as startSpan, exports_summarize as summarize, exports_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports_traceable as traceable, exports_traced as traced, exports_updateSpan as updateSpan, exports_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports_utf8ByteLength as utf8ByteLength, exports_withCurrent as withCurrent, exports_withDataset as withDataset, exports_withExperiment as withExperiment, exports_withLogger as withLogger, exports_withParent as withParent, exports_wrapAISDK as wrapAISDK, exports_wrapAISDKModel as wrapAISDKModel, exports_wrapAgentClass as wrapAgentClass, exports_wrapAnthropic as wrapAnthropic, exports_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports_wrapCohere as wrapCohere, exports_wrapGoogleADK as wrapGoogleADK, exports_wrapGoogleGenAI as wrapGoogleGenAI, exports_wrapHuggingFace as wrapHuggingFace, exports_wrapMastraAgent as wrapMastraAgent, exports_wrapMistral as wrapMistral, exports_wrapOpenAI as wrapOpenAI, exports_wrapOpenAIv4 as wrapOpenAIv4, exports_wrapOpenRouter as wrapOpenRouter, exports_wrapOpenRouterAgent as wrapOpenRouterAgent, exports_wrapTraced as wrapTraced, exports_wrapVitest as wrapVitest };
|
|
40743
41049
|
}
|
|
40744
41050
|
|
|
40745
|
-
export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustMiddleware, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, LazyValue, type LoadPromptOptions, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, braintrustStreamChunkSchema, buildLocalSummary, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapClaudeAgentSDK, wrapGoogleGenAI, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };
|
|
41051
|
+
export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BRAINTRUST_CURRENT_SPAN_STORE, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustMiddleware, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, type DatasetRecord, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalClassifier, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, LazyValue, type LoadPromptOptions, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, braintrustStreamChunkSchema, buildLocalSummary, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapClaudeAgentSDK, wrapCohere, wrapGoogleADK, wrapGoogleGenAI, wrapHuggingFace, wrapMastraAgent, wrapMistral, wrapOpenAI, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapTraced, wrapVitest };
|