braintrust 3.11.0 → 3.12.0

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