braintrust 3.11.0 → 3.13.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 (77) hide show
  1. package/README.md +8 -8
  2. package/dev/dist/index.d.mts +26 -7
  3. package/dev/dist/index.d.ts +26 -7
  4. package/dev/dist/index.js +2717 -335
  5. package/dev/dist/index.mjs +2499 -117
  6. package/dist/apply-auto-instrumentation.browser.d.mts +2 -0
  7. package/dist/apply-auto-instrumentation.browser.d.ts +2 -0
  8. package/dist/apply-auto-instrumentation.browser.js +18 -0
  9. package/dist/apply-auto-instrumentation.browser.mjs +0 -0
  10. package/dist/apply-auto-instrumentation.d.mts +2 -0
  11. package/dist/apply-auto-instrumentation.d.ts +2 -0
  12. package/dist/apply-auto-instrumentation.js +2534 -0
  13. package/dist/apply-auto-instrumentation.mjs +2534 -0
  14. package/dist/auto-instrumentations/bundler/esbuild.cjs +1803 -1283
  15. package/dist/auto-instrumentations/bundler/esbuild.d.mts +9 -5
  16. package/dist/auto-instrumentations/bundler/esbuild.d.ts +9 -5
  17. package/dist/auto-instrumentations/bundler/esbuild.mjs +10 -2
  18. package/dist/auto-instrumentations/bundler/next.cjs +3269 -0
  19. package/dist/auto-instrumentations/bundler/next.d.mts +3 -0
  20. package/dist/auto-instrumentations/bundler/next.d.ts +3 -0
  21. package/dist/auto-instrumentations/bundler/next.mjs +189 -0
  22. package/dist/auto-instrumentations/bundler/rollup.cjs +1803 -1283
  23. package/dist/auto-instrumentations/bundler/rollup.d.mts +9 -5
  24. package/dist/auto-instrumentations/bundler/rollup.d.ts +9 -5
  25. package/dist/auto-instrumentations/bundler/rollup.mjs +10 -2
  26. package/dist/auto-instrumentations/bundler/vite.cjs +1803 -1283
  27. package/dist/auto-instrumentations/bundler/vite.d.mts +9 -5
  28. package/dist/auto-instrumentations/bundler/vite.d.ts +9 -5
  29. package/dist/auto-instrumentations/bundler/vite.mjs +10 -2
  30. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +1861 -1308
  31. package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +3 -3
  32. package/dist/auto-instrumentations/bundler/webpack.cjs +1803 -1283
  33. package/dist/auto-instrumentations/bundler/webpack.d.mts +9 -5
  34. package/dist/auto-instrumentations/bundler/webpack.d.ts +9 -5
  35. package/dist/auto-instrumentations/bundler/webpack.mjs +6 -6
  36. package/dist/auto-instrumentations/{chunk-DIV5TO4S.mjs → chunk-E5DUYJWK.mjs} +338 -1
  37. package/dist/auto-instrumentations/chunk-GJOO4ESL.mjs +300 -0
  38. package/dist/auto-instrumentations/chunk-WFEUJACP.mjs +18 -0
  39. package/dist/auto-instrumentations/hook.mjs +1713 -1460
  40. package/dist/auto-instrumentations/index.cjs +94 -0
  41. package/dist/auto-instrumentations/index.d.mts +5 -1
  42. package/dist/auto-instrumentations/index.d.ts +5 -1
  43. package/dist/auto-instrumentations/index.mjs +6 -247
  44. package/dist/auto-instrumentations/loader/esm-hook.mjs +19 -2
  45. package/dist/auto-instrumentations/plugin-D7nDswtC.d.mts +44 -0
  46. package/dist/auto-instrumentations/plugin-D7nDswtC.d.ts +44 -0
  47. package/dist/browser.d.mts +264 -47
  48. package/dist/browser.d.ts +264 -47
  49. package/dist/browser.js +2521 -159
  50. package/dist/browser.mjs +2521 -159
  51. package/dist/chunk-26JGOELH.js +817 -0
  52. package/dist/chunk-75IQCUB2.mjs +817 -0
  53. package/dist/cli.js +2510 -122
  54. package/dist/edge-light.d.mts +1 -1
  55. package/dist/edge-light.d.ts +1 -1
  56. package/dist/edge-light.js +2521 -159
  57. package/dist/edge-light.mjs +2521 -159
  58. package/dist/index.d.mts +264 -47
  59. package/dist/index.d.ts +264 -47
  60. package/dist/index.js +3498 -1850
  61. package/dist/index.mjs +2635 -987
  62. package/dist/instrumentation/index.d.mts +7897 -48
  63. package/dist/instrumentation/index.d.ts +7897 -48
  64. package/dist/instrumentation/index.js +2408 -95
  65. package/dist/instrumentation/index.mjs +2407 -95
  66. package/dist/workerd.d.mts +1 -1
  67. package/dist/workerd.d.ts +1 -1
  68. package/dist/workerd.js +2521 -159
  69. package/dist/workerd.mjs +2521 -159
  70. package/package.json +23 -17
  71. package/util/dist/index.d.mts +3 -1
  72. package/util/dist/index.d.ts +3 -1
  73. package/util/dist/index.js +6 -0
  74. package/util/dist/index.mjs +6 -0
  75. package/dist/auto-instrumentations/chunk-G6ZWXGZB.mjs +0 -116
  76. package/dist/auto-instrumentations/plugin-Df3qKIl2.d.mts +0 -22
  77. package/dist/auto-instrumentations/plugin-Df3qKIl2.d.ts +0 -22
@@ -28,6 +28,69 @@ var import_path = require("path");
28
28
  var import_fs = require("fs");
29
29
  var import_module_details_from_path = __toESM(require("module-details-from-path"));
30
30
 
31
+ // src/instrumentation/config.ts
32
+ var envIntegrationAliases = {
33
+ openai: "openai",
34
+ "openai-codex": "openaiCodexSDK",
35
+ "openai-codex-sdk": "openaiCodexSDK",
36
+ openaicodexsdk: "openaiCodexSDK",
37
+ codex: "openaiCodexSDK",
38
+ "codex-sdk": "openaiCodexSDK",
39
+ anthropic: "anthropic",
40
+ aisdk: "aisdk",
41
+ "ai-sdk": "aisdk",
42
+ "vercel-ai": "aisdk",
43
+ vercel: "vercel",
44
+ claudeagentsdk: "claudeAgentSDK",
45
+ "claude-agent-sdk": "claudeAgentSDK",
46
+ cursor: "cursor",
47
+ "cursor-sdk": "cursorSDK",
48
+ cursorsdk: "cursorSDK",
49
+ flue: "flue",
50
+ "flue-runtime": "flue",
51
+ "openai-agents": "openAIAgents",
52
+ openaiagents: "openAIAgents",
53
+ "openai-agents-core": "openAIAgents",
54
+ openaiagentscore: "openAIAgents",
55
+ google: "google",
56
+ "google-genai": "googleGenAI",
57
+ googlegenai: "googleGenAI",
58
+ huggingface: "huggingface",
59
+ openrouter: "openrouter",
60
+ openrouteragent: "openrouterAgent",
61
+ "openrouter-agent": "openrouterAgent",
62
+ mistral: "mistral",
63
+ googleadk: "googleADK",
64
+ "google-adk": "googleADK",
65
+ cohere: "cohere",
66
+ groq: "groq",
67
+ "groq-sdk": "groq",
68
+ genkit: "genkit",
69
+ "firebase-genkit": "genkit",
70
+ githubcopilot: "gitHubCopilot",
71
+ "github-copilot": "gitHubCopilot",
72
+ "copilot-sdk": "gitHubCopilot",
73
+ langchain: "langchain",
74
+ "langchain-js": "langchain",
75
+ "@langchain": "langchain",
76
+ langgraph: "langgraph"
77
+ };
78
+ function readDisabledInstrumentationEnvConfig(disabledList) {
79
+ const integrations = {};
80
+ if (disabledList) {
81
+ for (const value of disabledList.split(",")) {
82
+ const sdk = value.trim().toLowerCase();
83
+ if (sdk.length > 0) {
84
+ integrations[envIntegrationAliases[sdk] ?? sdk] = false;
85
+ }
86
+ }
87
+ }
88
+ return { integrations };
89
+ }
90
+ function isInstrumentationIntegrationDisabled(integrations, ...names) {
91
+ return names.some((name) => integrations?.[name] === false);
92
+ }
93
+
31
94
  // src/isomorph.ts
