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.
Files changed (59) hide show
  1. package/README.md +0 -10
  2. package/dev/dist/index.d.mts +13 -0
  3. package/dev/dist/index.d.ts +13 -0
  4. package/dev/dist/index.js +11289 -7551
  5. package/dev/dist/index.mjs +11249 -7511
  6. package/dist/apply-auto-instrumentation.js +406 -187
  7. package/dist/apply-auto-instrumentation.mjs +237 -18
  8. package/dist/auto-instrumentations/bundler/esbuild.cjs +299 -18
  9. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  10. package/dist/auto-instrumentations/bundler/next.cjs +299 -18
  11. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  12. package/dist/auto-instrumentations/bundler/rollup.cjs +299 -18
  13. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  14. package/dist/auto-instrumentations/bundler/vite.cjs +299 -18
  15. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  16. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +298 -17
  17. package/dist/auto-instrumentations/bundler/webpack.cjs +299 -18
  18. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  19. package/dist/auto-instrumentations/{chunk-CNQ7BUKN.mjs → chunk-K74TZGGM.mjs} +1 -1
  20. package/dist/auto-instrumentations/{chunk-VXJONZVX.mjs → chunk-S4374IP6.mjs} +96 -6
  21. package/dist/auto-instrumentations/{chunk-E5DUYJWK.mjs → chunk-W4E36GIW.mjs} +210 -15
  22. package/dist/auto-instrumentations/hook.mjs +311 -18
  23. package/dist/auto-instrumentations/index.cjs +213 -16
  24. package/dist/auto-instrumentations/index.d.mts +5 -1
  25. package/dist/auto-instrumentations/index.d.ts +5 -1
  26. package/dist/auto-instrumentations/index.mjs +7 -3
  27. package/dist/auto-instrumentations/loader/cjs-patch.cjs +1 -1
  28. package/dist/auto-instrumentations/loader/cjs-patch.mjs +1 -1
  29. package/dist/auto-instrumentations/loader/esm-hook.mjs +1 -1
  30. package/dist/browser.d.mts +254 -17
  31. package/dist/browser.d.ts +254 -17
  32. package/dist/browser.js +4470 -385
  33. package/dist/browser.mjs +8610 -4525
  34. package/dist/chunk-37RLJF2U.js +29262 -0
  35. package/dist/{chunk-VMBQETG3.js → chunk-LPC4W2WX.js} +80 -4
  36. package/dist/chunk-VEQ2PCMC.mjs +29262 -0
  37. package/dist/{chunk-O4ZIWXO3.mjs → chunk-Y7W7WP6H.mjs} +79 -3
  38. package/dist/cli.js +11262 -7518
  39. package/dist/edge-light.d.mts +1 -1
  40. package/dist/edge-light.d.ts +1 -1
  41. package/dist/edge-light.js +4470 -385
  42. package/dist/edge-light.mjs +8610 -4525
  43. package/dist/index.d.mts +254 -17
  44. package/dist/index.d.ts +254 -17
  45. package/dist/index.js +952 -25912
  46. package/dist/index.mjs +699 -25659
  47. package/dist/instrumentation/index.d.mts +69 -6
  48. package/dist/instrumentation/index.d.ts +69 -6
  49. package/dist/instrumentation/index.js +12602 -8900
  50. package/dist/instrumentation/index.mjs +12602 -8900
  51. package/dist/vitest-evals-reporter.d.mts +22 -0
  52. package/dist/vitest-evals-reporter.d.ts +22 -0
  53. package/dist/vitest-evals-reporter.js +401 -0
  54. package/dist/vitest-evals-reporter.mjs +401 -0
  55. package/dist/workerd.d.mts +1 -1
  56. package/dist/workerd.d.ts +1 -1
  57. package/dist/workerd.js +4470 -385
  58. package/dist/workerd.mjs +8610 -4525
  59. package/package.json +16 -10
@@ -361,6 +361,10 @@ var aiSDKChannels = defineChannels("ai", {
361
361
  toolLoopAgentStream: channel({
362
362
  channelName: "ToolLoopAgent.stream",
363
363
  kind: "async"
364
+ }),
365
+ v7CreateTelemetryDispatcher: channel({
366
+ channelName: "createTelemetryDispatcher",
367
+ kind: "sync-stream"
364
368
  })
365
369
  });
366
370
 
@@ -408,6 +412,10 @@ var googleGenAIChannels = defineChannels("@google/genai", {
408
412
  embedContent: channel({
409
413
  channelName: "models.embedContent",
410
414
  kind: "async"
415
+ }),
416
+ interactionsCreate: channel({
417
+ channelName: "interactions.create",
418
+ kind: "async"
411
419
  })
412
420
  });
413
421
 
@@ -583,6 +591,21 @@ var groqChannels = defineChannels("groq-sdk", {
583
591
  )
584
592
  });
585
593
 
594
+ // src/instrumentation/plugins/bedrock-runtime-channels.ts
595
+ var clientSendChannel = channel({
596
+ channelName: "client.send",
597
+ kind: "async"
598
+ });
599
+ var bedrockRuntimeChannels = defineChannels("aws-bedrock-runtime", {
600
+ clientSend: clientSendChannel
601
+ });
602
+ var smithyCoreChannels = defineChannels("@smithy/core", {
603
+ clientSend: clientSendChannel
604
+ });
605
+ var smithyClientChannels = defineChannels("@smithy/smithy-client", {
606
+ clientSend: clientSendChannel
607
+ });
608
+
586
609
  // src/instrumentation/plugins/genkit-channels.ts
