braintrust 3.9.0 → 3.10.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 (42) hide show
  1. package/dev/dist/index.d.mts +107 -1
  2. package/dev/dist/index.d.ts +107 -1
  3. package/dev/dist/index.js +2126 -443
  4. package/dev/dist/index.mjs +1814 -131
  5. package/dist/auto-instrumentations/bundler/esbuild.cjs +166 -0
  6. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  7. package/dist/auto-instrumentations/bundler/rollup.cjs +166 -0
  8. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/vite.cjs +166 -0
  10. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  11. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +163 -0
  12. package/dist/auto-instrumentations/bundler/webpack.cjs +166 -0
  13. package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
  14. package/dist/auto-instrumentations/{chunk-KIMMUFAK.mjs → chunk-GZNXBBPU.mjs} +164 -1
  15. package/dist/auto-instrumentations/{chunk-G7F6HZGE.mjs → chunk-XWEQQOQH.mjs} +8 -1
  16. package/dist/auto-instrumentations/hook.mjs +255 -8
  17. package/dist/auto-instrumentations/index.cjs +256 -7
  18. package/dist/auto-instrumentations/index.d.mts +5 -1
  19. package/dist/auto-instrumentations/index.d.ts +5 -1
  20. package/dist/auto-instrumentations/index.mjs +96 -8
  21. package/dist/browser.d.mts +141 -7
  22. package/dist/browser.d.ts +141 -7
  23. package/dist/browser.js +2035 -140
  24. package/dist/browser.mjs +2035 -140
  25. package/dist/cli.js +1822 -139
  26. package/dist/edge-light.d.mts +1 -1
  27. package/dist/edge-light.d.ts +1 -1
  28. package/dist/edge-light.js +2035 -140
  29. package/dist/edge-light.mjs +2035 -140
  30. package/dist/index.d.mts +141 -7
  31. package/dist/index.d.ts +141 -7
  32. package/dist/index.js +2397 -502
  33. package/dist/index.mjs +2035 -140
  34. package/dist/instrumentation/index.d.mts +7 -0
  35. package/dist/instrumentation/index.d.ts +7 -0
  36. package/dist/instrumentation/index.js +1662 -167
  37. package/dist/instrumentation/index.mjs +1662 -167
  38. package/dist/workerd.d.mts +1 -1
  39. package/dist/workerd.d.ts +1 -1
  40. package/dist/workerd.js +2035 -140
  41. package/dist/workerd.mjs +2035 -140
  42. package/package.json +6 -6
@@ -915,6 +915,71 @@ var claudeAgentSDKConfigs = [
915
915
  }
916
916
  ];
917
917
 
918
+ // src/instrumentation/plugins/cursor-sdk-channels.ts
919
+ var cursorSDKChannels = defineChannels("@cursor/sdk", {
920
+ create: channel({
921
+ channelName: "Agent.create",
922
+ kind: "async"
923
+ }),
924
+ resume: channel({
925
+ channelName: "Agent.resume",
926
+ kind: "async"
927
+ }),
928
+ prompt: channel({
929
+ channelName: "Agent.prompt",
930
+ kind: "async"
931
+ }),
932
+ send: channel({
933
+ channelName: "agent.send",
934
+ kind: "async"
935
+ })
936
+ });
937
+
938
+ // src/auto-instrumentations/configs/cursor-sdk.ts
939
+ var cursorSDKVersionRange = ">=1.0.7 <2.0.0";
940
+ var cursorSDKEntrypoints = ["dist/esm/index.js", "dist/cjs/index.js"];
941
+ var cursorSDKConfigs = cursorSDKEntrypoints.flatMap((filePath) => [
942
+ {
943
+ channelName: cursorSDKChannels.create.channelName,
944
+ module: {
945
+ name: "@cursor/sdk",
946
+ versionRange: cursorSDKVersionRange,
947
+ filePath
948
+ },
949
+ functionQuery: {
950
+ className: "Agent",
951
+ methodName: "create",
952
+ kind: "Async"
953
+ }
954
+ },
955
+ {
956
+ channelName: cursorSDKChannels.resume.channelName,
957
+ module: {
958
+ name: "@cursor/sdk",
959
+ versionRange: cursorSDKVersionRange,
960
+ filePath
961
+ },
962
+ functionQuery: {
963
+ className: "Agent",
964
+ methodName: "resume",
965
+ kind: "Async"
966
+ }
967
+ },
968
+ {
969
+ channelName: cursorSDKChannels.prompt.channelName,
970
+ module: {
971
+ name: "@cursor/sdk",
972
+ versionRange: cursorSDKVersionRange,
973
+ filePath
974
+ },
975
+ functionQuery: {
976
+ className: "Agent",
977
+ methodName: "prompt",
978
+ kind: "Async"
979
+ }
980
+ }
981
+ ]);
982
+
918
983
  // src/instrumentation/plugins/google-genai-channels.ts
