braintrust 3.32.0 → 3.33.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.
Files changed (60) hide show
  1. package/README.md +0 -43
  2. package/dev/dist/index.d.mts +31 -0
  3. package/dev/dist/index.d.ts +31 -0
  4. package/dev/dist/index.js +2275 -920
  5. package/dev/dist/index.mjs +1610 -255
  6. package/dist/apply-auto-instrumentation.js +263 -224
  7. package/dist/apply-auto-instrumentation.mjs +45 -6
  8. package/dist/auto-instrumentations/bundler/esbuild.cjs +78 -5
  9. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  10. package/dist/auto-instrumentations/bundler/next.cjs +78 -5
  11. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  12. package/dist/auto-instrumentations/bundler/rollup.cjs +78 -5
  13. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  14. package/dist/auto-instrumentations/bundler/vite.cjs +78 -5
  15. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  16. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +78 -5
  17. package/dist/auto-instrumentations/bundler/webpack.cjs +78 -5
  18. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  19. package/dist/auto-instrumentations/{chunk-AFND2U7E.mjs → chunk-T2DMPWFI.mjs} +75 -5
  20. package/dist/auto-instrumentations/{chunk-RI4Y55ZF.mjs → chunk-UHJ2DNYJ.mjs} +6 -1
  21. package/dist/auto-instrumentations/{chunk-QEEPRBIS.mjs → chunk-W5QNG3PV.mjs} +1 -1
  22. package/dist/auto-instrumentations/hook.mjs +86 -7
  23. package/dist/auto-instrumentations/index.cjs +76 -5
  24. package/dist/auto-instrumentations/index.d.mts +3 -1
  25. package/dist/auto-instrumentations/index.d.ts +3 -1
  26. package/dist/auto-instrumentations/index.mjs +3 -1
  27. package/dist/browser.d.mts +202 -342
  28. package/dist/browser.d.ts +202 -342
  29. package/dist/browser.js +2586 -623
  30. package/dist/browser.mjs +2586 -623
  31. package/dist/chunk-7P6ASYW6.mjs +9 -0
  32. package/dist/{chunk-BTRLPQG5.js → chunk-AXJTOUOC.js} +2250 -1172
  33. package/dist/{chunk-AW4QECG5.js → chunk-G3VHOHRC.js} +40 -9
  34. package/dist/chunk-MLKGABMK.js +9 -0
  35. package/dist/{chunk-4QSAHP7D.mjs → chunk-MZLBAFVJ.mjs} +1236 -158
  36. package/dist/{chunk-WV6QZI2W.mjs → chunk-TZVZN2JJ.mjs} +39 -8
  37. package/dist/cli.js +1695 -293
  38. package/dist/custom-views.d.mts +112 -0
  39. package/dist/custom-views.d.ts +112 -0
  40. package/dist/custom-views.js +13 -0
  41. package/dist/custom-views.mjs +13 -0
  42. package/dist/edge-light.d.mts +1 -1
  43. package/dist/edge-light.d.ts +1 -1
  44. package/dist/edge-light.js +2586 -623
  45. package/dist/edge-light.mjs +2586 -623
  46. package/dist/index.d.mts +202 -342
  47. package/dist/index.d.ts +202 -342
  48. package/dist/index.js +1842 -986
  49. package/dist/index.mjs +1310 -454
  50. package/dist/instrumentation/index.d.mts +5 -245
  51. package/dist/instrumentation/index.d.ts +5 -245
  52. package/dist/instrumentation/index.js +1694 -254
  53. package/dist/instrumentation/index.mjs +1694 -254
  54. package/dist/vitest-evals-reporter.js +17 -16
  55. package/dist/vitest-evals-reporter.mjs +3 -2
  56. package/dist/workerd.d.mts +1 -1
  57. package/dist/workerd.d.ts +1 -1
  58. package/dist/workerd.js +2586 -623
  59. package/dist/workerd.mjs +2586 -623
  60. package/package.json +10 -2
