braintrust 3.4.0 → 3.5.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 (50) hide show
  1. package/dev/dist/index.d.mts +45 -5
  2. package/dev/dist/index.d.ts +45 -5
  3. package/dev/dist/index.js +992 -245
  4. package/dev/dist/index.mjs +914 -167
  5. package/dist/auto-instrumentations/bundler/esbuild.cjs +208 -10
  6. package/dist/auto-instrumentations/bundler/esbuild.d.mts +2 -2
  7. package/dist/auto-instrumentations/bundler/esbuild.d.ts +2 -2
  8. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/rollup.cjs +208 -10
  10. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  11. package/dist/auto-instrumentations/bundler/vite.cjs +208 -10
  12. package/dist/auto-instrumentations/bundler/vite.d.mts +2 -2
  13. package/dist/auto-instrumentations/bundler/vite.d.ts +2 -2
  14. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  15. package/dist/auto-instrumentations/bundler/webpack.cjs +208 -10
  16. package/dist/auto-instrumentations/bundler/webpack.d.mts +2 -2
  17. package/dist/auto-instrumentations/bundler/webpack.d.ts +2 -2
  18. package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
  19. package/dist/auto-instrumentations/{chunk-LVWWLUMN.mjs → chunk-DQTPSXJB.mjs} +208 -10
  20. package/dist/auto-instrumentations/chunk-EVUKFMHG.mjs +41 -0
  21. package/dist/auto-instrumentations/{chunk-D5ZPIUEL.mjs → chunk-F3TJZ3Z2.mjs} +1 -1
  22. package/dist/auto-instrumentations/chunk-VLEJ5AEK.mjs +41 -0
  23. package/dist/auto-instrumentations/hook.mjs +238 -18
  24. package/dist/auto-instrumentations/index.cjs +208 -10
  25. package/dist/auto-instrumentations/index.mjs +1 -1
  26. package/dist/auto-instrumentations/loader/cjs-patch.cjs +32 -10
  27. package/dist/auto-instrumentations/loader/cjs-patch.mjs +10 -5
  28. package/dist/auto-instrumentations/loader/esm-hook.mjs +4 -4
  29. package/dist/auto-instrumentations/loader/get-package-version.cjs +28 -8
  30. package/dist/auto-instrumentations/loader/get-package-version.d.mts +2 -1
  31. package/dist/auto-instrumentations/loader/get-package-version.d.ts +2 -1
  32. package/dist/auto-instrumentations/loader/get-package-version.mjs +3 -1
  33. package/dist/browser.d.mts +342 -269
  34. package/dist/browser.d.ts +342 -269
  35. package/dist/browser.js +996 -241
  36. package/dist/browser.mjs +996 -241
  37. package/dist/cli.js +1029 -289
  38. package/dist/edge-light.js +1007 -220
  39. package/dist/edge-light.mjs +1007 -220
  40. package/dist/index.d.mts +342 -269
  41. package/dist/index.d.ts +342 -269
  42. package/dist/index.js +1182 -427
  43. package/dist/index.mjs +996 -241
  44. package/dist/instrumentation/index.js +781 -107
  45. package/dist/instrumentation/index.mjs +781 -107
  46. package/dist/workerd.js +1007 -220
  47. package/dist/workerd.mjs +1007 -220
  48. package/package.json +22 -6
  49. package/dist/auto-instrumentations/chunk-XDBPUTVE.mjs +0 -22
  50. package/dist/auto-instrumentations/chunk-ZEC7BCL4.mjs +0 -22
@@ -55,8 +55,54 @@ var DefaultAsyncLocalStorage = class {
55
55
  return void 0;
56
56
  }
57
57
  };
