braintrust 3.11.0 → 3.13.0

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