braintrust 3.31.0 → 3.32.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 +736 -0
- package/dev/dist/index.d.ts +736 -0
- package/dev/dist/index.js +1280 -428
- package/dev/dist/index.mjs +859 -7
- package/dist/apply-auto-instrumentation.js +281 -216
- package/dist/apply-auto-instrumentation.mjs +66 -1
- package/dist/auto-instrumentations/bundler/esbuild.cjs +104 -2
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/next.cjs +104 -2
- package/dist/auto-instrumentations/bundler/next.mjs +3 -3
- package/dist/auto-instrumentations/bundler/rollup.cjs +104 -2
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +104 -2
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +104 -2
- package/dist/auto-instrumentations/bundler/webpack.cjs +104 -2
- package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
- package/dist/auto-instrumentations/{chunk-U64OYU4Q.mjs → chunk-AFND2U7E.mjs} +38 -1
- package/dist/auto-instrumentations/{chunk-OXINGIEZ.mjs → chunk-QEEPRBIS.mjs} +1 -1
- package/dist/auto-instrumentations/{chunk-LW4HDHXT.mjs → chunk-RI4Y55ZF.mjs} +69 -2
- package/dist/auto-instrumentations/hook.mjs +124 -3
- package/dist/auto-instrumentations/index.cjs +39 -1
- package/dist/auto-instrumentations/index.d.mts +3 -1
- package/dist/auto-instrumentations/index.d.ts +3 -1
- package/dist/auto-instrumentations/index.mjs +3 -1
- package/dist/browser.d.mts +2124 -2
- package/dist/browser.d.ts +2124 -2
- package/dist/browser.js +994 -10
- package/dist/browser.mjs +994 -10
- package/dist/{chunk-AJT4FR25.mjs → chunk-4QSAHP7D.mjs} +818 -5
- package/dist/{chunk-4AQGZS6X.js → chunk-AW4QECG5.js} +47 -4
- package/dist/{chunk-V32LW47Z.js → chunk-BTRLPQG5.js} +1663 -850
- package/dist/{chunk-CE3BLB2L.mjs → chunk-WV6QZI2W.mjs} +46 -3
- package/dist/cli.js +923 -8
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +994 -10
- package/dist/edge-light.mjs +994 -10
- package/dist/index.d.mts +2124 -2
- package/dist/index.d.ts +2124 -2
- package/dist/index.js +581 -447
- package/dist/index.mjs +136 -2
- package/dist/instrumentation/index.d.mts +434 -0
- package/dist/instrumentation/index.d.ts +434 -0
- package/dist/instrumentation/index.js +859 -7
- package/dist/instrumentation/index.mjs +859 -7
- 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 +994 -10
- package/dist/workerd.mjs +994 -10
- package/package.json +1 -1
- package/util/dist/index.d.mts +326 -0
- package/util/dist/index.d.ts +326 -0
|
@@ -815,6 +815,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
815
815
|
GENKIT: "genkit",
|
|
816
816
|
GITHUB_COPILOT: "github-copilot",
|
|
817
817
|
GOOGLE_ADK: "google-adk",
|
|
818
|
+
GOOGLE_GENERATIVE_AI: "google-generative-ai",
|
|
818
819
|
GOOGLE_GENAI: "google-genai",
|
|
819
820
|
GROQ: "groq",
|
|
820
821
|
HUGGINGFACE: "huggingface",
|
|
@@ -830,12 +831,13 @@ var INSTRUMENTATION_NAMES = {
|
|
|
830
831
|
OPENROUTER_AGENT: "openrouter-agent",
|
|
831
832
|
PI_CODING_AGENT: "pi-coding-agent",
|
|
832
833
|
STRANDS_AGENT_SDK: "strands-agent-sdk",
|
|
833
|
-
VOYAGEAI: "voyageai"
|
|
834
|
+
VOYAGEAI: "voyageai",
|
|
835
|
+
ELEVENLABS: "elevenlabs"
|
|
834
836
|
};
|
|
835
837
|
var INTERNAL_SPAN_INSTRUMENTATION_NAME = /* @__PURE__ */ Symbol.for(
|
|
836
838
|
"braintrust.spanInstrumentationName"
|
|
837
839
|
);
|
|
838
|
-
var SDK_VERSION = true ? "3.
|
|
840
|
+
var SDK_VERSION = true ? "3.32.0" : "0.0.0";
|
|
839
841
|
function withSpanInstrumentationName(args, instrumentationName) {
|
|
840
842
|
return {
|
|
841
843
|
...args,
|
|
@@ -1260,6 +1262,20 @@ var cursorSDKChannels = defineChannels(
|
|
|
1260
1262
|
{ instrumentationName: INSTRUMENTATION_NAMES.CURSOR_SDK }
|
|
1261
1263
|
);
|
|
1262
1264
|
|
|
1265
|
+
// src/instrumentation/plugins/google-generative-ai-channels.ts
|
|
1266
|
+
var googleGenerativeAIChannels = defineChannels(
|
|
1267
|
+
"@google/generative-ai",
|
|
1268
|
+
{
|
|
1269
|
+
generateContent: channel({ channelName: "GenerativeModel.generateContent", kind: "async" }),
|
|
1270
|
+
generateContentStream: channel({ channelName: "GenerativeModel.generateContentStream", kind: "async" }),
|
|
1271
|
+
embedContent: channel({ channelName: "GenerativeModel.embedContent", kind: "async" }),
|
|
1272
|
+
batchEmbedContents: channel({ channelName: "GenerativeModel.batchEmbedContents", kind: "async" }),
|
|
1273
|
+
sendMessage: channel({ channelName: "ChatSession.sendMessage", kind: "async" }),
|
|
1274
|
+
sendMessageStream: channel({ channelName: "ChatSession.sendMessageStream", kind: "async" })
|
|
1275
|
+
},
|
|
1276
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENERATIVE_AI }
|
|
1277
|
+
);
|
|
1278
|
+
|
|
1263
1279
|
// src/instrumentation/plugins/google-genai-channels.ts
|
|
1264
1280
|
var googleGenAIChannels = defineChannels(
|
|
1265
1281
|
"@google/genai",
|
|
@@ -1693,6 +1709,25 @@ var strandsAgentSDKChannels = defineChannels(
|
|
|
1693
1709
|
{ instrumentationName: INSTRUMENTATION_NAMES.STRANDS_AGENT_SDK }
|
|
1694
1710
|
);
|
|
1695
1711
|
|
|
1712
|
+
// src/instrumentation/plugins/elevenlabs-channels.ts
|
|
1713
|
+
var elevenLabsChannels = defineChannels(
|
|
1714
|
+
"@elevenlabs/elevenlabs-js",
|
|
1715
|
+
{
|
|
1716
|
+
convert: channel({
|
|
1717
|
+
channelName: "textToSpeech.convert",
|
|
1718
|
+
kind: "async"
|
|
1719
|
+
}),
|
|
1720
|
+
stream: channel({
|
|
1721
|
+
channelName: "textToSpeech.stream",
|
|
1722
|
+
kind: "async"
|
|
1723
|
+
}),
|
|
1724
|
+
convertWithTimestamps: channel({ channelName: "textToSpeech.convertWithTimestamps", kind: "async" }),
|
|
1725
|
+
streamWithTimestamps: channel({ channelName: "textToSpeech.streamWithTimestamps", kind: "async" }),
|
|
1726
|
+
transcribe: channel({ channelName: "speechToText.convert", kind: "async" })
|
|
1727
|
+
},
|
|
1728
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.ELEVENLABS }
|
|
1729
|
+
);
|
|
1730
|
+
|
|
1696
1731
|
// src/instrumentation/plugins/voyageai-channels.ts
|
|
1697
1732
|
var voyageAIChannels = defineChannels(
|
|
1698
1733
|
"voyageai",
|
|
@@ -1771,6 +1806,8 @@ var envIntegrationAliases = {
|
|
|
1771
1806
|
"openai-agents-core": "openAIAgents",
|
|
1772
1807
|
openaiagentscore: "openAIAgents",
|
|
1773
1808
|
google: "google",
|
|
1809
|
+
"google-generative-ai": "googleGenerativeAI",
|
|
1810
|
+
googlegenerativeai: "googleGenerativeAI",
|
|
1774
1811
|
"google-genai": "googleGenAI",
|
|
1775
1812
|
googlegenai: "googleGenAI",
|
|
1776
1813
|
huggingface: "huggingface",
|
|
@@ -1804,7 +1841,9 @@ var envIntegrationAliases = {
|
|
|
1804
1841
|
langsmith: "langsmith",
|
|
1805
1842
|
voyage: "voyageai",
|
|
1806
1843
|
"voyage-ai": "voyageai",
|
|
1807
|
-
voyageai: "voyageai"
|
|
1844
|
+
voyageai: "voyageai",
|
|
1845
|
+
elevenlabs: "elevenlabs",
|
|
1846
|
+
"@elevenlabs/elevenlabs-js": "elevenlabs"
|
|
1808
1847
|
};
|
|
1809
1848
|
function getDefaultInstrumentationIntegrations() {
|
|
1810
1849
|
return {
|
|
@@ -1815,6 +1854,7 @@ function getDefaultInstrumentationIntegrations() {
|
|
|
1815
1854
|
aisdk: true,
|
|
1816
1855
|
google: true,
|
|
1817
1856
|
googleGenAI: true,
|
|
1857
|
+
googleGenerativeAI: true,
|
|
1818
1858
|
googleADK: true,
|
|
1819
1859
|
huggingface: true,
|
|
1820
1860
|
claudeAgentSDK: true,
|
|
@@ -1840,6 +1880,7 @@ function getDefaultInstrumentationIntegrations() {
|
|
|
1840
1880
|
langgraph: true,
|
|
1841
1881
|
langsmith: true,
|
|
1842
1882
|
voyageai: true,
|
|
1883
|
+
elevenlabs: true,
|
|
1843
1884
|
piCodingAgent: true,
|
|
1844
1885
|
strandsAgentSDK: true,
|
|
1845
1886
|
cloudflareAgents: true
|
|
@@ -2118,6 +2159,7 @@ export {
|
|
|
2118
2159
|
cloudflareThinkChannels,
|
|
2119
2160
|
cursorSDKChannels,
|
|
2120
2161
|
openAIAgentsCoreChannels,
|
|
2162
|
+
googleGenerativeAIChannels,
|
|
2121
2163
|
googleGenAIChannels,
|
|
2122
2164
|
huggingFaceChannels,
|
|
2123
2165
|
isSupportedHuggingFaceTransformersTask,
|
|
@@ -2142,6 +2184,7 @@ export {
|
|
|
2142
2184
|
langSmithChannels,
|
|
2143
2185
|
piCodingAgentChannels,
|
|
2144
2186
|
strandsAgentSDKChannels,
|
|
2187
|
+
elevenLabsChannels,
|
|
2145
2188
|
voyageAIChannels,
|
|
2146
2189
|
cloudflareAIChatChannels,
|
|
2147
2190
|
cloudflareAgentsChannels,
|