58
- var DefaultTracingChannel = class {
58
+ var DefaultChannel = class {
59
+ constructor(name) {
60
+ this.name = name;
61
+ }
59
62
  hasSubscribers = false;
63
+ subscribe(_subscription) {
64
+ }
65
+ unsubscribe(_subscription) {
66
+ return false;
67
+ }
68
+ bindStore(_store, _transform) {
69
+ }
70
+ unbindStore(_store) {
71
+ return false;
72
+ }
73
+ publish(_message) {
74
+ }
75
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
+ runStores(_message, fn, thisArg, ...args) {
77
+ return fn.apply(thisArg, args);
78
+ }
79
+ };
80
+ var DefaultTracingChannel = class {
81
+ start;
82
+ end;
83
+ asyncStart;
84
+ asyncEnd;
85
+ error;
86
+ constructor(nameOrChannels) {
87
+ if (typeof nameOrChannels === "string") {
88
+ this.start = new DefaultChannel(`tracing:${nameOrChannels}:start`);
89
+ this.end = new DefaultChannel(`tracing:${nameOrChannels}:end`);
90
+ this.asyncStart = new DefaultChannel(
91
+ `tracing:${nameOrChannels}:asyncStart`
92
+ );
93
+ this.asyncEnd = new DefaultChannel(`tracing:${nameOrChannels}:asyncEnd`);
94
+ this.error = new DefaultChannel(`tracing:${nameOrChannels}:error`);
95
+ return;
96
+ }
97
+ this.start = nameOrChannels.start ?? new DefaultChannel("tracing:start");
98
+ this.end = nameOrChannels.end ?? new DefaultChannel("tracing:end");
99
+ this.asyncStart = nameOrChannels.asyncStart ?? new DefaultChannel("tracing:asyncStart");
100
+ this.asyncEnd = nameOrChannels.asyncEnd ?? new DefaultChannel("tracing:asyncEnd");
101
+ this.error = nameOrChannels.error ?? new DefaultChannel("tracing:error");
102
+ }
103
+ get hasSubscribers() {
104
+ return this.start.hasSubscribers || this.end.hasSubscribers || this.asyncStart.hasSubscribers || this.asyncEnd.hasSubscribers || this.error.hasSubscribers;
105
+ }
60
106
  subscribe(_handlers) {
61
107
  }
62
108
  unsubscribe(_handlers) {
@@ -84,7 +130,7 @@ var iso = {
84
130
  getCallerLocation: () => void 0,
85
131
  newAsyncLocalStorage: () => new DefaultAsyncLocalStorage(),
86
132
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
- newTracingChannel: (_nameOrChannels) => new DefaultTracingChannel(),
133
+ newTracingChannel: (nameOrChannels) => new DefaultTracingChannel(nameOrChannels),
88
134
  processOn: (_0, _1) => {
89
135
  },
90
136
  basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
@@ -394,6 +440,10 @@ var aiSDKChannels = defineChannels("ai", {
394
440
  channelName: "streamText",
395
441
  kind: "async"
396
442
  }),
443
+ streamTextSync: channel({
444
+ channelName: "streamText.sync",
445
+ kind: "sync-stream"
446
+ }),
397
447
  generateObject: channel({
398
448
  channelName: "generateObject",
399
449
  kind: "async"
@@ -402,6 +452,10 @@ var aiSDKChannels = defineChannels("ai", {
402
452
  channelName: "streamObject",
403
453
  kind: "async"
404
454
  }),
455
+ streamObjectSync: channel({
456
+ channelName: "streamObject.sync",
457
+ kind: "sync-stream"
458
+ }),
405
459
  agentGenerate: channel({
406
460
  channelName: "Agent.generate",
407
461
  kind: "async"
@@ -409,6 +463,14 @@ var aiSDKChannels = defineChannels("ai", {
409
463
  agentStream: channel({
410
464
  channelName: "Agent.stream",
411
465
  kind: "async"
466
+ }),
467
+ toolLoopAgentGenerate: channel({
468
+ channelName: "ToolLoopAgent.generate",
469
+ kind: "async"
470
+ }),
471
+ toolLoopAgentStream: channel({
472
+ channelName: "ToolLoopAgent.stream",
473
+ kind: "async"
412
474
  })
413
475
  });
414
476
 
@@ -427,6 +489,18 @@ var aiSDKConfigs = [
427
489
  kind: "Async"
428
490
  }
429
491
  },
492
+ {
493
+ channelName: aiSDKChannels.generateText.channelName,
494
+ module: {
495
+ name: "ai",
496
+ versionRange: ">=3.0.0",
497
+ filePath: "dist/index.js"
498
+ },
499
+ functionQuery: {
500
+ functionName: "generateText",
501
+ kind: "Async"
502
+ }
503
+ },
430
504
  // streamText - async function
431
505
  {
432
506
  channelName: aiSDKChannels.streamText.channelName,
@@ -440,6 +514,18 @@ var aiSDKConfigs = [
440
514
  kind: "Async"
441
515
  }
442
516
  },
517
+ {
518
+ channelName: aiSDKChannels.streamTextSync.channelName,
519
+ module: {
520
+ name: "ai",
521
+ versionRange: ">=3.0.0",
522
+ filePath: "dist/index.js"
523
+ },
524
+ functionQuery: {
525
+ functionName: "streamText",
526
+ kind: "Sync"
527
+ }
528
+ },
443
529
  // generateObject - async function
444
530
  {
445
531
  channelName: aiSDKChannels.generateObject.channelName,
@@ -453,6 +539,18 @@ var aiSDKConfigs = [
453
539
  kind: "Async"
454
540
  }
455
541
  },
542
+ {
543
+ channelName: aiSDKChannels.generateObject.channelName,
544
+ module: {
545
+ name: "ai",
546
+ versionRange: ">=3.0.0",
547
+ filePath: "dist/index.js"
548
+ },
549
+ functionQuery: {
550
+ functionName: "generateObject",
551
+ kind: "Async"
552
+ }
553
+ },
456
554
  // streamObject - async function
457
555
  {
458
556
  channelName: aiSDKChannels.streamObject.channelName,
@@ -466,32 +564,132 @@ var aiSDKConfigs = [
466
564
  kind: "Async"
467
565
  }
468
566
  },
469
- // Agent.generate - async method (v3-v5 only, Agent structure changed in v6)
567
+ {
568
+ channelName: aiSDKChannels.streamObjectSync.channelName,
569
+ module: {
570
+ name: "ai",
571
+ versionRange: ">=3.0.0",
572
+ filePath: "dist/index.js"
573
+ },
574
+ functionQuery: {
575
+ functionName: "streamObject",
576
+ kind: "Sync"
577
+ }
578
+ },
579
+ // Agent.generate - async method (v5 only)
580
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
581
+ // target the first async `generate` method in the file instead of a class name.
470
582
  {
471
583
  channelName: aiSDKChannels.agentGenerate.channelName,
472
584
  module: {
473
585
  name: "ai",
474
- versionRange: ">=3.0.0 <6.0.0",
586
+ versionRange: ">=5.0.0 <6.0.0",
475
587
  filePath: "dist/index.mjs"
476
588
  },
477
589
  functionQuery: {
478
- className: "Agent",
479
590
  methodName: "generate",
480
- kind: "Async"
591
+ kind: "Async",
592
+ index: 0
481
593
  }
482
594
  },
483
- // Agent.stream - async method (v3-v5 only, Agent structure changed in v6)
595
+ {
596
+ channelName: aiSDKChannels.agentGenerate.channelName,
597
+ module: {
598
+ name: "ai",
599
+ versionRange: ">=5.0.0 <6.0.0",
600
+ filePath: "dist/index.js"
601
+ },
602
+ functionQuery: {
603
+ methodName: "generate",
604
+ kind: "Async",
605
+ index: 0
606
+ }
607
+ },
608
+ // Agent.stream - async method (v5 only)
609
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
610
+ // target the first async `stream` method in the file instead of a class name.
484
611
  {
485
612
  channelName: aiSDKChannels.agentStream.channelName,
486
613
  module: {
487
614
  name: "ai",
488
- versionRange: ">=3.0.0 <6.0.0",
615
+ versionRange: ">=5.0.0 <6.0.0",
489
616
  filePath: "dist/index.mjs"
490
617
  },
491
618
  functionQuery: {
492
- className: "Agent",
493
619
  methodName: "stream",
494
- kind: "Async"
620
+ kind: "Async",
621
+ index: 0
622
+ }
623
+ },
624
+ {
625
+ channelName: aiSDKChannels.agentStream.channelName,
626
+ module: {
627
+ name: "ai",
628
+ versionRange: ">=5.0.0 <6.0.0",
629
+ filePath: "dist/index.js"
630
+ },
631
+ functionQuery: {
632
+ methodName: "stream",
633
+ kind: "Async",
634
+ index: 0
635
+ }
636
+ },
637
+ // ToolLoopAgent.generate - async method (v6 only, Experimental_Agent is an alias)
638
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
639
+ // target the first async `generate` method in the file instead of a class name.
640
+ {
641
+ channelName: aiSDKChannels.toolLoopAgentGenerate.channelName,
642
+ module: {
643
+ name: "ai",
644
+ versionRange: ">=6.0.0 <7.0.0",
645
+ filePath: "dist/index.mjs"
646
+ },
647
+ functionQuery: {
648
+ methodName: "generate",
649
+ kind: "Async",
650
+ index: 0
651
+ }
652
+ },
653
+ {
654
+ channelName: aiSDKChannels.toolLoopAgentGenerate.channelName,
655
+ module: {
656
+ name: "ai",
657
+ versionRange: ">=6.0.0 <7.0.0",
658
+ filePath: "dist/index.js"
659
+ },
660
+ functionQuery: {
661
+ methodName: "generate",
662
+ kind: "Async",
663
+ index: 0
664
+ }
665
+ },
666
+ // ToolLoopAgent.stream - async method (v6 only, Experimental_Agent is an alias)
667
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
668
+ // target the first async `stream` method in the file instead of a class name.
669
+ {
670
+ channelName: aiSDKChannels.toolLoopAgentStream.channelName,
671
+ module: {
672
+ name: "ai",
673
+ versionRange: ">=6.0.0 <7.0.0",
674
+ filePath: "dist/index.mjs"
675
+ },
676
+ functionQuery: {
677
+ methodName: "stream",
678
+ kind: "Async",
679
+ index: 0
680
+ }
681
+ },
682
+ {
683
+ channelName: aiSDKChannels.toolLoopAgentStream.channelName,
684
+ module: {
685
+ name: "ai",
686
+ versionRange: ">=6.0.0 <7.0.0",
687
+ filePath: "dist/index.js"
688
+ },
689
+ functionQuery: {
690
+ methodName: "stream",
691
+ kind: "Async",
692
+ index: 0
495
693
  }
496
694
  }
497
695
  ];
@@ -1,8 +1,8 @@
1
- import * as esbuild from 'esbuild';
1
+ import * as unplugin from 'unplugin';
2
2
  import { B as BundlerPluginOptions } from '../plugin-Df3qKIl2.mjs';
3
3
  import '@apm-js-collab/code-transformer';
4
4
 
5
5
  type EsbuildPluginOptions = BundlerPluginOptions;
6
- declare const esbuildPlugin: (options: BundlerPluginOptions) => esbuild.Plugin;
6
+ declare const esbuildPlugin: (options: BundlerPluginOptions) => unplugin.EsbuildPlugin;
7
7
 
8
8
  export { type EsbuildPluginOptions, esbuildPlugin };
@@ -1,8 +1,8 @@
1
- import * as esbuild from 'esbuild';
1
+ import * as unplugin from 'unplugin';
2
2
  import { B as BundlerPluginOptions } from '../plugin-Df3qKIl2.js';
3
3
  import '@apm-js-collab/code-transformer';
4
4
 
5
5
  type EsbuildPluginOptions = BundlerPluginOptions;
6
- declare const esbuildPlugin: (options: BundlerPluginOptions) => esbuild.Plugin;
6
+ declare const esbuildPlugin: (options: BundlerPluginOptions) => unplugin.EsbuildPlugin;
7
7
 
8
8
  export { type EsbuildPluginOptions, esbuildPlugin };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-D5ZPIUEL.mjs";
4
- import "../chunk-LVWWLUMN.mjs";
3
+ } from "../chunk-F3TJZ3Z2.mjs";
4
+ import "../chunk-DQTPSXJB.mjs";
5
5
 
6
6
  // src/auto-instrumentations/bundler/esbuild.ts
7
7
  var esbuildPlugin = unplugin.esbuild;
@@ -55,8 +55,54 @@ var DefaultAsyncLocalStorage = class {
55
55
  return void 0;
56
56
  }
57
57
  };
58
- var DefaultTracingChannel = class {
58
+ var DefaultChannel = class {
59
+ constructor(name) {
60
+ this.name = name;
61
+ }
59
62
  hasSubscribers = false;
63
+ subscribe(_subscription) {
64
+ }
65
+ unsubscribe(_subscription) {
66
+ return false;
67
+ }
68
+ bindStore(_store, _transform) {
69
+ }
70
+ unbindStore(_store) {
71
+ return false;
72
+ }
73
+ publish(_message) {
74
+ }
75
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
+ runStores(_message, fn, thisArg, ...args) {
77
+ return fn.apply(thisArg, args);
78
+ }
79
+ };
80
+ var DefaultTracingChannel = class {
81
+ start;
82
+ end;
83
+ asyncStart;
84
+ asyncEnd;
85
+ error;
86
+ constructor(nameOrChannels) {
87
+ if (typeof nameOrChannels === "string") {
88
+ this.start = new DefaultChannel(`tracing:${nameOrChannels}:start`);
89
+ this.end = new DefaultChannel(`tracing:${nameOrChannels}:end`);
90
+ this.asyncStart = new DefaultChannel(
91
+ `tracing:${nameOrChannels}:asyncStart`
92
+ );
93
+ this.asyncEnd = new DefaultChannel(`tracing:${nameOrChannels}:asyncEnd`);
94
+ this.error = new DefaultChannel(`tracing:${nameOrChannels}:error`);
95
+ return;
96
+ }
97
+ this.start = nameOrChannels.start ?? new DefaultChannel("tracing:start");
98
+ this.end = nameOrChannels.end ?? new DefaultChannel("tracing:end");
99
+ this.asyncStart = nameOrChannels.asyncStart ?? new DefaultChannel("tracing:asyncStart");
100
+ this.asyncEnd = nameOrChannels.asyncEnd ?? new DefaultChannel("tracing:asyncEnd");
101
+ this.error = nameOrChannels.error ?? new DefaultChannel("tracing:error");
102
+ }
103
+ get hasSubscribers() {
104
+ return this.start.hasSubscribers || this.end.hasSubscribers || this.asyncStart.hasSubscribers || this.asyncEnd.hasSubscribers || this.error.hasSubscribers;
105
+ }
60
106
  subscribe(_handlers) {
61
107
  }
62
108
  unsubscribe(_handlers) {
@@ -84,7 +130,7 @@ var iso = {
84
130
  getCallerLocation: () => void 0,
85
131
  newAsyncLocalStorage: () => new DefaultAsyncLocalStorage(),
86
132
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
- newTracingChannel: (_nameOrChannels) => new DefaultTracingChannel(),
133
+ newTracingChannel: (nameOrChannels) => new DefaultTracingChannel(nameOrChannels),
88
134
  processOn: (_0, _1) => {
89
135
  },
90
136
  basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
@@ -394,6 +440,10 @@ var aiSDKChannels = defineChannels("ai", {
394
440
  channelName: "streamText",
395
441
  kind: "async"
396
442
  }),
443
+ streamTextSync: channel({
444
+ channelName: "streamText.sync",
445
+ kind: "sync-stream"
446
+ }),
397
447
  generateObject: channel({
398
448
  channelName: "generateObject",
399
449
  kind: "async"
@@ -402,6 +452,10 @@ var aiSDKChannels = defineChannels("ai", {
402
452
  channelName: "streamObject",
403
453
  kind: "async"
404
454
  }),
455
+ streamObjectSync: channel({
456
+ channelName: "streamObject.sync",
457
+ kind: "sync-stream"
458
+ }),
405
459
  agentGenerate: channel({
406
460
  channelName: "Agent.generate",
407
461
  kind: "async"
@@ -409,6 +463,14 @@ var aiSDKChannels = defineChannels("ai", {
409
463
  agentStream: channel({
410
464
  channelName: "Agent.stream",
411
465
  kind: "async"
466
+ }),
467
+ toolLoopAgentGenerate: channel({
468
+ channelName: "ToolLoopAgent.generate",
469
+ kind: "async"
470
+ }),
471
+ toolLoopAgentStream: channel({
472
+ channelName: "ToolLoopAgent.stream",
473
+ kind: "async"
412
474
  })
413
475
  });
414
476
 
@@ -427,6 +489,18 @@ var aiSDKConfigs = [
427
489
  kind: "Async"
428
490
  }
429
491
  },
492
+ {
493
+ channelName: aiSDKChannels.generateText.channelName,
494
+ module: {
495
+ name: "ai",
496
+ versionRange: ">=3.0.0",
497
+ filePath: "dist/index.js"
498
+ },
499
+ functionQuery: {
500
+ functionName: "generateText",
501
+ kind: "Async"
502
+ }
503
+ },
430
504
  // streamText - async function
431
505
  {
432
506
  channelName: aiSDKChannels.streamText.channelName,
@@ -440,6 +514,18 @@ var aiSDKConfigs = [
440
514
  kind: "Async"
441
515
  }
442
516
  },
517
+ {
518
+ channelName: aiSDKChannels.streamTextSync.channelName,
519
+ module: {
520
+ name: "ai",
521
+ versionRange: ">=3.0.0",
522
+ filePath: "dist/index.js"
523
+ },
524
+ functionQuery: {
525
+ functionName: "streamText",
526
+ kind: "Sync"
527
+ }
528
+ },
443
529
  // generateObject - async function
444
530
  {
445
531
  channelName: aiSDKChannels.generateObject.channelName,
@@ -453,6 +539,18 @@ var aiSDKConfigs = [
453
539
  kind: "Async"
454
540
  }
455
541
  },
542
+ {
543
+ channelName: aiSDKChannels.generateObject.channelName,
544
+ module: {
545
+ name: "ai",
546
+ versionRange: ">=3.0.0",
547
+ filePath: "dist/index.js"
548
+ },
549
+ functionQuery: {
550
+ functionName: "generateObject",
551
+ kind: "Async"
552
+ }
553
+ },
456
554
  // streamObject - async function
457
555
  {
458
556
  channelName: aiSDKChannels.streamObject.channelName,
@@ -466,32 +564,132 @@ var aiSDKConfigs = [
466
564
  kind: "Async"
467
565
  }
468
566
  },
469
- // Agent.generate - async method (v3-v5 only, Agent structure changed in v6)
567
+ {
568
+ channelName: aiSDKChannels.streamObjectSync.channelName,
569
+ module: {
570
+ name: "ai",
571
+ versionRange: ">=3.0.0",
572
+ filePath: "dist/index.js"
573
+ },
574
+ functionQuery: {
575
+ functionName: "streamObject",
576
+ kind: "Sync"
577
+ }
578
+ },
579
+ // Agent.generate - async method (v5 only)
580
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
581
+ // target the first async `generate` method in the file instead of a class name.
470
582
  {
471
583
  channelName: aiSDKChannels.agentGenerate.channelName,
472
584
  module: {
473
585
  name: "ai",
474
- versionRange: ">=3.0.0 <6.0.0",
586
+ versionRange: ">=5.0.0 <6.0.0",
475
587
  filePath: "dist/index.mjs"
476
588
  },
477
589
  functionQuery: {
478
- className: "Agent",
479
590
  methodName: "generate",
480
- kind: "Async"
591
+ kind: "Async",
592
+ index: 0
481
593
  }
482
594
  },
483
- // Agent.stream - async method (v3-v5 only, Agent structure changed in v6)
595
+ {
596
+ channelName: aiSDKChannels.agentGenerate.channelName,
597
+ module: {
598
+ name: "ai",
599
+ versionRange: ">=5.0.0 <6.0.0",
600
+ filePath: "dist/index.js"
601
+ },
602
+ functionQuery: {
603
+ methodName: "generate",
604
+ kind: "Async",
605
+ index: 0
606
+ }
607
+ },
608
+ // Agent.stream - async method (v5 only)
609
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
610
+ // target the first async `stream` method in the file instead of a class name.
484
611
  {
485
612
  channelName: aiSDKChannels.agentStream.channelName,
486
613
  module: {
487
614
  name: "ai",
488
- versionRange: ">=3.0.0 <6.0.0",
615
+ versionRange: ">=5.0.0 <6.0.0",
489
616
  filePath: "dist/index.mjs"
490
617
  },
491
618
  functionQuery: {
492
- className: "Agent",
493
619
  methodName: "stream",
494
- kind: "Async"
620
+ kind: "Async",
621
+ index: 0
622
+ }
623
+ },
624
+ {
625
+ channelName: aiSDKChannels.agentStream.channelName,
626
+ module: {
627
+ name: "ai",
628
+ versionRange: ">=5.0.0 <6.0.0",
629
+ filePath: "dist/index.js"
630
+ },
631
+ functionQuery: {
632
+ methodName: "stream",
633
+ kind: "Async",
634
+ index: 0
635
+ }
636
+ },
637
+ // ToolLoopAgent.generate - async method (v6 only, Experimental_Agent is an alias)
638
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
639
+ // target the first async `generate` method in the file instead of a class name.
640
+ {
641
+ channelName: aiSDKChannels.toolLoopAgentGenerate.channelName,
642
+ module: {
643
+ name: "ai",
644
+ versionRange: ">=6.0.0 <7.0.0",
645
+ filePath: "dist/index.mjs"
646
+ },
647
+ functionQuery: {
648
+ methodName: "generate",
649
+ kind: "Async",
650
+ index: 0
651
+ }
652
+ },
653
+ {
654
+ channelName: aiSDKChannels.toolLoopAgentGenerate.channelName,
655
+ module: {
656
+ name: "ai",
657
+ versionRange: ">=6.0.0 <7.0.0",
658
+ filePath: "dist/index.js"
659
+ },
660
+ functionQuery: {
661
+ methodName: "generate",
662
+ kind: "Async",
663
+ index: 0
664
+ }
665
+ },
666
+ // ToolLoopAgent.stream - async method (v6 only, Experimental_Agent is an alias)
667
+ // The compiled AI SDK bundle emits this as an anonymous class method, so we
668
+ // target the first async `stream` method in the file instead of a class name.
669
+ {
670
+ channelName: aiSDKChannels.toolLoopAgentStream.channelName,
671
+ module: {
672
+ name: "ai",
673
+ versionRange: ">=6.0.0 <7.0.0",
674
+ filePath: "dist/index.mjs"
675
+ },
676
+ functionQuery: {
677
+ methodName: "stream",
678
+ kind: "Async",
679
+ index: 0
680
+ }
681
+ },
682
+ {
683
+ channelName: aiSDKChannels.toolLoopAgentStream.channelName,
684
+ module: {
685
+ name: "ai",
686
+ versionRange: ">=6.0.0 <7.0.0",
687
+ filePath: "dist/index.js"
688
+ },
689
+ functionQuery: {
690
+ methodName: "stream",
691
+ kind: "Async",
692
+ index: 0
495
693
  }
496
694
  }
497
695
  ];
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-D5ZPIUEL.mjs";
4
- import "../chunk-LVWWLUMN.mjs";
3
+ } from "../chunk-F3TJZ3Z2.mjs";
4
+ import "../chunk-DQTPSXJB.mjs";
5
5
 
6
6
  // src/auto-instrumentations/bundler/rollup.ts
7
7
  var rollupPlugin = unplugin.rollup;