braintrust 3.7.0 → 3.7.1

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 (32) hide show
  1. package/dev/dist/index.js +1859 -1338
  2. package/dev/dist/index.mjs +1774 -1253
  3. package/dist/auto-instrumentations/bundler/esbuild.cjs +12 -15
  4. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  5. package/dist/auto-instrumentations/bundler/rollup.cjs +12 -15
  6. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  7. package/dist/auto-instrumentations/bundler/vite.cjs +12 -15
  8. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +12 -15
  10. package/dist/auto-instrumentations/bundler/webpack.cjs +12 -15
  11. package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
  12. package/dist/auto-instrumentations/{chunk-ZK2IYER2.mjs → chunk-NY4CGTN6.mjs} +1 -1
  13. package/dist/auto-instrumentations/{chunk-AKEXR4AL.mjs → chunk-YCKND42U.mjs} +12 -15
  14. package/dist/auto-instrumentations/hook.mjs +12 -15
  15. package/dist/auto-instrumentations/index.cjs +12 -15
  16. package/dist/auto-instrumentations/index.mjs +1 -1
  17. package/dist/browser.d.mts +8 -30
  18. package/dist/browser.d.ts +8 -30
  19. package/dist/browser.js +4836 -6828
  20. package/dist/browser.mjs +4836 -6828
  21. package/dist/cli.js +1507 -986
  22. package/dist/edge-light.js +9173 -11163
  23. package/dist/edge-light.mjs +9173 -11163
  24. package/dist/index.d.mts +8 -30
  25. package/dist/index.d.ts +8 -30
  26. package/dist/index.js +4747 -6739
  27. package/dist/index.mjs +4748 -6740
  28. package/dist/instrumentation/index.js +1735 -1236
  29. package/dist/instrumentation/index.mjs +1735 -1236
  30. package/dist/workerd.js +9173 -11163
  31. package/dist/workerd.mjs +9173 -11163
  32. package/package.json +2 -2
@@ -114,7 +114,7 @@ var DefaultTracingChannel = class {
114
114
  }
115
115
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
116
  tracePromise(fn, _message, thisArg, ...args) {
117
- return Promise.resolve(fn.apply(thisArg, args));
117
+ return fn.apply(thisArg, args);
118
118
  }