919
984
  var googleGenAIChannels = defineChannels("@google/genai", {
920
985
  generateContent: channel({
@@ -1650,6 +1715,19 @@ var cohereConfigs = [
1650
1715
  kind: "Async"
1651
1716
  }
1652
1717
  },
1718
+ {
1719
+ channelName: cohereChannels.chat.channelName,
1720
+ module: {
1721
+ name: "cohere-ai",
1722
+ versionRange: ">=7.20.0 <8.0.0",
1723
+ filePath: "api/resources/v2/client/Client.js"
1724
+ },
1725
+ functionQuery: {
1726
+ className: "V2Client",
1727
+ methodName: "chat",
1728
+ kind: "Async"
1729
+ }
1730
+ },
1653
1731
  {
1654
1732
  channelName: cohereChannels.chat.channelName,
1655
1733
  module: {
@@ -1689,6 +1767,19 @@ var cohereConfigs = [
1689
1767
  kind: "Async"
1690
1768
  }
1691
1769
  },
1770
+ {
1771
+ channelName: cohereChannels.chatStream.channelName,
1772
+ module: {
1773
+ name: "cohere-ai",
1774
+ versionRange: ">=7.20.0 <8.0.0",
1775
+ filePath: "api/resources/v2/client/Client.js"
1776
+ },
1777
+ functionQuery: {
1778
+ className: "V2Client",
1779
+ methodName: "chatStream",
1780
+ kind: "Async"
1781
+ }
1782
+ },
1692
1783
  {
1693
1784
  channelName: cohereChannels.chatStream.channelName,
1694
1785
  module: {
@@ -1728,6 +1819,19 @@ var cohereConfigs = [
1728
1819
  kind: "Async"
1729
1820
  }
1730
1821
  },
1822
+ {
1823
+ channelName: cohereChannels.embed.channelName,
1824
+ module: {
1825
+ name: "cohere-ai",
1826
+ versionRange: ">=7.20.0 <8.0.0",
1827
+ filePath: "api/resources/v2/client/Client.js"
1828
+ },
1829
+ functionQuery: {
1830
+ className: "V2Client",
1831
+ methodName: "embed",
1832
+ kind: "Async"
1833
+ }
1834
+ },
1731
1835
  {
1732
1836
  channelName: cohereChannels.embed.channelName,
1733
1837
  module: {
@@ -1767,6 +1871,19 @@ var cohereConfigs = [
1767
1871
  kind: "Async"
1768
1872
  }
1769
1873
  },
1874
+ {
1875
+ channelName: cohereChannels.rerank.channelName,
1876
+ module: {
1877
+ name: "cohere-ai",
1878
+ versionRange: ">=7.20.0 <8.0.0",
1879
+ filePath: "api/resources/v2/client/Client.js"
1880
+ },
1881
+ functionQuery: {
1882
+ className: "V2Client",
1883
+ methodName: "rerank",
1884
+ kind: "Async"
1885
+ }
1886
+ },
1770
1887
  {
1771
1888
  channelName: cohereChannels.rerank.channelName,
1772
1889
  module: {
@@ -1795,6 +1912,50 @@ var cohereConfigs = [
1795
1912
  }
1796
1913
  ];
1797
1914
 
1915
+ // src/instrumentation/plugins/groq-channels.ts
1916
+ var groqChannels = defineChannels("groq-sdk", {
1917
+ chatCompletionsCreate: channel({
1918
+ channelName: "chat.completions.create",
1919
+ kind: "async"
1920
+ }),
1921
+ embeddingsCreate: channel(
1922
+ {
1923
+ channelName: "embeddings.create",
1924
+ kind: "async"
1925
+ }
1926
+ )
1927
+ });
1928
+
1929
+ // src/auto-instrumentations/configs/groq.ts
1930
+ var groqConfigs = [
1931
+ {
1932
+ channelName: groqChannels.chatCompletionsCreate.channelName,
1933
+ module: {
1934
+ name: "groq-sdk",
1935
+ versionRange: ">=1.0.0",
1936
+ filePath: "resources/chat/completions.mjs"
1937
+ },
1938
+ functionQuery: {
1939
+ className: "Completions",
1940
+ methodName: "create",
1941
+ kind: "Async"
1942
+ }
1943
+ },
1944
+ {
1945
+ channelName: groqChannels.embeddingsCreate.channelName,
1946
+ module: {
1947
+ name: "groq-sdk",
1948
+ versionRange: ">=1.0.0",
1949
+ filePath: "resources/embeddings.mjs"
1950
+ },
1951
+ functionQuery: {
1952
+ className: "Embeddings",
1953
+ methodName: "create",
1954
+ kind: "Async"
1955
+ }
1956
+ }
1957
+ ];
1958
+
1798
1959
  // src/auto-instrumentations/bundler/webpack-loader.ts
1799
1960
  function getModuleVersion(basedir) {
1800
1961
  try {
@@ -1814,12 +1975,14 @@ function getMatcher(options) {
1814
1975
  ...anthropicConfigs,
1815
1976
  ...aiSDKConfigs,
1816
1977
  ...claudeAgentSDKConfigs,
1978
+ ...cursorSDKConfigs,
1817
1979
  ...googleGenAIConfigs,
1818
1980
  ...huggingFaceConfigs,
1819
1981
  ...openRouterConfigs,
1820
1982
  ...openRouterAgentConfigs,
1821
1983
  ...mistralConfigs,
1822
1984
  ...cohereConfigs,
1985
+ ...groqConfigs,
1823
1986
  ...options.instrumentations ?? []
1824
1987
  ];
1825
1988
  const dcModule = options.browser ? "dc-browser" : void 0;
@@ -929,6 +929,71 @@ var claudeAgentSDKConfigs = [
929
929
  }
930
930
  ];
931
931
 
932
+ // src/instrumentation/plugins/cursor-sdk-channels.ts
933
+ var cursorSDKChannels = defineChannels("@cursor/sdk", {
934
+ create: channel({
935
+ channelName: "Agent.create",
936
+ kind: "async"
937
+ }),
938
+ resume: channel({
939
+ channelName: "Agent.resume",
940
+ kind: "async"
941
+ }),
942
+ prompt: channel({
943
+ channelName: "Agent.prompt",
944
+ kind: "async"
945
+ }),
946
+ send: channel({
947
+ channelName: "agent.send",
948
+ kind: "async"
949
+ })
950
+ });
951
+
952
+ // src/auto-instrumentations/configs/cursor-sdk.ts
953
+ var cursorSDKVersionRange = ">=1.0.7 <2.0.0";
954
+ var cursorSDKEntrypoints = ["dist/esm/index.js", "dist/cjs/index.js"];
955
+ var cursorSDKConfigs = cursorSDKEntrypoints.flatMap((filePath) => [
956
+ {
957
+ channelName: cursorSDKChannels.create.channelName,
958
+ module: {
959
+ name: "@cursor/sdk",
960
+ versionRange: cursorSDKVersionRange,
961
+ filePath
962
+ },
963
+ functionQuery: {
964
+ className: "Agent",
965
+ methodName: "create",
966
+ kind: "Async"
967
+ }
968
+ },
969
+ {
970
+ channelName: cursorSDKChannels.resume.channelName,
971
+ module: {
972
+ name: "@cursor/sdk",
973
+ versionRange: cursorSDKVersionRange,
974
+ filePath
975
+ },
976
+ functionQuery: {
977
+ className: "Agent",
978
+ methodName: "resume",
979
+ kind: "Async"
980
+ }
981
+ },
982
+ {
983
+ channelName: cursorSDKChannels.prompt.channelName,
984
+ module: {
985
+ name: "@cursor/sdk",
986
+ versionRange: cursorSDKVersionRange,
987
+ filePath
988
+ },
989
+ functionQuery: {
990
+ className: "Agent",
991
+ methodName: "prompt",
992
+ kind: "Async"
993
+ }
994
+ }
995
+ ]);
996
+
932
997
  // src/instrumentation/plugins/google-genai-channels.ts
933
998
  var googleGenAIChannels = defineChannels("@google/genai", {
934
999
  generateContent: channel({
@@ -1664,6 +1729,19 @@ var cohereConfigs = [
1664
1729
  kind: "Async"
1665
1730
  }
1666
1731
  },
1732
+ {
1733
+ channelName: cohereChannels.chat.channelName,
1734
+ module: {
1735
+ name: "cohere-ai",
1736
+ versionRange: ">=7.20.0 <8.0.0",
1737
+ filePath: "api/resources/v2/client/Client.js"
1738
+ },
1739
+ functionQuery: {
1740
+ className: "V2Client",
1741
+ methodName: "chat",
1742
+ kind: "Async"
1743
+ }
1744
+ },
1667
1745
  {
1668
1746
  channelName: cohereChannels.chat.channelName,
1669
1747
  module: {
@@ -1703,6 +1781,19 @@ var cohereConfigs = [
1703
1781
  kind: "Async"
1704
1782
  }
1705
1783
  },
1784
+ {
1785
+ channelName: cohereChannels.chatStream.channelName,
1786
+ module: {
1787
+ name: "cohere-ai",
1788
+ versionRange: ">=7.20.0 <8.0.0",
1789
+ filePath: "api/resources/v2/client/Client.js"
1790
+ },
1791
+ functionQuery: {
1792
+ className: "V2Client",
1793
+ methodName: "chatStream",
1794
+ kind: "Async"
1795
+ }
1796
+ },
1706
1797
  {
1707
1798
  channelName: cohereChannels.chatStream.channelName,
1708
1799
  module: {
@@ -1742,6 +1833,19 @@ var cohereConfigs = [
1742
1833
  kind: "Async"
1743
1834
  }
1744
1835
  },
1836
+ {
1837
+ channelName: cohereChannels.embed.channelName,
1838
+ module: {
1839
+ name: "cohere-ai",
1840
+ versionRange: ">=7.20.0 <8.0.0",
1841
+ filePath: "api/resources/v2/client/Client.js"
1842
+ },
1843
+ functionQuery: {
1844
+ className: "V2Client",
1845
+ methodName: "embed",
1846
+ kind: "Async"
1847
+ }
1848
+ },
1745
1849
  {
1746
1850
  channelName: cohereChannels.embed.channelName,
1747
1851
  module: {
@@ -1781,6 +1885,19 @@ var cohereConfigs = [
1781
1885
  kind: "Async"
1782
1886
  }
1783
1887
  },
1888
+ {
1889
+ channelName: cohereChannels.rerank.channelName,
1890
+ module: {
1891
+ name: "cohere-ai",
1892
+ versionRange: ">=7.20.0 <8.0.0",
1893
+ filePath: "api/resources/v2/client/Client.js"
1894
+ },
1895
+ functionQuery: {
1896
+ className: "V2Client",
1897
+ methodName: "rerank",
1898
+ kind: "Async"
1899
+ }
1900
+ },
1784
1901
  {
1785
1902
  channelName: cohereChannels.rerank.channelName,
1786
1903
  module: {
@@ -1809,6 +1926,50 @@ var cohereConfigs = [
1809
1926
  }
1810
1927
  ];
1811
1928
 
1929
+ // src/instrumentation/plugins/groq-channels.ts
1930
+ var groqChannels = defineChannels("groq-sdk", {
1931
+ chatCompletionsCreate: channel({
1932
+ channelName: "chat.completions.create",
1933
+ kind: "async"
1934
+ }),
1935
+ embeddingsCreate: channel(
1936
+ {
1937
+ channelName: "embeddings.create",
1938
+ kind: "async"
1939
+ }
1940
+ )
1941
+ });
1942
+
1943
+ // src/auto-instrumentations/configs/groq.ts
1944
+ var groqConfigs = [
1945
+ {
1946
+ channelName: groqChannels.chatCompletionsCreate.channelName,
1947
+ module: {
1948
+ name: "groq-sdk",
1949
+ versionRange: ">=1.0.0",
1950
+ filePath: "resources/chat/completions.mjs"
1951
+ },
1952
+ functionQuery: {
1953
+ className: "Completions",
1954
+ methodName: "create",
1955
+ kind: "Async"
1956
+ }
1957
+ },
1958
+ {
1959
+ channelName: groqChannels.embeddingsCreate.channelName,
1960
+ module: {
1961
+ name: "groq-sdk",
1962
+ versionRange: ">=1.0.0",
1963
+ filePath: "resources/embeddings.mjs"
1964
+ },
1965
+ functionQuery: {
1966
+ className: "Embeddings",
1967
+ methodName: "create",
1968
+ kind: "Async"
1969
+ }
1970
+ }
1971
+ ];
1972
+
1812
1973
  // src/auto-instrumentations/bundler/plugin.ts
1813
1974
  function getModuleVersion(basedir) {
1814
1975
  try {
@@ -1827,12 +1988,14 @@ var unplugin = (0, import_unplugin.createUnplugin)((options = {}) => {
1827
1988
  ...anthropicConfigs,
1828
1989
  ...aiSDKConfigs,
1829
1990
  ...claudeAgentSDKConfigs,
1991
+ ...cursorSDKConfigs,
1830
1992
  ...googleGenAIConfigs,
1831
1993
  ...huggingFaceConfigs,
1832
1994
  ...openRouterConfigs,
1833
1995
  ...openRouterAgentConfigs,
1834
1996
  ...mistralConfigs,
1835
1997
  ...cohereConfigs,
1998
+ ...groqConfigs,
1836
1999
  ...options.instrumentations || []
1837
2000
  ];
1838
2001
  const dcModule = options.browser === false ? void 0 : "dc-browser";
@@ -1841,6 +2004,9 @@ var unplugin = (0, import_unplugin.createUnplugin)((options = {}) => {
1841
2004
  name: "code-transformer",
1842
2005
  enforce: "pre",
1843
2006
  transform(code, id) {
2007
+ if (!id) {
2008
+ return null;
2009
+ }
1844
2010
  const filePath = id.startsWith("file:") ? (0, import_url.fileURLToPath)(id) : id;
1845
2011
  const ext = (0, import_path.extname)(filePath);
1846
2012
  let isModule = ext === ".mjs" || ext === ".ts" || ext === ".tsx";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-G7F6HZGE.mjs";
4
- import "../chunk-KIMMUFAK.mjs";
3
+ } from "../chunk-XWEQQOQH.mjs";
4
+ import "../chunk-GZNXBBPU.mjs";
5
5
 
6
6
  // src/auto-instrumentations/bundler/webpack.ts
7
7
  var webpackPlugin = unplugin.webpack;
@@ -885,6 +885,71 @@ var claudeAgentSDKConfigs = [
885
885
  }
886
886
  ];
887
887
 
888
+ // src/instrumentation/plugins/cursor-sdk-channels.ts
889
+ var cursorSDKChannels = defineChannels("@cursor/sdk", {
890
+ create: channel({
891
+ channelName: "Agent.create",
892
+ kind: "async"
893
+ }),
894
+ resume: channel({
895
+ channelName: "Agent.resume",
896
+ kind: "async"
897
+ }),
898
+ prompt: channel({
899
+ channelName: "Agent.prompt",
900
+ kind: "async"
901
+ }),
902
+ send: channel({
903
+ channelName: "agent.send",
904
+ kind: "async"
905
+ })
906
+ });
907
+
908
+ // src/auto-instrumentations/configs/cursor-sdk.ts
909
+ var cursorSDKVersionRange = ">=1.0.7 <2.0.0";
910
+ var cursorSDKEntrypoints = ["dist/esm/index.js", "dist/cjs/index.js"];
911
+ var cursorSDKConfigs = cursorSDKEntrypoints.flatMap((filePath) => [
912
+ {
913
+ channelName: cursorSDKChannels.create.channelName,
914
+ module: {
915
+ name: "@cursor/sdk",
916
+ versionRange: cursorSDKVersionRange,
917
+ filePath
918
+ },
919
+ functionQuery: {
920
+ className: "Agent",
921
+ methodName: "create",
922
+ kind: "Async"
923
+ }
924
+ },
925
+ {
926
+ channelName: cursorSDKChannels.resume.channelName,
927
+ module: {
928
+ name: "@cursor/sdk",
929
+ versionRange: cursorSDKVersionRange,
930
+ filePath
931
+ },
932
+ functionQuery: {
933
+ className: "Agent",
934
+ methodName: "resume",
935
+ kind: "Async"
936
+ }
937
+ },
938
+ {
939
+ channelName: cursorSDKChannels.prompt.channelName,
940
+ module: {
941
+ name: "@cursor/sdk",
942
+ versionRange: cursorSDKVersionRange,
943
+ filePath
944
+ },
945
+ functionQuery: {
946
+ className: "Agent",
947
+ methodName: "prompt",
948
+ kind: "Async"
949
+ }
950
+ }
951
+ ]);
952
+
888
953
  // src/instrumentation/plugins/google-genai-channels.ts
889
954
  var googleGenAIChannels = defineChannels("@google/genai", {
890
955
  generateContent: channel({
@@ -1620,6 +1685,19 @@ var cohereConfigs = [
1620
1685
  kind: "Async"
1621
1686
  }
1622
1687
  },
1688
+ {
1689
+ channelName: cohereChannels.chat.channelName,
1690
+ module: {
1691
+ name: "cohere-ai",
1692
+ versionRange: ">=7.20.0 <8.0.0",
1693
+ filePath: "api/resources/v2/client/Client.js"
1694
+ },
1695
+ functionQuery: {
1696
+ className: "V2Client",
1697
+ methodName: "chat",
1698
+ kind: "Async"
1699
+ }
1700
+ },
1623
1701
  {
1624
1702
  channelName: cohereChannels.chat.channelName,
1625
1703
  module: {
@@ -1659,6 +1737,19 @@ var cohereConfigs = [
1659
1737
  kind: "Async"
1660
1738
  }
1661
1739
  },
1740
+ {
1741
+ channelName: cohereChannels.chatStream.channelName,
1742
+ module: {
1743
+ name: "cohere-ai",
1744
+ versionRange: ">=7.20.0 <8.0.0",
1745
+ filePath: "api/resources/v2/client/Client.js"
1746
+ },
1747
+ functionQuery: {
1748
+ className: "V2Client",
1749
+ methodName: "chatStream",
1750
+ kind: "Async"
1751
+ }
1752
+ },
1662
1753
  {
1663
1754
  channelName: cohereChannels.chatStream.channelName,
1664
1755
  module: {
@@ -1698,6 +1789,19 @@ var cohereConfigs = [
1698
1789
  kind: "Async"
1699
1790
  }
1700
1791
  },
1792
+ {
1793
+ channelName: cohereChannels.embed.channelName,
1794
+ module: {
1795
+ name: "cohere-ai",
1796
+ versionRange: ">=7.20.0 <8.0.0",
1797
+ filePath: "api/resources/v2/client/Client.js"
1798
+ },
1799
+ functionQuery: {
1800
+ className: "V2Client",
1801
+ methodName: "embed",
1802
+ kind: "Async"
1803
+ }
1804
+ },
1701
1805
  {
1702
1806
  channelName: cohereChannels.embed.channelName,
1703
1807
  module: {
@@ -1737,6 +1841,19 @@ var cohereConfigs = [
1737
1841
  kind: "Async"
1738
1842
  }
1739
1843
  },
1844
+ {
1845
+ channelName: cohereChannels.rerank.channelName,
1846
+ module: {
1847
+ name: "cohere-ai",
1848
+ versionRange: ">=7.20.0 <8.0.0",
1849
+ filePath: "api/resources/v2/client/Client.js"
1850
+ },
1851
+ functionQuery: {
1852
+ className: "V2Client",
1853
+ methodName: "rerank",
1854
+ kind: "Async"
1855
+ }
1856
+ },
1740
1857
  {
1741
1858
  channelName: cohereChannels.rerank.channelName,
1742
1859
  module: {
@@ -1765,6 +1882,50 @@ var cohereConfigs = [
1765
1882
  }
1766
1883
  ];
1767
1884
 
1885
+ // src/instrumentation/plugins/groq-channels.ts
1886
+ var groqChannels = defineChannels("groq-sdk", {
1887
+ chatCompletionsCreate: channel({
1888
+ channelName: "chat.completions.create",
1889
+ kind: "async"
1890
+ }),
1891
+ embeddingsCreate: channel(
1892
+ {
1893
+ channelName: "embeddings.create",
1894
+ kind: "async"
1895
+ }
1896
+ )
1897
+ });
1898
+
1899
+ // src/auto-instrumentations/configs/groq.ts
1900
+ var groqConfigs = [
1901
+ {
1902
+ channelName: groqChannels.chatCompletionsCreate.channelName,
1903
+ module: {
1904
+ name: "groq-sdk",
1905
+ versionRange: ">=1.0.0",
1906
+ filePath: "resources/chat/completions.mjs"
1907
+ },
1908
+ functionQuery: {
1909
+ className: "Completions",
1910
+ methodName: "create",
1911
+ kind: "Async"
1912
+ }
1913
+ },
1914
+ {
1915
+ channelName: groqChannels.embeddingsCreate.channelName,
1916
+ module: {
1917
+ name: "groq-sdk",
1918
+ versionRange: ">=1.0.0",
1919
+ filePath: "resources/embeddings.mjs"
1920
+ },
1921
+ functionQuery: {
1922
+ className: "Embeddings",
1923
+ methodName: "create",
1924
+ kind: "Async"
1925
+ }
1926
+ }
1927
+ ];
1928
+
1768
1929
  export {
1769
1930
  channel,
1770
1931
  defineChannels,
@@ -1772,10 +1933,12 @@ export {
1772
1933
  anthropicConfigs,
1773
1934
  aiSDKConfigs,
1774
1935
  claudeAgentSDKConfigs,
1936
+ cursorSDKConfigs,
1775
1937
  googleGenAIConfigs,
1776
1938
  huggingFaceConfigs,
1777
1939
  openRouterAgentConfigs,
1778
1940
  openRouterConfigs,
1779
1941
  mistralConfigs,
1780
- cohereConfigs
1942
+ cohereConfigs,
1943
+ groqConfigs
1781
1944
  };
@@ -3,13 +3,15 @@ import {
3
3
  anthropicConfigs,
4
4
  claudeAgentSDKConfigs,
5
5
  cohereConfigs,
6
+ cursorSDKConfigs,
6
7
  googleGenAIConfigs,
8
+ groqConfigs,
7
9
  huggingFaceConfigs,
8
10
  mistralConfigs,
9
11
  openRouterAgentConfigs,
10
12
  openRouterConfigs,
11
13
  openaiConfigs
12
- } from "./chunk-KIMMUFAK.mjs";
14
+ } from "./chunk-GZNXBBPU.mjs";
13
15
 
14
16
  // src/auto-instrumentations/bundler/plugin.ts
15
17
  import { createUnplugin } from "unplugin";
@@ -37,12 +39,14 @@ var unplugin = createUnplugin((options = {}) => {
37
39
  ...anthropicConfigs,
38
40
  ...aiSDKConfigs,
39
41
  ...claudeAgentSDKConfigs,
42
+ ...cursorSDKConfigs,
40
43
  ...googleGenAIConfigs,
41
44
  ...huggingFaceConfigs,
42
45
  ...openRouterConfigs,
43
46
  ...openRouterAgentConfigs,
44
47
  ...mistralConfigs,
45
48
  ...cohereConfigs,
49
+ ...groqConfigs,
46
50
  ...options.instrumentations || []
47
51
  ];
48
52
  const dcModule = options.browser === false ? void 0 : "dc-browser";
@@ -51,6 +55,9 @@ var unplugin = createUnplugin((options = {}) => {
51
55
  name: "code-transformer",
52
56
  enforce: "pre",
53
57
  transform(code, id) {
58
+ if (!id) {
59
+ return null;
60
+ }
54
61
  const filePath = id.startsWith("file:") ? fileURLToPath(id) : id;
55
62
  const ext = extname(filePath);
56
63
  let isModule = ext === ".mjs" || ext === ".ts" || ext === ".tsx";