587
610
  var genkitChannels = defineChannels("@genkit-ai/ai", {
588
611
  generate: channel({
@@ -641,6 +664,33 @@ var flueChannels = defineChannels("@flue/runtime", {
641
664
  })
642
665
  });
643
666
 
667
+ // src/instrumentation/plugins/pi-coding-agent-channels.ts
668
+ var piCodingAgentChannels = defineChannels(
669
+ "@earendil-works/pi-coding-agent",
670
+ {
671
+ prompt: channel({
672
+ channelName: "AgentSession.prompt",
673
+ kind: "async"
674
+ })
675
+ }
676
+ );
677
+
678
+ // src/instrumentation/plugins/strands-agent-sdk-channels.ts
679
+ var strandsAgentSDKChannels = defineChannels("@strands-agents/sdk", {
680
+ agentStream: channel({
681
+ channelName: "Agent.stream",
682
+ kind: "sync-stream"
683
+ }),
684
+ graphStream: channel({
685
+ channelName: "Graph.stream",
686
+ kind: "sync-stream"
687
+ }),
688
+ swarmStream: channel({
689
+ channelName: "Swarm.stream",
690
+ kind: "sync-stream"
691
+ })
692
+ });
693
+
644
694
  // src/instrumentation/config.ts
645
695
  var envIntegrationAliases = {
646
696
  openai: "openai",
@@ -649,6 +699,15 @@ var envIntegrationAliases = {
649
699
  openaicodexsdk: "openaiCodexSDK",
650
700
  codex: "openaiCodexSDK",
651
701
  "codex-sdk": "openaiCodexSDK",
702
+ "pi-coding-agent": "piCodingAgent",
703
+ "pi-coding-agent-sdk": "piCodingAgent",
704
+ picodingagent: "piCodingAgent",
705
+ picodingagentsdk: "piCodingAgent",
706
+ "@earendil-works/pi-coding-agent": "piCodingAgent",
707
+ strandsAgentSDK: "strandsAgentSDK",
708
+ strandsagentsdk: "strandsAgentSDK",
709
+ "strands-agent-sdk": "strandsAgentSDK",
710
+ "@strands-agents/sdk": "strandsAgentSDK",
652
711
  anthropic: "anthropic",
653
712
  aisdk: "aisdk",
654
713
  "ai-sdk": "aisdk",
@@ -679,6 +738,12 @@ var envIntegrationAliases = {
679
738
  cohere: "cohere",
680
739
  groq: "groq",
681
740
  "groq-sdk": "groq",
741
+ bedrock: "bedrock",
742
+ "aws-bedrock": "awsBedrock",
743
+ awsbedrock: "awsBedrock",
744
+ "aws-bedrock-runtime": "awsBedrockRuntime",
745
+ awsbedrockruntime: "awsBedrockRuntime",
746
+ "@aws-sdk/client-bedrock-runtime": "awsBedrockRuntime",
682
747
  genkit: "genkit",
683
748
  "firebase-genkit": "genkit",
684
749
  githubcopilot: "gitHubCopilot",
@@ -711,19 +776,25 @@ function getDefaultInstrumentationIntegrations() {
711
776
  mistral: true,
712
777
  cohere: true,
713
778
  groq: true,
779
+ bedrock: true,
780
+ awsBedrock: true,
781
+ awsBedrockRuntime: true,
714
782
  genkit: true,
715
783
  gitHubCopilot: true,
716
784
  langchain: true,
717
- langgraph: true
785
+ langgraph: true,
786
+ piCodingAgent: true,
787
+ strandsAgentSDK: true
718
788
  };
719
789
  }
720
790
  function readDisabledInstrumentationEnvConfig(disabledList) {
721
791
  const integrations = {};
722
792
  if (disabledList) {
723
793
  for (const value of disabledList.split(",")) {
724
- const sdk = value.trim().toLowerCase();
794
+ const rawSdk = value.trim();
795
+ const sdk = rawSdk.toLowerCase();
725
796
  if (sdk.length > 0) {
726
- integrations[envIntegrationAliases[sdk] ?? sdk] = false;
797
+ integrations[envIntegrationAliases[rawSdk] ?? envIntegrationAliases[sdk] ?? sdk] = false;
727
798
  }
728
799
  }
729
800
  }
@@ -957,11 +1028,16 @@ export {
957
1028
  googleADKChannels,
958
1029
  cohereChannels,
959
1030
  groqChannels,
1031
+ bedrockRuntimeChannels,
1032
+ smithyCoreChannels,
1033
+ smithyClientChannels,
960
1034
  genkitChannels,
961
1035
  genkitCoreChannels,
962
1036
  gitHubCopilotChannels,
963
1037
  flueChannels,
964
1038
  langChainChannels,
1039
+ piCodingAgentChannels,
1040
+ strandsAgentSDKChannels,
965
1041
  getDefaultInstrumentationIntegrations,
966
1042
  readDisabledInstrumentationEnvConfig,
967
1043
  isInstrumentationIntegrationDisabled,