119
119
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
120
120
  traceCallback(fn, _position, _message, thisArg, ...args) {
@@ -134,6 +134,7 @@ var iso = {
134
134
  processOn: (_0, _1) => {
135
135
  },
136
136
  basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
137
+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
137
138
  writeln: (text) => console.log(text)
138
139
  };
139
140
  var isomorph_default = iso;
@@ -454,10 +455,6 @@ var aiSDKChannels = defineChannels("ai", {
454
455
  channelName: "streamText",
455
456
  kind: "async"
456
457
  }),
457
- streamTextSync: channel({
458
- channelName: "streamText.sync",
459
- kind: "sync-stream"
460
- }),
461
458
  generateObject: channel({
462
459
  channelName: "generateObject",
463
460
  kind: "async"
@@ -466,10 +463,6 @@ var aiSDKChannels = defineChannels("ai", {
466
463
  channelName: "streamObject",
467
464
  kind: "async"
468
465
  }),
469
- streamObjectSync: channel({
470
- channelName: "streamObject.sync",
471
- kind: "sync-stream"
472
- }),
473
466
  agentGenerate: channel({
474
467
  channelName: "Agent.generate",
475
468
  kind: "async"
@@ -515,7 +508,7 @@ var aiSDKConfigs = [
515
508
  kind: "Async"
516
509
  }
517
510
  },
518
- // streamText - async function
511
+ // streamText - function returning stream
519
512
  {
520
513
  channelName: aiSDKChannels.streamText.channelName,
521
514
  module: {
@@ -529,7 +522,7 @@ var aiSDKConfigs = [
529
522
  }
530
523
  },
531
524
  {
532
- channelName: aiSDKChannels.streamTextSync.channelName,
525
+ channelName: aiSDKChannels.streamText.channelName,
533
526
  module: {
534
527
  name: "ai",
535
528
  versionRange: ">=3.0.0",
@@ -537,7 +530,7 @@ var aiSDKConfigs = [
537
530
  },
538
531
  functionQuery: {
539
532
  functionName: "streamText",
540
- kind: "Sync"
533
+ kind: "Async"
541
534
  }
542
535
  },
543
536
  // generateObject - async function
@@ -565,7 +558,7 @@ var aiSDKConfigs = [
565
558
  kind: "Async"
566
559
  }
567
560
  },
568
- // streamObject - async function
561
+ // streamObject - function returning stream
569
562
  {
570
563
  channelName: aiSDKChannels.streamObject.channelName,
571
564
  module: {
@@ -579,7 +572,7 @@ var aiSDKConfigs = [
579
572
  }
580
573
  },
581
574
  {
582
- channelName: aiSDKChannels.streamObjectSync.channelName,
575
+ channelName: aiSDKChannels.streamObject.channelName,
583
576
  module: {
584
577
  name: "ai",
585
578
  versionRange: ">=3.0.0",
@@ -587,7 +580,7 @@ var aiSDKConfigs = [
587
580
  },
588
581
  functionQuery: {
589
582
  functionName: "streamObject",
590
- kind: "Sync"
583
+ kind: "Async"
591
584
  }
592
585
  },
593
586
  // Agent.generate - async method (v5 only)
@@ -814,6 +807,10 @@ var openRouterChannels = defineChannels("@openrouter/sdk", {
814
807
  channelName: "callModel",
815
808
  kind: "sync-stream"
816
809
  }),
810
+ callModelTurn: channel({
811
+ channelName: "callModel.turn",
812
+ kind: "async"
813
+ }),
817
814
  toolExecute: channel({
818
815
  channelName: "tool.execute",
819
816
  kind: "async"
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-ZK2IYER2.mjs";
4
- import "../chunk-AKEXR4AL.mjs";
3
+ } from "../chunk-NY4CGTN6.mjs";
4
+ import "../chunk-YCKND42U.mjs";
5
5
 
6
6
  // src/auto-instrumentations/bundler/esbuild.ts
7
7
  var esbuildPlugin = unplugin.esbuild;
@@ -114,7 +114,7 @@ var DefaultTracingChannel = class {
114
114
  }
115
115
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
116
  tracePromise(fn, _message, thisArg, ...args) {
117
- return Promise.resolve(fn.apply(thisArg, args));
117
+ return fn.apply(thisArg, args);
118
118
  }
119
119
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
120
120
  traceCallback(fn, _position, _message, thisArg, ...args) {
@@ -134,6 +134,7 @@ var iso = {
134
134
  processOn: (_0, _1) => {
135
135
  },
136
136
  basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
137
+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
137
138
  writeln: (text) => console.log(text)
138
139
  };
139
140
  var isomorph_default = iso;
@@ -454,10 +455,6 @@ var aiSDKChannels = defineChannels("ai", {
454
455
  channelName: "streamText",
455
456
  kind: "async"
456
457
  }),
457
- streamTextSync: channel({
458
- channelName: "streamText.sync",
459
- kind: "sync-stream"
460
- }),
461
458
  generateObject: channel({
462
459
  channelName: "generateObject",
463
460
  kind: "async"
@@ -466,10 +463,6 @@ var aiSDKChannels = defineChannels("ai", {
466
463
  channelName: "streamObject",
467
464
  kind: "async"
468
465
  }),
469
- streamObjectSync: channel({
470
- channelName: "streamObject.sync",
471
- kind: "sync-stream"
472
- }),
473
466
  agentGenerate: channel({
474
467
  channelName: "Agent.generate",
475
468
  kind: "async"
@@ -515,7 +508,7 @@ var aiSDKConfigs = [
515
508
  kind: "Async"
516
509
  }
517
510
  },
518
- // streamText - async function
511
+ // streamText - function returning stream
519
512
  {
520
513
  channelName: aiSDKChannels.streamText.channelName,
521
514
  module: {
@@ -529,7 +522,7 @@ var aiSDKConfigs = [
529
522
  }
530
523
  },
531
524
  {
532
- channelName: aiSDKChannels.streamTextSync.channelName,
525
+ channelName: aiSDKChannels.streamText.channelName,
533
526
  module: {
534
527
  name: "ai",
535
528
  versionRange: ">=3.0.0",
@@ -537,7 +530,7 @@ var aiSDKConfigs = [
537
530
  },
538
531
  functionQuery: {
539
532
  functionName: "streamText",
540
- kind: "Sync"
533
+ kind: "Async"
541
534
  }
542
535
  },
543
536
  // generateObject - async function
@@ -565,7 +558,7 @@ var aiSDKConfigs = [
565
558
  kind: "Async"
566
559
  }
567
560
  },
568
- // streamObject - async function
561
+ // streamObject - function returning stream
569
562
  {
570
563
  channelName: aiSDKChannels.streamObject.channelName,
571
564
  module: {
@@ -579,7 +572,7 @@ var aiSDKConfigs = [
579
572
  }
580
573
  },
581
574
  {
582
- channelName: aiSDKChannels.streamObjectSync.channelName,
575
+ channelName: aiSDKChannels.streamObject.channelName,
583
576
  module: {
584
577
  name: "ai",
585
578
  versionRange: ">=3.0.0",
@@ -587,7 +580,7 @@ var aiSDKConfigs = [
587
580
  },
588
581
  functionQuery: {
589
582
  functionName: "streamObject",
590
- kind: "Sync"
583
+ kind: "Async"
591
584
  }
592
585
  },
593
586
  // Agent.generate - async method (v5 only)
@@ -814,6 +807,10 @@ var openRouterChannels = defineChannels("@openrouter/sdk", {
814
807
  channelName: "callModel",
815
808
  kind: "sync-stream"
816
809
  }),
810
+ callModelTurn: channel({
811
+ channelName: "callModel.turn",
812
+ kind: "async"
813
+ }),
817
814
  toolExecute: channel({
818
815
  channelName: "tool.execute",
819
816
  kind: "async"
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-ZK2IYER2.mjs";
4
- import "../chunk-AKEXR4AL.mjs";
3
+ } from "../chunk-NY4CGTN6.mjs";
4
+ import "../chunk-YCKND42U.mjs";
5
5
 
6
6
  // src/auto-instrumentations/bundler/rollup.ts
7
7
  var rollupPlugin = unplugin.rollup;
@@ -114,7 +114,7 @@ var DefaultTracingChannel = class {
114
114
  }
115
115
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
116
  tracePromise(fn, _message, thisArg, ...args) {
117
- return Promise.resolve(fn.apply(thisArg, args));
117
+ return fn.apply(thisArg, args);
118
118
  }
119
119
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
120
120
  traceCallback(fn, _position, _message, thisArg, ...args) {
@@ -134,6 +134,7 @@ var iso = {
134
134
  processOn: (_0, _1) => {
135
135
  },
136
136
  basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
137
+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
137
138
  writeln: (text) => console.log(text)
138
139
  };
139
140
  var isomorph_default = iso;
@@ -454,10 +455,6 @@ var aiSDKChannels = defineChannels("ai", {
454
455
  channelName: "streamText",
455
456
  kind: "async"
456
457
  }),
457
- streamTextSync: channel({
458
- channelName: "streamText.sync",
459
- kind: "sync-stream"
460
- }),
461
458
  generateObject: channel({
462
459
  channelName: "generateObject",
463
460
  kind: "async"
@@ -466,10 +463,6 @@ var aiSDKChannels = defineChannels("ai", {
466
463
  channelName: "streamObject",
467
464
  kind: "async"
468
465
  }),
469
- streamObjectSync: channel({
470
- channelName: "streamObject.sync",
471
- kind: "sync-stream"
472
- }),
473
466
  agentGenerate: channel({
474
467
  channelName: "Agent.generate",
475
468
  kind: "async"
@@ -515,7 +508,7 @@ var aiSDKConfigs = [
515
508
  kind: "Async"
516
509
  }
517
510
  },
518
- // streamText - async function
511
+ // streamText - function returning stream
519
512
  {
520
513
  channelName: aiSDKChannels.streamText.channelName,
521
514
  module: {
@@ -529,7 +522,7 @@ var aiSDKConfigs = [
529
522
  }
530
523
  },
531
524
  {
532
- channelName: aiSDKChannels.streamTextSync.channelName,
525
+ channelName: aiSDKChannels.streamText.channelName,
533
526
  module: {
534
527
  name: "ai",
535
528
  versionRange: ">=3.0.0",
@@ -537,7 +530,7 @@ var aiSDKConfigs = [
537
530
  },
538
531
  functionQuery: {
539
532
  functionName: "streamText",
540
- kind: "Sync"
533
+ kind: "Async"
541
534
  }
542
535
  },
543
536
  // generateObject - async function
@@ -565,7 +558,7 @@ var aiSDKConfigs = [
565
558
  kind: "Async"
566
559
  }
567
560
  },
568
- // streamObject - async function
561
+ // streamObject - function returning stream
569
562
  {
570
563
  channelName: aiSDKChannels.streamObject.channelName,
571
564
  module: {
@@ -579,7 +572,7 @@ var aiSDKConfigs = [
579
572
  }
580
573
  },
581
574
  {
582
- channelName: aiSDKChannels.streamObjectSync.channelName,
575
+ channelName: aiSDKChannels.streamObject.channelName,
583
576
  module: {
584
577
  name: "ai",
585
578
  versionRange: ">=3.0.0",
@@ -587,7 +580,7 @@ var aiSDKConfigs = [
587
580
  },
588
581
  functionQuery: {
589
582
  functionName: "streamObject",
590
- kind: "Sync"
583
+ kind: "Async"
591
584
  }
592
585
  },
593
586
  // Agent.generate - async method (v5 only)
@@ -814,6 +807,10 @@ var openRouterChannels = defineChannels("@openrouter/sdk", {
814
807
  channelName: "callModel",
815
808
  kind: "sync-stream"
816
809
  }),
810
+ callModelTurn: channel({
811
+ channelName: "callModel.turn",
812
+ kind: "async"
813
+ }),
817
814
  toolExecute: channel({
818
815
  channelName: "tool.execute",
819
816
  kind: "async"
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-ZK2IYER2.mjs";
4
- import "../chunk-AKEXR4AL.mjs";
3
+ } from "../chunk-NY4CGTN6.mjs";
4
+ import "../chunk-YCKND42U.mjs";
5
5
 
6
6
  // src/auto-instrumentations/bundler/vite.ts
7
7
  var vitePlugin = unplugin.vite;
@@ -100,7 +100,7 @@ var DefaultTracingChannel = class {
100
100
  }
101
101
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
102
102
  tracePromise(fn, _message, thisArg, ...args) {
103
- return Promise.resolve(fn.apply(thisArg, args));
103
+ return fn.apply(thisArg, args);
104
104
  }
105
105
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
106
106
  traceCallback(fn, _position, _message, thisArg, ...args) {
@@ -120,6 +120,7 @@ var iso = {
120
120
  processOn: (_0, _1) => {
121
121
  },
122
122
  basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
123
+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
123
124
  writeln: (text) => console.log(text)
124
125
  };
125
126
  var isomorph_default = iso;
@@ -440,10 +441,6 @@ var aiSDKChannels = defineChannels("ai", {
440
441
  channelName: "streamText",
441
442
  kind: "async"
442
443
  }),
443
- streamTextSync: channel({
444
- channelName: "streamText.sync",
445
- kind: "sync-stream"
446
- }),
447
444
  generateObject: channel({
448
445
  channelName: "generateObject",
449
446
  kind: "async"
@@ -452,10 +449,6 @@ var aiSDKChannels = defineChannels("ai", {
452
449
  channelName: "streamObject",
453
450
  kind: "async"
454
451
  }),
455
- streamObjectSync: channel({
456
- channelName: "streamObject.sync",
457
- kind: "sync-stream"
458
- }),
459
452
  agentGenerate: channel({
460
453
  channelName: "Agent.generate",
461
454
  kind: "async"
@@ -501,7 +494,7 @@ var aiSDKConfigs = [
501
494
  kind: "Async"
502
495
  }
503
496
  },
504
- // streamText - async function
497
+ // streamText - function returning stream
505
498
  {
506
499
  channelName: aiSDKChannels.streamText.channelName,
507
500
  module: {
@@ -515,7 +508,7 @@ var aiSDKConfigs = [
515
508
  }
516
509
  },
517
510
  {
518
- channelName: aiSDKChannels.streamTextSync.channelName,
511
+ channelName: aiSDKChannels.streamText.channelName,
519
512
  module: {
520
513
  name: "ai",
521
514
  versionRange: ">=3.0.0",
@@ -523,7 +516,7 @@ var aiSDKConfigs = [
523
516
  },
524
517
  functionQuery: {
525
518
  functionName: "streamText",
526
- kind: "Sync"
519
+ kind: "Async"
527
520
  }
528
521
  },
529
522
  // generateObject - async function
@@ -551,7 +544,7 @@ var aiSDKConfigs = [
551
544
  kind: "Async"
552
545
  }
553
546
  },
554
- // streamObject - async function
547
+ // streamObject - function returning stream
555
548
  {
556
549
  channelName: aiSDKChannels.streamObject.channelName,
557
550
  module: {
@@ -565,7 +558,7 @@ var aiSDKConfigs = [
565
558
  }
566
559
  },
567
560
  {
568
- channelName: aiSDKChannels.streamObjectSync.channelName,
561
+ channelName: aiSDKChannels.streamObject.channelName,
569
562
  module: {
570
563
  name: "ai",
571
564
  versionRange: ">=3.0.0",
@@ -573,7 +566,7 @@ var aiSDKConfigs = [
573
566
  },
574
567
  functionQuery: {
575
568
  functionName: "streamObject",
576
- kind: "Sync"
569
+ kind: "Async"
577
570
  }
578
571
  },
579
572
  // Agent.generate - async method (v5 only)
@@ -800,6 +793,10 @@ var openRouterChannels = defineChannels("@openrouter/sdk", {
800
793
  channelName: "callModel",
801
794
  kind: "sync-stream"
802
795
  }),
796
+ callModelTurn: channel({
797
+ channelName: "callModel.turn",
798
+ kind: "async"
799
+ }),
803
800
  toolExecute: channel({
804
801
  channelName: "tool.execute",
805
802
  kind: "async"
@@ -114,7 +114,7 @@ var DefaultTracingChannel = class {
114
114
  }
115
115
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
116
  tracePromise(fn, _message, thisArg, ...args) {
117
- return Promise.resolve(fn.apply(thisArg, args));
117
+ return fn.apply(thisArg, args);
118
118
  }
119
119
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
120
120
  traceCallback(fn, _position, _message, thisArg, ...args) {
@@ -134,6 +134,7 @@ var iso = {
134
134
  processOn: (_0, _1) => {
135
135
  },
136
136
  basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
137
+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
137
138
  writeln: (text) => console.log(text)
138
139
  };
139
140
  var isomorph_default = iso;
@@ -454,10 +455,6 @@ var aiSDKChannels = defineChannels("ai", {
454
455
  channelName: "streamText",
455
456
  kind: "async"
456
457
  }),
457
- streamTextSync: channel({
458
- channelName: "streamText.sync",
459
- kind: "sync-stream"
460
- }),
461
458
  generateObject: channel({
462
459
  channelName: "generateObject",
463
460
  kind: "async"
@@ -466,10 +463,6 @@ var aiSDKChannels = defineChannels("ai", {
466
463
  channelName: "streamObject",
467
464
  kind: "async"
468
465
  }),
469
- streamObjectSync: channel({
470
- channelName: "streamObject.sync",
471
- kind: "sync-stream"
472
- }),
473
466
  agentGenerate: channel({
474
467
  channelName: "Agent.generate",
475
468
  kind: "async"
@@ -515,7 +508,7 @@ var aiSDKConfigs = [
515
508
  kind: "Async"
516
509
  }
517
510
  },
518
- // streamText - async function
511
+ // streamText - function returning stream
519
512
  {
520
513
  channelName: aiSDKChannels.streamText.channelName,
521
514
  module: {
@@ -529,7 +522,7 @@ var aiSDKConfigs = [
529
522
  }
530
523
  },
531
524
  {
532
- channelName: aiSDKChannels.streamTextSync.channelName,
525
+ channelName: aiSDKChannels.streamText.channelName,
533
526
  module: {
534
527
  name: "ai",
535
528
  versionRange: ">=3.0.0",
@@ -537,7 +530,7 @@ var aiSDKConfigs = [
537
530
  },
538
531
  functionQuery: {
539
532
  functionName: "streamText",
540
- kind: "Sync"
533
+ kind: "Async"
541
534
  }
542
535
  },
543
536
  // generateObject - async function
@@ -565,7 +558,7 @@ var aiSDKConfigs = [
565
558
  kind: "Async"
566
559
  }
567
560
  },
568
- // streamObject - async function
561
+ // streamObject - function returning stream
569
562
  {
570
563
  channelName: aiSDKChannels.streamObject.channelName,
571
564
  module: {
@@ -579,7 +572,7 @@ var aiSDKConfigs = [
579
572
  }
580
573
  },
581
574
  {
582
- channelName: aiSDKChannels.streamObjectSync.channelName,
575
+ channelName: aiSDKChannels.streamObject.channelName,
583
576
  module: {
584
577
  name: "ai",
585
578
  versionRange: ">=3.0.0",
@@ -587,7 +580,7 @@ var aiSDKConfigs = [
587
580
  },
588
581
  functionQuery: {
589
582
  functionName: "streamObject",
590
- kind: "Sync"
583
+ kind: "Async"
591
584
  }
592
585
  },
593
586
  // Agent.generate - async method (v5 only)
@@ -814,6 +807,10 @@ var openRouterChannels = defineChannels("@openrouter/sdk", {
814
807
  channelName: "callModel",
815
808
  kind: "sync-stream"
816
809
  }),
810
+ callModelTurn: channel({
811
+ channelName: "callModel.turn",
812
+ kind: "async"
813
+ }),
817
814
  toolExecute: channel({
818
815
  channelName: "tool.execute",
819
816
  kind: "async"
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-ZK2IYER2.mjs";
4
- import "../chunk-AKEXR4AL.mjs";
3
+ } from "../chunk-NY4CGTN6.mjs";
4
+ import "../chunk-YCKND42U.mjs";
5
5
 
6
6
  // src/auto-instrumentations/bundler/webpack.ts
7
7
  var webpackPlugin = unplugin.webpack;
@@ -5,7 +5,7 @@ import {
5
5
  googleGenAIConfigs,
6
6
  openRouterConfigs,
7
7
  openaiConfigs
8
- } from "./chunk-AKEXR4AL.mjs";
8
+ } from "./chunk-YCKND42U.mjs";
9
9
 
10
10
  // src/auto-instrumentations/bundler/plugin.ts
11
11
  import { createUnplugin } from "unplugin";
@@ -70,7 +70,7 @@ var DefaultTracingChannel = class {
70
70
  }
71
71
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
72
72
  tracePromise(fn, _message, thisArg, ...args) {
73
- return Promise.resolve(fn.apply(thisArg, args));
73
+ return fn.apply(thisArg, args);
74
74
  }
75
75
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
76
  traceCallback(fn, _position, _message, thisArg, ...args) {
@@ -90,6 +90,7 @@ var iso = {
90
90
  processOn: (_0, _1) => {
91
91
  },
92
92
  basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
93
+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
93
94
  writeln: (text) => console.log(text)
94
95
  };
95
96
  var isomorph_default = iso;
@@ -410,10 +411,6 @@ var aiSDKChannels = defineChannels("ai", {
410
411
  channelName: "streamText",
411
412
  kind: "async"
412
413
  }),
413
- streamTextSync: channel({
414
- channelName: "streamText.sync",
415
- kind: "sync-stream"
416
- }),
417
414
  generateObject: channel({
418
415
  channelName: "generateObject",
419
416
  kind: "async"
@@ -422,10 +419,6 @@ var aiSDKChannels = defineChannels("ai", {
422
419
  channelName: "streamObject",
423
420
  kind: "async"
424
421
  }),
425
- streamObjectSync: channel({
426
- channelName: "streamObject.sync",
427
- kind: "sync-stream"
428
- }),
429
422
  agentGenerate: channel({
430
423
  channelName: "Agent.generate",
431
424
  kind: "async"
@@ -471,7 +464,7 @@ var aiSDKConfigs = [
471
464
  kind: "Async"
472
465
  }
473
466
  },
474
- // streamText - async function
467
+ // streamText - function returning stream
475
468
  {
476
469
  channelName: aiSDKChannels.streamText.channelName,
477
470
  module: {
@@ -485,7 +478,7 @@ var aiSDKConfigs = [
485
478
  }
486
479
  },
487
480
  {
488
- channelName: aiSDKChannels.streamTextSync.channelName,
481
+ channelName: aiSDKChannels.streamText.channelName,
489
482
  module: {
490
483
  name: "ai",
491
484
  versionRange: ">=3.0.0",
@@ -493,7 +486,7 @@ var aiSDKConfigs = [
493
486
  },
494
487
  functionQuery: {
495
488
  functionName: "streamText",
496
- kind: "Sync"
489
+ kind: "Async"
497
490
  }
498
491
  },
499
492
  // generateObject - async function
@@ -521,7 +514,7 @@ var aiSDKConfigs = [
521
514
  kind: "Async"
522
515
  }
523
516
  },
524
- // streamObject - async function
517
+ // streamObject - function returning stream
525
518
  {
526
519
  channelName: aiSDKChannels.streamObject.channelName,
527
520
  module: {
@@ -535,7 +528,7 @@ var aiSDKConfigs = [
535
528
  }
536
529
  },
537
530
  {
538
- channelName: aiSDKChannels.streamObjectSync.channelName,
531
+ channelName: aiSDKChannels.streamObject.channelName,
539
532
  module: {
540
533
  name: "ai",
541
534
  versionRange: ">=3.0.0",
@@ -543,7 +536,7 @@ var aiSDKConfigs = [
543
536
  },
544
537
  functionQuery: {
545
538
  functionName: "streamObject",
546
- kind: "Sync"
539
+ kind: "Async"
547
540
  }
548
541
  },
549
542
  // Agent.generate - async method (v5 only)
@@ -770,6 +763,10 @@ var openRouterChannels = defineChannels("@openrouter/sdk", {
770
763
  channelName: "callModel",
771
764
  kind: "sync-stream"
772
765
  }),
766
+ callModelTurn: channel({
767
+ channelName: "callModel.turn",
768
+ kind: "async"
769
+ }),
773
770
  toolExecute: channel({
774
771
  channelName: "tool.execute",
775
772
  kind: "async"