braintrust 3.11.0 → 3.13.0

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