braintrust 3.8.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.
- package/dev/dist/index.d.mts +191 -4
- package/dev/dist/index.d.ts +191 -4
- package/dev/dist/index.js +7269 -2590
- package/dev/dist/index.mjs +7281 -2602
- package/dist/auto-instrumentations/bundler/esbuild.cjs +741 -2
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/rollup.cjs +741 -2
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +741 -2
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +738 -2
- package/dist/auto-instrumentations/bundler/webpack.cjs +741 -2
- package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
- package/dist/auto-instrumentations/{chunk-OLBMPZXE.mjs → chunk-GZNXBBPU.mjs} +741 -3
- package/dist/auto-instrumentations/{chunk-MD7W27YH.mjs → chunk-XWEQQOQH.mjs} +12 -1
- package/dist/auto-instrumentations/hook.mjs +1193 -199
- package/dist/auto-instrumentations/index.cjs +1173 -187
- package/dist/auto-instrumentations/index.d.mts +22 -1
- package/dist/auto-instrumentations/index.d.ts +22 -1
- package/dist/auto-instrumentations/index.mjs +256 -1
- package/dist/auto-instrumentations/loader/esm-hook.mjs +2 -1
- package/dist/browser.d.mts +451 -11
- package/dist/browser.d.ts +451 -11
- package/dist/browser.js +7659 -2321
- package/dist/browser.mjs +7659 -2321
- package/dist/cli.js +7143 -2435
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +7659 -2321
- package/dist/edge-light.mjs +7659 -2321
- package/dist/index.d.mts +451 -11
- package/dist/index.d.ts +451 -11
- package/dist/index.js +8054 -2716
- package/dist/index.mjs +7659 -2321
- package/dist/instrumentation/index.d.mts +17 -0
- package/dist/instrumentation/index.d.ts +17 -0
- package/dist/instrumentation/index.js +6420 -2051
- package/dist/instrumentation/index.mjs +6420 -2051
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +7659 -2321
- package/dist/workerd.mjs +7659 -2321
- package/package.json +56 -51
- package/util/dist/index.d.mts +42 -1
- package/util/dist/index.d.ts +42 -1
- package/util/dist/index.js +5 -1
- package/util/dist/index.mjs +4 -0
- package/LICENSE +0 -201
|
@@ -413,6 +413,10 @@ var anthropicChannels = defineChannels("@anthropic-ai/sdk", {
|
|
|
413
413
|
betaMessagesCreate: channel({
|
|
414
414
|
channelName: "beta.messages.create",
|
|
415
415
|
kind: "async"
|
|
416
|
+
}),
|
|
417
|
+
betaMessagesToolRunner: channel({
|
|
418
|
+
channelName: "beta.messages.toolRunner",
|
|
419
|
+
kind: "sync-stream"
|
|
416
420
|
})
|
|
417
421
|
});
|
|
418
422
|
|
|
@@ -459,6 +463,20 @@ var anthropicConfigs = [
|
|
|
459
463
|
methodName: "create",
|
|
460
464
|
kind: "Async"
|
|
461
465
|
}
|
|
466
|
+
},
|
|
467
|
+
// Beta Messages API - toolRunner (sync helper returning async iterable/thenable)
|
|
468
|
+
{
|
|
469
|
+
channelName: anthropicChannels.betaMessagesToolRunner.channelName,
|
|
470
|
+
module: {
|
|
471
|
+
name: "@anthropic-ai/sdk",
|
|
472
|
+
versionRange: ">=0.39.0",
|
|
473
|
+
filePath: "resources/beta/messages/messages.mjs"
|
|
474
|
+
},
|
|
475
|
+
functionQuery: {
|
|
476
|
+
className: "Messages",
|
|
477
|
+
methodName: "toolRunner",
|
|
478
|
+
kind: "Sync"
|
|
479
|
+
}
|
|
462
480
|
}
|
|
463
481
|
];
|
|
464
482
|
|
|
@@ -498,6 +516,10 @@ var aiSDKChannels = defineChannels("ai", {
|
|
|
498
516
|
channelName: "embedMany",
|
|
499
517
|
kind: "async"
|
|
500
518
|
}),
|
|
519
|
+
rerank: channel({
|
|
520
|
+
channelName: "rerank",
|
|
521
|
+
kind: "async"
|
|
522
|
+
}),
|
|
501
523
|
agentGenerate: channel({
|
|
502
524
|
channelName: "Agent.generate",
|
|
503
525
|
kind: "async"
|
|
@@ -577,7 +599,7 @@ var aiSDKConfigs = [
|
|
|
577
599
|
channelName: aiSDKChannels.streamText.channelName,
|
|
578
600
|
module: {
|
|
579
601
|
name: "ai",
|
|
580
|
-
versionRange: ">=3.0.0",
|
|
602
|
+
versionRange: ">=3.0.0 <4.0.0",
|
|
581
603
|
filePath: "dist/index.js"
|
|
582
604
|
},
|
|
583
605
|
functionQuery: {
|
|
@@ -585,6 +607,18 @@ var aiSDKConfigs = [
|
|
|
585
607
|
kind: "Async"
|
|
586
608
|
}
|
|
587
609
|
},
|
|
610
|
+
{
|
|
611
|
+
channelName: aiSDKChannels.streamTextSync.channelName,
|
|
612
|
+
module: {
|
|
613
|
+
name: "ai",
|
|
614
|
+
versionRange: ">=4.0.0",
|
|
615
|
+
filePath: "dist/index.js"
|
|
616
|
+
},
|
|
617
|
+
functionQuery: {
|
|
618
|
+
functionName: "streamText",
|
|
619
|
+
kind: "Sync"
|
|
620
|
+
}
|
|
621
|
+
},
|
|
588
622
|
// generateObject - async function
|
|
589
623
|
{
|
|
590
624
|
channelName: aiSDKChannels.generateObject.channelName,
|
|
@@ -660,6 +694,31 @@ var aiSDKConfigs = [
|
|
|
660
694
|
kind: "Async"
|
|
661
695
|
}
|
|
662
696
|
},
|
|
697
|
+
// rerank - async function
|
|
698
|
+
{
|
|
699
|
+
channelName: aiSDKChannels.rerank.channelName,
|
|
700
|
+
module: {
|
|
701
|
+
name: "ai",
|
|
702
|
+
versionRange: ">=5.0.0",
|
|
703
|
+
filePath: "dist/index.mjs"
|
|
704
|
+
},
|
|
705
|
+
functionQuery: {
|
|
706
|
+
functionName: "rerank",
|
|
707
|
+
kind: "Async"
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
channelName: aiSDKChannels.rerank.channelName,
|
|
712
|
+
module: {
|
|
713
|
+
name: "ai",
|
|
714
|
+
versionRange: ">=5.0.0",
|
|
715
|
+
filePath: "dist/index.js"
|
|
716
|
+
},
|
|
717
|
+
functionQuery: {
|
|
718
|
+
functionName: "rerank",
|
|
719
|
+
kind: "Async"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
663
722
|
// streamObject - async function (v3 only, before the sync refactor in v4)
|
|
664
723
|
{
|
|
665
724
|
channelName: aiSDKChannels.streamObject.channelName,
|
|
@@ -690,7 +749,7 @@ var aiSDKConfigs = [
|
|
|
690
749
|
channelName: aiSDKChannels.streamObject.channelName,
|
|
691
750
|
module: {
|
|
692
751
|
name: "ai",
|
|
693
|
-
versionRange: ">=3.0.0",
|
|
752
|
+
versionRange: ">=3.0.0 <4.0.0",
|
|
694
753
|
filePath: "dist/index.js"
|
|
695
754
|
},
|
|
696
755
|
functionQuery: {
|
|
@@ -698,6 +757,18 @@ var aiSDKConfigs = [
|
|
|
698
757
|
kind: "Async"
|
|
699
758
|
}
|
|
700
759
|
},
|
|
760
|
+
{
|
|
761
|
+
channelName: aiSDKChannels.streamObjectSync.channelName,
|
|
762
|
+
module: {
|
|
763
|
+
name: "ai",
|
|
764
|
+
versionRange: ">=4.0.0",
|
|
765
|
+
filePath: "dist/index.js"
|
|
766
|
+
},
|
|
767
|
+
functionQuery: {
|
|
768
|
+
functionName: "streamObject",
|
|
769
|
+
kind: "Sync"
|
|
770
|
+
}
|
|
771
|
+
},
|
|
701
772
|
// Agent.generate - async method (v5 only)
|
|
702
773
|
// The compiled AI SDK bundle emits this as an anonymous class method, so we
|
|
703
774
|
// target the first async `generate` method in the file instead of a class name.
|
|
@@ -858,6 +929,71 @@ var claudeAgentSDKConfigs = [
|
|
|
858
929
|
}
|
|
859
930
|
];
|
|
860
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
|
+
|
|
861
997
|
// src/instrumentation/plugins/google-genai-channels.ts
|
|
862
998
|
var googleGenAIChannels = defineChannels("@google/genai", {
|
|
863
999
|
generateContent: channel({
|
|
@@ -867,6 +1003,10 @@ var googleGenAIChannels = defineChannels("@google/genai", {
|
|
|
867
1003
|
generateContentStream: channel({
|
|
868
1004
|
channelName: "models.generateContentStream",
|
|
869
1005
|
kind: "async"
|
|
1006
|
+
}),
|
|
1007
|
+
embedContent: channel({
|
|
1008
|
+
channelName: "models.embedContent",
|
|
1009
|
+
kind: "async"
|
|
870
1010
|
})
|
|
871
1011
|
});
|
|
872
1012
|
|
|
@@ -901,6 +1041,303 @@ var googleGenAIConfigs = [
|
|
|
901
1041
|
methodName: "generateContentStreamInternal",
|
|
902
1042
|
kind: "Async"
|
|
903
1043
|
}
|
|
1044
|
+
},
|
|
1045
|
+
// Models.embedContent - class method in older SDK versions
|
|
1046
|
+
{
|
|
1047
|
+
channelName: googleGenAIChannels.embedContent.channelName,
|
|
1048
|
+
module: {
|
|
1049
|
+
name: "@google/genai",
|
|
1050
|
+
versionRange: ">=1.0.0 <1.44.0",
|
|
1051
|
+
filePath: "dist/node/index.mjs"
|
|
1052
|
+
},
|
|
1053
|
+
functionQuery: {
|
|
1054
|
+
className: "Models",
|
|
1055
|
+
methodName: "embedContent",
|
|
1056
|
+
kind: "Async"
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
// Models.embedContentInternal - class method in newer SDK versions
|
|
1060
|
+
// Note: embedContent is an arrow function property that calls this method
|
|
1061
|
+
{
|
|
1062
|
+
channelName: googleGenAIChannels.embedContent.channelName,
|
|
1063
|
+
module: {
|
|
1064
|
+
name: "@google/genai",
|
|
1065
|
+
versionRange: ">=1.44.0",
|
|
1066
|
+
filePath: "dist/node/index.mjs"
|
|
1067
|
+
},
|
|
1068
|
+
functionQuery: {
|
|
1069
|
+
className: "Models",
|
|
1070
|
+
methodName: "embedContentInternal",
|
|
1071
|
+
kind: "Async"
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
];
|
|
1075
|
+
|
|
1076
|
+
// src/instrumentation/plugins/huggingface-channels.ts
|
|
1077
|
+
var huggingFaceChannels = defineChannels("@huggingface/inference", {
|
|
1078
|
+
chatCompletion: channel({
|
|
1079
|
+
channelName: "chatCompletion",
|
|
1080
|
+
kind: "async"
|
|
1081
|
+
}),
|
|
1082
|
+
chatCompletionStream: channel({
|
|
1083
|
+
channelName: "chatCompletionStream",
|
|
1084
|
+
kind: "sync-stream"
|
|
1085
|
+
}),
|
|
1086
|
+
textGeneration: channel({
|
|
1087
|
+
channelName: "textGeneration",
|
|
1088
|
+
kind: "async"
|
|
1089
|
+
}),
|
|
1090
|
+
textGenerationStream: channel({
|
|
1091
|
+
channelName: "textGenerationStream",
|
|
1092
|
+
kind: "sync-stream"
|
|
1093
|
+
}),
|
|
1094
|
+
featureExtraction: channel({
|
|
1095
|
+
channelName: "featureExtraction",
|
|
1096
|
+
kind: "async"
|
|
1097
|
+
})
|
|
1098
|
+
});
|
|
1099
|
+
|
|
1100
|
+
// src/auto-instrumentations/configs/huggingface.ts
|
|
1101
|
+
var huggingFaceConfigs = [
|
|
1102
|
+
{
|
|
1103
|
+
channelName: huggingFaceChannels.chatCompletion.channelName,
|
|
1104
|
+
module: {
|
|
1105
|
+
name: "@huggingface/inference",
|
|
1106
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1107
|
+
filePath: "dist/index.js"
|
|
1108
|
+
},
|
|
1109
|
+
functionQuery: {
|
|
1110
|
+
functionName: "chatCompletion",
|
|
1111
|
+
kind: "Async"
|
|
1112
|
+
}
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
channelName: huggingFaceChannels.chatCompletion.channelName,
|
|
1116
|
+
module: {
|
|
1117
|
+
name: "@huggingface/inference",
|
|
1118
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1119
|
+
filePath: "dist/index.cjs"
|
|
1120
|
+
},
|
|
1121
|
+
functionQuery: {
|
|
1122
|
+
functionName: "chatCompletion",
|
|
1123
|
+
kind: "Async"
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
channelName: huggingFaceChannels.chatCompletionStream.channelName,
|
|
1128
|
+
module: {
|
|
1129
|
+
name: "@huggingface/inference",
|
|
1130
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1131
|
+
filePath: "dist/index.js"
|
|
1132
|
+
},
|
|
1133
|
+
functionQuery: {
|
|
1134
|
+
functionName: "chatCompletionStream",
|
|
1135
|
+
kind: "Sync"
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
channelName: huggingFaceChannels.chatCompletionStream.channelName,
|
|
1140
|
+
module: {
|
|
1141
|
+
name: "@huggingface/inference",
|
|
1142
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1143
|
+
filePath: "dist/index.cjs"
|
|
1144
|
+
},
|
|
1145
|
+
functionQuery: {
|
|
1146
|
+
functionName: "chatCompletionStream",
|
|
1147
|
+
kind: "Sync"
|
|
1148
|
+
}
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
channelName: huggingFaceChannels.textGeneration.channelName,
|
|
1152
|
+
module: {
|
|
1153
|
+
name: "@huggingface/inference",
|
|
1154
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1155
|
+
filePath: "dist/index.js"
|
|
1156
|
+
},
|
|
1157
|
+
functionQuery: {
|
|
1158
|
+
functionName: "textGeneration",
|
|
1159
|
+
kind: "Async"
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
channelName: huggingFaceChannels.textGeneration.channelName,
|
|
1164
|
+
module: {
|
|
1165
|
+
name: "@huggingface/inference",
|
|
1166
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1167
|
+
filePath: "dist/index.cjs"
|
|
1168
|
+
},
|
|
1169
|
+
functionQuery: {
|
|
1170
|
+
functionName: "textGeneration",
|
|
1171
|
+
kind: "Async"
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
channelName: huggingFaceChannels.textGenerationStream.channelName,
|
|
1176
|
+
module: {
|
|
1177
|
+
name: "@huggingface/inference",
|
|
1178
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1179
|
+
filePath: "dist/index.js"
|
|
1180
|
+
},
|
|
1181
|
+
functionQuery: {
|
|
1182
|
+
functionName: "textGenerationStream",
|
|
1183
|
+
kind: "Sync"
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
channelName: huggingFaceChannels.textGenerationStream.channelName,
|
|
1188
|
+
module: {
|
|
1189
|
+
name: "@huggingface/inference",
|
|
1190
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1191
|
+
filePath: "dist/index.cjs"
|
|
1192
|
+
},
|
|
1193
|
+
functionQuery: {
|
|
1194
|
+
functionName: "textGenerationStream",
|
|
1195
|
+
kind: "Sync"
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
channelName: huggingFaceChannels.featureExtraction.channelName,
|
|
1200
|
+
module: {
|
|
1201
|
+
name: "@huggingface/inference",
|
|
1202
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1203
|
+
filePath: "dist/index.js"
|
|
1204
|
+
},
|
|
1205
|
+
functionQuery: {
|
|
1206
|
+
functionName: "featureExtraction",
|
|
1207
|
+
kind: "Async"
|
|
1208
|
+
}
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
channelName: huggingFaceChannels.featureExtraction.channelName,
|
|
1212
|
+
module: {
|
|
1213
|
+
name: "@huggingface/inference",
|
|
1214
|
+
versionRange: ">=2.0.0 <3.0.0",
|
|
1215
|
+
filePath: "dist/index.cjs"
|
|
1216
|
+
},
|
|
1217
|
+
functionQuery: {
|
|
1218
|
+
functionName: "featureExtraction",
|
|
1219
|
+
kind: "Async"
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
channelName: huggingFaceChannels.chatCompletion.channelName,
|
|
1224
|
+
module: {
|
|
1225
|
+
name: "@huggingface/inference",
|
|
1226
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1227
|
+
filePath: "dist/esm/tasks/nlp/chatCompletion.js"
|
|
1228
|
+
},
|
|
1229
|
+
functionQuery: {
|
|
1230
|
+
functionName: "chatCompletion",
|
|
1231
|
+
kind: "Async"
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
channelName: huggingFaceChannels.chatCompletion.channelName,
|
|
1236
|
+
module: {
|
|
1237
|
+
name: "@huggingface/inference",
|
|
1238
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1239
|
+
filePath: "dist/commonjs/tasks/nlp/chatCompletion.js"
|
|
1240
|
+
},
|
|
1241
|
+
functionQuery: {
|
|
1242
|
+
functionName: "chatCompletion",
|
|
1243
|
+
kind: "Async"
|
|
1244
|
+
}
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
channelName: huggingFaceChannels.chatCompletionStream.channelName,
|
|
1248
|
+
module: {
|
|
1249
|
+
name: "@huggingface/inference",
|
|
1250
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1251
|
+
filePath: "dist/esm/tasks/nlp/chatCompletionStream.js"
|
|
1252
|
+
},
|
|
1253
|
+
functionQuery: {
|
|
1254
|
+
functionName: "chatCompletionStream",
|
|
1255
|
+
kind: "Sync"
|
|
1256
|
+
}
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
channelName: huggingFaceChannels.chatCompletionStream.channelName,
|
|
1260
|
+
module: {
|
|
1261
|
+
name: "@huggingface/inference",
|
|
1262
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1263
|
+
filePath: "dist/commonjs/tasks/nlp/chatCompletionStream.js"
|
|
1264
|
+
},
|
|
1265
|
+
functionQuery: {
|
|
1266
|
+
functionName: "chatCompletionStream",
|
|
1267
|
+
kind: "Sync"
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
channelName: huggingFaceChannels.textGeneration.channelName,
|
|
1272
|
+
module: {
|
|
1273
|
+
name: "@huggingface/inference",
|
|
1274
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1275
|
+
filePath: "dist/esm/tasks/nlp/textGeneration.js"
|
|
1276
|
+
},
|
|
1277
|
+
functionQuery: {
|
|
1278
|
+
functionName: "textGeneration",
|
|
1279
|
+
kind: "Async"
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
channelName: huggingFaceChannels.textGeneration.channelName,
|
|
1284
|
+
module: {
|
|
1285
|
+
name: "@huggingface/inference",
|
|
1286
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1287
|
+
filePath: "dist/commonjs/tasks/nlp/textGeneration.js"
|
|
1288
|
+
},
|
|
1289
|
+
functionQuery: {
|
|
1290
|
+
functionName: "textGeneration",
|
|
1291
|
+
kind: "Async"
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
channelName: huggingFaceChannels.textGenerationStream.channelName,
|
|
1296
|
+
module: {
|
|
1297
|
+
name: "@huggingface/inference",
|
|
1298
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1299
|
+
filePath: "dist/esm/tasks/nlp/textGenerationStream.js"
|
|
1300
|
+
},
|
|
1301
|
+
functionQuery: {
|
|
1302
|
+
functionName: "textGenerationStream",
|
|
1303
|
+
kind: "Sync"
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
channelName: huggingFaceChannels.textGenerationStream.channelName,
|
|
1308
|
+
module: {
|
|
1309
|
+
name: "@huggingface/inference",
|
|
1310
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1311
|
+
filePath: "dist/commonjs/tasks/nlp/textGenerationStream.js"
|
|
1312
|
+
},
|
|
1313
|
+
functionQuery: {
|
|
1314
|
+
functionName: "textGenerationStream",
|
|
1315
|
+
kind: "Sync"
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
channelName: huggingFaceChannels.featureExtraction.channelName,
|
|
1320
|
+
module: {
|
|
1321
|
+
name: "@huggingface/inference",
|
|
1322
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1323
|
+
filePath: "dist/esm/tasks/nlp/featureExtraction.js"
|
|
1324
|
+
},
|
|
1325
|
+
functionQuery: {
|
|
1326
|
+
functionName: "featureExtraction",
|
|
1327
|
+
kind: "Async"
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
channelName: huggingFaceChannels.featureExtraction.channelName,
|
|
1332
|
+
module: {
|
|
1333
|
+
name: "@huggingface/inference",
|
|
1334
|
+
versionRange: ">=3.0.0 <5.0.0",
|
|
1335
|
+
filePath: "dist/commonjs/tasks/nlp/featureExtraction.js"
|
|
1336
|
+
},
|
|
1337
|
+
functionQuery: {
|
|
1338
|
+
functionName: "featureExtraction",
|
|
1339
|
+
kind: "Async"
|
|
1340
|
+
}
|
|
904
1341
|
}
|
|
905
1342
|
];
|
|
906
1343
|
|
|
@@ -946,6 +1383,12 @@ var openRouterChannels = defineChannels("@openrouter/sdk", {
|
|
|
946
1383
|
channelName: "embeddings.generate",
|
|
947
1384
|
kind: "async"
|
|
948
1385
|
}),
|
|
1386
|
+
rerankRerank: channel(
|
|
1387
|
+
{
|
|
1388
|
+
channelName: "rerank.rerank",
|
|
1389
|
+
kind: "async"
|
|
1390
|
+
}
|
|
1391
|
+
),
|
|
949
1392
|
betaResponsesSend: channel({
|
|
950
1393
|
channelName: "beta.responses.send",
|
|
951
1394
|
kind: "async"
|
|
@@ -992,6 +1435,19 @@ var openRouterConfigs = [
|
|
|
992
1435
|
kind: "Async"
|
|
993
1436
|
}
|
|
994
1437
|
},
|
|
1438
|
+
{
|
|
1439
|
+
channelName: openRouterChannels.rerankRerank.channelName,
|
|
1440
|
+
module: {
|
|
1441
|
+
name: "@openrouter/sdk",
|
|
1442
|
+
versionRange: ">=0.12.0 <1.0.0",
|
|
1443
|
+
filePath: "esm/sdk/rerank.js"
|
|
1444
|
+
},
|
|
1445
|
+
functionQuery: {
|
|
1446
|
+
className: "Rerank",
|
|
1447
|
+
methodName: "rerank",
|
|
1448
|
+
kind: "Async"
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
995
1451
|
{
|
|
996
1452
|
channelName: openRouterChannels.betaResponsesSend.channelName,
|
|
997
1453
|
module: {
|
|
@@ -1238,6 +1694,282 @@ var mistralConfigs = [
|
|
|
1238
1694
|
}
|
|
1239
1695
|
];
|
|
1240
1696
|
|
|
1697
|
+
// src/instrumentation/plugins/cohere-channels.ts
|
|
1698
|
+
var cohereChannels = defineChannels("cohere-ai", {
|
|
1699
|
+
chat: channel({
|
|
1700
|
+
channelName: "chat",
|
|
1701
|
+
kind: "async"
|
|
1702
|
+
}),
|
|
1703
|
+
chatStream: channel({
|
|
1704
|
+
channelName: "chatStream",
|
|
1705
|
+
kind: "async"
|
|
1706
|
+
}),
|
|
1707
|
+
embed: channel({
|
|
1708
|
+
channelName: "embed",
|
|
1709
|
+
kind: "async"
|
|
1710
|
+
}),
|
|
1711
|
+
rerank: channel({
|
|
1712
|
+
channelName: "rerank",
|
|
1713
|
+
kind: "async"
|
|
1714
|
+
})
|
|
1715
|
+
});
|
|
1716
|
+
|
|
1717
|
+
// src/auto-instrumentations/configs/cohere.ts
|
|
1718
|
+
var cohereConfigs = [
|
|
1719
|
+
{
|
|
1720
|
+
channelName: cohereChannels.chat.channelName,
|
|
1721
|
+
module: {
|
|
1722
|
+
name: "cohere-ai",
|
|
1723
|
+
versionRange: ">=7.0.0 <8.0.0",
|
|
1724
|
+
filePath: "Client.js"
|
|
1725
|
+
},
|
|
1726
|
+
functionQuery: {
|
|
1727
|
+
className: "CohereClient",
|
|
1728
|
+
methodName: "chat",
|
|
1729
|
+
kind: "Async"
|
|
1730
|
+
}
|
|
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
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
channelName: cohereChannels.chat.channelName,
|
|
1747
|
+
module: {
|
|
1748
|
+
name: "cohere-ai",
|
|
1749
|
+
versionRange: ">=8.0.0 <9.0.0",
|
|
1750
|
+
filePath: "Client.js"
|
|
1751
|
+
},
|
|
1752
|
+
functionQuery: {
|
|
1753
|
+
className: "CohereClient",
|
|
1754
|
+
methodName: "chat",
|
|
1755
|
+
kind: "Async"
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
channelName: cohereChannels.chat.channelName,
|
|
1760
|
+
module: {
|
|
1761
|
+
name: "cohere-ai",
|
|
1762
|
+
versionRange: ">=8.0.0 <9.0.0",
|
|
1763
|
+
filePath: "api/resources/v2/client/Client.js"
|
|
1764
|
+
},
|
|
1765
|
+
functionQuery: {
|
|
1766
|
+
className: "V2Client",
|
|
1767
|
+
methodName: "chat",
|
|
1768
|
+
kind: "Async"
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
channelName: cohereChannels.chatStream.channelName,
|
|
1773
|
+
module: {
|
|
1774
|
+
name: "cohere-ai",
|
|
1775
|
+
versionRange: ">=7.0.0 <8.0.0",
|
|
1776
|
+
filePath: "Client.js"
|
|
1777
|
+
},
|
|
1778
|
+
functionQuery: {
|
|
1779
|
+
className: "CohereClient",
|
|
1780
|
+
methodName: "chatStream",
|
|
1781
|
+
kind: "Async"
|
|
1782
|
+
}
|
|
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
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
channelName: cohereChannels.chatStream.channelName,
|
|
1799
|
+
module: {
|
|
1800
|
+
name: "cohere-ai",
|
|
1801
|
+
versionRange: ">=8.0.0 <9.0.0",
|
|
1802
|
+
filePath: "Client.js"
|
|
1803
|
+
},
|
|
1804
|
+
functionQuery: {
|
|
1805
|
+
className: "CohereClient",
|
|
1806
|
+
methodName: "chatStream",
|
|
1807
|
+
kind: "Async"
|
|
1808
|
+
}
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
channelName: cohereChannels.chatStream.channelName,
|
|
1812
|
+
module: {
|
|
1813
|
+
name: "cohere-ai",
|
|
1814
|
+
versionRange: ">=8.0.0 <9.0.0",
|
|
1815
|
+
filePath: "api/resources/v2/client/Client.js"
|
|
1816
|
+
},
|
|
1817
|
+
functionQuery: {
|
|
1818
|
+
className: "V2Client",
|
|
1819
|
+
methodName: "chatStream",
|
|
1820
|
+
kind: "Async"
|
|
1821
|
+
}
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
channelName: cohereChannels.embed.channelName,
|
|
1825
|
+
module: {
|
|
1826
|
+
name: "cohere-ai",
|
|
1827
|
+
versionRange: ">=7.0.0 <8.0.0",
|
|
1828
|
+
filePath: "Client.js"
|
|
1829
|
+
},
|
|
1830
|
+
functionQuery: {
|
|
1831
|
+
className: "CohereClient",
|
|
1832
|
+
methodName: "embed",
|
|
1833
|
+
kind: "Async"
|
|
1834
|
+
}
|
|
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
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
channelName: cohereChannels.embed.channelName,
|
|
1851
|
+
module: {
|
|
1852
|
+
name: "cohere-ai",
|
|
1853
|
+
versionRange: ">=8.0.0 <9.0.0",
|
|
1854
|
+
filePath: "Client.js"
|
|
1855
|
+
},
|
|
1856
|
+
functionQuery: {
|
|
1857
|
+
className: "CohereClient",
|
|
1858
|
+
methodName: "embed",
|
|
1859
|
+
kind: "Async"
|
|
1860
|
+
}
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
channelName: cohereChannels.embed.channelName,
|
|
1864
|
+
module: {
|
|
1865
|
+
name: "cohere-ai",
|
|
1866
|
+
versionRange: ">=8.0.0 <9.0.0",
|
|
1867
|
+
filePath: "api/resources/v2/client/Client.js"
|
|
1868
|
+
},
|
|
1869
|
+
functionQuery: {
|
|
1870
|
+
className: "V2Client",
|
|
1871
|
+
methodName: "embed",
|
|
1872
|
+
kind: "Async"
|
|
1873
|
+
}
|
|
1874
|
+
},
|
|
1875
|
+
{
|
|
1876
|
+
channelName: cohereChannels.rerank.channelName,
|
|
1877
|
+
module: {
|
|
1878
|
+
name: "cohere-ai",
|
|
1879
|
+
versionRange: ">=7.0.0 <8.0.0",
|
|
1880
|
+
filePath: "Client.js"
|
|
1881
|
+
},
|
|
1882
|
+
functionQuery: {
|
|
1883
|
+
className: "CohereClient",
|
|
1884
|
+
methodName: "rerank",
|
|
1885
|
+
kind: "Async"
|
|
1886
|
+
}
|
|
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
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
channelName: cohereChannels.rerank.channelName,
|
|
1903
|
+
module: {
|
|
1904
|
+
name: "cohere-ai",
|
|
1905
|
+
versionRange: ">=8.0.0 <9.0.0",
|
|
1906
|
+
filePath: "Client.js"
|
|
1907
|
+
},
|
|
1908
|
+
functionQuery: {
|
|
1909
|
+
className: "CohereClient",
|
|
1910
|
+
methodName: "rerank",
|
|
1911
|
+
kind: "Async"
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
channelName: cohereChannels.rerank.channelName,
|
|
1916
|
+
module: {
|
|
1917
|
+
name: "cohere-ai",
|
|
1918
|
+
versionRange: ">=8.0.0 <9.0.0",
|
|
1919
|
+
filePath: "api/resources/v2/client/Client.js"
|
|
1920
|
+
},
|
|
1921
|
+
functionQuery: {
|
|
1922
|
+
className: "V2Client",
|
|
1923
|
+
methodName: "rerank",
|
|
1924
|
+
kind: "Async"
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
];
|
|
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
|
+
|
|
1241
1973
|
// src/auto-instrumentations/bundler/plugin.ts
|
|
1242
1974
|
function getModuleVersion(basedir) {
|
|
1243
1975
|
try {
|
|
@@ -1256,10 +1988,14 @@ var unplugin = (0, import_unplugin.createUnplugin)((options = {}) => {
|
|
|
1256
1988
|
...anthropicConfigs,
|
|
1257
1989
|
...aiSDKConfigs,
|
|
1258
1990
|
...claudeAgentSDKConfigs,
|
|
1991
|
+
...cursorSDKConfigs,
|
|
1259
1992
|
...googleGenAIConfigs,
|
|
1993
|
+
...huggingFaceConfigs,
|
|
1260
1994
|
...openRouterConfigs,
|
|
1261
1995
|
...openRouterAgentConfigs,
|
|
1262
1996
|
...mistralConfigs,
|
|
1997
|
+
...cohereConfigs,
|
|
1998
|
+
...groqConfigs,
|
|
1263
1999
|
...options.instrumentations || []
|
|
1264
2000
|
];
|
|
1265
2001
|
const dcModule = options.browser === false ? void 0 : "dc-browser";
|
|
@@ -1268,6 +2004,9 @@ var unplugin = (0, import_unplugin.createUnplugin)((options = {}) => {
|
|
|
1268
2004
|
name: "code-transformer",
|
|
1269
2005
|
enforce: "pre",
|
|
1270
2006
|
transform(code, id) {
|
|
2007
|
+
if (!id) {
|
|
2008
|
+
return null;
|
|
2009
|
+
}
|
|
1271
2010
|
const filePath = id.startsWith("file:") ? (0, import_url.fileURLToPath)(id) : id;
|
|
1272
2011
|
const ext = (0, import_path.extname)(filePath);
|
|
1273
2012
|
let isModule = ext === ".mjs" || ext === ".ts" || ext === ".tsx";
|