braintrust 3.13.0 → 3.15.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 +6 -8
- package/dev/dist/index.d.ts +6 -8
- package/dev/dist/index.js +1399 -1466
- package/dev/dist/index.mjs +971 -1038
- package/dist/apply-auto-instrumentation.js +208 -188
- package/dist/apply-auto-instrumentation.mjs +40 -20
- package/dist/auto-instrumentations/bundler/esbuild.cjs +230 -40
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -1
- package/dist/auto-instrumentations/bundler/next.cjs +230 -40
- package/dist/auto-instrumentations/bundler/next.mjs +3 -2
- package/dist/auto-instrumentations/bundler/rollup.cjs +230 -40
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -1
- package/dist/auto-instrumentations/bundler/vite.cjs +230 -40
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -1
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +13 -39
- package/dist/auto-instrumentations/bundler/webpack.cjs +230 -40
- package/dist/auto-instrumentations/bundler/webpack.mjs +3 -2
- package/dist/auto-instrumentations/{chunk-WFEUJACP.mjs → chunk-CNQ7BUKN.mjs} +1 -1
- package/dist/auto-instrumentations/chunk-J57YF7WS.mjs +208 -0
- package/dist/auto-instrumentations/chunk-QFMACSOL.mjs +280 -0
- package/dist/auto-instrumentations/{chunk-GJOO4ESL.mjs → chunk-VXJONZVX.mjs} +28 -40
- package/dist/auto-instrumentations/hook.mjs +7985 -46
- package/dist/auto-instrumentations/loader/cjs-patch.cjs +194 -4
- package/dist/auto-instrumentations/loader/cjs-patch.mjs +13 -27
- package/dist/auto-instrumentations/loader/esm-hook.mjs +24 -10
- package/dist/browser.d.mts +138 -26
- package/dist/browser.d.ts +138 -26
- package/dist/browser.js +898 -1063
- package/dist/browser.mjs +898 -1063
- package/dist/{chunk-75IQCUB2.mjs → chunk-O4ZIWXO3.mjs} +179 -25
- package/dist/{chunk-26JGOELH.js → chunk-VMBQETG3.js} +179 -25
- package/dist/cli.js +990 -1077
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +898 -1063
- package/dist/edge-light.mjs +898 -1063
- package/dist/index.d.mts +138 -26
- package/dist/index.d.ts +138 -26
- package/dist/index.js +1690 -1825
- package/dist/index.mjs +918 -1053
- package/dist/instrumentation/index.d.mts +18 -9
- package/dist/instrumentation/index.d.ts +18 -9
- package/dist/instrumentation/index.js +711 -1038
- package/dist/instrumentation/index.mjs +710 -1038
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +898 -1063
- package/dist/workerd.mjs +898 -1063
- package/package.json +1 -7
- package/dist/auto-instrumentations/chunk-MWZXZQUO.mjs +0 -81
|
@@ -6137,6 +6137,7 @@ interface InstrumentationIntegrationsConfig {
|
|
|
6137
6137
|
cursor?: boolean;
|
|
6138
6138
|
cursorSDK?: boolean;
|
|
6139
6139
|
flue?: boolean;
|
|
6140
|
+
mastra?: boolean;
|
|
6140
6141
|
openAIAgents?: boolean;
|
|
6141
6142
|
openrouter?: boolean;
|
|
6142
6143
|
openrouterAgent?: boolean;
|
|
@@ -6737,17 +6738,15 @@ interface PromptKey {
|
|
|
6737
6738
|
id?: string;
|
|
6738
6739
|
}
|
|
6739
6740
|
/**
|
|
6740
|
-
* A
|
|
6741
|
+
* A configurable cache for Braintrust prompts with optional in-memory and filesystem storage.
|
|
6741
6742
|
*
|
|
6742
|
-
* This cache
|
|
6743
|
-
* 1. A fast in-memory LRU cache for frequently accessed prompts.
|
|
6744
|
-
* 2. An optional persistent filesystem-based cache that serves as a backing store.
|
|
6743
|
+
* This cache can use either layer independently, both layers together, or no layers.
|
|
6745
6744
|
*/
|
|
6746
6745
|
declare class PromptCache {
|
|
6747
|
-
private readonly memoryCache
|
|
6746
|
+
private readonly memoryCache?;
|
|
6748
6747
|
private readonly diskCache?;
|
|
6749
6748
|
constructor(options: {
|
|
6750
|
-
memoryCache
|
|
6749
|
+
memoryCache?: LRUCache<string, Prompt>;
|
|
6751
6750
|
diskCache?: DiskCache<Prompt>;
|
|
6752
6751
|
});
|
|
6753
6752
|
/**
|
|
@@ -6774,10 +6773,10 @@ interface ParametersKey {
|
|
|
6774
6773
|
id?: string;
|
|
6775
6774
|
}
|
|
6776
6775
|
declare class ParametersCache {
|
|
6777
|
-
private readonly memoryCache
|
|
6776
|
+
private readonly memoryCache?;
|
|
6778
6777
|
private readonly diskCache?;
|
|
6779
6778
|
constructor(options: {
|
|
6780
|
-
memoryCache
|
|
6779
|
+
memoryCache?: LRUCache<string, RemoteEvalParameters>;
|
|
6781
6780
|
diskCache?: DiskCache<RemoteEvalParameters>;
|
|
6782
6781
|
});
|
|
6783
6782
|
get(key: ParametersKey): Promise<RemoteEvalParameters | undefined>;
|
|
@@ -8166,6 +8165,16 @@ declare class OpenAIAgentsTraceProcessor {
|
|
|
8166
8165
|
private omitKeys;
|
|
8167
8166
|
}
|
|
8168
8167
|
|
|
8168
|
+
type FlueObserver = (event: unknown, ctx?: unknown) => void;
|
|
8169
|
+
/**
|
|
8170
|
+
* Braintrust's Flue observe subscriber.
|
|
8171
|
+
*
|
|
8172
|
+
* Pass this directly to @flue/runtime/app.observe:
|
|
8173
|
+
*
|
|
8174
|
+
* const unsubscribe = observe(braintrustFlueObserver);
|
|
8175
|
+
*/
|
|
8176
|
+
declare const braintrustFlueObserver: FlueObserver;
|
|
8177
|
+
|
|
8169
8178
|
/**
|
|
8170
8179
|
* Plugin registry and configuration for auto-instrumentation.
|
|
8171
8180
|
*
|
|
@@ -8202,4 +8211,4 @@ declare class OpenAIAgentsTraceProcessor {
|
|
|
8202
8211
|
*/
|
|
8203
8212
|
declare function configureInstrumentation(config: InstrumentationConfig): void;
|
|
8204
8213
|
|
|
8205
|
-
export { type AsyncEndEvent, type AsyncStartEvent, type BaseContext, BasePlugin, BraintrustPlugin, type BraintrustPluginConfig, type ChannelHandlers, type EndEvent, type ErrorEvent, type InstrumentationConfig, OpenAIAgentsTraceProcessor, type OpenAIAgentsTraceProcessorOptions, type StartEvent, configureInstrumentation, createChannelName, isValidChannelName, parseChannelName };
|
|
8214
|
+
export { type AsyncEndEvent, type AsyncStartEvent, type BaseContext, BasePlugin, BraintrustPlugin, type BraintrustPluginConfig, type ChannelHandlers, type EndEvent, type ErrorEvent, type InstrumentationConfig, OpenAIAgentsTraceProcessor, type OpenAIAgentsTraceProcessorOptions, type StartEvent, braintrustFlueObserver, configureInstrumentation, createChannelName, isValidChannelName, parseChannelName };
|
|
@@ -6137,6 +6137,7 @@ interface InstrumentationIntegrationsConfig {
|
|
|
6137
6137
|
cursor?: boolean;
|
|
6138
6138
|
cursorSDK?: boolean;
|
|
6139
6139
|
flue?: boolean;
|
|
6140
|
+
mastra?: boolean;
|
|
6140
6141
|
openAIAgents?: boolean;
|
|
6141
6142
|
openrouter?: boolean;
|
|
6142
6143
|
openrouterAgent?: boolean;
|
|
@@ -6737,17 +6738,15 @@ interface PromptKey {
|
|
|
6737
6738
|
id?: string;
|
|
6738
6739
|
}
|
|
6739
6740
|
/**
|
|
6740
|
-
* A
|
|
6741
|
+
* A configurable cache for Braintrust prompts with optional in-memory and filesystem storage.
|
|
6741
6742
|
*
|
|
6742
|
-
* This cache
|
|
6743
|
-
* 1. A fast in-memory LRU cache for frequently accessed prompts.
|
|
6744
|
-
* 2. An optional persistent filesystem-based cache that serves as a backing store.
|
|
6743
|
+
* This cache can use either layer independently, both layers together, or no layers.
|
|
6745
6744
|
*/
|
|
6746
6745
|
declare class PromptCache {
|
|
6747
|
-
private readonly memoryCache
|
|
6746
|
+
private readonly memoryCache?;
|
|
6748
6747
|
private readonly diskCache?;
|
|
6749
6748
|
constructor(options: {
|
|
6750
|
-
memoryCache
|
|
6749
|
+
memoryCache?: LRUCache<string, Prompt>;
|
|
6751
6750
|
diskCache?: DiskCache<Prompt>;
|
|
6752
6751
|
});
|
|
6753
6752
|
/**
|
|
@@ -6774,10 +6773,10 @@ interface ParametersKey {
|
|
|
6774
6773
|
id?: string;
|
|
6775
6774
|
}
|
|
6776
6775
|
declare class ParametersCache {
|
|
6777
|
-
private readonly memoryCache
|
|
6776
|
+
private readonly memoryCache?;
|
|
6778
6777
|
private readonly diskCache?;
|
|
6779
6778
|
constructor(options: {
|
|
6780
|
-
memoryCache
|
|
6779
|
+
memoryCache?: LRUCache<string, RemoteEvalParameters>;
|
|
6781
6780
|
diskCache?: DiskCache<RemoteEvalParameters>;
|
|
6782
6781
|
});
|
|
6783
6782
|
get(key: ParametersKey): Promise<RemoteEvalParameters | undefined>;
|
|
@@ -8166,6 +8165,16 @@ declare class OpenAIAgentsTraceProcessor {
|
|
|
8166
8165
|
private omitKeys;
|
|
8167
8166
|
}
|
|
8168
8167
|
|
|
8168
|
+
type FlueObserver = (event: unknown, ctx?: unknown) => void;
|
|
8169
|
+
/**
|
|
8170
|
+
* Braintrust's Flue observe subscriber.
|
|
8171
|
+
*
|
|
8172
|
+
* Pass this directly to @flue/runtime/app.observe:
|
|
8173
|
+
*
|
|
8174
|
+
* const unsubscribe = observe(braintrustFlueObserver);
|
|
8175
|
+
*/
|
|
8176
|
+
declare const braintrustFlueObserver: FlueObserver;
|
|
8177
|
+
|
|
8169
8178
|
/**
|
|
8170
8179
|
* Plugin registry and configuration for auto-instrumentation.
|
|
8171
8180
|
*
|
|
@@ -8202,4 +8211,4 @@ declare class OpenAIAgentsTraceProcessor {
|
|
|
8202
8211
|
*/
|
|
8203
8212
|
declare function configureInstrumentation(config: InstrumentationConfig): void;
|
|
8204
8213
|
|
|
8205
|
-
export { type AsyncEndEvent, type AsyncStartEvent, type BaseContext, BasePlugin, BraintrustPlugin, type BraintrustPluginConfig, type ChannelHandlers, type EndEvent, type ErrorEvent, type InstrumentationConfig, OpenAIAgentsTraceProcessor, type OpenAIAgentsTraceProcessorOptions, type StartEvent, configureInstrumentation, createChannelName, isValidChannelName, parseChannelName };
|
|
8214
|
+
export { type AsyncEndEvent, type AsyncStartEvent, type BaseContext, BasePlugin, BraintrustPlugin, type BraintrustPluginConfig, type ChannelHandlers, type EndEvent, type ErrorEvent, type InstrumentationConfig, OpenAIAgentsTraceProcessor, type OpenAIAgentsTraceProcessorOptions, type StartEvent, braintrustFlueObserver, configureInstrumentation, createChannelName, isValidChannelName, parseChannelName };
|