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