braintrust 3.17.0 → 3.19.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/README.md +0 -10
- package/dev/dist/index.d.mts +13 -0
- package/dev/dist/index.d.ts +13 -0
- package/dev/dist/index.js +11289 -7551
- package/dev/dist/index.mjs +11249 -7511
- package/dist/apply-auto-instrumentation.js +406 -187
- package/dist/apply-auto-instrumentation.mjs +237 -18
- package/dist/auto-instrumentations/bundler/esbuild.cjs +299 -18
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/next.cjs +299 -18
- package/dist/auto-instrumentations/bundler/next.mjs +3 -3
- package/dist/auto-instrumentations/bundler/rollup.cjs +299 -18
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +299 -18
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +298 -17
- package/dist/auto-instrumentations/bundler/webpack.cjs +299 -18
- package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
- package/dist/auto-instrumentations/{chunk-CNQ7BUKN.mjs → chunk-K74TZGGM.mjs} +1 -1
- package/dist/auto-instrumentations/{chunk-VXJONZVX.mjs → chunk-S4374IP6.mjs} +96 -6
- package/dist/auto-instrumentations/{chunk-E5DUYJWK.mjs → chunk-W4E36GIW.mjs} +210 -15
- package/dist/auto-instrumentations/hook.mjs +311 -18
- package/dist/auto-instrumentations/index.cjs +213 -16
- package/dist/auto-instrumentations/index.d.mts +5 -1
- package/dist/auto-instrumentations/index.d.ts +5 -1
- package/dist/auto-instrumentations/index.mjs +7 -3
- package/dist/auto-instrumentations/loader/cjs-patch.cjs +1 -1
- package/dist/auto-instrumentations/loader/cjs-patch.mjs +1 -1
- package/dist/auto-instrumentations/loader/esm-hook.mjs +1 -1
- package/dist/browser.d.mts +254 -17
- package/dist/browser.d.ts +254 -17
- package/dist/browser.js +4470 -385
- package/dist/browser.mjs +8610 -4525
- package/dist/chunk-37RLJF2U.js +29262 -0
- package/dist/{chunk-VMBQETG3.js → chunk-LPC4W2WX.js} +80 -4
- package/dist/chunk-VEQ2PCMC.mjs +29262 -0
- package/dist/{chunk-O4ZIWXO3.mjs → chunk-Y7W7WP6H.mjs} +79 -3
- package/dist/cli.js +11262 -7518
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +4470 -385
- package/dist/edge-light.mjs +8610 -4525
- package/dist/index.d.mts +254 -17
- package/dist/index.d.ts +254 -17
- package/dist/index.js +952 -25912
- package/dist/index.mjs +699 -25659
- package/dist/instrumentation/index.d.mts +69 -6
- package/dist/instrumentation/index.d.ts +69 -6
- package/dist/instrumentation/index.js +12602 -8900
- package/dist/instrumentation/index.mjs +12602 -8900
- package/dist/vitest-evals-reporter.d.mts +22 -0
- package/dist/vitest-evals-reporter.d.ts +22 -0
- package/dist/vitest-evals-reporter.js +401 -0
- package/dist/vitest-evals-reporter.mjs +401 -0
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +4470 -385
- package/dist/workerd.mjs +8610 -4525
- package/package.json +16 -10
|
@@ -6144,9 +6144,14 @@ interface InstrumentationIntegrationsConfig {
|
|
|
6144
6144
|
mistral?: boolean;
|
|
6145
6145
|
cohere?: boolean;
|
|
6146
6146
|
groq?: boolean;
|
|
6147
|
+
bedrock?: boolean;
|
|
6148
|
+
awsBedrock?: boolean;
|
|
6149
|
+
awsBedrockRuntime?: boolean;
|
|
6147
6150
|
genkit?: boolean;
|
|
6148
6151
|
gitHubCopilot?: boolean;
|
|
6149
6152
|
openaiCodexSDK?: boolean;
|
|
6153
|
+
piCodingAgent?: boolean;
|
|
6154
|
+
strandsAgentSDK?: boolean;
|
|
6150
6155
|
langchain?: boolean;
|
|
6151
6156
|
langgraph?: boolean;
|
|
6152
6157
|
}
|
|
@@ -6195,10 +6200,13 @@ declare class BraintrustPlugin extends BasePlugin {
|
|
|
6195
6200
|
private googleADKPlugin;
|
|
6196
6201
|
private coherePlugin;
|
|
6197
6202
|
private groqPlugin;
|
|
6203
|
+
private bedrockRuntimePlugin;
|
|
6198
6204
|
private genkitPlugin;
|
|
6199
6205
|
private gitHubCopilotPlugin;
|
|
6200
6206
|
private fluePlugin;
|
|
6201
6207
|
private langChainPlugin;
|
|
6208
|
+
private piCodingAgentPlugin;
|
|
6209
|
+
private strandsAgentSDKPlugin;
|
|
6202
6210
|
constructor(config?: BraintrustPluginConfig);
|
|
6203
6211
|
protected onEnable(): void;
|
|
6204
6212
|
protected onDisable(): void;
|
|
@@ -7621,6 +7629,7 @@ declare class Experiment extends ObjectFetcher<ExperimentEvent> implements Expor
|
|
|
7621
7629
|
_waitForId(): Promise<void>;
|
|
7622
7630
|
get name(): Promise<string>;
|
|
7623
7631
|
get project(): Promise<ObjectMetadata>;
|
|
7632
|
+
_getBaseExperimentId(): Promise<string | undefined>;
|
|
7624
7633
|
private parentObjectType;
|
|
7625
7634
|
protected getState(): Promise<BraintrustState>;
|
|
7626
7635
|
/**
|
|
@@ -8165,15 +8174,69 @@ declare class OpenAIAgentsTraceProcessor {
|
|
|
8165
8174
|
private omitKeys;
|
|
8166
8175
|
}
|
|
8167
8176
|
|
|
8168
|
-
type FlueObserver = (event: unknown, ctx?: unknown) => void;
|
|
8169
8177
|
/**
|
|
8170
|
-
*
|
|
8171
|
-
*
|
|
8172
|
-
* Pass this directly to @flue/runtime/app.observe:
|
|
8178
|
+
* Vendored types for @flue/runtime observe/instrument-based instrumentation.
|
|
8173
8179
|
*
|
|
8174
|
-
*
|
|
8180
|
+
* Keep this surface intentionally narrow. These types are not exported to SDK
|
|
8181
|
+
* users and should only cover fields we read, correlate, or log.
|
|
8175
8182
|
*/
|
|
8176
|
-
|
|
8183
|
+
type FlueOperationKind = "prompt" | "skill" | "task" | "compact";
|
|
8184
|
+
interface FlueContext {
|
|
8185
|
+
readonly id?: string;
|
|
8186
|
+
readonly runId?: string;
|
|
8187
|
+
[key: string | symbol]: unknown;
|
|
8188
|
+
}
|
|
8189
|
+
type FlueExecutionOperation = {
|
|
8190
|
+
type: "workflow";
|
|
8191
|
+
runId: string;
|
|
8192
|
+
workflowName: string;
|
|
8193
|
+
phase: "start" | "resume";
|
|
8194
|
+
startedAt: string;
|
|
8195
|
+
} | {
|
|
8196
|
+
type: "agent";
|
|
8197
|
+
operationId: string;
|
|
8198
|
+
operationKind: FlueOperationKind;
|
|
8199
|
+
} | {
|
|
8200
|
+
type: "model";
|
|
8201
|
+
turnId: string;
|
|
8202
|
+
} | {
|
|
8203
|
+
type: "tool";
|
|
8204
|
+
toolCallId: string;
|
|
8205
|
+
toolName: string;
|
|
8206
|
+
} | {
|
|
8207
|
+
type: "task";
|
|
8208
|
+
taskId: string;
|
|
8209
|
+
};
|
|
8210
|
+
interface FlueTraceCarrier {
|
|
8211
|
+
traceparent: string;
|
|
8212
|
+
tracestate?: string;
|
|
8213
|
+
}
|
|
8214
|
+
interface FlueExecutionContext {
|
|
8215
|
+
eventContext?: FlueContext;
|
|
8216
|
+
runId?: string;
|
|
8217
|
+
instanceId?: string;
|
|
8218
|
+
submissionId?: string;
|
|
8219
|
+
dispatchId?: string;
|
|
8220
|
+
agentName?: string;
|
|
8221
|
+
conversationId?: string;
|
|
8222
|
+
harness?: string;
|
|
8223
|
+
session?: string;
|
|
8224
|
+
operationId?: string;
|
|
8225
|
+
turnId?: string;
|
|
8226
|
+
taskId?: string;
|
|
8227
|
+
traceCarrier?: FlueTraceCarrier;
|
|
8228
|
+
}
|
|
8229
|
+
type FlueExecutionInterceptor = <T>(operation: FlueExecutionOperation, ctx: FlueExecutionContext, next: () => Promise<T>) => Promise<T>;
|
|
8230
|
+
interface FlueInstrumentation {
|
|
8231
|
+
key?: symbol;
|
|
8232
|
+
observe(event: unknown, ctx?: unknown): void | Promise<void>;
|
|
8233
|
+
interceptor: FlueExecutionInterceptor;
|
|
8234
|
+
dispose(): void | Promise<void>;
|
|
8235
|
+
}
|
|
8236
|
+
|
|
8237
|
+
type FlueObserver = (event: unknown, ctx?: unknown) => void;
|
|
8238
|
+
type BraintrustFlueObserver = FlueObserver & FlueInstrumentation;
|
|
8239
|
+
declare const braintrustFlueObserver: BraintrustFlueObserver;
|
|
8177
8240
|
|
|
8178
8241
|
/**
|
|
8179
8242
|
* Plugin registry and configuration for auto-instrumentation.
|
|
@@ -6144,9 +6144,14 @@ interface InstrumentationIntegrationsConfig {
|
|
|
6144
6144
|
mistral?: boolean;
|
|
6145
6145
|
cohere?: boolean;
|
|
6146
6146
|
groq?: boolean;
|
|
6147
|
+
bedrock?: boolean;
|
|
6148
|
+
awsBedrock?: boolean;
|
|
6149
|
+
awsBedrockRuntime?: boolean;
|
|
6147
6150
|
genkit?: boolean;
|
|
6148
6151
|
gitHubCopilot?: boolean;
|
|
6149
6152
|
openaiCodexSDK?: boolean;
|
|
6153
|
+
piCodingAgent?: boolean;
|
|
6154
|
+
strandsAgentSDK?: boolean;
|
|
6150
6155
|
langchain?: boolean;
|
|
6151
6156
|
langgraph?: boolean;
|
|
6152
6157
|
}
|
|
@@ -6195,10 +6200,13 @@ declare class BraintrustPlugin extends BasePlugin {
|
|
|
6195
6200
|
private googleADKPlugin;
|
|
6196
6201
|
private coherePlugin;
|
|
6197
6202
|
private groqPlugin;
|
|
6203
|
+
private bedrockRuntimePlugin;
|
|
6198
6204
|
private genkitPlugin;
|
|
6199
6205
|
private gitHubCopilotPlugin;
|
|
6200
6206
|
private fluePlugin;
|
|
6201
6207
|
private langChainPlugin;
|
|
6208
|
+
private piCodingAgentPlugin;
|
|
6209
|
+
private strandsAgentSDKPlugin;
|
|
6202
6210
|
constructor(config?: BraintrustPluginConfig);
|
|
6203
6211
|
protected onEnable(): void;
|
|
6204
6212
|
protected onDisable(): void;
|
|
@@ -7621,6 +7629,7 @@ declare class Experiment extends ObjectFetcher<ExperimentEvent> implements Expor
|
|
|
7621
7629
|
_waitForId(): Promise<void>;
|
|
7622
7630
|
get name(): Promise<string>;
|
|
7623
7631
|
get project(): Promise<ObjectMetadata>;
|
|
7632
|
+
_getBaseExperimentId(): Promise<string | undefined>;
|
|
7624
7633
|
private parentObjectType;
|
|
7625
7634
|
protected getState(): Promise<BraintrustState>;
|
|
7626
7635
|
/**
|
|
@@ -8165,15 +8174,69 @@ declare class OpenAIAgentsTraceProcessor {
|
|
|
8165
8174
|
private omitKeys;
|
|
8166
8175
|
}
|
|
8167
8176
|
|
|
8168
|
-
type FlueObserver = (event: unknown, ctx?: unknown) => void;
|
|
8169
8177
|
/**
|
|
8170
|
-
*
|
|
8171
|
-
*
|
|
8172
|
-
* Pass this directly to @flue/runtime/app.observe:
|
|
8178
|
+
* Vendored types for @flue/runtime observe/instrument-based instrumentation.
|
|
8173
8179
|
*
|
|
8174
|
-
*
|
|
8180
|
+
* Keep this surface intentionally narrow. These types are not exported to SDK
|
|
8181
|
+
* users and should only cover fields we read, correlate, or log.
|
|
8175
8182
|
*/
|
|
8176
|
-
|
|
8183
|
+
type FlueOperationKind = "prompt" | "skill" | "task" | "compact";
|
|
8184
|
+
interface FlueContext {
|
|
8185
|
+
readonly id?: string;
|
|
8186
|
+
readonly runId?: string;
|
|
8187
|
+
[key: string | symbol]: unknown;
|
|
8188
|
+
}
|
|
8189
|
+
type FlueExecutionOperation = {
|
|
8190
|
+
type: "workflow";
|
|
8191
|
+
runId: string;
|
|
8192
|
+
workflowName: string;
|
|
8193
|
+
phase: "start" | "resume";
|
|
8194
|
+
startedAt: string;
|
|
8195
|
+
} | {
|
|
8196
|
+
type: "agent";
|
|
8197
|
+
operationId: string;
|
|
8198
|
+
operationKind: FlueOperationKind;
|
|
8199
|
+
} | {
|
|
8200
|
+
type: "model";
|
|
8201
|
+
turnId: string;
|
|
8202
|
+
} | {
|
|
8203
|
+
type: "tool";
|
|
8204
|
+
toolCallId: string;
|
|
8205
|
+
toolName: string;
|
|
8206
|
+
} | {
|
|
8207
|
+
type: "task";
|
|
8208
|
+
taskId: string;
|
|
8209
|
+
};
|
|
8210
|
+
interface FlueTraceCarrier {
|
|
8211
|
+
traceparent: string;
|
|
8212
|
+
tracestate?: string;
|
|
8213
|
+
}
|
|
8214
|
+
interface FlueExecutionContext {
|
|
8215
|
+
eventContext?: FlueContext;
|
|
8216
|
+
runId?: string;
|
|
8217
|
+
instanceId?: string;
|
|
8218
|
+
submissionId?: string;
|
|
8219
|
+
dispatchId?: string;
|
|
8220
|
+
agentName?: string;
|
|
8221
|
+
conversationId?: string;
|
|
8222
|
+
harness?: string;
|
|
8223
|
+
session?: string;
|
|
8224
|
+
operationId?: string;
|
|
8225
|
+
turnId?: string;
|
|
8226
|
+
taskId?: string;
|
|
8227
|
+
traceCarrier?: FlueTraceCarrier;
|
|
8228
|
+
}
|
|
8229
|
+
type FlueExecutionInterceptor = <T>(operation: FlueExecutionOperation, ctx: FlueExecutionContext, next: () => Promise<T>) => Promise<T>;
|
|
8230
|
+
interface FlueInstrumentation {
|
|
8231
|
+
key?: symbol;
|
|
8232
|
+
observe(event: unknown, ctx?: unknown): void | Promise<void>;
|
|
8233
|
+
interceptor: FlueExecutionInterceptor;
|
|
8234
|
+
dispose(): void | Promise<void>;
|
|
8235
|
+
}
|
|
8236
|
+
|
|
8237
|
+
type FlueObserver = (event: unknown, ctx?: unknown) => void;
|
|
8238
|
+
type BraintrustFlueObserver = FlueObserver & FlueInstrumentation;
|
|
8239
|
+
declare const braintrustFlueObserver: BraintrustFlueObserver;
|
|
8177
8240
|
|
|
8178
8241
|
/**
|
|
8179
8242
|
* Plugin registry and configuration for auto-instrumentation.
|