@@ -27,6 +27,7 @@ import {
27
27
  huggingFaceTransformersChannels,
28
28
  isInstrumentationIntegrationDisabled,
29
29
  langChainChannels,
30
+ langGraphSDKChannels,
30
31
  langSmithChannels,
31
32
  mistralChannels,
32
33
  ollamaChannels,
@@ -42,7 +43,8 @@ import {
42
43
  smithyCoreChannels,
43
44
  strandsAgentSDKChannels,
44
45
  voyageAIChannels
45
- } from "./chunk-WV6QZI2W.mjs";
46
+ } from "./chunk-TZVZN2JJ.mjs";
47
+ import "./chunk-7P6ASYW6.mjs";
46
48
 
47
49
  // src/node/apply-auto-instrumentation.ts
48
50
  import { register } from "node:module";
@@ -51,8 +53,8 @@ import { pathToFileURL } from "node:url";
51
53
  // src/auto-instrumentations/configs/ai-sdk.ts
52
54
  var aiSDKConfigs = [
53
55
  // HarnessAgent turn methods are published only from the package's ESM
54
- // `./agent` entrypoint. The compiled class expression is anonymous, so match
55
- // the first async method with each public name instead of a class name.
56
+ // `./agent` entrypoint. Target the class binding so similarly named getters
57
+ // on stream result classes are not mistaken for agent turn methods.
56
58
  ...[
57
59
  ["createSession", harnessAgentChannels.createSession.channelName],
58
60
  ["generate", harnessAgentChannels.generate.channelName],
@@ -67,6 +69,7 @@ var aiSDKConfigs = [
67
69
  filePath: "dist/agent/index.js"
68
70
  },
69
71
  functionQuery: {
72
+ className: "HarnessAgent",
70
73
  methodName,
71
74
  kind: "Async",
72
75
  index: 0
@@ -472,9 +475,9 @@ var aiSDKConfigs = [
472
475
  // src/auto-instrumentations/configs/anthropic.ts
473
476
  var anthropicConfigs = [
474
477
  // Each logical target is listed for both published module formats:
475
- // `.mjs` covers ESM imports, while `.js` covers CJS requires. The Bedrock
476
- // SDK delegates CJS `messages.create` calls through these Anthropic SDK
477
- // `.js` resource files.
478
+ // `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
479
+ // @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
480
+ // shared Anthropic resources, so they use the same targets and channels.
478
481
  // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
479
482
  {
480
483
  channelName: anthropicChannels.messagesCreate.channelName,
@@ -1645,6 +1648,21 @@ var googleGenAIConfigs = [
1645
1648
  kind: "Async"
1646
1649
  }
1647
1650
  },
1651
+ // The SDK's embedding response converter drops usageMetadata. Observe the
1652
+ // parsed HTTP response before conversion; the plugin scopes this to embeddings.
1653
+ {
1654
+ channelName: googleGenAIChannels.httpResponseJson.channelName,
1655
+ module: {
1656
+ name: "@google/genai",
1657
+ versionRange: ">=1.0.0",
1658
+ filePath: "dist/node/index.mjs"
1659
+ },
1660
+ functionQuery: {
1661
+ className: "HttpResponse",
1662
+ methodName: "json",
1663
+ kind: "Async"
1664
+ }
1665
+ },
1648
1666
  // BaseInteractions.create - Interactions API entry point
1649
1667
  {
1650
1668
  channelName: googleGenAIChannels.interactionsCreate.channelName,
@@ -2352,6 +2370,26 @@ var mistralConfigs = [
2352
2370
  }
2353
2371
  ];
2354
2372
 
2373
+ // src/auto-instrumentations/configs/langgraph-sdk.ts
2374
+ var langGraphSDKConfigs = [
2375
+ "js",
2376
+ "cjs"
2377
+ ].flatMap(
2378
+ (extension) => ["wait", "stream"].map((methodName) => ({
2379
+ channelName: langGraphSDKChannels[methodName].channelName,
2380
+ module: {
2381
+ name: "@langchain/langgraph-sdk",
2382
+ versionRange: ">=1.9.25 <2.0.0",
2383
+ filePath: `dist/client/runs/index.${extension}`
2384
+ },
2385
+ functionQuery: {
2386
+ className: "RunsClient",
2387
+ methodName,
2388
+ kind: methodName === "stream" ? "Sync" : "Async"
2389
+ }
2390
+ }))
2391
+ );
2392
+
2355
2393
  // src/auto-instrumentations/configs/ollama.ts
2356
2394
  var methods = [
2357
2395
  ["chat", ollamaChannels.chat.channelName],
@@ -2914,6 +2952,7 @@ var defaultInstrumentationConfigGroups = [
2914
2952
  configs: openRouterAgentConfigs
2915
2953
  },
2916
2954
  { integrations: ["mistral"], configs: mistralConfigs },
2955
+ { integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
2917
2956
  { integrations: ["ollama"], configs: ollamaConfigs },
2918
2957
  { integrations: ["googleADK"], configs: googleADKConfigs },
2919
2958
  { integrations: ["cohere"], configs: cohereConfigs },
@@ -1220,6 +1220,9 @@ var envIntegrationAliases = {
1220
1220
  "langchain-js": "langchain",
1221
1221
  "@langchain": "langchain",
1222
1222
  langgraph: "langgraph",
1223
+ langgraphsdk: "langgraphSDK",
1224
+ "langgraph-sdk": "langgraphSDK",
1225
+ "@langchain/langgraph-sdk": "langgraphSDK",
1223
1226
  langsmith: "langsmith",
1224
1227
  voyage: "voyageai",
1225
1228
  "voyage-ai": "voyageai",
@@ -1369,6 +1372,7 @@ var INSTRUMENTATION_NAMES = {
1369
1372
  LANGSMITH: "langsmith",
1370
1373
  MASTRA: "mastra",
1371
1374
  MISTRAL: "mistral",
1375
+ LANGGRAPH_SDK: "langgraph-sdk",
1372
1376
  OLLAMA: "ollama",
1373
1377
  OPENAI: "openai",
1374
1378
  OPENAI_AGENTS: "openai-agents",
@@ -1486,8 +1490,8 @@ var harnessAgentChannels = defineChannels(
1486
1490
  // src/auto-instrumentations/configs/ai-sdk.ts
1487
1491
  var aiSDKConfigs = [
1488
1492
  // HarnessAgent turn methods are published only from the package's ESM
1489
- // `./agent` entrypoint. The compiled class expression is anonymous, so match
1490
- // the first async method with each public name instead of a class name.
1493
+ // `./agent` entrypoint. Target the class binding so similarly named getters
1494
+ // on stream result classes are not mistaken for agent turn methods.
1491
1495
  ...[
1492
1496
  ["createSession", harnessAgentChannels.createSession.channelName],
1493
1497
  ["generate", harnessAgentChannels.generate.channelName],
@@ -1502,6 +1506,7 @@ var aiSDKConfigs = [
1502
1506
  filePath: "dist/agent/index.js"
1503
1507
  },
1504
1508
  functionQuery: {
1509
+ className: "HarnessAgent",
1505
1510
  methodName,
1506
1511
  kind: "Async",
1507
1512
  index: 0
@@ -1935,9 +1940,9 @@ var anthropicChannels = defineChannels(
1935
1940
  // src/auto-instrumentations/configs/anthropic.ts
1936
1941
  var anthropicConfigs = [
1937
1942
  // Each logical target is listed for both published module formats:
1938
- // `.mjs` covers ESM imports, while `.js` covers CJS requires. The Bedrock
1939
- // SDK delegates CJS `messages.create` calls through these Anthropic SDK
1940
- // `.js` resource files.
1943
+ // `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
1944
+ // @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
1945
+ // shared Anthropic resources, so they use the same targets and channels.
1941
1946
  // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
1942
1947
  {
1943
1948
  channelName: anthropicChannels.messagesCreate.channelName,
@@ -3298,6 +3303,10 @@ var googleGenAIChannels = defineChannels(
3298
3303
  channelName: "models.embedContent",
3299
3304
  kind: "async"
3300
3305
  }),
3306
+ httpResponseJson: channel({
3307
+ channelName: "httpResponse.json",
3308
+ kind: "async"
3309
+ }),
3301
3310
  interactionsCreate: channel({
3302
3311
  channelName: "interactions.create",
3303
3312
  kind: "async"
@@ -3367,6 +3376,21 @@ var googleGenAIConfigs = [
3367
3376
  kind: "Async"
3368
3377
  }
3369
3378
  },
3379
+ // The SDK's embedding response converter drops usageMetadata. Observe the
3380
+ // parsed HTTP response before conversion; the plugin scopes this to embeddings.
3381
+ {
3382
+ channelName: googleGenAIChannels.httpResponseJson.channelName,
3383
+ module: {
3384
+ name: "@google/genai",
3385
+ versionRange: ">=1.0.0",
3386
+ filePath: "dist/node/index.mjs"
3387
+ },
3388
+ functionQuery: {
3389
+ className: "HttpResponse",
3390
+ methodName: "json",
3391
+ kind: "Async"
3392
+ }
3393
+ },
3370
3394
  // BaseInteractions.create - Interactions API entry point
3371
3395
  {
3372
3396
  channelName: googleGenAIChannels.interactionsCreate.channelName,
@@ -4222,6 +4246,42 @@ var mistralConfigs = [
4222
4246
  }
4223
4247
  ];
4224
4248
 
4249
+ // src/instrumentation/plugins/langgraph-sdk-channels.ts
4250
+ var langGraphSDKChannels = defineChannels(
4251
+ "@langchain/langgraph-sdk",
4252
+ {
4253
+ wait: channel({
4254
+ channelName: "runs.wait",
4255
+ kind: "async"
4256
+ }),
4257
+ stream: channel({
4258
+ channelName: "runs.stream",
4259
+ kind: "sync-stream"
4260
+ })
4261
+ },
4262
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
4263
+ );
4264
+
4265
+ // src/auto-instrumentations/configs/langgraph-sdk.ts
4266
+ var langGraphSDKConfigs = [
4267
+ "js",
4268
+ "cjs"
4269
+ ].flatMap(
4270
+ (extension) => ["wait", "stream"].map((methodName) => ({
4271
+ channelName: langGraphSDKChannels[methodName].channelName,
4272
+ module: {
4273
+ name: "@langchain/langgraph-sdk",
4274
+ versionRange: ">=1.9.25 <2.0.0",
4275
+ filePath: `dist/client/runs/index.${extension}`
4276
+ },
4277
+ functionQuery: {
4278
+ className: "RunsClient",
4279
+ methodName,
4280
+ kind: methodName === "stream" ? "Sync" : "Async"
4281
+ }
4282
+ }))
4283
+ );
4284
+
4225
4285
  // src/instrumentation/plugins/ollama-channels.ts
4226
4286
  var ollamaChannels = defineChannels(
4227
4287
  "ollama",
@@ -4320,6 +4380,18 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
4320
4380
  var openAIChannels = defineChannels(
4321
4381
  "openai",
4322
4382
  {
4383
+ agentsTraceStart: channel({
4384
+ channelName: "agents.trace.start",
4385
+ kind: "async"
4386
+ }),
4387
+ agentsTraceCapture: channel({
4388
+ channelName: "agents.trace.capture",
4389
+ kind: "async"
4390
+ }),
4391
+ agentsTraceFail: channel({
4392
+ channelName: "agents.trace.fail",
4393
+ kind: "async"
4394
+ }),
4323
4395
  filesCreateTraced: channel({
4324
4396
  channelName: "files.create-traced",
4325
4397
  kind: "async"
@@ -5031,6 +5103,7 @@ var defaultInstrumentationConfigGroups = [
5031
5103
  configs: openRouterAgentConfigs
5032
5104
  },
5033
5105
  { integrations: ["mistral"], configs: mistralConfigs },
5106
+ { integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
5034
5107
  { integrations: ["ollama"], configs: ollamaConfigs },
5035
5108
  { integrations: ["googleADK"], configs: googleADKConfigs },
5036
5109
  { integrations: ["cohere"], configs: cohereConfigs },
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-RI4Y55ZF.mjs";
4
- import "../chunk-AFND2U7E.mjs";
3
+ } from "../chunk-UHJ2DNYJ.mjs";
4
+ import "../chunk-T2DMPWFI.mjs";
5
5
  import "../chunk-I55G56ZL.mjs";
6
6
  import "../chunk-JPUFNW7X.mjs";
7
7
  import "../chunk-P5YLNB2A.mjs";
@@ -1221,6 +1221,9 @@ var envIntegrationAliases = {
1221
1221
  "langchain-js": "langchain",
1222
1222
  "@langchain": "langchain",
1223
1223
  langgraph: "langgraph",
1224
+ langgraphsdk: "langgraphSDK",
1225
+ "langgraph-sdk": "langgraphSDK",
1226
+ "@langchain/langgraph-sdk": "langgraphSDK",
1224
1227
  langsmith: "langsmith",
1225
1228
  voyage: "voyageai",
1226
1229
  "voyage-ai": "voyageai",
@@ -1370,6 +1373,7 @@ var INSTRUMENTATION_NAMES = {
1370
1373
  LANGSMITH: "langsmith",
1371
1374
  MASTRA: "mastra",
1372
1375
  MISTRAL: "mistral",
1376
+ LANGGRAPH_SDK: "langgraph-sdk",
1373
1377
  OLLAMA: "ollama",
1374
1378
  OPENAI: "openai",
1375
1379
  OPENAI_AGENTS: "openai-agents",
@@ -1487,8 +1491,8 @@ var harnessAgentChannels = defineChannels(
1487
1491
  // src/auto-instrumentations/configs/ai-sdk.ts
1488
1492
  var aiSDKConfigs = [
1489
1493
  // HarnessAgent turn methods are published only from the package's ESM
1490
- // `./agent` entrypoint. The compiled class expression is anonymous, so match
1491
- // the first async method with each public name instead of a class name.
1494
+ // `./agent` entrypoint. Target the class binding so similarly named getters
1495
+ // on stream result classes are not mistaken for agent turn methods.
1492
1496
  ...[
1493
1497
  ["createSession", harnessAgentChannels.createSession.channelName],
1494
1498
  ["generate", harnessAgentChannels.generate.channelName],
@@ -1503,6 +1507,7 @@ var aiSDKConfigs = [
1503
1507
  filePath: "dist/agent/index.js"
1504
1508
  },
1505
1509
  functionQuery: {
1510
+ className: "HarnessAgent",
1506
1511
  methodName,
1507
1512
  kind: "Async",
1508
1513
  index: 0
@@ -1936,9 +1941,9 @@ var anthropicChannels = defineChannels(
1936
1941
  // src/auto-instrumentations/configs/anthropic.ts
1937
1942
  var anthropicConfigs = [
1938
1943
  // Each logical target is listed for both published module formats:
1939
- // `.mjs` covers ESM imports, while `.js` covers CJS requires. The Bedrock
1940
- // SDK delegates CJS `messages.create` calls through these Anthropic SDK
1941
- // `.js` resource files.
1944
+ // `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
1945
+ // @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
1946
+ // shared Anthropic resources, so they use the same targets and channels.
1942
1947
  // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
1943
1948
  {
1944
1949
  channelName: anthropicChannels.messagesCreate.channelName,
@@ -3299,6 +3304,10 @@ var googleGenAIChannels = defineChannels(
3299
3304
  channelName: "models.embedContent",
3300
3305
  kind: "async"
3301
3306
  }),
3307
+ httpResponseJson: channel({
3308
+ channelName: "httpResponse.json",
3309
+ kind: "async"
3310
+ }),
3302
3311
  interactionsCreate: channel({
3303
3312
  channelName: "interactions.create",
3304
3313
  kind: "async"
@@ -3368,6 +3377,21 @@ var googleGenAIConfigs = [
3368
3377
  kind: "Async"
3369
3378
  }
3370
3379
  },
3380
+ // The SDK's embedding response converter drops usageMetadata. Observe the
3381
+ // parsed HTTP response before conversion; the plugin scopes this to embeddings.
3382
+ {
3383
+ channelName: googleGenAIChannels.httpResponseJson.channelName,
3384
+ module: {
3385
+ name: "@google/genai",
3386
+ versionRange: ">=1.0.0",
3387
+ filePath: "dist/node/index.mjs"
3388
+ },
3389
+ functionQuery: {
3390
+ className: "HttpResponse",
3391
+ methodName: "json",
3392
+ kind: "Async"
3393
+ }
3394
+ },
3371
3395
  // BaseInteractions.create - Interactions API entry point
3372
3396
  {
3373
3397
  channelName: googleGenAIChannels.interactionsCreate.channelName,
@@ -4223,6 +4247,42 @@ var mistralConfigs = [
4223
4247
  }
4224
4248
  ];
4225
4249
 
4250
+ // src/instrumentation/plugins/langgraph-sdk-channels.ts
4251
+ var langGraphSDKChannels = defineChannels(
4252
+ "@langchain/langgraph-sdk",
4253
+ {
4254
+ wait: channel({
4255
+ channelName: "runs.wait",
4256
+ kind: "async"
4257
+ }),
4258
+ stream: channel({
4259
+ channelName: "runs.stream",
4260
+ kind: "sync-stream"
4261
+ })
4262
+ },
4263
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
4264
+ );
4265
+
4266
+ // src/auto-instrumentations/configs/langgraph-sdk.ts
4267
+ var langGraphSDKConfigs = [
4268
+ "js",
4269
+ "cjs"
4270
+ ].flatMap(
4271
+ (extension) => ["wait", "stream"].map((methodName) => ({
4272
+ channelName: langGraphSDKChannels[methodName].channelName,
4273
+ module: {
4274
+ name: "@langchain/langgraph-sdk",
4275
+ versionRange: ">=1.9.25 <2.0.0",
4276
+ filePath: `dist/client/runs/index.${extension}`
4277
+ },
4278
+ functionQuery: {
4279
+ className: "RunsClient",
4280
+ methodName,
4281
+ kind: methodName === "stream" ? "Sync" : "Async"
4282
+ }
4283
+ }))
4284
+ );
4285
+
4226
4286
  // src/instrumentation/plugins/ollama-channels.ts
4227
4287
  var ollamaChannels = defineChannels(
4228
4288
  "ollama",
@@ -4321,6 +4381,18 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
4321
4381
  var openAIChannels = defineChannels(
4322
4382
  "openai",
4323
4383
  {
4384
+ agentsTraceStart: channel({
4385
+ channelName: "agents.trace.start",
4386
+ kind: "async"
4387
+ }),
4388
+ agentsTraceCapture: channel({
4389
+ channelName: "agents.trace.capture",
4390
+ kind: "async"
4391
+ }),
4392
+ agentsTraceFail: channel({
4393
+ channelName: "agents.trace.fail",
4394
+ kind: "async"
4395
+ }),
4324
4396
  filesCreateTraced: channel({
4325
4397
  channelName: "files.create-traced",
4326
4398
  kind: "async"
@@ -5032,6 +5104,7 @@ var defaultInstrumentationConfigGroups = [
5032
5104
  configs: openRouterAgentConfigs
5033
5105
  },
5034
5106
  { integrations: ["mistral"], configs: mistralConfigs },
5107
+ { integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
5035
5108
  { integrations: ["ollama"], configs: ollamaConfigs },
5036
5109
  { integrations: ["googleADK"], configs: googleADKConfigs },
5037
5110
  { integrations: ["cohere"], configs: cohereConfigs },
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  webpackPlugin
3
- } from "../chunk-QEEPRBIS.mjs";
4
- import "../chunk-RI4Y55ZF.mjs";
5
- import "../chunk-AFND2U7E.mjs";
3
+ } from "../chunk-W5QNG3PV.mjs";
4
+ import "../chunk-UHJ2DNYJ.mjs";
5
+ import "../chunk-T2DMPWFI.mjs";
6
6
  import "../chunk-I55G56ZL.mjs";
7
7
  import "../chunk-JPUFNW7X.mjs";
8
8
  import "../chunk-P5YLNB2A.mjs";
@@ -1220,6 +1220,9 @@ var envIntegrationAliases = {
1220
1220
  "langchain-js": "langchain",
1221
1221
  "@langchain": "langchain",
1222
1222
  langgraph: "langgraph",
1223
+ langgraphsdk: "langgraphSDK",
1224
+ "langgraph-sdk": "langgraphSDK",
1225
+ "@langchain/langgraph-sdk": "langgraphSDK",
1223
1226
  langsmith: "langsmith",
1224
1227
  voyage: "voyageai",
1225
1228
  "voyage-ai": "voyageai",
@@ -1369,6 +1372,7 @@ var INSTRUMENTATION_NAMES = {
1369
1372
  LANGSMITH: "langsmith",
1370
1373
  MASTRA: "mastra",
1371
1374
  MISTRAL: "mistral",
1375
+ LANGGRAPH_SDK: "langgraph-sdk",
1372
1376
  OLLAMA: "ollama",
1373
1377
  OPENAI: "openai",
1374
1378
  OPENAI_AGENTS: "openai-agents",
@@ -1486,8 +1490,8 @@ var harnessAgentChannels = defineChannels(
1486
1490
  // src/auto-instrumentations/configs/ai-sdk.ts
1487
1491
  var aiSDKConfigs = [
1488
1492
  // HarnessAgent turn methods are published only from the package's ESM
1489
- // `./agent` entrypoint. The compiled class expression is anonymous, so match
1490
- // the first async method with each public name instead of a class name.
1493
+ // `./agent` entrypoint. Target the class binding so similarly named getters
1494
+ // on stream result classes are not mistaken for agent turn methods.
1491
1495
  ...[
1492
1496
  ["createSession", harnessAgentChannels.createSession.channelName],
1493
1497
  ["generate", harnessAgentChannels.generate.channelName],
@@ -1502,6 +1506,7 @@ var aiSDKConfigs = [
1502
1506
  filePath: "dist/agent/index.js"
1503
1507
  },
1504
1508
  functionQuery: {
1509
+ className: "HarnessAgent",
1505
1510
  methodName,
1506
1511
  kind: "Async",
1507
1512
  index: 0
@@ -1935,9 +1940,9 @@ var anthropicChannels = defineChannels(
1935
1940
  // src/auto-instrumentations/configs/anthropic.ts
1936
1941
  var anthropicConfigs = [
1937
1942
  // Each logical target is listed for both published module formats:
1938
- // `.mjs` covers ESM imports, while `.js` covers CJS requires. The Bedrock
1939
- // SDK delegates CJS `messages.create` calls through these Anthropic SDK
1940
- // `.js` resource files.
1943
+ // `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
1944
+ // @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
1945
+ // shared Anthropic resources, so they use the same targets and channels.
1941
1946
  // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
1942
1947
  {
1943
1948
  channelName: anthropicChannels.messagesCreate.channelName,
@@ -3298,6 +3303,10 @@ var googleGenAIChannels = defineChannels(
3298
3303
  channelName: "models.embedContent",
3299
3304
  kind: "async"
3300
3305
  }),
3306
+ httpResponseJson: channel({
3307
+ channelName: "httpResponse.json",
3308
+ kind: "async"
3309
+ }),
3301
3310
  interactionsCreate: channel({
3302
3311
  channelName: "interactions.create",
3303
3312
  kind: "async"
@@ -3367,6 +3376,21 @@ var googleGenAIConfigs = [
3367
3376
  kind: "Async"
3368
3377
  }
3369
3378
  },
3379
+ // The SDK's embedding response converter drops usageMetadata. Observe the
3380
+ // parsed HTTP response before conversion; the plugin scopes this to embeddings.
3381
+ {
3382
+ channelName: googleGenAIChannels.httpResponseJson.channelName,
3383
+ module: {
3384
+ name: "@google/genai",
3385
+ versionRange: ">=1.0.0",
3386
+ filePath: "dist/node/index.mjs"
3387
+ },
3388
+ functionQuery: {
3389
+ className: "HttpResponse",
3390
+ methodName: "json",
3391
+ kind: "Async"
3392
+ }
3393
+ },
3370
3394
  // BaseInteractions.create - Interactions API entry point
3371
3395
  {
3372
3396
  channelName: googleGenAIChannels.interactionsCreate.channelName,
@@ -4222,6 +4246,42 @@ var mistralConfigs = [
4222
4246
  }
4223
4247
  ];
4224
4248
 
4249
+ // src/instrumentation/plugins/langgraph-sdk-channels.ts
4250
+ var langGraphSDKChannels = defineChannels(
4251
+ "@langchain/langgraph-sdk",
4252
+ {
4253
+ wait: channel({
4254
+ channelName: "runs.wait",
4255
+ kind: "async"
4256
+ }),
4257
+ stream: channel({
4258
+ channelName: "runs.stream",
4259
+ kind: "sync-stream"
4260
+ })
4261
+ },
4262
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
4263
+ );
4264
+
4265
+ // src/auto-instrumentations/configs/langgraph-sdk.ts
4266
+ var langGraphSDKConfigs = [
4267
+ "js",
4268
+ "cjs"
4269
+ ].flatMap(
4270
+ (extension) => ["wait", "stream"].map((methodName) => ({
4271
+ channelName: langGraphSDKChannels[methodName].channelName,
4272
+ module: {
4273
+ name: "@langchain/langgraph-sdk",
4274
+ versionRange: ">=1.9.25 <2.0.0",
4275
+ filePath: `dist/client/runs/index.${extension}`
4276
+ },
4277
+ functionQuery: {
4278
+ className: "RunsClient",
4279
+ methodName,
4280
+ kind: methodName === "stream" ? "Sync" : "Async"
4281
+ }
4282
+ }))
4283
+ );
4284
+
4225
4285
  // src/instrumentation/plugins/ollama-channels.ts
4226
4286
  var ollamaChannels = defineChannels(
4227
4287
  "ollama",
@@ -4320,6 +4380,18 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
4320
4380
  var openAIChannels = defineChannels(
4321
4381
  "openai",
4322
4382
  {
4383
+ agentsTraceStart: channel({
4384
+ channelName: "agents.trace.start",
4385
+ kind: "async"
4386
+ }),
4387
+ agentsTraceCapture: channel({
4388
+ channelName: "agents.trace.capture",
4389
+ kind: "async"
4390
+ }),
4391
+ agentsTraceFail: channel({
4392
+ channelName: "agents.trace.fail",
4393
+ kind: "async"
4394
+ }),
4323
4395
  filesCreateTraced: channel({
4324
4396
  channelName: "files.create-traced",
4325
4397
  kind: "async"
@@ -5031,6 +5103,7 @@ var defaultInstrumentationConfigGroups = [
5031
5103
  configs: openRouterAgentConfigs
5032
5104
  },
5033
5105
  { integrations: ["mistral"], configs: mistralConfigs },
5106
+ { integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
5034
5107
  { integrations: ["ollama"], configs: ollamaConfigs },
5035
5108
  { integrations: ["googleADK"], configs: googleADKConfigs },
5036
5109
  { integrations: ["cohere"], configs: cohereConfigs },
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-RI4Y55ZF.mjs";
4
- import "../chunk-AFND2U7E.mjs";
3
+ } from "../chunk-UHJ2DNYJ.mjs";
4
+ import "../chunk-T2DMPWFI.mjs";
5
5
  import "../chunk-I55G56ZL.mjs";
6
6
  import "../chunk-JPUFNW7X.mjs";
7
7
  import "../chunk-P5YLNB2A.mjs";