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
@@ -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/esbuild.ts
7
7
  var esbuildPlugin = unplugin.esbuild;
@@ -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/rollup.ts
7
7
  var rollupPlugin = unplugin.rollup;
@@ -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/vite.ts
7
7
  var vitePlugin = unplugin.vite;