32
95
  var DefaultAsyncLocalStorage = class {
33
96
  constructor() {
@@ -113,6 +176,7 @@ var iso = {
113
176
  getRepoInfo: async (_settings) => void 0,
114
177
  getPastNAncestors: async () => [],
115
178
  getEnv: (_name) => void 0,
179
+ getBraintrustApiKey: async () => void 0,
116
180
  getCallerLocation: () => void 0,
117
181
  newAsyncLocalStorage: () => new DefaultAsyncLocalStorage(),
118
182
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -171,705 +235,486 @@ function defineChannels(pkg, channels) {
171
235
  );
172
236
  }
173
237
 
174
- // src/instrumentation/plugins/openai-channels.ts
175
- var openAIChannels = defineChannels("openai", {
176
- chatCompletionsCreate: channel({
177
- channelName: "chat.completions.create",
238
+ // src/instrumentation/plugins/ai-sdk-channels.ts
239
+ var aiSDKChannels = defineChannels("ai", {
240
+ generateText: channel({
241
+ channelName: "generateText",
178
242
  kind: "async"
179
243
  }),
180
- embeddingsCreate: channel({
181
- channelName: "embeddings.create",
244
+ streamText: channel({
245
+ channelName: "streamText",
182
246
  kind: "async"
183
247
  }),
184
- betaChatCompletionsParse: channel({
185
- channelName: "beta.chat.completions.parse",
248
+ streamTextSync: channel({
249
+ channelName: "streamText.sync",
250
+ kind: "sync-stream"
251
+ }),
252
+ generateObject: channel({
253
+ channelName: "generateObject",
186
254
  kind: "async"
187
255
  }),
188
- betaChatCompletionsStream: channel({
189
- channelName: "beta.chat.completions.stream",
256
+ streamObject: channel({
257
+ channelName: "streamObject",
258
+ kind: "async"
259
+ }),
260
+ streamObjectSync: channel({
261
+ channelName: "streamObject.sync",
190
262
  kind: "sync-stream"
191
263
  }),
192
- moderationsCreate: channel({
193
- channelName: "moderations.create",
264
+ embed: channel(
265
+ {
266
+ channelName: "embed",
267
+ kind: "async"
268
+ }
269
+ ),
270
+ embedMany: channel({
271
+ channelName: "embedMany",
194
272
  kind: "async"
195
273
  }),
196
- responsesCreate: channel({
197
- channelName: "responses.create",
274
+ rerank: channel({
275
+ channelName: "rerank",
198
276
  kind: "async"
199
277
  }),
200
- responsesStream: channel({
201
- channelName: "responses.stream",
278
+ agentGenerate: channel({
279
+ channelName: "Agent.generate",
280
+ kind: "async"
281
+ }),
282
+ agentStream: channel({
283
+ channelName: "Agent.stream",
284
+ kind: "async"
285
+ }),
286
+ agentStreamSync: channel({
287
+ channelName: "Agent.stream.sync",
202
288
  kind: "sync-stream"
203
289
  }),
204
- responsesParse: channel({
205
- channelName: "responses.parse",
290
+ toolLoopAgentGenerate: channel({
291
+ channelName: "ToolLoopAgent.generate",
206
292
  kind: "async"
207
293
  }),
208
- responsesCompact: channel({
209
- channelName: "responses.compact",
294
+ toolLoopAgentStream: channel({
295
+ channelName: "ToolLoopAgent.stream",
210
296
  kind: "async"
211
297
  })
212
298
  });
213
299
 
214
- // src/auto-instrumentations/configs/openai.ts
215
- var openaiConfigs = [
216
- // Chat Completions
300
+ // src/auto-instrumentations/configs/ai-sdk.ts
301
+ var aiSDKConfigs = [
302
+ // generateText - async function
217
303
  {
218
- channelName: openAIChannels.chatCompletionsCreate.channelName,
304
+ channelName: aiSDKChannels.generateText.channelName,
219
305
  module: {
220
- name: "openai",
221
- versionRange: ">=4.0.0 <5.0.0",
222
- filePath: "resources/chat/completions.mjs"
306
+ name: "ai",
307
+ versionRange: ">=3.0.0",
308
+ filePath: "dist/index.mjs"
223
309
  },
224
310
  functionQuery: {
225
- className: "Completions",
226
- methodName: "create",
311
+ functionName: "generateText",
227
312
  kind: "Async"
228
313
  }
229
314
  },
230
315
  {
231
- channelName: openAIChannels.chatCompletionsCreate.channelName,
316
+ channelName: aiSDKChannels.generateText.channelName,
232
317
  module: {
233
- name: "openai",
234
- versionRange: ">=4.0.0 <5.0.0",
235
- filePath: "resources/chat/completions/completions.mjs"
318
+ name: "ai",
319
+ versionRange: ">=3.0.0",
320
+ filePath: "dist/index.js"
236
321
  },
237
322
  functionQuery: {
238
- className: "Completions",
239
- methodName: "create",
323
+ functionName: "generateText",
240
324
  kind: "Async"
241
325
  }
242
326
  },
327
+ // streamText - async function (v3 only, before the sync refactor in v4)
243
328
  {
244
- channelName: openAIChannels.chatCompletionsCreate.channelName,
329
+ channelName: aiSDKChannels.streamText.channelName,
245
330
  module: {
246
- name: "openai",
247
- versionRange: ">=5.0.0",
248
- filePath: "resources/chat/completions/completions.mjs"
331
+ name: "ai",
332
+ versionRange: ">=3.0.0 <4.0.0",
333
+ filePath: "dist/index.mjs"
249
334
  },
250
335
  functionQuery: {
251
- className: "Completions",
252
- methodName: "create",
336
+ functionName: "streamText",
253
337
  kind: "Async"
254
338
  }
255
339
  },
256
- // Embeddings
340
+ // streamText - sync function returning stream (v4+)
257
341
  {
258
- channelName: openAIChannels.embeddingsCreate.channelName,
342
+ channelName: aiSDKChannels.streamTextSync.channelName,
259
343
  module: {
260
- name: "openai",
344
+ name: "ai",
261
345
  versionRange: ">=4.0.0",
262
- filePath: "resources/embeddings.mjs"
346
+ filePath: "dist/index.mjs"
263
347
  },
264
348
  functionQuery: {
265
- className: "Embeddings",
266
- methodName: "create",
267
- kind: "Async"
349
+ functionName: "streamText",
350
+ kind: "Sync"
268
351
  }
269
352
  },
270
- // Beta Chat Completions Parse
271
353
  {
272
- channelName: openAIChannels.betaChatCompletionsParse.channelName,
354
+ channelName: aiSDKChannels.streamText.channelName,
273
355
  module: {
274
- name: "openai",
275
- versionRange: ">=4.0.0 <5.0.0",
276
- filePath: "resources/beta/chat/completions.mjs"
356
+ name: "ai",
357
+ versionRange: ">=3.0.0 <4.0.0",
358
+ filePath: "dist/index.js"
277
359
  },
278
360
  functionQuery: {
279
- className: "Completions",
280
- methodName: "parse",
361
+ functionName: "streamText",
281
362
  kind: "Async"
282
363
  }
283
364
  },
284
365
  {
285
- channelName: openAIChannels.betaChatCompletionsParse.channelName,
366
+ channelName: aiSDKChannels.streamTextSync.channelName,
286
367
  module: {
287
- name: "openai",
288
- versionRange: ">=5.0.0",
289
- filePath: "resources/chat/completions/completions.mjs"
368
+ name: "ai",
369
+ versionRange: ">=4.0.0",
370
+ filePath: "dist/index.js"
290
371
  },
291
372
  functionQuery: {
292
- className: "Completions",
293
- methodName: "parse",
373
+ functionName: "streamText",
374
+ kind: "Sync"
375
+ }
376
+ },
377
+ // generateObject - async function
378
+ {
379
+ channelName: aiSDKChannels.generateObject.channelName,
380
+ module: {
381
+ name: "ai",
382
+ versionRange: ">=3.0.0",
383
+ filePath: "dist/index.mjs"
384
+ },
385
+ functionQuery: {
386
+ functionName: "generateObject",
294
387
  kind: "Async"
295
388
  }
296
389
  },
297
- // Moderations
298
390
  {
299
- channelName: openAIChannels.moderationsCreate.channelName,
391
+ channelName: aiSDKChannels.generateObject.channelName,
300
392
  module: {
301
- name: "openai",
302
- versionRange: ">=4.0.0",
303
- filePath: "resources/moderations.mjs"
393
+ name: "ai",
394
+ versionRange: ">=3.0.0",
395
+ filePath: "dist/index.js"
304
396
  },
305
397
  functionQuery: {
306
- className: "Moderations",
307
- methodName: "create",
398
+ functionName: "generateObject",
308
399
  kind: "Async"
309
400
  }
310
401
  },
311
- // Beta Chat Completions Stream
402
+ // embed - async function
312
403
  {
313
- channelName: openAIChannels.betaChatCompletionsStream.channelName,
404
+ channelName: aiSDKChannels.embed.channelName,
314
405
  module: {
315
- name: "openai",
316
- versionRange: ">=4.0.0 <5.0.0",
317
- filePath: "resources/beta/chat/completions.mjs"
406
+ name: "ai",
407
+ versionRange: ">=3.0.0",
408
+ filePath: "dist/index.mjs"
318
409
  },
319
410
  functionQuery: {
320
- className: "Completions",
321
- methodName: "stream",
322
- kind: "Sync"
411
+ functionName: "embed",
412
+ kind: "Async"
323
413
  }
324
414
  },
325
415
  {
326
- channelName: openAIChannels.betaChatCompletionsStream.channelName,
416
+ channelName: aiSDKChannels.embed.channelName,
327
417
  module: {
328
- name: "openai",
329
- versionRange: ">=5.0.0",
330
- filePath: "resources/chat/completions/completions.mjs"
418
+ name: "ai",
419
+ versionRange: ">=3.0.0",
420
+ filePath: "dist/index.js"
331
421
  },
332
422
  functionQuery: {
333
- className: "Completions",
334
- methodName: "stream",
335
- kind: "Sync"
423
+ functionName: "embed",
424
+ kind: "Async"
336
425
  }
337
426
  },
338
- // Responses API (v4.87.0+)
427
+ // embedMany - async function
339
428
  {
340
- channelName: openAIChannels.responsesCreate.channelName,
429
+ channelName: aiSDKChannels.embedMany.channelName,
341
430
  module: {
342
- name: "openai",
343
- versionRange: ">=4.87.0",
344
- filePath: "resources/responses/responses.mjs"
431
+ name: "ai",
432
+ versionRange: ">=3.0.0",
433
+ filePath: "dist/index.mjs"
345
434
  },
346
435
  functionQuery: {
347
- className: "Responses",
348
- methodName: "create",
436
+ functionName: "embedMany",
349
437
  kind: "Async"
350
438
  }
351
439
  },
352
440
  {
353
- channelName: openAIChannels.responsesStream.channelName,
441
+ channelName: aiSDKChannels.embedMany.channelName,
354
442
  module: {
355
- name: "openai",
356
- versionRange: ">=4.87.0",
357
- filePath: "resources/responses/responses.mjs"
443
+ name: "ai",
444
+ versionRange: ">=3.0.0",
445
+ filePath: "dist/index.js"
358
446
  },
359
447
  functionQuery: {
360
- className: "Responses",
361
- methodName: "stream",
362
- kind: "Sync"
448
+ functionName: "embedMany",
449
+ kind: "Async"
363
450
  }
364
451
  },
452
+ // rerank - async function
365
453
  {
366
- channelName: openAIChannels.responsesParse.channelName,
454
+ channelName: aiSDKChannels.rerank.channelName,
367
455
  module: {
368
- name: "openai",
369
- versionRange: ">=4.87.0",
370
- filePath: "resources/responses/responses.mjs"
456
+ name: "ai",
457
+ versionRange: ">=5.0.0",
458
+ filePath: "dist/index.mjs"
371
459
  },
372
460
  functionQuery: {
373
- className: "Responses",
374
- methodName: "parse",
461
+ functionName: "rerank",
375
462
  kind: "Async"
376
463
  }
377
464
  },
378
465
  {
379
- channelName: openAIChannels.responsesCompact.channelName,
466
+ channelName: aiSDKChannels.rerank.channelName,
380
467
  module: {
381
- name: "openai",
382
- versionRange: ">=6.10.0",
383
- filePath: "resources/responses/responses.mjs"
468
+ name: "ai",
469
+ versionRange: ">=5.0.0",
470
+ filePath: "dist/index.js"
384
471
  },
385
472
  functionQuery: {
386
- className: "Responses",
387
- methodName: "compact",
388
- kind: "Async"
389
- }
390
- }
391
- ];
392
-
393
- // src/instrumentation/plugins/anthropic-channels.ts
394
- var anthropicChannels = defineChannels("@anthropic-ai/sdk", {
395
- messagesCreate: channel({
396
- channelName: "messages.create",
397
- kind: "async"
398
- }),
399
- betaMessagesCreate: channel({
400
- channelName: "beta.messages.create",
401
- kind: "async"
402
- }),
403
- betaMessagesToolRunner: channel({
404
- channelName: "beta.messages.toolRunner",
405
- kind: "sync-stream"
406
- })
407
- });
408
-
409
- // src/auto-instrumentations/configs/anthropic.ts
410
- var anthropicConfigs = [
411
- // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
412
- {
413
- channelName: anthropicChannels.messagesCreate.channelName,
414
- module: {
415
- name: "@anthropic-ai/sdk",
416
- versionRange: ">=0.27.0 <0.39.0",
417
- filePath: "resources/messages.mjs"
418
- },
419
- functionQuery: {
420
- className: "Messages",
421
- methodName: "create",
422
- kind: "Async"
423
- }
424
- },
425
- // Messages API - create (supports streaming via stream=true parameter)
426
- {
427
- channelName: anthropicChannels.messagesCreate.channelName,
428
- module: {
429
- name: "@anthropic-ai/sdk",
430
- versionRange: ">=0.39.0",
431
- filePath: "resources/messages/messages.mjs"
432
- },
433
- functionQuery: {
434
- className: "Messages",
435
- methodName: "create",
436
- kind: "Async"
437
- }
438
- },
439
- // Beta Messages API - create (supports streaming via stream=true parameter)
440
- {
441
- channelName: anthropicChannels.betaMessagesCreate.channelName,
442
- module: {
443
- name: "@anthropic-ai/sdk",
444
- versionRange: ">=0.39.0",
445
- filePath: "resources/beta/messages/messages.mjs"
446
- },
447
- functionQuery: {
448
- className: "Messages",
449
- methodName: "create",
473
+ functionName: "rerank",
450
474
  kind: "Async"
451
475
  }
452
476
  },
453
- // Beta Messages API - toolRunner (sync helper returning async iterable/thenable)
454
- {
455
- channelName: anthropicChannels.betaMessagesToolRunner.channelName,
456
- module: {
457
- name: "@anthropic-ai/sdk",
458
- versionRange: ">=0.39.0",
459
- filePath: "resources/beta/messages/messages.mjs"
460
- },
461
- functionQuery: {
462
- className: "Messages",
463
- methodName: "toolRunner",
464
- kind: "Sync"
465
- }
466
- }
467
- ];
468
-
469
- // src/instrumentation/plugins/ai-sdk-channels.ts
470
- var aiSDKChannels = defineChannels("ai", {
471
- generateText: channel({
472
- channelName: "generateText",
473
- kind: "async"
474
- }),
475
- streamText: channel({
476
- channelName: "streamText",
477
- kind: "async"
478
- }),
479
- streamTextSync: channel({
480
- channelName: "streamText.sync",
481
- kind: "sync-stream"
482
- }),
483
- generateObject: channel({
484
- channelName: "generateObject",
485
- kind: "async"
486
- }),
487
- streamObject: channel({
488
- channelName: "streamObject",
489
- kind: "async"
490
- }),
491
- streamObjectSync: channel({
492
- channelName: "streamObject.sync",
493
- kind: "sync-stream"
494
- }),
495
- embed: channel(
496
- {
497
- channelName: "embed",
498
- kind: "async"
499
- }
500
- ),
501
- embedMany: channel({
502
- channelName: "embedMany",
503
- kind: "async"
504
- }),
505
- rerank: channel({
506
- channelName: "rerank",
507
- kind: "async"
508
- }),
509
- agentGenerate: channel({
510
- channelName: "Agent.generate",
511
- kind: "async"
512
- }),
513
- agentStream: channel({
514
- channelName: "Agent.stream",
515
- kind: "async"
516
- }),
517
- agentStreamSync: channel({
518
- channelName: "Agent.stream.sync",
519
- kind: "sync-stream"
520
- }),
521
- toolLoopAgentGenerate: channel({
522
- channelName: "ToolLoopAgent.generate",
523
- kind: "async"
524
- }),
525
- toolLoopAgentStream: channel({
526
- channelName: "ToolLoopAgent.stream",
527
- kind: "async"
528
- })
529
- });
530
-
531
- // src/auto-instrumentations/configs/ai-sdk.ts
532
- var aiSDKConfigs = [
533
- // generateText - async function
477
+ // streamObject - async function (v3 only, before the sync refactor in v4)
534
478
  {
535
- channelName: aiSDKChannels.generateText.channelName,
479
+ channelName: aiSDKChannels.streamObject.channelName,
536
480
  module: {
537
481
  name: "ai",
538
- versionRange: ">=3.0.0",
482
+ versionRange: ">=3.0.0 <4.0.0",
539
483
  filePath: "dist/index.mjs"
540
484
  },
541
485
  functionQuery: {
542
- functionName: "generateText",
486
+ functionName: "streamObject",
543
487
  kind: "Async"
544
488
  }
545
489
  },
490
+ // streamObject - sync function returning stream (v4+)
546
491
  {
547
- channelName: aiSDKChannels.generateText.channelName,
492
+ channelName: aiSDKChannels.streamObjectSync.channelName,
548
493
  module: {
549
494
  name: "ai",
550
- versionRange: ">=3.0.0",
551
- filePath: "dist/index.js"
495
+ versionRange: ">=4.0.0",
496
+ filePath: "dist/index.mjs"
552
497
  },
553
498
  functionQuery: {
554
- functionName: "generateText",
555
- kind: "Async"
499
+ functionName: "streamObject",
500
+ kind: "Sync"
556
501
  }
557
502
  },
558
- // streamText - async function (v3 only, before the sync refactor in v4)
559
503
  {
560
- channelName: aiSDKChannels.streamText.channelName,
504
+ channelName: aiSDKChannels.streamObject.channelName,
561
505
  module: {
562
506
  name: "ai",
563
507
  versionRange: ">=3.0.0 <4.0.0",
564
- filePath: "dist/index.mjs"
508
+ filePath: "dist/index.js"
565
509
  },
566
510
  functionQuery: {
567
- functionName: "streamText",
511
+ functionName: "streamObject",
568
512
  kind: "Async"
569
513
  }
570
514
  },
571
- // streamText - sync function returning stream (v4+)
572
515
  {
573
- channelName: aiSDKChannels.streamTextSync.channelName,
516
+ channelName: aiSDKChannels.streamObjectSync.channelName,
574
517
  module: {
575
518
  name: "ai",
576
519
  versionRange: ">=4.0.0",
577
- filePath: "dist/index.mjs"
520
+ filePath: "dist/index.js"
578
521
  },
579
522
  functionQuery: {
580
- functionName: "streamText",
523
+ functionName: "streamObject",
581
524
  kind: "Sync"
582
525
  }
583
526
  },
527
+ // Agent.generate - async method (v5 only)
528
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
529
+ // target the first async `generate` method in the file instead of a class name.
584
530
  {
585
- channelName: aiSDKChannels.streamText.channelName,
531
+ channelName: aiSDKChannels.agentGenerate.channelName,
586
532
  module: {
587
533
  name: "ai",
588
- versionRange: ">=3.0.0 <4.0.0",
589
- filePath: "dist/index.js"
534
+ versionRange: ">=5.0.0 <6.0.0",
535
+ filePath: "dist/index.mjs"
590
536
  },
591
537
  functionQuery: {
592
- functionName: "streamText",
593
- kind: "Async"
538
+ methodName: "generate",
539
+ kind: "Async",
540
+ index: 0
594
541
  }
595
542
  },
596
543
  {
597
- channelName: aiSDKChannels.streamTextSync.channelName,
544
+ channelName: aiSDKChannels.agentGenerate.channelName,
598
545
  module: {
599
546
  name: "ai",
600
- versionRange: ">=4.0.0",
547
+ versionRange: ">=5.0.0 <6.0.0",
601
548
  filePath: "dist/index.js"
602
549
  },
603
550
  functionQuery: {
604
- functionName: "streamText",
605
- kind: "Sync"
551
+ methodName: "generate",
552
+ kind: "Async",
553
+ index: 0
606
554
  }
607
555
  },
608
- // generateObject - async function
556
+ // Agent.stream - sync method (v5 only)
557
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
558
+ // target the first sync `stream` method in the file instead of a class name.
609
559
  {
610
- channelName: aiSDKChannels.generateObject.channelName,
560
+ channelName: aiSDKChannels.agentStreamSync.channelName,
611
561
  module: {
612
562
  name: "ai",
613
- versionRange: ">=3.0.0",
563
+ versionRange: ">=5.0.0 <6.0.0",
614
564
  filePath: "dist/index.mjs"
615
565
  },
616
566
  functionQuery: {
617
- functionName: "generateObject",
618
- kind: "Async"
567
+ methodName: "stream",
568
+ kind: "Sync",
569
+ index: 0
619
570
  }
620
571
  },
621
572
  {
622
- channelName: aiSDKChannels.generateObject.channelName,
573
+ channelName: aiSDKChannels.agentStreamSync.channelName,
623
574
  module: {
624
575
  name: "ai",
625
- versionRange: ">=3.0.0",
576
+ versionRange: ">=5.0.0 <6.0.0",
626
577
  filePath: "dist/index.js"
627
578
  },
628
579
  functionQuery: {
629
- functionName: "generateObject",
630
- kind: "Async"
580
+ methodName: "stream",
581
+ kind: "Sync",
582
+ index: 0
631
583
  }
632
584
  },
633
- // embed - async function
585
+ // ToolLoopAgent.generate - async method (v6 only, Experimental_Agent is an alias)
586
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
587
+ // target the first async `generate` method in the file instead of a class name.
634
588
  {
635
- channelName: aiSDKChannels.embed.channelName,
589
+ channelName: aiSDKChannels.toolLoopAgentGenerate.channelName,
636
590
  module: {
637
591
  name: "ai",
638
- versionRange: ">=3.0.0",
592
+ versionRange: ">=6.0.0 <7.0.0",
639
593
  filePath: "dist/index.mjs"
640
594
  },
641
595
  functionQuery: {
642
- functionName: "embed",
643
- kind: "Async"
596
+ methodName: "generate",
597
+ kind: "Async",
598
+ index: 0
644
599
  }
645
600
  },
646
601
  {
647
- channelName: aiSDKChannels.embed.channelName,
602
+ channelName: aiSDKChannels.toolLoopAgentGenerate.channelName,
648
603
  module: {
649
604
  name: "ai",
650
- versionRange: ">=3.0.0",
605
+ versionRange: ">=6.0.0 <7.0.0",
651
606
  filePath: "dist/index.js"
652
607
  },
653
608
  functionQuery: {
654
- functionName: "embed",
655
- kind: "Async"
609
+ methodName: "generate",
610
+ kind: "Async",
611
+ index: 0
656
612
  }
657
613
  },
658
- // embedMany - async function
614
+ // ToolLoopAgent.stream - async method (v6 only, Experimental_Agent is an alias)
615
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
616
+ // target the first async `stream` method in the file instead of a class name.
659
617
  {
660
- channelName: aiSDKChannels.embedMany.channelName,
618
+ channelName: aiSDKChannels.toolLoopAgentStream.channelName,
661
619
  module: {
662
620
  name: "ai",
663
- versionRange: ">=3.0.0",
621
+ versionRange: ">=6.0.0 <7.0.0",
664
622
  filePath: "dist/index.mjs"
665
623
  },
666
624
  functionQuery: {
667
- functionName: "embedMany",
668
- kind: "Async"
625
+ methodName: "stream",
626
+ kind: "Async",
627
+ index: 0
669
628
  }
670
629
  },
671
630
  {
672
- channelName: aiSDKChannels.embedMany.channelName,
631
+ channelName: aiSDKChannels.toolLoopAgentStream.channelName,
673
632
  module: {
674
633
  name: "ai",
675
- versionRange: ">=3.0.0",
634
+ versionRange: ">=6.0.0 <7.0.0",
676
635
  filePath: "dist/index.js"
677
636
  },
678
637
  functionQuery: {
679
- functionName: "embedMany",
680
- kind: "Async"
638
+ methodName: "stream",
639
+ kind: "Async",
640
+ index: 0
681
641
  }
682
- },
683
- // rerank - async function
684
- {
685
- channelName: aiSDKChannels.rerank.channelName,
686
- module: {
687
- name: "ai",
688
- versionRange: ">=5.0.0",
689
- filePath: "dist/index.mjs"
690
- },
691
- functionQuery: {
692
- functionName: "rerank",
693
- kind: "Async"
694
- }
695
- },
642
+ }
643
+ ];
644
+
645
+ // src/instrumentation/plugins/anthropic-channels.ts
646
+ var anthropicChannels = defineChannels("@anthropic-ai/sdk", {
647
+ messagesCreate: channel({
648
+ channelName: "messages.create",
649
+ kind: "async"
650
+ }),
651
+ betaMessagesCreate: channel({
652
+ channelName: "beta.messages.create",
653
+ kind: "async"
654
+ }),
655
+ betaMessagesToolRunner: channel({
656
+ channelName: "beta.messages.toolRunner",
657
+ kind: "sync-stream"
658
+ })
659
+ });
660
+
661
+ // src/auto-instrumentations/configs/anthropic.ts
662
+ var anthropicConfigs = [
663
+ // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
696
664
  {
697
- channelName: aiSDKChannels.rerank.channelName,
665
+ channelName: anthropicChannels.messagesCreate.channelName,
698
666
  module: {
699
- name: "ai",
700
- versionRange: ">=5.0.0",
701
- filePath: "dist/index.js"
667
+ name: "@anthropic-ai/sdk",
668
+ versionRange: ">=0.27.0 <0.39.0",
669
+ filePath: "resources/messages.mjs"
702
670
  },
703
671
  functionQuery: {
704
- functionName: "rerank",
672
+ className: "Messages",
673
+ methodName: "create",
705
674
  kind: "Async"
706
675
  }
707
676
  },
708
- // streamObject - async function (v3 only, before the sync refactor in v4)
677
+ // Messages API - create (supports streaming via stream=true parameter)
709
678
  {
710
- channelName: aiSDKChannels.streamObject.channelName,
679
+ channelName: anthropicChannels.messagesCreate.channelName,
711
680
  module: {
712
- name: "ai",
713
- versionRange: ">=3.0.0 <4.0.0",
714
- filePath: "dist/index.mjs"
681
+ name: "@anthropic-ai/sdk",
682
+ versionRange: ">=0.39.0",
683
+ filePath: "resources/messages/messages.mjs"
715
684
  },
716
685
  functionQuery: {
717
- functionName: "streamObject",
686
+ className: "Messages",
687
+ methodName: "create",
718
688
  kind: "Async"
719
689
  }
720
690
  },
721
- // streamObject - sync function returning stream (v4+)
722
- {
723
- channelName: aiSDKChannels.streamObjectSync.channelName,
724
- module: {
725
- name: "ai",
726
- versionRange: ">=4.0.0",
727
- filePath: "dist/index.mjs"
728
- },
729
- functionQuery: {
730
- functionName: "streamObject",
731
- kind: "Sync"
732
- }
733
- },
691
+ // Beta Messages API - create (supports streaming via stream=true parameter)
734
692
  {
735
- channelName: aiSDKChannels.streamObject.channelName,
693
+ channelName: anthropicChannels.betaMessagesCreate.channelName,
736
694
  module: {
737
- name: "ai",
738
- versionRange: ">=3.0.0 <4.0.0",
739
- filePath: "dist/index.js"
695
+ name: "@anthropic-ai/sdk",
696
+ versionRange: ">=0.39.0",
697
+ filePath: "resources/beta/messages/messages.mjs"
740
698
  },
741
699
  functionQuery: {
742
- functionName: "streamObject",
700
+ className: "Messages",
701
+ methodName: "create",
743
702
  kind: "Async"
744
703
  }
745
704
  },
705
+ // Beta Messages API - toolRunner (sync helper returning async iterable/thenable)
746
706
  {
747
- channelName: aiSDKChannels.streamObjectSync.channelName,
707
+ channelName: anthropicChannels.betaMessagesToolRunner.channelName,
748
708
  module: {
749
- name: "ai",
750
- versionRange: ">=4.0.0",
751
- filePath: "dist/index.js"
709
+ name: "@anthropic-ai/sdk",
710
+ versionRange: ">=0.39.0",
711
+ filePath: "resources/beta/messages/messages.mjs"
752
712
  },
753
713
  functionQuery: {
754
- functionName: "streamObject",
714
+ className: "Messages",
715
+ methodName: "toolRunner",
755
716
  kind: "Sync"
756
717
  }
757
- },
758
- // Agent.generate - async method (v5 only)
759
- // The compiled AI SDK bundle emits this as an anonymous class method, so we
760
- // target the first async `generate` method in the file instead of a class name.
761
- {
762
- channelName: aiSDKChannels.agentGenerate.channelName,
763
- module: {
764
- name: "ai",
765
- versionRange: ">=5.0.0 <6.0.0",
766
- filePath: "dist/index.mjs"
767
- },
768
- functionQuery: {
769
- methodName: "generate",
770
- kind: "Async",
771
- index: 0
772
- }
773
- },
774
- {
775
- channelName: aiSDKChannels.agentGenerate.channelName,
776
- module: {
777
- name: "ai",
778
- versionRange: ">=5.0.0 <6.0.0",
779
- filePath: "dist/index.js"
780
- },
781
- functionQuery: {
782
- methodName: "generate",
783
- kind: "Async",
784
- index: 0
785
- }
786
- },
787
- // Agent.stream - sync method (v5 only)
788
- // The compiled AI SDK bundle emits this as an anonymous class method, so we
789
- // target the first sync `stream` method in the file instead of a class name.
790
- {
791
- channelName: aiSDKChannels.agentStreamSync.channelName,
792
- module: {
793
- name: "ai",
794
- versionRange: ">=5.0.0 <6.0.0",
795
- filePath: "dist/index.mjs"
796
- },
797
- functionQuery: {
798
- methodName: "stream",
799
- kind: "Sync",
800
- index: 0
801
- }
802
- },
803
- {
804
- channelName: aiSDKChannels.agentStreamSync.channelName,
805
- module: {
806
- name: "ai",
807
- versionRange: ">=5.0.0 <6.0.0",
808
- filePath: "dist/index.js"
809
- },
810
- functionQuery: {
811
- methodName: "stream",
812
- kind: "Sync",
813
- index: 0
814
- }
815
- },
816
- // ToolLoopAgent.generate - async method (v6 only, Experimental_Agent is an alias)
817
- // The compiled AI SDK bundle emits this as an anonymous class method, so we
818
- // target the first async `generate` method in the file instead of a class name.
819
- {
820
- channelName: aiSDKChannels.toolLoopAgentGenerate.channelName,
821
- module: {
822
- name: "ai",
823
- versionRange: ">=6.0.0 <7.0.0",
824
- filePath: "dist/index.mjs"
825
- },
826
- functionQuery: {
827
- methodName: "generate",
828
- kind: "Async",
829
- index: 0
830
- }
831
- },
832
- {
833
- channelName: aiSDKChannels.toolLoopAgentGenerate.channelName,
834
- module: {
835
- name: "ai",
836
- versionRange: ">=6.0.0 <7.0.0",
837
- filePath: "dist/index.js"
838
- },
839
- functionQuery: {
840
- methodName: "generate",
841
- kind: "Async",
842
- index: 0
843
- }
844
- },
845
- // ToolLoopAgent.stream - async method (v6 only, Experimental_Agent is an alias)
846
- // The compiled AI SDK bundle emits this as an anonymous class method, so we
847
- // target the first async `stream` method in the file instead of a class name.
848
- {
849
- channelName: aiSDKChannels.toolLoopAgentStream.channelName,
850
- module: {
851
- name: "ai",
852
- versionRange: ">=6.0.0 <7.0.0",
853
- filePath: "dist/index.mjs"
854
- },
855
- functionQuery: {
856
- methodName: "stream",
857
- kind: "Async",
858
- index: 0
859
- }
860
- },
861
- {
862
- channelName: aiSDKChannels.toolLoopAgentStream.channelName,
863
- module: {
864
- name: "ai",
865
- versionRange: ">=6.0.0 <7.0.0",
866
- filePath: "dist/index.js"
867
- },
868
- functionQuery: {
869
- methodName: "stream",
870
- kind: "Async",
871
- index: 0
872
- }
873
718
  }
874
719
  ];
875
720
 
@@ -915,1196 +760,1824 @@ var claudeAgentSDKConfigs = [
915
760
  }
916
761
  ];
917
762
 
918
- // src/instrumentation/plugins/cursor-sdk-channels.ts
919
- var cursorSDKChannels = defineChannels("@cursor/sdk", {
920
- create: channel({
921
- channelName: "Agent.create",
763
+ // src/instrumentation/plugins/cohere-channels.ts
764
+ var cohereChannels = defineChannels("cohere-ai", {
765
+ chat: channel({
766
+ channelName: "chat",
922
767
  kind: "async"
923
768
  }),
924
- resume: channel({
925
- channelName: "Agent.resume",
769
+ chatStream: channel({
770
+ channelName: "chatStream",
926
771
  kind: "async"
927
772
  }),
928
- prompt: channel({
929
- channelName: "Agent.prompt",
773
+ embed: channel({
774
+ channelName: "embed",
930
775
  kind: "async"
931
776
  }),
932
- send: channel({
933
- channelName: "agent.send",
777
+ rerank: channel({
778
+ channelName: "rerank",
934
779
  kind: "async"
935
780
  })
936
781
  });
937
782
 
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) => [
783
+ // src/auto-instrumentations/configs/cohere.ts
784
+ var cohereConfigs = [
942
785
  {
943
- channelName: cursorSDKChannels.create.channelName,
786
+ channelName: cohereChannels.chat.channelName,
944
787
  module: {
945
- name: "@cursor/sdk",
946
- versionRange: cursorSDKVersionRange,
947
- filePath
788
+ name: "cohere-ai",
789
+ versionRange: ">=7.0.0 <8.0.0",
790
+ filePath: "Client.js"
948
791
  },
949
792
  functionQuery: {
950
- className: "Agent",
951
- methodName: "create",
793
+ className: "CohereClient",
794
+ methodName: "chat",
952
795
  kind: "Async"
953
796
  }
954
797
  },
955
798
  {
956
- channelName: cursorSDKChannels.resume.channelName,
799
+ channelName: cohereChannels.chat.channelName,
957
800
  module: {
958
- name: "@cursor/sdk",
959
- versionRange: cursorSDKVersionRange,
960
- filePath
961
- },
801
+ name: "cohere-ai",
802
+ versionRange: ">=7.0.0 <7.21.0",
803
+ filePath: "api/resources/v2/client/Client.js"
804
+ },
962
805
  functionQuery: {
963
- className: "Agent",
964
- methodName: "resume",
806
+ className: "V2",
807
+ methodName: "chat",
965
808
  kind: "Async"
966
809
  }
967
810
  },
968
811
  {
969
- channelName: cursorSDKChannels.prompt.channelName,
812
+ channelName: cohereChannels.chat.channelName,
970
813
  module: {
971
- name: "@cursor/sdk",
972
- versionRange: cursorSDKVersionRange,
973
- filePath
814
+ name: "cohere-ai",
815
+ versionRange: ">=7.21.0 <8.0.0",
816
+ filePath: "api/resources/v2/client/Client.js"
974
817
  },
975
818
  functionQuery: {
976
- className: "Agent",
977
- methodName: "prompt",
819
+ className: "V2Client",
820
+ methodName: "chat",
978
821
  kind: "Async"
979
822
  }
980
- }
981
- ]);
982
-
983
- // src/instrumentation/plugins/google-genai-channels.ts
984
- var googleGenAIChannels = defineChannels("@google/genai", {
985
- generateContent: channel({
986
- channelName: "models.generateContent",
987
- kind: "async"
988
- }),
989
- generateContentStream: channel({
990
- channelName: "models.generateContentStream",
991
- kind: "async"
992
- }),
993
- embedContent: channel({
994
- channelName: "models.embedContent",
995
- kind: "async"
996
- })
997
- });
998
-
999
- // src/auto-instrumentations/configs/google-genai.ts
1000
- var googleGenAIConfigs = [
1001
- // Models.generateContentInternal - The actual class method (Node.js entry point)
1002
- // Note: generateContent is an arrow function property that calls this internal method
823
+ },
1003
824
  {
1004
- channelName: googleGenAIChannels.generateContent.channelName,
825
+ channelName: cohereChannels.chat.channelName,
1005
826
  module: {
1006
- name: "@google/genai",
1007
- versionRange: ">=1.0.0",
1008
- filePath: "dist/node/index.mjs"
827
+ name: "cohere-ai",
828
+ versionRange: ">=8.0.0 <9.0.0",
829
+ filePath: "Client.js"
1009
830
  },
1010
831
  functionQuery: {
1011
- className: "Models",
1012
- methodName: "generateContentInternal",
832
+ className: "CohereClient",
833
+ methodName: "chat",
1013
834
  kind: "Async"
1014
835
  }
1015
836
  },
1016
- // Models.generateContentStreamInternal - The actual class method (Node.js entry point)
1017
- // Note: generateContentStream is an arrow function property that calls this internal method
1018
837
  {
1019
- channelName: googleGenAIChannels.generateContentStream.channelName,
838
+ channelName: cohereChannels.chat.channelName,
1020
839
  module: {
1021
- name: "@google/genai",
1022
- versionRange: ">=1.0.0",
1023
- filePath: "dist/node/index.mjs"
840
+ name: "cohere-ai",
841
+ versionRange: ">=8.0.0 <9.0.0",
842
+ filePath: "api/resources/v2/client/Client.js"
1024
843
  },
1025
844
  functionQuery: {
1026
- className: "Models",
1027
- methodName: "generateContentStreamInternal",
845
+ className: "V2Client",
846
+ methodName: "chat",
1028
847
  kind: "Async"
1029
848
  }
1030
849
  },
1031
- // Models.embedContent - class method in older SDK versions
1032
850
  {
1033
- channelName: googleGenAIChannels.embedContent.channelName,
851
+ channelName: cohereChannels.chatStream.channelName,
1034
852
  module: {
1035
- name: "@google/genai",
1036
- versionRange: ">=1.0.0 <1.44.0",
1037
- filePath: "dist/node/index.mjs"
853
+ name: "cohere-ai",
854
+ versionRange: ">=7.0.0 <8.0.0",
855
+ filePath: "Client.js"
1038
856
  },
1039
857
  functionQuery: {
1040
- className: "Models",
1041
- methodName: "embedContent",
858
+ className: "CohereClient",
859
+ methodName: "chatStream",
1042
860
  kind: "Async"
1043
861
  }
1044
862
  },
1045
- // Models.embedContentInternal - class method in newer SDK versions
1046
- // Note: embedContent is an arrow function property that calls this method
1047
863
  {
1048
- channelName: googleGenAIChannels.embedContent.channelName,
864
+ channelName: cohereChannels.chatStream.channelName,
1049
865
  module: {
1050
- name: "@google/genai",
1051
- versionRange: ">=1.44.0",
1052
- filePath: "dist/node/index.mjs"
866
+ name: "cohere-ai",
867
+ versionRange: ">=7.0.0 <7.21.0",
868
+ filePath: "api/resources/v2/client/Client.js"
1053
869
  },
1054
870
  functionQuery: {
1055
- className: "Models",
1056
- methodName: "embedContentInternal",
871
+ className: "V2",
872
+ methodName: "chatStream",
1057
873
  kind: "Async"
1058
874
  }
1059
- }
1060
- ];
1061
-
1062
- // src/instrumentation/plugins/huggingface-channels.ts
1063
- var huggingFaceChannels = defineChannels("@huggingface/inference", {
1064
- chatCompletion: channel({
1065
- channelName: "chatCompletion",
1066
- kind: "async"
1067
- }),
1068
- chatCompletionStream: channel({
1069
- channelName: "chatCompletionStream",
1070
- kind: "sync-stream"
1071
- }),
1072
- textGeneration: channel({
1073
- channelName: "textGeneration",
1074
- kind: "async"
1075
- }),
1076
- textGenerationStream: channel({
1077
- channelName: "textGenerationStream",
1078
- kind: "sync-stream"
1079
- }),
1080
- featureExtraction: channel({
1081
- channelName: "featureExtraction",
1082
- kind: "async"
1083
- })
1084
- });
1085
-
1086
- // src/auto-instrumentations/configs/huggingface.ts
1087
- var huggingFaceConfigs = [
875
+ },
1088
876
  {
1089
- channelName: huggingFaceChannels.chatCompletion.channelName,
877
+ channelName: cohereChannels.chatStream.channelName,
1090
878
  module: {
1091
- name: "@huggingface/inference",
1092
- versionRange: ">=2.0.0 <3.0.0",
1093
- filePath: "dist/index.js"
879
+ name: "cohere-ai",
880
+ versionRange: ">=7.21.0 <8.0.0",
881
+ filePath: "api/resources/v2/client/Client.js"
1094
882
  },
1095
883
  functionQuery: {
1096
- functionName: "chatCompletion",
884
+ className: "V2Client",
885
+ methodName: "chatStream",
1097
886
  kind: "Async"
1098
887
  }
1099
888
  },
1100
889
  {
1101
- channelName: huggingFaceChannels.chatCompletion.channelName,
890
+ channelName: cohereChannels.chatStream.channelName,
1102
891
  module: {
1103
- name: "@huggingface/inference",
1104
- versionRange: ">=2.0.0 <3.0.0",
1105
- filePath: "dist/index.cjs"
892
+ name: "cohere-ai",
893
+ versionRange: ">=8.0.0 <9.0.0",
894
+ filePath: "Client.js"
1106
895
  },
1107
896
  functionQuery: {
1108
- functionName: "chatCompletion",
897
+ className: "CohereClient",
898
+ methodName: "chatStream",
1109
899
  kind: "Async"
1110
900
  }
1111
901
  },
1112
902
  {
1113
- channelName: huggingFaceChannels.chatCompletionStream.channelName,
903
+ channelName: cohereChannels.chatStream.channelName,
1114
904
  module: {
1115
- name: "@huggingface/inference",
1116
- versionRange: ">=2.0.0 <3.0.0",
1117
- filePath: "dist/index.js"
905
+ name: "cohere-ai",
906
+ versionRange: ">=8.0.0 <9.0.0",
907
+ filePath: "api/resources/v2/client/Client.js"
1118
908
  },
1119
909
  functionQuery: {
1120
- functionName: "chatCompletionStream",
1121
- kind: "Sync"
910
+ className: "V2Client",
911
+ methodName: "chatStream",
912
+ kind: "Async"
1122
913
  }
1123
914
  },
1124
915
  {
1125
- channelName: huggingFaceChannels.chatCompletionStream.channelName,
916
+ channelName: cohereChannels.embed.channelName,
1126
917
  module: {
1127
- name: "@huggingface/inference",
1128
- versionRange: ">=2.0.0 <3.0.0",
1129
- filePath: "dist/index.cjs"
918
+ name: "cohere-ai",
919
+ versionRange: ">=7.0.0 <8.0.0",
920
+ filePath: "Client.js"
1130
921
  },
1131
922
  functionQuery: {
1132
- functionName: "chatCompletionStream",
1133
- kind: "Sync"
923
+ className: "CohereClient",
924
+ methodName: "embed",
925
+ kind: "Async"
1134
926
  }
1135
927
  },
1136
928
  {
1137
- channelName: huggingFaceChannels.textGeneration.channelName,
929
+ channelName: cohereChannels.embed.channelName,
1138
930
  module: {
1139
- name: "@huggingface/inference",
1140
- versionRange: ">=2.0.0 <3.0.0",
1141
- filePath: "dist/index.js"
931
+ name: "cohere-ai",
932
+ versionRange: ">=7.0.0 <7.21.0",
933
+ filePath: "api/resources/v2/client/Client.js"
1142
934
  },
1143
935
  functionQuery: {
1144
- functionName: "textGeneration",
936
+ className: "V2",
937
+ methodName: "embed",
1145
938
  kind: "Async"
1146
939
  }
1147
940
  },
1148
941
  {
1149
- channelName: huggingFaceChannels.textGeneration.channelName,
942
+ channelName: cohereChannels.embed.channelName,
1150
943
  module: {
1151
- name: "@huggingface/inference",
1152
- versionRange: ">=2.0.0 <3.0.0",
1153
- filePath: "dist/index.cjs"
944
+ name: "cohere-ai",
945
+ versionRange: ">=7.21.0 <8.0.0",
946
+ filePath: "api/resources/v2/client/Client.js"
1154
947
  },
1155
948
  functionQuery: {
1156
- functionName: "textGeneration",
949
+ className: "V2Client",
950
+ methodName: "embed",
1157
951
  kind: "Async"
1158
952
  }
1159
953
  },
1160
954
  {
1161
- channelName: huggingFaceChannels.textGenerationStream.channelName,
955
+ channelName: cohereChannels.embed.channelName,
1162
956
  module: {
1163
- name: "@huggingface/inference",
1164
- versionRange: ">=2.0.0 <3.0.0",
1165
- filePath: "dist/index.js"
957
+ name: "cohere-ai",
958
+ versionRange: ">=8.0.0 <9.0.0",
959
+ filePath: "Client.js"
1166
960
  },
1167
961
  functionQuery: {
1168
- functionName: "textGenerationStream",
1169
- kind: "Sync"
962
+ className: "CohereClient",
963
+ methodName: "embed",
964
+ kind: "Async"
1170
965
  }
1171
966
  },
1172
967
  {
1173
- channelName: huggingFaceChannels.textGenerationStream.channelName,
968
+ channelName: cohereChannels.embed.channelName,
1174
969
  module: {
1175
- name: "@huggingface/inference",
1176
- versionRange: ">=2.0.0 <3.0.0",
1177
- filePath: "dist/index.cjs"
970
+ name: "cohere-ai",
971
+ versionRange: ">=8.0.0 <9.0.0",
972
+ filePath: "api/resources/v2/client/Client.js"
1178
973
  },
1179
974
  functionQuery: {
1180
- functionName: "textGenerationStream",
1181
- kind: "Sync"
975
+ className: "V2Client",
976
+ methodName: "embed",
977
+ kind: "Async"
1182
978
  }
1183
979
  },
1184
980
  {
1185
- channelName: huggingFaceChannels.featureExtraction.channelName,
981
+ channelName: cohereChannels.rerank.channelName,
1186
982
  module: {
1187
- name: "@huggingface/inference",
1188
- versionRange: ">=2.0.0 <3.0.0",
1189
- filePath: "dist/index.js"
983
+ name: "cohere-ai",
984
+ versionRange: ">=7.0.0 <8.0.0",
985
+ filePath: "Client.js"
1190
986
  },
1191
987
  functionQuery: {
1192
- functionName: "featureExtraction",
988
+ className: "CohereClient",
989
+ methodName: "rerank",
1193
990
  kind: "Async"
1194
991
  }
1195
992
  },
1196
993
  {
1197
- channelName: huggingFaceChannels.featureExtraction.channelName,
994
+ channelName: cohereChannels.rerank.channelName,
1198
995
  module: {
1199
- name: "@huggingface/inference",
1200
- versionRange: ">=2.0.0 <3.0.0",
1201
- filePath: "dist/index.cjs"
996
+ name: "cohere-ai",
997
+ versionRange: ">=7.0.0 <7.21.0",
998
+ filePath: "api/resources/v2/client/Client.js"
1202
999
  },
1203
1000
  functionQuery: {
1204
- functionName: "featureExtraction",
1001
+ className: "V2",
1002
+ methodName: "rerank",
1205
1003
  kind: "Async"
1206
1004
  }
1207
1005
  },
1208
1006
  {
1209
- channelName: huggingFaceChannels.chatCompletion.channelName,
1007
+ channelName: cohereChannels.rerank.channelName,
1210
1008
  module: {
1211
- name: "@huggingface/inference",
1212
- versionRange: ">=3.0.0 <5.0.0",
1213
- filePath: "dist/esm/tasks/nlp/chatCompletion.js"
1009
+ name: "cohere-ai",
1010
+ versionRange: ">=7.21.0 <8.0.0",
1011
+ filePath: "api/resources/v2/client/Client.js"
1214
1012
  },
1215
1013
  functionQuery: {
1216
- functionName: "chatCompletion",
1014
+ className: "V2Client",
1015
+ methodName: "rerank",
1217
1016
  kind: "Async"
1218
1017
  }
1219
1018
  },
1220
1019
  {
1221
- channelName: huggingFaceChannels.chatCompletion.channelName,
1020
+ channelName: cohereChannels.rerank.channelName,
1222
1021
  module: {
1223
- name: "@huggingface/inference",
1224
- versionRange: ">=3.0.0 <5.0.0",
1225
- filePath: "dist/commonjs/tasks/nlp/chatCompletion.js"
1022
+ name: "cohere-ai",
1023
+ versionRange: ">=8.0.0 <9.0.0",
1024
+ filePath: "Client.js"
1226
1025
  },
1227
1026
  functionQuery: {
1228
- functionName: "chatCompletion",
1027
+ className: "CohereClient",
1028
+ methodName: "rerank",
1229
1029
  kind: "Async"
1230
1030
  }
1231
1031
  },
1232
1032
  {
1233
- channelName: huggingFaceChannels.chatCompletionStream.channelName,
1234
- module: {
1235
- name: "@huggingface/inference",
1236
- versionRange: ">=3.0.0 <5.0.0",
1237
- filePath: "dist/esm/tasks/nlp/chatCompletionStream.js"
1238
- },
1239
- functionQuery: {
1240
- functionName: "chatCompletionStream",
1241
- kind: "Sync"
1242
- }
1243
- },
1244
- {
1245
- channelName: huggingFaceChannels.chatCompletionStream.channelName,
1246
- module: {
1247
- name: "@huggingface/inference",
1248
- versionRange: ">=3.0.0 <5.0.0",
1249
- filePath: "dist/commonjs/tasks/nlp/chatCompletionStream.js"
1250
- },
1251
- functionQuery: {
1252
- functionName: "chatCompletionStream",
1253
- kind: "Sync"
1254
- }
1255
- },
1256
- {
1257
- channelName: huggingFaceChannels.textGeneration.channelName,
1033
+ channelName: cohereChannels.rerank.channelName,
1258
1034
  module: {
1259
- name: "@huggingface/inference",
1260
- versionRange: ">=3.0.0 <5.0.0",
1261
- filePath: "dist/esm/tasks/nlp/textGeneration.js"
1035
+ name: "cohere-ai",
1036
+ versionRange: ">=8.0.0 <9.0.0",
1037
+ filePath: "api/resources/v2/client/Client.js"
1262
1038
  },
1263
1039
  functionQuery: {
1264
- functionName: "textGeneration",
1040
+ className: "V2Client",
1041
+ methodName: "rerank",
1265
1042
  kind: "Async"
1266
1043
  }
1267
- },
1044
+ }
1045
+ ];
1046
+
1047
+ // src/instrumentation/plugins/cursor-sdk-channels.ts
1048
+ var cursorSDKChannels = defineChannels("@cursor/sdk", {
1049
+ create: channel({
1050
+ channelName: "Agent.create",
1051
+ kind: "async"
1052
+ }),
1053
+ resume: channel({
1054
+ channelName: "Agent.resume",
1055
+ kind: "async"
1056
+ }),
1057
+ prompt: channel({
1058
+ channelName: "Agent.prompt",
1059
+ kind: "async"
1060
+ }),
1061
+ send: channel({
1062
+ channelName: "agent.send",
1063
+ kind: "async"
1064
+ })
1065
+ });
1066
+
1067
+ // src/auto-instrumentations/configs/cursor-sdk.ts
1068
+ var cursorSDKVersionRange = ">=1.0.7 <2.0.0";
1069
+ var cursorSDKEntrypoints = ["dist/esm/index.js", "dist/cjs/index.js"];
1070
+ var cursorSDKConfigs = cursorSDKEntrypoints.flatMap((filePath) => [
1268
1071
  {
1269
- channelName: huggingFaceChannels.textGeneration.channelName,
1072
+ channelName: cursorSDKChannels.create.channelName,
1270
1073
  module: {
1271
- name: "@huggingface/inference",
1272
- versionRange: ">=3.0.0 <5.0.0",
1273
- filePath: "dist/commonjs/tasks/nlp/textGeneration.js"
1074
+ name: "@cursor/sdk",
1075
+ versionRange: cursorSDKVersionRange,
1076
+ filePath
1274
1077
  },
1275
1078
  functionQuery: {
1276
- functionName: "textGeneration",
1079
+ className: "Agent",
1080
+ methodName: "create",
1277
1081
  kind: "Async"
1278
1082
  }
1279
1083
  },
1280
1084
  {
1281
- channelName: huggingFaceChannels.textGenerationStream.channelName,
1282
- module: {
1283
- name: "@huggingface/inference",
1284
- versionRange: ">=3.0.0 <5.0.0",
1285
- filePath: "dist/esm/tasks/nlp/textGenerationStream.js"
1286
- },
1287
- functionQuery: {
1288
- functionName: "textGenerationStream",
1289
- kind: "Sync"
1290
- }
1291
- },
1292
- {
1293
- channelName: huggingFaceChannels.textGenerationStream.channelName,
1294
- module: {
1295
- name: "@huggingface/inference",
1296
- versionRange: ">=3.0.0 <5.0.0",
1297
- filePath: "dist/commonjs/tasks/nlp/textGenerationStream.js"
1298
- },
1299
- functionQuery: {
1300
- functionName: "textGenerationStream",
1301
- kind: "Sync"
1302
- }
1303
- },
1304
- {
1305
- channelName: huggingFaceChannels.featureExtraction.channelName,
1085
+ channelName: cursorSDKChannels.resume.channelName,
1306
1086
  module: {
1307
- name: "@huggingface/inference",
1308
- versionRange: ">=3.0.0 <5.0.0",
1309
- filePath: "dist/esm/tasks/nlp/featureExtraction.js"
1087
+ name: "@cursor/sdk",
1088
+ versionRange: cursorSDKVersionRange,
1089
+ filePath
1310
1090
  },
1311
1091
  functionQuery: {
1312
- functionName: "featureExtraction",
1092
+ className: "Agent",
1093
+ methodName: "resume",
1313
1094
  kind: "Async"
1314
1095
  }
1315
1096
  },
1316
1097
  {
1317
- channelName: huggingFaceChannels.featureExtraction.channelName,
1098
+ channelName: cursorSDKChannels.prompt.channelName,
1318
1099
  module: {
1319
- name: "@huggingface/inference",
1320
- versionRange: ">=3.0.0 <5.0.0",
1321
- filePath: "dist/commonjs/tasks/nlp/featureExtraction.js"
1100
+ name: "@cursor/sdk",
1101
+ versionRange: cursorSDKVersionRange,
1102
+ filePath
1322
1103
  },
1323
1104
  functionQuery: {
1324
- functionName: "featureExtraction",
1105
+ className: "Agent",
1106
+ methodName: "prompt",
1325
1107
  kind: "Async"
1326
1108
  }
1327
1109
  }
1328
- ];
1110
+ ]);
1329
1111
 
1330
- // src/instrumentation/plugins/openrouter-agent-channels.ts
1331
- var openRouterAgentChannels = defineChannels("@openrouter/agent", {
1332
- callModel: channel({
1333
- channelName: "callModel",
1112
+ // src/instrumentation/plugins/flue-channels.ts
1113
+ var flueChannels = defineChannels("@flue/runtime", {
1114
+ createContext: channel({
1115
+ channelName: "createFlueContext",
1334
1116
  kind: "sync-stream"
1335
1117
  }),
1336
- callModelTurn: channel({
1337
- channelName: "callModel.turn",
1118
+ openSession: channel({
1119
+ channelName: "Harness.openSession",
1338
1120
  kind: "async"
1339
1121
  }),
1340
- toolExecute: channel({
1341
- channelName: "tool.execute",
1122
+ contextEvent: channel({
1123
+ channelName: "context.event",
1124
+ kind: "sync-stream"
1125
+ }),
1126
+ prompt: channel({
1127
+ channelName: "session.prompt",
1128
+ kind: "async"
1129
+ }),
1130
+ skill: channel({
1131
+ channelName: "session.skill",
1132
+ kind: "async"
1133
+ }),
1134
+ task: channel({
1135
+ channelName: "session.task",
1136
+ kind: "async"
1137
+ }),
1138
+ compact: channel({
1139
+ channelName: "session.compact",
1342
1140
  kind: "async"
1343
1141
  })
1344
1142
  });
1345
1143
 
1346
- // src/auto-instrumentations/configs/openrouter-agent.ts
1347
- var openRouterAgentConfigs = [
1144
+ // src/auto-instrumentations/configs/flue.ts
1145
+ var flueVersionRange = ">=0.7.0 <0.8.0";
1146
+ var flueConfigs = [
1348
1147
  {
1349
- channelName: openRouterAgentChannels.callModel.channelName,
1148
+ channelName: flueChannels.createContext.channelName,
1350
1149
  module: {
1351
- name: "@openrouter/agent",
1352
- versionRange: ">=0.1.2",
1353
- filePath: "esm/inner-loop/call-model.js"
1150
+ name: "@flue/runtime",
1151
+ versionRange: flueVersionRange,
1152
+ filePath: "dist/internal.mjs"
1354
1153
  },
1355
1154
  functionQuery: {
1356
- functionName: "callModel",
1155
+ functionName: "createFlueContext",
1357
1156
  kind: "Sync"
1358
1157
  }
1158
+ },
1159
+ {
1160
+ channelName: flueChannels.openSession.channelName,
1161
+ module: {
1162
+ name: "@flue/runtime",
1163
+ versionRange: flueVersionRange,
1164
+ filePath: "dist/internal.mjs"
1165
+ },
1166
+ functionQuery: {
1167
+ className: "Harness",
1168
+ methodName: "openSession",
1169
+ kind: "Async"
1170
+ }
1359
1171
  }
1360
1172
  ];
1361
1173
 
1362
- // src/instrumentation/plugins/openrouter-channels.ts
1363
- var openRouterChannels = defineChannels("@openrouter/sdk", {
1364
- chatSend: channel({
1365
- channelName: "chat.send",
1174
+ // src/instrumentation/plugins/genkit-channels.ts
1175
+ var genkitChannels = defineChannels("@genkit-ai/ai", {
1176
+ generate: channel({
1177
+ channelName: "generate",
1366
1178
  kind: "async"
1367
1179
  }),
1368
- embeddingsGenerate: channel({
1369
- channelName: "embeddings.generate",
1370
- kind: "async"
1180
+ generateStream: channel({
1181
+ channelName: "generateStream",
1182
+ kind: "sync-stream"
1371
1183
  }),
1372
- rerankRerank: channel(
1373
- {
1374
- channelName: "rerank.rerank",
1375
- kind: "async"
1376
- }
1377
- ),
1378
- betaResponsesSend: channel({
1379
- channelName: "beta.responses.send",
1184
+ embed: channel({
1185
+ channelName: "embed",
1380
1186
  kind: "async"
1381
1187
  }),
1382
- callModel: channel({
1383
- channelName: "callModel",
1384
- kind: "sync-stream"
1188
+ embedMany: channel({
1189
+ channelName: "embedMany",
1190
+ kind: "async"
1385
1191
  }),
1386
- callModelTurn: channel({
1387
- channelName: "callModel.turn",
1192
+ actionRun: channel({
1193
+ channelName: "action.run",
1388
1194
  kind: "async"
1389
1195
  }),
1390
- toolExecute: channel({
1391
- channelName: "tool.execute",
1196
+ actionStream: channel({
1197
+ channelName: "action.stream",
1198
+ kind: "sync-stream"
1199
+ })
1200
+ });
1201
+ var genkitCoreChannels = defineChannels("@genkit-ai/core", {
1202
+ actionSpan: channel({
1203
+ channelName: "action.span",
1392
1204
  kind: "async"
1393
1205
  })
1394
1206
  });
1395
1207
 
1396
- // src/auto-instrumentations/configs/openrouter.ts
1397
- var openRouterConfigs = [
1208
+ // src/auto-instrumentations/configs/genkit.ts
1209
+ var genkitVersionRange = ">=1.0.0 <2.0.0";
1210
+ var genkitConfigs = [
1398
1211
  {
1399
- channelName: openRouterChannels.chatSend.channelName,
1212
+ channelName: genkitChannels.generate.channelName,
1400
1213
  module: {
1401
- name: "@openrouter/sdk",
1402
- versionRange: ">=0.9.11 <1.0.0",
1403
- filePath: "esm/sdk/chat.js"
1214
+ name: "@genkit-ai/ai",
1215
+ versionRange: genkitVersionRange,
1216
+ filePath: "lib/genkit-ai.mjs"
1404
1217
  },
1405
1218
  functionQuery: {
1406
- className: "Chat",
1407
- methodName: "send",
1219
+ className: "GenkitAI",
1220
+ methodName: "generate",
1408
1221
  kind: "Async"
1409
1222
  }
1410
1223
  },
1411
1224
  {
1412
- channelName: openRouterChannels.embeddingsGenerate.channelName,
1225
+ channelName: genkitChannels.generate.channelName,
1413
1226
  module: {
1414
- name: "@openrouter/sdk",
1415
- versionRange: ">=0.9.11 <1.0.0",
1416
- filePath: "esm/sdk/embeddings.js"
1227
+ name: "@genkit-ai/ai",
1228
+ versionRange: genkitVersionRange,
1229
+ filePath: "lib/genkit-ai.js"
1417
1230
  },
1418
1231
  functionQuery: {
1419
- className: "Embeddings",
1232
+ className: "GenkitAI",
1420
1233
  methodName: "generate",
1421
1234
  kind: "Async"
1422
1235
  }
1423
1236
  },
1424
1237
  {
1425
- channelName: openRouterChannels.rerankRerank.channelName,
1238
+ channelName: genkitChannels.generateStream.channelName,
1426
1239
  module: {
1427
- name: "@openrouter/sdk",
1428
- versionRange: ">=0.12.0 <1.0.0",
1429
- filePath: "esm/sdk/rerank.js"
1240
+ name: "@genkit-ai/ai",
1241
+ versionRange: genkitVersionRange,
1242
+ filePath: "lib/genkit-ai.mjs"
1430
1243
  },
1431
1244
  functionQuery: {
1432
- className: "Rerank",
1433
- methodName: "rerank",
1434
- kind: "Async"
1245
+ className: "GenkitAI",
1246
+ methodName: "generateStream",
1247
+ kind: "Sync"
1435
1248
  }
1436
1249
  },
1437
1250
  {
1438
- channelName: openRouterChannels.betaResponsesSend.channelName,
1251
+ channelName: genkitChannels.generateStream.channelName,
1439
1252
  module: {
1440
- name: "@openrouter/sdk",
1441
- versionRange: ">=0.9.11 <1.0.0",
1442
- filePath: "esm/sdk/responses.js"
1443
- },
1444
- functionQuery: {
1445
- className: "Responses",
1446
- methodName: "send",
1253
+ name: "@genkit-ai/ai",
1254
+ versionRange: genkitVersionRange,
1255
+ filePath: "lib/genkit-ai.js"
1256
+ },
1257
+ functionQuery: {
1258
+ className: "GenkitAI",
1259
+ methodName: "generateStream",
1260
+ kind: "Sync"
1261
+ }
1262
+ },
1263
+ {
1264
+ channelName: genkitChannels.embed.channelName,
1265
+ module: {
1266
+ name: "@genkit-ai/ai",
1267
+ versionRange: genkitVersionRange,
1268
+ filePath: "lib/genkit-ai.mjs"
1269
+ },
1270
+ functionQuery: {
1271
+ className: "GenkitAI",
1272
+ methodName: "embed",
1273
+ kind: "Async"
1274
+ }
1275
+ },
1276
+ {
1277
+ channelName: genkitChannels.embed.channelName,
1278
+ module: {
1279
+ name: "@genkit-ai/ai",
1280
+ versionRange: genkitVersionRange,
1281
+ filePath: "lib/genkit-ai.js"
1282
+ },
1283
+ functionQuery: {
1284
+ className: "GenkitAI",
1285
+ methodName: "embed",
1286
+ kind: "Async"
1287
+ }
1288
+ },
1289
+ {
1290
+ channelName: genkitChannels.embedMany.channelName,
1291
+ module: {
1292
+ name: "@genkit-ai/ai",
1293
+ versionRange: genkitVersionRange,
1294
+ filePath: "lib/genkit-ai.mjs"
1295
+ },
1296
+ functionQuery: {
1297
+ className: "GenkitAI",
1298
+ methodName: "embedMany",
1299
+ kind: "Async"
1300
+ }
1301
+ },
1302
+ {
1303
+ channelName: genkitChannels.embedMany.channelName,
1304
+ module: {
1305
+ name: "@genkit-ai/ai",
1306
+ versionRange: genkitVersionRange,
1307
+ filePath: "lib/genkit-ai.js"
1308
+ },
1309
+ functionQuery: {
1310
+ className: "GenkitAI",
1311
+ methodName: "embedMany",
1312
+ kind: "Async"
1313
+ }
1314
+ },
1315
+ {
1316
+ channelName: genkitChannels.actionRun.channelName,
1317
+ module: {
1318
+ name: "@genkit-ai/ai",
1319
+ versionRange: genkitVersionRange,
1320
+ filePath: "lib/genkit-ai.mjs"
1321
+ },
1322
+ functionQuery: {
1323
+ className: "GenkitAI",
1324
+ methodName: "run",
1325
+ kind: "Async"
1326
+ }
1327
+ },
1328
+ {
1329
+ channelName: genkitChannels.actionRun.channelName,
1330
+ module: {
1331
+ name: "@genkit-ai/ai",
1332
+ versionRange: genkitVersionRange,
1333
+ filePath: "lib/genkit-ai.js"
1334
+ },
1335
+ functionQuery: {
1336
+ className: "GenkitAI",
1337
+ methodName: "run",
1338
+ kind: "Async"
1339
+ }
1340
+ },
1341
+ {
1342
+ channelName: genkitCoreChannels.actionSpan.channelName,
1343
+ module: {
1344
+ name: "@genkit-ai/core",
1345
+ versionRange: genkitVersionRange,
1346
+ filePath: "lib/tracing/instrumentation.mjs"
1347
+ },
1348
+ functionQuery: {
1349
+ functionName: "runInNewSpan",
1350
+ kind: "Async"
1351
+ }
1352
+ },
1353
+ {
1354
+ channelName: genkitCoreChannels.actionSpan.channelName,
1355
+ module: {
1356
+ name: "@genkit-ai/core",
1357
+ versionRange: genkitVersionRange,
1358
+ filePath: "lib/tracing/instrumentation.js"
1359
+ },
1360
+ functionQuery: {
1361
+ functionName: "runInNewSpan",
1362
+ kind: "Async"
1363
+ }
1364
+ }
1365
+ ];
1366
+
1367
+ // src/instrumentation/plugins/github-copilot-channels.ts
1368
+ var gitHubCopilotChannels = defineChannels("@github/copilot-sdk", {
1369
+ createSession: channel({
1370
+ channelName: "client.createSession",
1371
+ kind: "async"
1372
+ }),
1373
+ resumeSession: channel({
1374
+ channelName: "client.resumeSession",
1375
+ kind: "async"
1376
+ }),
1377
+ sendAndWait: channel({
1378
+ channelName: "session.sendAndWait",
1379
+ kind: "async"
1380
+ })
1381
+ });
1382
+
1383
+ // src/auto-instrumentations/configs/github-copilot.ts
1384
+ var gitHubCopilotConfigs = [
1385
+ // ESM: CopilotClient.createSession
1386
+ {
1387
+ channelName: gitHubCopilotChannels.createSession.channelName,
1388
+ module: {
1389
+ name: "@github/copilot-sdk",
1390
+ versionRange: ">=0.3.0",
1391
+ filePath: "dist/client.js"
1392
+ },
1393
+ functionQuery: {
1394
+ className: "CopilotClient",
1395
+ methodName: "createSession",
1396
+ kind: "Async"
1397
+ }
1398
+ },
1399
+ // CJS: CopilotClient.createSession
1400
+ {
1401
+ channelName: gitHubCopilotChannels.createSession.channelName,
1402
+ module: {
1403
+ name: "@github/copilot-sdk",
1404
+ versionRange: ">=0.3.0",
1405
+ filePath: "dist/cjs/client.js"
1406
+ },
1407
+ functionQuery: {
1408
+ className: "CopilotClient",
1409
+ methodName: "createSession",
1410
+ kind: "Async"
1411
+ }
1412
+ },
1413
+ // ESM: CopilotClient.resumeSession
1414
+ {
1415
+ channelName: gitHubCopilotChannels.resumeSession.channelName,
1416
+ module: {
1417
+ name: "@github/copilot-sdk",
1418
+ versionRange: ">=0.3.0",
1419
+ filePath: "dist/client.js"
1420
+ },
1421
+ functionQuery: {
1422
+ className: "CopilotClient",
1423
+ methodName: "resumeSession",
1424
+ kind: "Async"
1425
+ }
1426
+ },
1427
+ // CJS: CopilotClient.resumeSession
1428
+ {
1429
+ channelName: gitHubCopilotChannels.resumeSession.channelName,
1430
+ module: {
1431
+ name: "@github/copilot-sdk",
1432
+ versionRange: ">=0.3.0",
1433
+ filePath: "dist/cjs/client.js"
1434
+ },
1435
+ functionQuery: {
1436
+ className: "CopilotClient",
1437
+ methodName: "resumeSession",
1438
+ kind: "Async"
1439
+ }
1440
+ },
1441
+ // ESM: CopilotSession.sendAndWait
1442
+ {
1443
+ channelName: gitHubCopilotChannels.sendAndWait.channelName,
1444
+ module: {
1445
+ name: "@github/copilot-sdk",
1446
+ versionRange: ">=0.3.0",
1447
+ filePath: "dist/session.js"
1448
+ },
1449
+ functionQuery: {
1450
+ className: "CopilotSession",
1451
+ methodName: "sendAndWait",
1452
+ kind: "Async"
1453
+ }
1454
+ },
1455
+ // CJS: CopilotSession.sendAndWait
1456
+ {
1457
+ channelName: gitHubCopilotChannels.sendAndWait.channelName,
1458
+ module: {
1459
+ name: "@github/copilot-sdk",
1460
+ versionRange: ">=0.3.0",
1461
+ filePath: "dist/cjs/session.js"
1462
+ },
1463
+ functionQuery: {
1464
+ className: "CopilotSession",
1465
+ methodName: "sendAndWait",
1466
+ kind: "Async"
1467
+ }
1468
+ }
1469
+ ];
1470
+
1471
+ // src/instrumentation/plugins/google-adk-channels.ts
1472
+ var googleADKChannels = defineChannels("@google/adk", {
1473
+ runnerRunAsync: channel({
1474
+ channelName: "runner.runAsync",
1475
+ kind: "sync-stream"
1476
+ }),
1477
+ agentRunAsync: channel({
1478
+ channelName: "agent.runAsync",
1479
+ kind: "sync-stream"
1480
+ }),
1481
+ toolRunAsync: channel({
1482
+ channelName: "tool.runAsync",
1483
+ kind: "async"
1484
+ })
1485
+ });
1486
+
1487
+ // src/auto-instrumentations/configs/google-adk.ts
1488
+ var googleADKVersionRange = ">=0.1.0";
1489
+ var googleADKBundledIndexV06VersionRange = ">=0.6.1 <0.7.0";
1490
+ var googleADKBundledIndexV1VersionRange = ">=1.0.0 <2.0.0";
1491
+ var googleADKConfigs = [
1492
+ // --- Runner.runAsync --- async generator, kind "Sync" + sync-stream channel
1493
+ // Runner.runAsync — ESM individual module file
1494
+ {
1495
+ channelName: googleADKChannels.runnerRunAsync.channelName,
1496
+ module: {
1497
+ name: "@google/adk",
1498
+ versionRange: googleADKVersionRange,
1499
+ filePath: "dist/esm/runner/runner.js"
1500
+ },
1501
+ functionQuery: {
1502
+ className: "Runner",
1503
+ methodName: "runAsync",
1504
+ kind: "Sync"
1505
+ }
1506
+ },
1507
+ // Runner.runAsync — bundled CJS/ESM indexes
1508
+ // The bundled entrypoints minify class names, so target the 12th sync
1509
+ // `runAsync` method in file order rather than a class name. This mapping is
1510
+ // only validated against the current 0.6.x bundle layout, so keep the range
1511
+ // tight until we verify newer bundled outputs.
1512
+ {
1513
+ channelName: googleADKChannels.runnerRunAsync.channelName,
1514
+ module: {
1515
+ name: "@google/adk",
1516
+ versionRange: googleADKBundledIndexV06VersionRange,
1517
+ filePath: "dist/cjs/index.js"
1518
+ },
1519
+ functionQuery: {
1520
+ methodName: "runAsync",
1521
+ kind: "Sync",
1522
+ index: 11
1523
+ }
1524
+ },
1525
+ {
1526
+ channelName: googleADKChannels.runnerRunAsync.channelName,
1527
+ module: {
1528
+ name: "@google/adk",
1529
+ versionRange: googleADKBundledIndexV06VersionRange,
1530
+ filePath: "dist/esm/index.js"
1531
+ },
1532
+ functionQuery: {
1533
+ methodName: "runAsync",
1534
+ kind: "Sync",
1535
+ index: 11
1536
+ }
1537
+ },
1538
+ // The 1.x bundled entrypoints still inline the runtime into index.js, but
1539
+ // the minified method order changed. These indices are verified against 1.0.0.
1540
+ {
1541
+ channelName: googleADKChannels.runnerRunAsync.channelName,
1542
+ module: {
1543
+ name: "@google/adk",
1544
+ versionRange: googleADKBundledIndexV1VersionRange,
1545
+ filePath: "dist/cjs/index.js"
1546
+ },
1547
+ functionQuery: {
1548
+ methodName: "runAsync",
1549
+ kind: "Sync",
1550
+ index: 12
1551
+ }
1552
+ },
1553
+ {
1554
+ channelName: googleADKChannels.runnerRunAsync.channelName,
1555
+ module: {
1556
+ name: "@google/adk",
1557
+ versionRange: googleADKBundledIndexV1VersionRange,
1558
+ filePath: "dist/esm/index.js"
1559
+ },
1560
+ functionQuery: {
1561
+ methodName: "runAsync",
1562
+ kind: "Sync",
1563
+ index: 12
1564
+ }
1565
+ },
1566
+ // --- BaseAgent.runAsync --- async generator, kind "Sync" + sync-stream channel
1567
+ // BaseAgent.runAsync — ESM individual module file
1568
+ {
1569
+ channelName: googleADKChannels.agentRunAsync.channelName,
1570
+ module: {
1571
+ name: "@google/adk",
1572
+ versionRange: googleADKVersionRange,
1573
+ filePath: "dist/esm/agents/base_agent.js"
1574
+ },
1575
+ functionQuery: {
1576
+ className: "BaseAgent",
1577
+ methodName: "runAsync",
1578
+ kind: "Sync"
1579
+ }
1580
+ },
1581
+ // BaseAgent.runAsync — bundled CJS/ESM indexes
1582
+ // The bundled entrypoints minify class names, so target the first sync
1583
+ // `runAsync` method in file order rather than a class name. This mapping is
1584
+ // only validated against the current 0.6.x bundle layout, so keep the range
1585
+ // tight until we verify newer bundled outputs.
1586
+ {
1587
+ channelName: googleADKChannels.agentRunAsync.channelName,
1588
+ module: {
1589
+ name: "@google/adk",
1590
+ versionRange: googleADKBundledIndexV06VersionRange,
1591
+ filePath: "dist/cjs/index.js"
1592
+ },
1593
+ functionQuery: {
1594
+ methodName: "runAsync",
1595
+ kind: "Sync",
1596
+ index: 0
1597
+ }
1598
+ },
1599
+ {
1600
+ channelName: googleADKChannels.agentRunAsync.channelName,
1601
+ module: {
1602
+ name: "@google/adk",
1603
+ versionRange: googleADKBundledIndexV06VersionRange,
1604
+ filePath: "dist/esm/index.js"
1605
+ },
1606
+ functionQuery: {
1607
+ methodName: "runAsync",
1608
+ kind: "Sync",
1609
+ index: 0
1610
+ }
1611
+ },
1612
+ // The 1.x bundled entrypoints keep BaseAgent.runAsync as the first bundled
1613
+ // async-generator runAsync method in file order.
1614
+ {
1615
+ channelName: googleADKChannels.agentRunAsync.channelName,
1616
+ module: {
1617
+ name: "@google/adk",
1618
+ versionRange: googleADKBundledIndexV1VersionRange,
1619
+ filePath: "dist/cjs/index.js"
1620
+ },
1621
+ functionQuery: {
1622
+ methodName: "runAsync",
1623
+ kind: "Sync",
1624
+ index: 0
1625
+ }
1626
+ },
1627
+ {
1628
+ channelName: googleADKChannels.agentRunAsync.channelName,
1629
+ module: {
1630
+ name: "@google/adk",
1631
+ versionRange: googleADKBundledIndexV1VersionRange,
1632
+ filePath: "dist/esm/index.js"
1633
+ },
1634
+ functionQuery: {
1635
+ methodName: "runAsync",
1636
+ kind: "Sync",
1637
+ index: 0
1638
+ }
1639
+ },
1640
+ // --- FunctionTool.runAsync --- regular async, kind "Async"
1641
+ // FunctionTool.runAsync — ESM individual module file
1642
+ {
1643
+ channelName: googleADKChannels.toolRunAsync.channelName,
1644
+ module: {
1645
+ name: "@google/adk",
1646
+ versionRange: googleADKVersionRange,
1647
+ filePath: "dist/esm/tools/function_tool.js"
1648
+ },
1649
+ functionQuery: {
1650
+ className: "FunctionTool",
1651
+ methodName: "runAsync",
1447
1652
  kind: "Async"
1448
1653
  }
1449
1654
  },
1655
+ // FunctionTool.runAsync — bundled CJS/ESM indexes
1656
+ // The bundled entrypoints minify class names, so target the first async
1657
+ // `runAsync` method in file order rather than a class name. This mapping is
1658
+ // only validated against the current 0.6.x bundle layout, so keep the range
1659
+ // tight until we verify newer bundled outputs.
1450
1660
  {
1451
- channelName: openRouterChannels.callModel.channelName,
1661
+ channelName: googleADKChannels.toolRunAsync.channelName,
1452
1662
  module: {
1453
- name: "@openrouter/sdk",
1454
- versionRange: ">=0.9.11 <1.0.0",
1455
- filePath: "esm/sdk/sdk.js"
1663
+ name: "@google/adk",
1664
+ versionRange: googleADKBundledIndexV06VersionRange,
1665
+ filePath: "dist/cjs/index.js"
1456
1666
  },
1457
1667
  functionQuery: {
1458
- className: "OpenRouter",
1459
- methodName: "callModel",
1460
- kind: "Sync"
1668
+ methodName: "runAsync",
1669
+ kind: "Async",
1670
+ index: 1
1671
+ }
1672
+ },
1673
+ {
1674
+ channelName: googleADKChannels.toolRunAsync.channelName,
1675
+ module: {
1676
+ name: "@google/adk",
1677
+ versionRange: googleADKBundledIndexV06VersionRange,
1678
+ filePath: "dist/esm/index.js"
1679
+ },
1680
+ functionQuery: {
1681
+ methodName: "runAsync",
1682
+ kind: "Async",
1683
+ index: 1
1684
+ }
1685
+ },
1686
+ // The 1.x bundle moves FunctionTool.runAsync behind one helper method.
1687
+ {
1688
+ channelName: googleADKChannels.toolRunAsync.channelName,
1689
+ module: {
1690
+ name: "@google/adk",
1691
+ versionRange: googleADKBundledIndexV1VersionRange,
1692
+ filePath: "dist/cjs/index.js"
1693
+ },
1694
+ functionQuery: {
1695
+ methodName: "runAsync",
1696
+ kind: "Async",
1697
+ index: 1
1698
+ }
1699
+ },
1700
+ {
1701
+ channelName: googleADKChannels.toolRunAsync.channelName,
1702
+ module: {
1703
+ name: "@google/adk",
1704
+ versionRange: googleADKBundledIndexV1VersionRange,
1705
+ filePath: "dist/esm/index.js"
1706
+ },
1707
+ functionQuery: {
1708
+ methodName: "runAsync",
1709
+ kind: "Async",
1710
+ index: 1
1461
1711
  }
1462
1712
  }
1463
1713
  ];
1464
1714
 
1465
- // src/instrumentation/plugins/mistral-channels.ts
1466
- var mistralChannels = defineChannels("@mistralai/mistralai", {
1467
- chatComplete: channel({
1468
- channelName: "chat.complete",
1469
- kind: "async"
1470
- }),
1471
- chatStream: channel({
1472
- channelName: "chat.stream",
1473
- kind: "async"
1474
- }),
1475
- embeddingsCreate: channel({
1476
- channelName: "embeddings.create",
1715
+ // src/instrumentation/plugins/google-genai-channels.ts
1716
+ var googleGenAIChannels = defineChannels("@google/genai", {
1717
+ generateContent: channel({
1718
+ channelName: "models.generateContent",
1477
1719
  kind: "async"
1478
1720
  }),
1479
- classifiersModerate: channel({
1480
- channelName: "classifiers.moderate",
1721
+ generateContentStream: channel({
1722
+ channelName: "models.generateContentStream",
1481
1723
  kind: "async"
1482
1724
  }),
1483
- classifiersModerateChat: channel({
1484
- channelName: "classifiers.moderateChat",
1725
+ embedContent: channel({
1726
+ channelName: "models.embedContent",
1485
1727
  kind: "async"
1486
- }),
1487
- classifiersClassify: channel({
1488
- channelName: "classifiers.classify",
1728
+ })
1729
+ });
1730
+
1731
+ // src/auto-instrumentations/configs/google-genai.ts
1732
+ var googleGenAIConfigs = [
1733
+ // Models.generateContentInternal - The actual class method (Node.js entry point)
1734
+ // Note: generateContent is an arrow function property that calls this internal method
1735
+ {
1736
+ channelName: googleGenAIChannels.generateContent.channelName,
1737
+ module: {
1738
+ name: "@google/genai",
1739
+ versionRange: ">=1.0.0",
1740
+ filePath: "dist/node/index.mjs"
1741
+ },
1742
+ functionQuery: {
1743
+ className: "Models",
1744
+ methodName: "generateContentInternal",
1745
+ kind: "Async"
1746
+ }
1747
+ },
1748
+ // Models.generateContentStreamInternal - The actual class method (Node.js entry point)
1749
+ // Note: generateContentStream is an arrow function property that calls this internal method
1750
+ {
1751
+ channelName: googleGenAIChannels.generateContentStream.channelName,
1752
+ module: {
1753
+ name: "@google/genai",
1754
+ versionRange: ">=1.0.0",
1755
+ filePath: "dist/node/index.mjs"
1756
+ },
1757
+ functionQuery: {
1758
+ className: "Models",
1759
+ methodName: "generateContentStreamInternal",
1760
+ kind: "Async"
1761
+ }
1762
+ },
1763
+ // Models.embedContent - class method in older SDK versions
1764
+ {
1765
+ channelName: googleGenAIChannels.embedContent.channelName,
1766
+ module: {
1767
+ name: "@google/genai",
1768
+ versionRange: ">=1.0.0 <1.44.0",
1769
+ filePath: "dist/node/index.mjs"
1770
+ },
1771
+ functionQuery: {
1772
+ className: "Models",
1773
+ methodName: "embedContent",
1774
+ kind: "Async"
1775
+ }
1776
+ },
1777
+ // Models.embedContentInternal - class method in newer SDK versions
1778
+ // Note: embedContent is an arrow function property that calls this method
1779
+ {
1780
+ channelName: googleGenAIChannels.embedContent.channelName,
1781
+ module: {
1782
+ name: "@google/genai",
1783
+ versionRange: ">=1.44.0",
1784
+ filePath: "dist/node/index.mjs"
1785
+ },
1786
+ functionQuery: {
1787
+ className: "Models",
1788
+ methodName: "embedContentInternal",
1789
+ kind: "Async"
1790
+ }
1791
+ }
1792
+ ];
1793
+
1794
+ // src/instrumentation/plugins/groq-channels.ts
1795
+ var groqChannels = defineChannels("groq-sdk", {
1796
+ chatCompletionsCreate: channel({
1797
+ channelName: "chat.completions.create",
1489
1798
  kind: "async"
1490
1799
  }),
1491
- classifiersClassifyChat: channel({
1492
- channelName: "classifiers.classifyChat",
1800
+ embeddingsCreate: channel(
1801
+ {
1802
+ channelName: "embeddings.create",
1803
+ kind: "async"
1804
+ }
1805
+ )
1806
+ });
1807
+
1808
+ // src/auto-instrumentations/configs/groq.ts
1809
+ var groqConfigs = [
1810
+ {
1811
+ channelName: groqChannels.chatCompletionsCreate.channelName,
1812
+ module: {
1813
+ name: "groq-sdk",
1814
+ versionRange: ">=1.0.0",
1815
+ filePath: "resources/chat/completions.mjs"
1816
+ },
1817
+ functionQuery: {
1818
+ className: "Completions",
1819
+ methodName: "create",
1820
+ kind: "Async"
1821
+ }
1822
+ },
1823
+ {
1824
+ channelName: groqChannels.embeddingsCreate.channelName,
1825
+ module: {
1826
+ name: "groq-sdk",
1827
+ versionRange: ">=1.0.0",
1828
+ filePath: "resources/embeddings.mjs"
1829
+ },
1830
+ functionQuery: {
1831
+ className: "Embeddings",
1832
+ methodName: "create",
1833
+ kind: "Async"
1834
+ }
1835
+ }
1836
+ ];
1837
+
1838
+ // src/instrumentation/plugins/huggingface-channels.ts
1839
+ var huggingFaceChannels = defineChannels("@huggingface/inference", {
1840
+ chatCompletion: channel({
1841
+ channelName: "chatCompletion",
1493
1842
  kind: "async"
1494
1843
  }),
1495
- fimComplete: channel({
1496
- channelName: "fim.complete",
1497
- kind: "async"
1844
+ chatCompletionStream: channel({
1845
+ channelName: "chatCompletionStream",
1846
+ kind: "sync-stream"
1498
1847
  }),
1499
- fimStream: channel({
1500
- channelName: "fim.stream",
1848
+ textGeneration: channel({
1849
+ channelName: "textGeneration",
1501
1850
  kind: "async"
1502
1851
  }),
1503
- agentsComplete: channel({
1504
- channelName: "agents.complete",
1505
- kind: "async"
1852
+ textGenerationStream: channel({
1853
+ channelName: "textGenerationStream",
1854
+ kind: "sync-stream"
1506
1855
  }),
1507
- agentsStream: channel({
1508
- channelName: "agents.stream",
1856
+ featureExtraction: channel({
1857
+ channelName: "featureExtraction",
1509
1858
  kind: "async"
1510
1859
  })
1511
1860
  });
1512
1861
 
1513
- // src/auto-instrumentations/configs/mistral.ts
1514
- var mistralConfigs = [
1862
+ // src/auto-instrumentations/configs/huggingface.ts
1863
+ var huggingFaceConfigs = [
1864
+ {
1865
+ channelName: huggingFaceChannels.chatCompletion.channelName,
1866
+ module: {
1867
+ name: "@huggingface/inference",
1868
+ versionRange: ">=2.0.0 <3.0.0",
1869
+ filePath: "dist/index.js"
1870
+ },
1871
+ functionQuery: {
1872
+ functionName: "chatCompletion",
1873
+ kind: "Async"
1874
+ }
1875
+ },
1876
+ {
1877
+ channelName: huggingFaceChannels.chatCompletion.channelName,
1878
+ module: {
1879
+ name: "@huggingface/inference",
1880
+ versionRange: ">=2.0.0 <3.0.0",
1881
+ filePath: "dist/index.cjs"
1882
+ },
1883
+ functionQuery: {
1884
+ functionName: "chatCompletion",
1885
+ kind: "Async"
1886
+ }
1887
+ },
1515
1888
  {
1516
- channelName: mistralChannels.chatComplete.channelName,
1889
+ channelName: huggingFaceChannels.chatCompletionStream.channelName,
1517
1890
  module: {
1518
- name: "@mistralai/mistralai",
1519
- versionRange: ">=1.0.0 <2.0.0",
1520
- filePath: "sdk/chat.js"
1891
+ name: "@huggingface/inference",
1892
+ versionRange: ">=2.0.0 <3.0.0",
1893
+ filePath: "dist/index.js"
1521
1894
  },
1522
1895
  functionQuery: {
1523
- className: "Chat",
1524
- methodName: "complete",
1525
- kind: "Async"
1896
+ functionName: "chatCompletionStream",
1897
+ kind: "Sync"
1526
1898
  }
1527
1899
  },
1528
1900
  {
1529
- channelName: mistralChannels.chatComplete.channelName,
1901
+ channelName: huggingFaceChannels.chatCompletionStream.channelName,
1530
1902
  module: {
1531
- name: "@mistralai/mistralai",
1903
+ name: "@huggingface/inference",
1532
1904
  versionRange: ">=2.0.0 <3.0.0",
1533
- filePath: "esm/sdk/chat.js"
1905
+ filePath: "dist/index.cjs"
1534
1906
  },
1535
1907
  functionQuery: {
1536
- className: "Chat",
1537
- methodName: "complete",
1538
- kind: "Async"
1908
+ functionName: "chatCompletionStream",
1909
+ kind: "Sync"
1539
1910
  }
1540
1911
  },
1541
1912
  {
1542
- channelName: mistralChannels.chatStream.channelName,
1913
+ channelName: huggingFaceChannels.textGeneration.channelName,
1543
1914
  module: {
1544
- name: "@mistralai/mistralai",
1545
- versionRange: ">=1.0.0 <2.0.0",
1546
- filePath: "sdk/chat.js"
1915
+ name: "@huggingface/inference",
1916
+ versionRange: ">=2.0.0 <3.0.0",
1917
+ filePath: "dist/index.js"
1547
1918
  },
1548
1919
  functionQuery: {
1549
- className: "Chat",
1550
- methodName: "stream",
1920
+ functionName: "textGeneration",
1551
1921
  kind: "Async"
1552
1922
  }
1553
1923
  },
1554
1924
  {
1555
- channelName: mistralChannels.chatStream.channelName,
1925
+ channelName: huggingFaceChannels.textGeneration.channelName,
1556
1926
  module: {
1557
- name: "@mistralai/mistralai",
1927
+ name: "@huggingface/inference",
1558
1928
  versionRange: ">=2.0.0 <3.0.0",
1559
- filePath: "esm/sdk/chat.js"
1929
+ filePath: "dist/index.cjs"
1560
1930
  },
1561
1931
  functionQuery: {
1562
- className: "Chat",
1563
- methodName: "stream",
1932
+ functionName: "textGeneration",
1564
1933
  kind: "Async"
1565
1934
  }
1566
1935
  },
1567
1936
  {
1568
- channelName: mistralChannels.embeddingsCreate.channelName,
1937
+ channelName: huggingFaceChannels.textGenerationStream.channelName,
1569
1938
  module: {
1570
- name: "@mistralai/mistralai",
1571
- versionRange: ">=1.0.0 <2.0.0",
1572
- filePath: "sdk/embeddings.js"
1939
+ name: "@huggingface/inference",
1940
+ versionRange: ">=2.0.0 <3.0.0",
1941
+ filePath: "dist/index.js"
1573
1942
  },
1574
1943
  functionQuery: {
1575
- className: "Embeddings",
1576
- methodName: "create",
1577
- kind: "Async"
1944
+ functionName: "textGenerationStream",
1945
+ kind: "Sync"
1578
1946
  }
1579
1947
  },
1580
1948
  {
1581
- channelName: mistralChannels.embeddingsCreate.channelName,
1949
+ channelName: huggingFaceChannels.textGenerationStream.channelName,
1582
1950
  module: {
1583
- name: "@mistralai/mistralai",
1951
+ name: "@huggingface/inference",
1584
1952
  versionRange: ">=2.0.0 <3.0.0",
1585
- filePath: "esm/sdk/embeddings.js"
1953
+ filePath: "dist/index.cjs"
1586
1954
  },
1587
1955
  functionQuery: {
1588
- className: "Embeddings",
1589
- methodName: "create",
1590
- kind: "Async"
1956
+ functionName: "textGenerationStream",
1957
+ kind: "Sync"
1591
1958
  }
1592
1959
  },
1593
1960
  {
1594
- channelName: mistralChannels.classifiersModerate.channelName,
1961
+ channelName: huggingFaceChannels.featureExtraction.channelName,
1595
1962
  module: {
1596
- name: "@mistralai/mistralai",
1597
- versionRange: ">=1.0.0 <2.0.0",
1598
- filePath: "sdk/classifiers.js"
1963
+ name: "@huggingface/inference",
1964
+ versionRange: ">=2.0.0 <3.0.0",
1965
+ filePath: "dist/index.js"
1599
1966
  },
1600
1967
  functionQuery: {
1601
- className: "Classifiers",
1602
- methodName: "moderate",
1968
+ functionName: "featureExtraction",
1603
1969
  kind: "Async"
1604
1970
  }
1605
1971
  },
1606
1972
  {
1607
- channelName: mistralChannels.classifiersModerate.channelName,
1973
+ channelName: huggingFaceChannels.featureExtraction.channelName,
1608
1974
  module: {
1609
- name: "@mistralai/mistralai",
1975
+ name: "@huggingface/inference",
1610
1976
  versionRange: ">=2.0.0 <3.0.0",
1611
- filePath: "esm/sdk/classifiers.js"
1977
+ filePath: "dist/index.cjs"
1612
1978
  },
1613
1979
  functionQuery: {
1614
- className: "Classifiers",
1615
- methodName: "moderate",
1980
+ functionName: "featureExtraction",
1616
1981
  kind: "Async"
1617
1982
  }
1618
1983
  },
1619
1984
  {
1620
- channelName: mistralChannels.classifiersModerateChat.channelName,
1985
+ channelName: huggingFaceChannels.chatCompletion.channelName,
1621
1986
  module: {
1622
- name: "@mistralai/mistralai",
1623
- versionRange: ">=1.0.0 <2.0.0",
1624
- filePath: "sdk/classifiers.js"
1987
+ name: "@huggingface/inference",
1988
+ versionRange: ">=3.0.0 <5.0.0",
1989
+ filePath: "dist/esm/tasks/nlp/chatCompletion.js"
1625
1990
  },
1626
1991
  functionQuery: {
1627
- className: "Classifiers",
1628
- methodName: "moderateChat",
1992
+ functionName: "chatCompletion",
1629
1993
  kind: "Async"
1630
1994
  }
1631
1995
  },
1632
1996
  {
1633
- channelName: mistralChannels.classifiersModerateChat.channelName,
1997
+ channelName: huggingFaceChannels.chatCompletion.channelName,
1634
1998
  module: {
1635
- name: "@mistralai/mistralai",
1636
- versionRange: ">=2.0.0 <3.0.0",
1637
- filePath: "esm/sdk/classifiers.js"
1999
+ name: "@huggingface/inference",
2000
+ versionRange: ">=3.0.0 <5.0.0",
2001
+ filePath: "dist/commonjs/tasks/nlp/chatCompletion.js"
1638
2002
  },
1639
2003
  functionQuery: {
1640
- className: "Classifiers",
1641
- methodName: "moderateChat",
2004
+ functionName: "chatCompletion",
1642
2005
  kind: "Async"
1643
2006
  }
1644
2007
  },
1645
2008
  {
1646
- channelName: mistralChannels.classifiersClassify.channelName,
2009
+ channelName: huggingFaceChannels.chatCompletionStream.channelName,
1647
2010
  module: {
1648
- name: "@mistralai/mistralai",
1649
- versionRange: ">=1.10.0 <2.0.0",
1650
- filePath: "sdk/classifiers.js"
2011
+ name: "@huggingface/inference",
2012
+ versionRange: ">=3.0.0 <5.0.0",
2013
+ filePath: "dist/esm/tasks/nlp/chatCompletionStream.js"
1651
2014
  },
1652
2015
  functionQuery: {
1653
- className: "Classifiers",
1654
- methodName: "classify",
1655
- kind: "Async"
2016
+ functionName: "chatCompletionStream",
2017
+ kind: "Sync"
1656
2018
  }
1657
2019
  },
1658
2020
  {
1659
- channelName: mistralChannels.classifiersClassify.channelName,
2021
+ channelName: huggingFaceChannels.chatCompletionStream.channelName,
1660
2022
  module: {
1661
- name: "@mistralai/mistralai",
1662
- versionRange: ">=2.0.0 <3.0.0",
1663
- filePath: "esm/sdk/classifiers.js"
2023
+ name: "@huggingface/inference",
2024
+ versionRange: ">=3.0.0 <5.0.0",
2025
+ filePath: "dist/commonjs/tasks/nlp/chatCompletionStream.js"
1664
2026
  },
1665
2027
  functionQuery: {
1666
- className: "Classifiers",
1667
- methodName: "classify",
1668
- kind: "Async"
2028
+ functionName: "chatCompletionStream",
2029
+ kind: "Sync"
1669
2030
  }
1670
2031
  },
1671
2032
  {
1672
- channelName: mistralChannels.classifiersClassifyChat.channelName,
2033
+ channelName: huggingFaceChannels.textGeneration.channelName,
1673
2034
  module: {
1674
- name: "@mistralai/mistralai",
1675
- versionRange: ">=1.10.0 <2.0.0",
1676
- filePath: "sdk/classifiers.js"
2035
+ name: "@huggingface/inference",
2036
+ versionRange: ">=3.0.0 <5.0.0",
2037
+ filePath: "dist/esm/tasks/nlp/textGeneration.js"
1677
2038
  },
1678
2039
  functionQuery: {
1679
- className: "Classifiers",
1680
- methodName: "classifyChat",
2040
+ functionName: "textGeneration",
1681
2041
  kind: "Async"
1682
2042
  }
1683
2043
  },
1684
2044
  {
1685
- channelName: mistralChannels.classifiersClassifyChat.channelName,
2045
+ channelName: huggingFaceChannels.textGeneration.channelName,
1686
2046
  module: {
1687
- name: "@mistralai/mistralai",
1688
- versionRange: ">=2.0.0 <3.0.0",
1689
- filePath: "esm/sdk/classifiers.js"
2047
+ name: "@huggingface/inference",
2048
+ versionRange: ">=3.0.0 <5.0.0",
2049
+ filePath: "dist/commonjs/tasks/nlp/textGeneration.js"
1690
2050
  },
1691
2051
  functionQuery: {
1692
- className: "Classifiers",
1693
- methodName: "classifyChat",
2052
+ functionName: "textGeneration",
1694
2053
  kind: "Async"
1695
2054
  }
1696
2055
  },
1697
2056
  {
1698
- channelName: mistralChannels.fimComplete.channelName,
2057
+ channelName: huggingFaceChannels.textGenerationStream.channelName,
1699
2058
  module: {
1700
- name: "@mistralai/mistralai",
1701
- versionRange: ">=1.0.0 <2.0.0",
1702
- filePath: "sdk/fim.js"
2059
+ name: "@huggingface/inference",
2060
+ versionRange: ">=3.0.0 <5.0.0",
2061
+ filePath: "dist/esm/tasks/nlp/textGenerationStream.js"
1703
2062
  },
1704
2063
  functionQuery: {
1705
- className: "Fim",
1706
- methodName: "complete",
1707
- kind: "Async"
2064
+ functionName: "textGenerationStream",
2065
+ kind: "Sync"
1708
2066
  }
1709
2067
  },
1710
2068
  {
1711
- channelName: mistralChannels.fimComplete.channelName,
2069
+ channelName: huggingFaceChannels.textGenerationStream.channelName,
1712
2070
  module: {
1713
- name: "@mistralai/mistralai",
1714
- versionRange: ">=2.0.0 <3.0.0",
1715
- filePath: "esm/sdk/fim.js"
2071
+ name: "@huggingface/inference",
2072
+ versionRange: ">=3.0.0 <5.0.0",
2073
+ filePath: "dist/commonjs/tasks/nlp/textGenerationStream.js"
1716
2074
  },
1717
2075
  functionQuery: {
1718
- className: "Fim",
1719
- methodName: "complete",
1720
- kind: "Async"
2076
+ functionName: "textGenerationStream",
2077
+ kind: "Sync"
1721
2078
  }
1722
2079
  },
1723
2080
  {
1724
- channelName: mistralChannels.fimStream.channelName,
2081
+ channelName: huggingFaceChannels.featureExtraction.channelName,
1725
2082
  module: {
1726
- name: "@mistralai/mistralai",
1727
- versionRange: ">=1.0.0 <2.0.0",
1728
- filePath: "sdk/fim.js"
2083
+ name: "@huggingface/inference",
2084
+ versionRange: ">=3.0.0 <5.0.0",
2085
+ filePath: "dist/esm/tasks/nlp/featureExtraction.js"
1729
2086
  },
1730
2087
  functionQuery: {
1731
- className: "Fim",
1732
- methodName: "stream",
2088
+ functionName: "featureExtraction",
1733
2089
  kind: "Async"
1734
2090
  }
1735
2091
  },
1736
2092
  {
1737
- channelName: mistralChannels.fimStream.channelName,
2093
+ channelName: huggingFaceChannels.featureExtraction.channelName,
1738
2094
  module: {
1739
- name: "@mistralai/mistralai",
1740
- versionRange: ">=2.0.0 <3.0.0",
1741
- filePath: "esm/sdk/fim.js"
2095
+ name: "@huggingface/inference",
2096
+ versionRange: ">=3.0.0 <5.0.0",
2097
+ filePath: "dist/commonjs/tasks/nlp/featureExtraction.js"
1742
2098
  },
1743
2099
  functionQuery: {
1744
- className: "Fim",
1745
- methodName: "stream",
2100
+ functionName: "featureExtraction",
1746
2101
  kind: "Async"
1747
2102
  }
2103
+ }
2104
+ ];
2105
+
2106
+ // src/instrumentation/plugins/langchain-channels.ts
2107
+ var langChainChannels = defineChannels("@langchain/core", {
2108
+ configure: channel({
2109
+ channelName: "CallbackManager.configure",
2110
+ kind: "sync-stream"
2111
+ }),
2112
+ configureSync: channel({
2113
+ channelName: "CallbackManager._configureSync",
2114
+ kind: "sync-stream"
2115
+ })
2116
+ });
2117
+
2118
+ // src/auto-instrumentations/configs/langchain.ts
2119
+ var langChainCoreVersionRange = ">=0.3.42";
2120
+ var langChainCallbackManagerFilePath = "dist/callbacks/manager.js";
2121
+ var langchainConfigs = [
2122
+ {
2123
+ channelName: langChainChannels.configure.channelName,
2124
+ module: {
2125
+ name: "@langchain/core",
2126
+ versionRange: langChainCoreVersionRange,
2127
+ filePath: langChainCallbackManagerFilePath
2128
+ },
2129
+ functionQuery: {
2130
+ className: "CallbackManager",
2131
+ methodName: "configure",
2132
+ kind: "Sync"
2133
+ }
1748
2134
  },
1749
2135
  {
1750
- channelName: mistralChannels.agentsComplete.channelName,
2136
+ channelName: langChainChannels.configureSync.channelName,
2137
+ module: {
2138
+ name: "@langchain/core",
2139
+ versionRange: langChainCoreVersionRange,
2140
+ filePath: langChainCallbackManagerFilePath
2141
+ },
2142
+ functionQuery: {
2143
+ className: "CallbackManager",
2144
+ methodName: "_configureSync",
2145
+ kind: "Sync"
2146
+ }
2147
+ }
2148
+ ];
2149
+
2150
+ // src/instrumentation/plugins/mistral-channels.ts
2151
+ var mistralChannels = defineChannels("@mistralai/mistralai", {
2152
+ chatComplete: channel({
2153
+ channelName: "chat.complete",
2154
+ kind: "async"
2155
+ }),
2156
+ chatStream: channel({
2157
+ channelName: "chat.stream",
2158
+ kind: "async"
2159
+ }),
2160
+ embeddingsCreate: channel({
2161
+ channelName: "embeddings.create",
2162
+ kind: "async"
2163
+ }),
2164
+ classifiersModerate: channel({
2165
+ channelName: "classifiers.moderate",
2166
+ kind: "async"
2167
+ }),
2168
+ classifiersModerateChat: channel({
2169
+ channelName: "classifiers.moderateChat",
2170
+ kind: "async"
2171
+ }),
2172
+ classifiersClassify: channel({
2173
+ channelName: "classifiers.classify",
2174
+ kind: "async"
2175
+ }),
2176
+ classifiersClassifyChat: channel({
2177
+ channelName: "classifiers.classifyChat",
2178
+ kind: "async"
2179
+ }),
2180
+ fimComplete: channel({
2181
+ channelName: "fim.complete",
2182
+ kind: "async"
2183
+ }),
2184
+ fimStream: channel({
2185
+ channelName: "fim.stream",
2186
+ kind: "async"
2187
+ }),
2188
+ agentsComplete: channel({
2189
+ channelName: "agents.complete",
2190
+ kind: "async"
2191
+ }),
2192
+ agentsStream: channel({
2193
+ channelName: "agents.stream",
2194
+ kind: "async"
2195
+ })
2196
+ });
2197
+
2198
+ // src/auto-instrumentations/configs/mistral.ts
2199
+ var mistralConfigs = [
2200
+ {
2201
+ channelName: mistralChannels.chatComplete.channelName,
1751
2202
  module: {
1752
2203
  name: "@mistralai/mistralai",
1753
2204
  versionRange: ">=1.0.0 <2.0.0",
1754
- filePath: "sdk/agents.js"
2205
+ filePath: "sdk/chat.js"
1755
2206
  },
1756
2207
  functionQuery: {
1757
- className: "Agents",
2208
+ className: "Chat",
1758
2209
  methodName: "complete",
1759
2210
  kind: "Async"
1760
2211
  }
1761
2212
  },
1762
2213
  {
1763
- channelName: mistralChannels.agentsComplete.channelName,
2214
+ channelName: mistralChannels.chatComplete.channelName,
1764
2215
  module: {
1765
2216
  name: "@mistralai/mistralai",
1766
2217
  versionRange: ">=2.0.0 <3.0.0",
1767
- filePath: "esm/sdk/agents.js"
2218
+ filePath: "esm/sdk/chat.js"
1768
2219
  },
1769
2220
  functionQuery: {
1770
- className: "Agents",
2221
+ className: "Chat",
1771
2222
  methodName: "complete",
1772
2223
  kind: "Async"
1773
2224
  }
1774
2225
  },
1775
2226
  {
1776
- channelName: mistralChannels.agentsStream.channelName,
2227
+ channelName: mistralChannels.chatStream.channelName,
1777
2228
  module: {
1778
2229
  name: "@mistralai/mistralai",
1779
2230
  versionRange: ">=1.0.0 <2.0.0",
1780
- filePath: "sdk/agents.js"
2231
+ filePath: "sdk/chat.js"
1781
2232
  },
1782
2233
  functionQuery: {
1783
- className: "Agents",
2234
+ className: "Chat",
1784
2235
  methodName: "stream",
1785
2236
  kind: "Async"
1786
2237
  }
1787
2238
  },
1788
2239
  {
1789
- channelName: mistralChannels.agentsStream.channelName,
2240
+ channelName: mistralChannels.chatStream.channelName,
1790
2241
  module: {
1791
2242
  name: "@mistralai/mistralai",
1792
2243
  versionRange: ">=2.0.0 <3.0.0",
1793
- filePath: "esm/sdk/agents.js"
2244
+ filePath: "esm/sdk/chat.js"
1794
2245
  },
1795
2246
  functionQuery: {
1796
- className: "Agents",
2247
+ className: "Chat",
1797
2248
  methodName: "stream",
1798
2249
  kind: "Async"
1799
2250
  }
1800
- }
1801
- ];
1802
-
1803
- // src/instrumentation/plugins/cohere-channels.ts
1804
- var cohereChannels = defineChannels("cohere-ai", {
1805
- chat: channel({
1806
- channelName: "chat",
1807
- kind: "async"
1808
- }),
1809
- chatStream: channel({
1810
- channelName: "chatStream",
1811
- kind: "async"
1812
- }),
1813
- embed: channel({
1814
- channelName: "embed",
1815
- kind: "async"
1816
- }),
1817
- rerank: channel({
1818
- channelName: "rerank",
1819
- kind: "async"
1820
- })
1821
- });
1822
-
1823
- // src/auto-instrumentations/configs/cohere.ts
1824
- var cohereConfigs = [
1825
- {
1826
- channelName: cohereChannels.chat.channelName,
1827
- module: {
1828
- name: "cohere-ai",
1829
- versionRange: ">=7.0.0 <8.0.0",
1830
- filePath: "Client.js"
1831
- },
1832
- functionQuery: {
1833
- className: "CohereClient",
1834
- methodName: "chat",
1835
- kind: "Async"
1836
- }
1837
- },
1838
- {
1839
- channelName: cohereChannels.chat.channelName,
1840
- module: {
1841
- name: "cohere-ai",
1842
- versionRange: ">=7.0.0 <7.21.0",
1843
- filePath: "api/resources/v2/client/Client.js"
1844
- },
1845
- functionQuery: {
1846
- className: "V2",
1847
- methodName: "chat",
1848
- kind: "Async"
1849
- }
1850
2251
  },
1851
2252
  {
1852
- channelName: cohereChannels.chat.channelName,
2253
+ channelName: mistralChannels.embeddingsCreate.channelName,
1853
2254
  module: {
1854
- name: "cohere-ai",
1855
- versionRange: ">=7.21.0 <8.0.0",
1856
- filePath: "api/resources/v2/client/Client.js"
2255
+ name: "@mistralai/mistralai",
2256
+ versionRange: ">=1.0.0 <2.0.0",
2257
+ filePath: "sdk/embeddings.js"
1857
2258
  },
1858
2259
  functionQuery: {
1859
- className: "V2Client",
1860
- methodName: "chat",
2260
+ className: "Embeddings",
2261
+ methodName: "create",
1861
2262
  kind: "Async"
1862
2263
  }
1863
2264
  },
1864
2265
  {
1865
- channelName: cohereChannels.chat.channelName,
2266
+ channelName: mistralChannels.embeddingsCreate.channelName,
1866
2267
  module: {
1867
- name: "cohere-ai",
1868
- versionRange: ">=8.0.0 <9.0.0",
1869
- filePath: "Client.js"
2268
+ name: "@mistralai/mistralai",
2269
+ versionRange: ">=2.0.0 <3.0.0",
2270
+ filePath: "esm/sdk/embeddings.js"
1870
2271
  },
1871
2272
  functionQuery: {
1872
- className: "CohereClient",
1873
- methodName: "chat",
2273
+ className: "Embeddings",
2274
+ methodName: "create",
1874
2275
  kind: "Async"
1875
2276
  }
1876
2277
  },
1877
2278
  {
1878
- channelName: cohereChannels.chat.channelName,
2279
+ channelName: mistralChannels.classifiersModerate.channelName,
1879
2280
  module: {
1880
- name: "cohere-ai",
1881
- versionRange: ">=8.0.0 <9.0.0",
1882
- filePath: "api/resources/v2/client/Client.js"
2281
+ name: "@mistralai/mistralai",
2282
+ versionRange: ">=1.0.0 <2.0.0",
2283
+ filePath: "sdk/classifiers.js"
1883
2284
  },
1884
2285
  functionQuery: {
1885
- className: "V2Client",
1886
- methodName: "chat",
2286
+ className: "Classifiers",
2287
+ methodName: "moderate",
1887
2288
  kind: "Async"
1888
2289
  }
1889
2290
  },
1890
2291
  {
1891
- channelName: cohereChannels.chatStream.channelName,
2292
+ channelName: mistralChannels.classifiersModerate.channelName,
1892
2293
  module: {
1893
- name: "cohere-ai",
1894
- versionRange: ">=7.0.0 <8.0.0",
1895
- filePath: "Client.js"
2294
+ name: "@mistralai/mistralai",
2295
+ versionRange: ">=2.0.0 <3.0.0",
2296
+ filePath: "esm/sdk/classifiers.js"
1896
2297
  },
1897
2298
  functionQuery: {
1898
- className: "CohereClient",
1899
- methodName: "chatStream",
2299
+ className: "Classifiers",
2300
+ methodName: "moderate",
1900
2301
  kind: "Async"
1901
2302
  }
1902
2303
  },
1903
2304
  {
1904
- channelName: cohereChannels.chatStream.channelName,
2305
+ channelName: mistralChannels.classifiersModerateChat.channelName,
1905
2306
  module: {
1906
- name: "cohere-ai",
1907
- versionRange: ">=7.0.0 <7.21.0",
1908
- filePath: "api/resources/v2/client/Client.js"
2307
+ name: "@mistralai/mistralai",
2308
+ versionRange: ">=1.0.0 <2.0.0",
2309
+ filePath: "sdk/classifiers.js"
1909
2310
  },
1910
2311
  functionQuery: {
1911
- className: "V2",
1912
- methodName: "chatStream",
2312
+ className: "Classifiers",
2313
+ methodName: "moderateChat",
1913
2314
  kind: "Async"
1914
2315
  }
1915
2316
  },
1916
2317
  {
1917
- channelName: cohereChannels.chatStream.channelName,
2318
+ channelName: mistralChannels.classifiersModerateChat.channelName,
1918
2319
  module: {
1919
- name: "cohere-ai",
1920
- versionRange: ">=7.21.0 <8.0.0",
1921
- filePath: "api/resources/v2/client/Client.js"
2320
+ name: "@mistralai/mistralai",
2321
+ versionRange: ">=2.0.0 <3.0.0",
2322
+ filePath: "esm/sdk/classifiers.js"
1922
2323
  },
1923
2324
  functionQuery: {
1924
- className: "V2Client",
1925
- methodName: "chatStream",
2325
+ className: "Classifiers",
2326
+ methodName: "moderateChat",
1926
2327
  kind: "Async"
1927
2328
  }
1928
2329
  },
1929
2330
  {
1930
- channelName: cohereChannels.chatStream.channelName,
2331
+ channelName: mistralChannels.classifiersClassify.channelName,
1931
2332
  module: {
1932
- name: "cohere-ai",
1933
- versionRange: ">=8.0.0 <9.0.0",
1934
- filePath: "Client.js"
2333
+ name: "@mistralai/mistralai",
2334
+ versionRange: ">=1.10.0 <2.0.0",
2335
+ filePath: "sdk/classifiers.js"
1935
2336
  },
1936
2337
  functionQuery: {
1937
- className: "CohereClient",
1938
- methodName: "chatStream",
2338
+ className: "Classifiers",
2339
+ methodName: "classify",
1939
2340
  kind: "Async"
1940
2341
  }
1941
2342
  },
1942
2343
  {
1943
- channelName: cohereChannels.chatStream.channelName,
2344
+ channelName: mistralChannels.classifiersClassify.channelName,
1944
2345
  module: {
1945
- name: "cohere-ai",
1946
- versionRange: ">=8.0.0 <9.0.0",
1947
- filePath: "api/resources/v2/client/Client.js"
2346
+ name: "@mistralai/mistralai",
2347
+ versionRange: ">=2.0.0 <3.0.0",
2348
+ filePath: "esm/sdk/classifiers.js"
1948
2349
  },
1949
2350
  functionQuery: {
1950
- className: "V2Client",
1951
- methodName: "chatStream",
2351
+ className: "Classifiers",
2352
+ methodName: "classify",
1952
2353
  kind: "Async"
1953
2354
  }
1954
2355
  },
1955
2356
  {
1956
- channelName: cohereChannels.embed.channelName,
2357
+ channelName: mistralChannels.classifiersClassifyChat.channelName,
1957
2358
  module: {
1958
- name: "cohere-ai",
1959
- versionRange: ">=7.0.0 <8.0.0",
1960
- filePath: "Client.js"
2359
+ name: "@mistralai/mistralai",
2360
+ versionRange: ">=1.10.0 <2.0.0",
2361
+ filePath: "sdk/classifiers.js"
1961
2362
  },
1962
2363
  functionQuery: {
1963
- className: "CohereClient",
1964
- methodName: "embed",
2364
+ className: "Classifiers",
2365
+ methodName: "classifyChat",
1965
2366
  kind: "Async"
1966
2367
  }
1967
2368
  },
1968
2369
  {
1969
- channelName: cohereChannels.embed.channelName,
2370
+ channelName: mistralChannels.classifiersClassifyChat.channelName,
1970
2371
  module: {
1971
- name: "cohere-ai",
1972
- versionRange: ">=7.0.0 <7.21.0",
1973
- filePath: "api/resources/v2/client/Client.js"
2372
+ name: "@mistralai/mistralai",
2373
+ versionRange: ">=2.0.0 <3.0.0",
2374
+ filePath: "esm/sdk/classifiers.js"
1974
2375
  },
1975
2376
  functionQuery: {
1976
- className: "V2",
1977
- methodName: "embed",
2377
+ className: "Classifiers",
2378
+ methodName: "classifyChat",
1978
2379
  kind: "Async"
1979
2380
  }
1980
2381
  },
1981
2382
  {
1982
- channelName: cohereChannels.embed.channelName,
2383
+ channelName: mistralChannels.fimComplete.channelName,
1983
2384
  module: {
1984
- name: "cohere-ai",
1985
- versionRange: ">=7.21.0 <8.0.0",
1986
- filePath: "api/resources/v2/client/Client.js"
2385
+ name: "@mistralai/mistralai",
2386
+ versionRange: ">=1.0.0 <2.0.0",
2387
+ filePath: "sdk/fim.js"
1987
2388
  },
1988
2389
  functionQuery: {
1989
- className: "V2Client",
1990
- methodName: "embed",
2390
+ className: "Fim",
2391
+ methodName: "complete",
1991
2392
  kind: "Async"
1992
2393
  }
1993
2394
  },
1994
2395
  {
1995
- channelName: cohereChannels.embed.channelName,
2396
+ channelName: mistralChannels.fimComplete.channelName,
1996
2397
  module: {
1997
- name: "cohere-ai",
1998
- versionRange: ">=8.0.0 <9.0.0",
1999
- filePath: "Client.js"
2398
+ name: "@mistralai/mistralai",
2399
+ versionRange: ">=2.0.0 <3.0.0",
2400
+ filePath: "esm/sdk/fim.js"
2000
2401
  },
2001
2402
  functionQuery: {
2002
- className: "CohereClient",
2003
- methodName: "embed",
2403
+ className: "Fim",
2404
+ methodName: "complete",
2004
2405
  kind: "Async"
2005
2406
  }
2006
2407
  },
2007
2408
  {
2008
- channelName: cohereChannels.embed.channelName,
2409
+ channelName: mistralChannels.fimStream.channelName,
2009
2410
  module: {
2010
- name: "cohere-ai",
2011
- versionRange: ">=8.0.0 <9.0.0",
2012
- filePath: "api/resources/v2/client/Client.js"
2411
+ name: "@mistralai/mistralai",
2412
+ versionRange: ">=1.0.0 <2.0.0",
2413
+ filePath: "sdk/fim.js"
2013
2414
  },
2014
2415
  functionQuery: {
2015
- className: "V2Client",
2016
- methodName: "embed",
2416
+ className: "Fim",
2417
+ methodName: "stream",
2017
2418
  kind: "Async"
2018
2419
  }
2019
2420
  },
2020
2421
  {
2021
- channelName: cohereChannels.rerank.channelName,
2422
+ channelName: mistralChannels.fimStream.channelName,
2022
2423
  module: {
2023
- name: "cohere-ai",
2024
- versionRange: ">=7.0.0 <8.0.0",
2025
- filePath: "Client.js"
2424
+ name: "@mistralai/mistralai",
2425
+ versionRange: ">=2.0.0 <3.0.0",
2426
+ filePath: "esm/sdk/fim.js"
2026
2427
  },
2027
2428
  functionQuery: {
2028
- className: "CohereClient",
2029
- methodName: "rerank",
2429
+ className: "Fim",
2430
+ methodName: "stream",
2030
2431
  kind: "Async"
2031
2432
  }
2032
2433
  },
2033
2434
  {
2034
- channelName: cohereChannels.rerank.channelName,
2435
+ channelName: mistralChannels.agentsComplete.channelName,
2035
2436
  module: {
2036
- name: "cohere-ai",
2037
- versionRange: ">=7.0.0 <7.21.0",
2038
- filePath: "api/resources/v2/client/Client.js"
2437
+ name: "@mistralai/mistralai",
2438
+ versionRange: ">=1.0.0 <2.0.0",
2439
+ filePath: "sdk/agents.js"
2039
2440
  },
2040
2441
  functionQuery: {
2041
- className: "V2",
2042
- methodName: "rerank",
2442
+ className: "Agents",
2443
+ methodName: "complete",
2043
2444
  kind: "Async"
2044
2445
  }
2045
2446
  },
2046
2447
  {
2047
- channelName: cohereChannels.rerank.channelName,
2448
+ channelName: mistralChannels.agentsComplete.channelName,
2048
2449
  module: {
2049
- name: "cohere-ai",
2050
- versionRange: ">=7.21.0 <8.0.0",
2051
- filePath: "api/resources/v2/client/Client.js"
2450
+ name: "@mistralai/mistralai",
2451
+ versionRange: ">=2.0.0 <3.0.0",
2452
+ filePath: "esm/sdk/agents.js"
2052
2453
  },
2053
2454
  functionQuery: {
2054
- className: "V2Client",
2055
- methodName: "rerank",
2455
+ className: "Agents",
2456
+ methodName: "complete",
2056
2457
  kind: "Async"
2057
2458
  }
2058
2459
  },
2059
2460
  {
2060
- channelName: cohereChannels.rerank.channelName,
2461
+ channelName: mistralChannels.agentsStream.channelName,
2061
2462
  module: {
2062
- name: "cohere-ai",
2063
- versionRange: ">=8.0.0 <9.0.0",
2064
- filePath: "Client.js"
2463
+ name: "@mistralai/mistralai",
2464
+ versionRange: ">=1.0.0 <2.0.0",
2465
+ filePath: "sdk/agents.js"
2065
2466
  },
2066
2467
  functionQuery: {
2067
- className: "CohereClient",
2068
- methodName: "rerank",
2468
+ className: "Agents",
2469
+ methodName: "stream",
2069
2470
  kind: "Async"
2070
2471
  }
2071
2472
  },
2072
2473
  {
2073
- channelName: cohereChannels.rerank.channelName,
2474
+ channelName: mistralChannels.agentsStream.channelName,
2074
2475
  module: {
2075
- name: "cohere-ai",
2076
- versionRange: ">=8.0.0 <9.0.0",
2077
- filePath: "api/resources/v2/client/Client.js"
2476
+ name: "@mistralai/mistralai",
2477
+ versionRange: ">=2.0.0 <3.0.0",
2478
+ filePath: "esm/sdk/agents.js"
2078
2479
  },
2079
2480
  functionQuery: {
2080
- className: "V2Client",
2081
- methodName: "rerank",
2481
+ className: "Agents",
2482
+ methodName: "stream",
2082
2483
  kind: "Async"
2083
2484
  }
2084
2485
  }
2085
2486
  ];
2086
2487
 
2087
- // src/instrumentation/plugins/groq-channels.ts
2088
- var groqChannels = defineChannels("groq-sdk", {
2488
+ // src/instrumentation/plugins/openai-agents-channels.ts
2489
+ var openAIAgentsCoreChannels = defineChannels("@openai/agents-core", {
2490
+ onTraceStart: channel({
2491
+ channelName: "tracing.processor.onTraceStart",
2492
+ kind: "async"
2493
+ }),
2494
+ onTraceEnd: channel({
2495
+ channelName: "tracing.processor.onTraceEnd",
2496
+ kind: "async"
2497
+ }),
2498
+ onSpanStart: channel({
2499
+ channelName: "tracing.processor.onSpanStart",
2500
+ kind: "async"
2501
+ }),
2502
+ onSpanEnd: channel({
2503
+ channelName: "tracing.processor.onSpanEnd",
2504
+ kind: "async"
2505
+ })
2506
+ });
2507
+
2508
+ // src/auto-instrumentations/configs/openai-agents.ts
2509
+ var lifecycleMethods = [
2510
+ ["onTraceStart", openAIAgentsCoreChannels.onTraceStart.channelName],
2511
+ ["onTraceEnd", openAIAgentsCoreChannels.onTraceEnd.channelName],
2512
+ ["onSpanStart", openAIAgentsCoreChannels.onSpanStart.channelName],
2513
+ ["onSpanEnd", openAIAgentsCoreChannels.onSpanEnd.channelName]
2514
+ ];
2515
+ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
2516
+ ([methodName, channelName]) => ["dist/tracing/processor.mjs", "dist/tracing/processor.js"].map(
2517
+ (filePath) => ({
2518
+ channelName,
2519
+ module: {
2520
+ name: "@openai/agents-core",
2521
+ versionRange: ">=0.0.14",
2522
+ filePath
2523
+ },
2524
+ functionQuery: {
2525
+ className: "MultiTracingProcessor",
2526
+ methodName,
2527
+ kind: "Async"
2528
+ }
2529
+ })
2530
+ )
2531
+ );
2532
+
2533
+ // src/instrumentation/plugins/openai-channels.ts
2534
+ var openAIChannels = defineChannels("openai", {
2089
2535
  chatCompletionsCreate: channel({
2090
2536
  channelName: "chat.completions.create",
2091
2537
  kind: "async"
2092
2538
  }),
2093
- embeddingsCreate: channel(
2094
- {
2095
- channelName: "embeddings.create",
2096
- kind: "async"
2097
- }
2098
- )
2539
+ embeddingsCreate: channel({
2540
+ channelName: "embeddings.create",
2541
+ kind: "async"
2542
+ }),
2543
+ betaChatCompletionsParse: channel({
2544
+ channelName: "beta.chat.completions.parse",
2545
+ kind: "async"
2546
+ }),
2547
+ betaChatCompletionsStream: channel({
2548
+ channelName: "beta.chat.completions.stream",
2549
+ kind: "sync-stream"
2550
+ }),
2551
+ moderationsCreate: channel({
2552
+ channelName: "moderations.create",
2553
+ kind: "async"
2554
+ }),
2555
+ responsesCreate: channel({
2556
+ channelName: "responses.create",
2557
+ kind: "async"
2558
+ }),
2559
+ responsesStream: channel({
2560
+ channelName: "responses.stream",
2561
+ kind: "sync-stream"
2562
+ }),
2563
+ responsesParse: channel({
2564
+ channelName: "responses.parse",
2565
+ kind: "async"
2566
+ }),
2567
+ responsesCompact: channel({
2568
+ channelName: "responses.compact",
2569
+ kind: "async"
2570
+ })
2099
2571
  });
2100
2572
 
2101
- // src/auto-instrumentations/configs/groq.ts
2102
- var groqConfigs = [
2573
+ // src/auto-instrumentations/configs/openai.ts
2574
+ var openaiConfigs = [
2575
+ // Chat Completions
2103
2576
  {
2104
- channelName: groqChannels.chatCompletionsCreate.channelName,
2577
+ channelName: openAIChannels.chatCompletionsCreate.channelName,
2105
2578
  module: {
2106
- name: "groq-sdk",
2107
- versionRange: ">=1.0.0",
2579
+ name: "openai",
2580
+ versionRange: ">=4.0.0 <5.0.0",
2108
2581
  filePath: "resources/chat/completions.mjs"
2109
2582
  },
2110
2583
  functionQuery: {
@@ -2114,317 +2587,411 @@ var groqConfigs = [
2114
2587
  }
2115
2588
  },
2116
2589
  {
2117
- channelName: groqChannels.embeddingsCreate.channelName,
2590
+ channelName: openAIChannels.chatCompletionsCreate.channelName,
2118
2591
  module: {
2119
- name: "groq-sdk",
2120
- versionRange: ">=1.0.0",
2121
- filePath: "resources/embeddings.mjs"
2592
+ name: "openai",
2593
+ versionRange: ">=4.0.0 <5.0.0",
2594
+ filePath: "resources/chat/completions/completions.mjs"
2122
2595
  },
2123
2596
  functionQuery: {
2124
- className: "Embeddings",
2597
+ className: "Completions",
2125
2598
  methodName: "create",
2126
2599
  kind: "Async"
2127
2600
  }
2128
- }
2129
- ];
2130
-
2131
- // src/instrumentation/plugins/genkit-channels.ts
2132
- var genkitChannels = defineChannels("@genkit-ai/ai", {
2133
- generate: channel({
2134
- channelName: "generate",
2135
- kind: "async"
2136
- }),
2137
- generateStream: channel({
2138
- channelName: "generateStream",
2139
- kind: "sync-stream"
2140
- }),
2141
- embed: channel({
2142
- channelName: "embed",
2143
- kind: "async"
2144
- }),
2145
- embedMany: channel({
2146
- channelName: "embedMany",
2147
- kind: "async"
2148
- }),
2149
- actionRun: channel({
2150
- channelName: "action.run",
2151
- kind: "async"
2152
- }),
2153
- actionStream: channel({
2154
- channelName: "action.stream",
2155
- kind: "sync-stream"
2156
- })
2157
- });
2158
- var genkitCoreChannels = defineChannels("@genkit-ai/core", {
2159
- actionSpan: channel({
2160
- channelName: "action.span",
2161
- kind: "async"
2162
- })
2163
- });
2164
-
2165
- // src/auto-instrumentations/configs/genkit.ts
2166
- var genkitVersionRange = ">=1.0.0 <2.0.0";
2167
- var genkitConfigs = [
2601
+ },
2168
2602
  {
2169
- channelName: genkitChannels.generate.channelName,
2603
+ channelName: openAIChannels.chatCompletionsCreate.channelName,
2170
2604
  module: {
2171
- name: "@genkit-ai/ai",
2172
- versionRange: genkitVersionRange,
2173
- filePath: "lib/genkit-ai.mjs"
2605
+ name: "openai",
2606
+ versionRange: ">=5.0.0",
2607
+ filePath: "resources/chat/completions/completions.mjs"
2174
2608
  },
2175
2609
  functionQuery: {
2176
- className: "GenkitAI",
2177
- methodName: "generate",
2610
+ className: "Completions",
2611
+ methodName: "create",
2178
2612
  kind: "Async"
2179
2613
  }
2180
2614
  },
2615
+ // Embeddings
2181
2616
  {
2182
- channelName: genkitChannels.generate.channelName,
2617
+ channelName: openAIChannels.embeddingsCreate.channelName,
2183
2618
  module: {
2184
- name: "@genkit-ai/ai",
2185
- versionRange: genkitVersionRange,
2186
- filePath: "lib/genkit-ai.js"
2619
+ name: "openai",
2620
+ versionRange: ">=4.0.0",
2621
+ filePath: "resources/embeddings.mjs"
2187
2622
  },
2188
2623
  functionQuery: {
2189
- className: "GenkitAI",
2190
- methodName: "generate",
2624
+ className: "Embeddings",
2625
+ methodName: "create",
2191
2626
  kind: "Async"
2192
2627
  }
2193
2628
  },
2629
+ // Beta Chat Completions Parse
2194
2630
  {
2195
- channelName: genkitChannels.generateStream.channelName,
2631
+ channelName: openAIChannels.betaChatCompletionsParse.channelName,
2196
2632
  module: {
2197
- name: "@genkit-ai/ai",
2198
- versionRange: genkitVersionRange,
2199
- filePath: "lib/genkit-ai.mjs"
2633
+ name: "openai",
2634
+ versionRange: ">=4.0.0 <5.0.0",
2635
+ filePath: "resources/beta/chat/completions.mjs"
2200
2636
  },
2201
2637
  functionQuery: {
2202
- className: "GenkitAI",
2203
- methodName: "generateStream",
2204
- kind: "Sync"
2638
+ className: "Completions",
2639
+ methodName: "parse",
2640
+ kind: "Async"
2205
2641
  }
2206
2642
  },
2207
2643
  {
2208
- channelName: genkitChannels.generateStream.channelName,
2644
+ channelName: openAIChannels.betaChatCompletionsParse.channelName,
2209
2645
  module: {
2210
- name: "@genkit-ai/ai",
2211
- versionRange: genkitVersionRange,
2212
- filePath: "lib/genkit-ai.js"
2646
+ name: "openai",
2647
+ versionRange: ">=5.0.0",
2648
+ filePath: "resources/chat/completions/completions.mjs"
2213
2649
  },
2214
2650
  functionQuery: {
2215
- className: "GenkitAI",
2216
- methodName: "generateStream",
2217
- kind: "Sync"
2651
+ className: "Completions",
2652
+ methodName: "parse",
2653
+ kind: "Async"
2218
2654
  }
2219
2655
  },
2656
+ // Moderations
2220
2657
  {
2221
- channelName: genkitChannels.embed.channelName,
2658
+ channelName: openAIChannels.moderationsCreate.channelName,
2222
2659
  module: {
2223
- name: "@genkit-ai/ai",
2224
- versionRange: genkitVersionRange,
2225
- filePath: "lib/genkit-ai.mjs"
2660
+ name: "openai",
2661
+ versionRange: ">=4.0.0",
2662
+ filePath: "resources/moderations.mjs"
2226
2663
  },
2227
2664
  functionQuery: {
2228
- className: "GenkitAI",
2229
- methodName: "embed",
2665
+ className: "Moderations",
2666
+ methodName: "create",
2230
2667
  kind: "Async"
2231
2668
  }
2232
2669
  },
2670
+ // Beta Chat Completions Stream
2671
+ {
2672
+ channelName: openAIChannels.betaChatCompletionsStream.channelName,
2673
+ module: {
2674
+ name: "openai",
2675
+ versionRange: ">=4.0.0 <5.0.0",
2676
+ filePath: "resources/beta/chat/completions.mjs"
2677
+ },
2678
+ functionQuery: {
2679
+ className: "Completions",
2680
+ methodName: "stream",
2681
+ kind: "Sync"
2682
+ }
2683
+ },
2233
2684
  {
2234
- channelName: genkitChannels.embed.channelName,
2685
+ channelName: openAIChannels.betaChatCompletionsStream.channelName,
2235
2686
  module: {
2236
- name: "@genkit-ai/ai",
2237
- versionRange: genkitVersionRange,
2238
- filePath: "lib/genkit-ai.js"
2687
+ name: "openai",
2688
+ versionRange: ">=5.0.0",
2689
+ filePath: "resources/chat/completions/completions.mjs"
2239
2690
  },
2240
2691
  functionQuery: {
2241
- className: "GenkitAI",
2242
- methodName: "embed",
2243
- kind: "Async"
2692
+ className: "Completions",
2693
+ methodName: "stream",
2694
+ kind: "Sync"
2244
2695
  }
2245
2696
  },
2697
+ // Responses API (v4.87.0+)
2246
2698
  {
2247
- channelName: genkitChannels.embedMany.channelName,
2699
+ channelName: openAIChannels.responsesCreate.channelName,
2248
2700
  module: {
2249
- name: "@genkit-ai/ai",
2250
- versionRange: genkitVersionRange,
2251
- filePath: "lib/genkit-ai.mjs"
2701
+ name: "openai",
2702
+ versionRange: ">=4.87.0",
2703
+ filePath: "resources/responses/responses.mjs"
2252
2704
  },
2253
2705
  functionQuery: {
2254
- className: "GenkitAI",
2255
- methodName: "embedMany",
2706
+ className: "Responses",
2707
+ methodName: "create",
2256
2708
  kind: "Async"
2257
2709
  }
2258
2710
  },
2259
2711
  {
2260
- channelName: genkitChannels.embedMany.channelName,
2712
+ channelName: openAIChannels.responsesStream.channelName,
2261
2713
  module: {
2262
- name: "@genkit-ai/ai",
2263
- versionRange: genkitVersionRange,
2264
- filePath: "lib/genkit-ai.js"
2714
+ name: "openai",
2715
+ versionRange: ">=4.87.0",
2716
+ filePath: "resources/responses/responses.mjs"
2265
2717
  },
2266
2718
  functionQuery: {
2267
- className: "GenkitAI",
2268
- methodName: "embedMany",
2269
- kind: "Async"
2719
+ className: "Responses",
2720
+ methodName: "stream",
2721
+ kind: "Sync"
2270
2722
  }
2271
2723
  },
2272
2724
  {
2273
- channelName: genkitChannels.actionRun.channelName,
2725
+ channelName: openAIChannels.responsesParse.channelName,
2274
2726
  module: {
2275
- name: "@genkit-ai/ai",
2276
- versionRange: genkitVersionRange,
2277
- filePath: "lib/genkit-ai.mjs"
2727
+ name: "openai",
2728
+ versionRange: ">=4.87.0",
2729
+ filePath: "resources/responses/responses.mjs"
2278
2730
  },
2279
2731
  functionQuery: {
2280
- className: "GenkitAI",
2281
- methodName: "run",
2732
+ className: "Responses",
2733
+ methodName: "parse",
2282
2734
  kind: "Async"
2283
2735
  }
2284
2736
  },
2285
2737
  {
2286
- channelName: genkitChannels.actionRun.channelName,
2738
+ channelName: openAIChannels.responsesCompact.channelName,
2287
2739
  module: {
2288
- name: "@genkit-ai/ai",
2289
- versionRange: genkitVersionRange,
2290
- filePath: "lib/genkit-ai.js"
2740
+ name: "openai",
2741
+ versionRange: ">=6.10.0",
2742
+ filePath: "resources/responses/responses.mjs"
2291
2743
  },
2292
2744
  functionQuery: {
2293
- className: "GenkitAI",
2294
- methodName: "run",
2745
+ className: "Responses",
2746
+ methodName: "compact",
2295
2747
  kind: "Async"
2296
2748
  }
2297
- },
2749
+ }
2750
+ ];
2751
+
2752
+ // src/instrumentation/plugins/openai-codex-channels.ts
2753
+ var openAICodexChannels = defineChannels("@openai/codex-sdk", {
2754
+ run: channel({
2755
+ channelName: "Thread.run",
2756
+ kind: "async"
2757
+ }),
2758
+ runStreamed: channel({
2759
+ channelName: "Thread.runStreamed",
2760
+ kind: "async"
2761
+ })
2762
+ });
2763
+
2764
+ // src/auto-instrumentations/configs/openai-codex.ts
2765
+ var openAICodexVersionRange = ">=0.128.0 <1.0.0";
2766
+ var openAICodexConfigs = [
2298
2767
  {
2299
- channelName: genkitCoreChannels.actionSpan.channelName,
2768
+ channelName: openAICodexChannels.run.channelName,
2300
2769
  module: {
2301
- name: "@genkit-ai/core",
2302
- versionRange: genkitVersionRange,
2303
- filePath: "lib/tracing/instrumentation.mjs"
2770
+ name: "@openai/codex-sdk",
2771
+ versionRange: openAICodexVersionRange,
2772
+ filePath: "dist/index.js"
2304
2773
  },
2305
2774
  functionQuery: {
2306
- functionName: "runInNewSpan",
2775
+ className: "Thread",
2776
+ methodName: "run",
2307
2777
  kind: "Async"
2308
2778
  }
2309
2779
  },
2310
2780
  {
2311
- channelName: genkitCoreChannels.actionSpan.channelName,
2781
+ channelName: openAICodexChannels.runStreamed.channelName,
2312
2782
  module: {
2313
- name: "@genkit-ai/core",
2314
- versionRange: genkitVersionRange,
2315
- filePath: "lib/tracing/instrumentation.js"
2783
+ name: "@openai/codex-sdk",
2784
+ versionRange: openAICodexVersionRange,
2785
+ filePath: "dist/index.js"
2316
2786
  },
2317
2787
  functionQuery: {
2318
- functionName: "runInNewSpan",
2788
+ className: "Thread",
2789
+ methodName: "runStreamed",
2319
2790
  kind: "Async"
2320
2791
  }
2321
2792
  }
2322
2793
  ];
2323
2794
 
2324
- // src/instrumentation/plugins/github-copilot-channels.ts
2325
- var gitHubCopilotChannels = defineChannels("@github/copilot-sdk", {
2326
- createSession: channel({
2327
- channelName: "client.createSession",
2795
+ // src/instrumentation/plugins/openrouter-channels.ts
2796
+ var openRouterChannels = defineChannels("@openrouter/sdk", {
2797
+ chatSend: channel({
2798
+ channelName: "chat.send",
2328
2799
  kind: "async"
2329
2800
  }),
2330
- resumeSession: channel({
2331
- channelName: "client.resumeSession",
2801
+ embeddingsGenerate: channel({
2802
+ channelName: "embeddings.generate",
2332
2803
  kind: "async"
2333
2804
  }),
2334
- sendAndWait: channel({
2335
- channelName: "session.sendAndWait",
2805
+ rerankRerank: channel(
2806
+ {
2807
+ channelName: "rerank.rerank",
2808
+ kind: "async"
2809
+ }
2810
+ ),
2811
+ betaResponsesSend: channel({
2812
+ channelName: "beta.responses.send",
2813
+ kind: "async"
2814
+ }),
2815
+ callModel: channel({
2816
+ channelName: "callModel",
2817
+ kind: "sync-stream"
2818
+ }),
2819
+ callModelTurn: channel({
2820
+ channelName: "callModel.turn",
2821
+ kind: "async"
2822
+ }),
2823
+ toolExecute: channel({
2824
+ channelName: "tool.execute",
2336
2825
  kind: "async"
2337
2826
  })
2338
2827
  });
2339
2828
 
2340
- // src/auto-instrumentations/configs/github-copilot.ts
2341
- var gitHubCopilotConfigs = [
2342
- // ESM: CopilotClient.createSession
2829
+ // src/auto-instrumentations/configs/openrouter.ts
2830
+ var openRouterConfigs = [
2343
2831
  {
2344
- channelName: gitHubCopilotChannels.createSession.channelName,
2832
+ channelName: openRouterChannels.chatSend.channelName,
2345
2833
  module: {
2346
- name: "@github/copilot-sdk",
2347
- versionRange: ">=0.3.0",
2348
- filePath: "dist/client.js"
2834
+ name: "@openrouter/sdk",
2835
+ versionRange: ">=0.9.11 <1.0.0",
2836
+ filePath: "esm/sdk/chat.js"
2349
2837
  },
2350
2838
  functionQuery: {
2351
- className: "CopilotClient",
2352
- methodName: "createSession",
2839
+ className: "Chat",
2840
+ methodName: "send",
2353
2841
  kind: "Async"
2354
2842
  }
2355
2843
  },
2356
- // CJS: CopilotClient.createSession
2357
2844
  {
2358
- channelName: gitHubCopilotChannels.createSession.channelName,
2845
+ channelName: openRouterChannels.embeddingsGenerate.channelName,
2359
2846
  module: {
2360
- name: "@github/copilot-sdk",
2361
- versionRange: ">=0.3.0",
2362
- filePath: "dist/cjs/client.js"
2847
+ name: "@openrouter/sdk",
2848
+ versionRange: ">=0.9.11 <1.0.0",
2849
+ filePath: "esm/sdk/embeddings.js"
2363
2850
  },
2364
2851
  functionQuery: {
2365
- className: "CopilotClient",
2366
- methodName: "createSession",
2852
+ className: "Embeddings",
2853
+ methodName: "generate",
2367
2854
  kind: "Async"
2368
2855
  }
2369
2856
  },
2370
- // ESM: CopilotClient.resumeSession
2371
2857
  {
2372
- channelName: gitHubCopilotChannels.resumeSession.channelName,
2858
+ channelName: openRouterChannels.rerankRerank.channelName,
2373
2859
  module: {
2374
- name: "@github/copilot-sdk",
2375
- versionRange: ">=0.3.0",
2376
- filePath: "dist/client.js"
2860
+ name: "@openrouter/sdk",
2861
+ versionRange: ">=0.12.0 <1.0.0",
2862
+ filePath: "esm/sdk/rerank.js"
2377
2863
  },
2378
2864
  functionQuery: {
2379
- className: "CopilotClient",
2380
- methodName: "resumeSession",
2865
+ className: "Rerank",
2866
+ methodName: "rerank",
2381
2867
  kind: "Async"
2382
2868
  }
2383
2869
  },
2384
- // CJS: CopilotClient.resumeSession
2385
2870
  {
2386
- channelName: gitHubCopilotChannels.resumeSession.channelName,
2871
+ channelName: openRouterChannels.betaResponsesSend.channelName,
2387
2872
  module: {
2388
- name: "@github/copilot-sdk",
2389
- versionRange: ">=0.3.0",
2390
- filePath: "dist/cjs/client.js"
2873
+ name: "@openrouter/sdk",
2874
+ versionRange: ">=0.9.11 <1.0.0",
2875
+ filePath: "esm/sdk/responses.js"
2391
2876
  },
2392
2877
  functionQuery: {
2393
- className: "CopilotClient",
2394
- methodName: "resumeSession",
2878
+ className: "Responses",
2879
+ methodName: "send",
2395
2880
  kind: "Async"
2396
2881
  }
2397
2882
  },
2398
- // ESM: CopilotSession.sendAndWait
2399
2883
  {
2400
- channelName: gitHubCopilotChannels.sendAndWait.channelName,
2884
+ channelName: openRouterChannels.callModel.channelName,
2401
2885
  module: {
2402
- name: "@github/copilot-sdk",
2403
- versionRange: ">=0.3.0",
2404
- filePath: "dist/session.js"
2886
+ name: "@openrouter/sdk",
2887
+ versionRange: ">=0.9.11 <1.0.0",
2888
+ filePath: "esm/sdk/sdk.js"
2405
2889
  },
2406
2890
  functionQuery: {
2407
- className: "CopilotSession",
2408
- methodName: "sendAndWait",
2409
- kind: "Async"
2891
+ className: "OpenRouter",
2892
+ methodName: "callModel",
2893
+ kind: "Sync"
2410
2894
  }
2411
- },
2412
- // CJS: CopilotSession.sendAndWait
2895
+ }
2896
+ ];
2897
+
2898
+ // src/instrumentation/plugins/openrouter-agent-channels.ts
2899
+ var openRouterAgentChannels = defineChannels("@openrouter/agent", {
2900
+ callModel: channel({
2901
+ channelName: "callModel",
2902
+ kind: "sync-stream"
2903
+ }),
2904
+ callModelTurn: channel({
2905
+ channelName: "callModel.turn",
2906
+ kind: "async"
2907
+ }),
2908
+ toolExecute: channel({
2909
+ channelName: "tool.execute",
2910
+ kind: "async"
2911
+ })
2912
+ });
2913
+
2914
+ // src/auto-instrumentations/configs/openrouter-agent.ts
2915
+ var openRouterAgentConfigs = [
2413
2916
  {
2414
- channelName: gitHubCopilotChannels.sendAndWait.channelName,
2917
+ channelName: openRouterAgentChannels.callModel.channelName,
2415
2918
  module: {
2416
- name: "@github/copilot-sdk",
2417
- versionRange: ">=0.3.0",
2418
- filePath: "dist/cjs/session.js"
2919
+ name: "@openrouter/agent",
2920
+ versionRange: ">=0.1.2",
2921
+ filePath: "esm/inner-loop/call-model.js"
2419
2922
  },
2420
2923
  functionQuery: {
2421
- className: "CopilotSession",
2422
- methodName: "sendAndWait",
2423
- kind: "Async"
2924
+ functionName: "callModel",
2925
+ kind: "Sync"
2424
2926
  }
2425
2927
  }
2426
2928
  ];
2427
2929
 
2930
+ // src/auto-instrumentations/configs/all.ts
2931
+ var defaultInstrumentationConfigGroups = [
2932
+ { integrations: ["openai"], configs: openaiConfigs },
2933
+ {
2934
+ integrations: ["openaiCodexSDK"],
2935
+ configs: openAICodexConfigs
2936
+ },
2937
+ { integrations: ["anthropic"], configs: anthropicConfigs },
2938
+ {
2939
+ integrations: ["aisdk", "vercel"],
2940
+ configs: aiSDKConfigs
2941
+ },
2942
+ {
2943
+ integrations: ["claudeAgentSDK"],
2944
+ configs: claudeAgentSDKConfigs
2945
+ },
2946
+ { integrations: ["cursor", "cursorSDK"], configs: cursorSDKConfigs },
2947
+ { integrations: ["flue"], configs: flueConfigs },
2948
+ {
2949
+ integrations: ["openAIAgents"],
2950
+ configs: openAIAgentsCoreConfigs
2951
+ },
2952
+ {
2953
+ integrations: ["google", "googleGenAI"],
2954
+ configs: googleGenAIConfigs
2955
+ },
2956
+ { integrations: ["huggingface"], configs: huggingFaceConfigs },
2957
+ {
2958
+ integrations: ["langchain", "langgraph"],
2959
+ configs: langchainConfigs
2960
+ },
2961
+ { integrations: ["openrouter"], configs: openRouterConfigs },
2962
+ {
2963
+ integrations: ["openrouterAgent"],
2964
+ configs: openRouterAgentConfigs
2965
+ },
2966
+ { integrations: ["mistral"], configs: mistralConfigs },
2967
+ { integrations: ["googleADK"], configs: googleADKConfigs },
2968
+ { integrations: ["cohere"], configs: cohereConfigs },
2969
+ { integrations: ["groq"], configs: groqConfigs },
2970
+ {
2971
+ integrations: ["genkit"],
2972
+ configs: genkitConfigs
2973
+ },
2974
+ {
2975
+ integrations: ["gitHubCopilot"],
2976
+ configs: gitHubCopilotConfigs
2977
+ }
2978
+ ];
2979
+ function getDefaultInstrumentationConfigs({
2980
+ additionalInstrumentations,
2981
+ disabledIntegrationConfig,
2982
+ disabledIntegrations
2983
+ } = {}) {
2984
+ const disabledConfig = disabledIntegrationConfig ?? (disabledIntegrations ? readDisabledInstrumentationEnvConfig(
2985
+ [...disabledIntegrations].join(",")
2986
+ ).integrations : void 0);
2987
+ return [
2988
+ ...defaultInstrumentationConfigGroups.flatMap(
2989
+ ({ configs, integrations }) => isInstrumentationIntegrationDisabled(disabledConfig, ...integrations) ? [] : configs
2990
+ ),
2991
+ ...additionalInstrumentations ?? []
2992
+ ];
2993
+ }
2994
+
2428
2995
  // src/auto-instrumentations/bundler/webpack-loader.ts
2429
2996
  function getModuleVersion(basedir) {
2430
2997
  try {
@@ -2439,23 +3006,9 @@ function getModuleVersion(basedir) {
2439
3006
  }
2440
3007
  var matcherCache = /* @__PURE__ */ new Map();
2441
3008
  function getMatcher(options) {
2442
- const allInstrumentations = [
2443
- ...openaiConfigs,
2444
- ...anthropicConfigs,
2445
- ...aiSDKConfigs,
2446
- ...claudeAgentSDKConfigs,
2447
- ...cursorSDKConfigs,
2448
- ...googleGenAIConfigs,
2449
- ...huggingFaceConfigs,
2450
- ...openRouterConfigs,
2451
- ...openRouterAgentConfigs,
2452
- ...mistralConfigs,
2453
- ...cohereConfigs,
2454
- ...groqConfigs,
2455
- ...genkitConfigs,
2456
- ...gitHubCopilotConfigs,
2457
- ...options.instrumentations ?? []
2458
- ];
3009
+ const allInstrumentations = getDefaultInstrumentationConfigs({
3010
+ additionalInstrumentations: options.instrumentations
3011
+ });
2459
3012
  const dcModule = options.browser ? "dc-browser" : void 0;
2460
3013
  const configHash = JSON.stringify({ allInstrumentations, dcModule });
2461
3014
  if (matcherCache.has(configHash)) {