braintrust 3.23.0 → 3.24.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.
- package/dev/dist/index.d.mts +6 -0
- package/dev/dist/index.d.ts +6 -0
- package/dev/dist/index.js +902 -588
- package/dev/dist/index.mjs +320 -6
- package/dist/apply-auto-instrumentation.js +211 -189
- package/dist/apply-auto-instrumentation.mjs +23 -1
- package/dist/auto-instrumentations/bundler/esbuild.cjs +40 -0
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/next.cjs +40 -0
- package/dist/auto-instrumentations/bundler/next.mjs +3 -3
- package/dist/auto-instrumentations/bundler/rollup.cjs +40 -0
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +40 -0
- package/dist/auto-instrumentations/bundler/vite.d.mts +1 -1
- package/dist/auto-instrumentations/bundler/vite.d.ts +1 -1
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +40 -0
- package/dist/auto-instrumentations/bundler/webpack.cjs +40 -0
- package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
- package/dist/auto-instrumentations/{chunk-KIMLYPRW.mjs → chunk-BURMPO7L.mjs} +1 -1
- package/dist/auto-instrumentations/{chunk-YXLNSAMJ.mjs → chunk-F43DNLPD.mjs} +40 -0
- package/dist/auto-instrumentations/{chunk-EXY7QCJD.mjs → chunk-GSZHTAQW.mjs} +1 -1
- package/dist/auto-instrumentations/hook.mjs +150 -1
- package/dist/auto-instrumentations/index.cjs +40 -0
- package/dist/auto-instrumentations/index.mjs +1 -1
- package/dist/browser.d.mts +131 -9
- package/dist/browser.d.ts +131 -9
- package/dist/browser.js +703 -67
- package/dist/browser.mjs +703 -67
- package/dist/{chunk-CDIKAHDZ.js → chunk-7AUY2XWX.js} +21 -1
- package/dist/{chunk-36IPYKMG.mjs → chunk-7F6GCRHH.mjs} +20 -0
- package/dist/{chunk-FZWPFCVE.js → chunk-SU6EHKJV.js} +1085 -801
- package/dist/{chunk-IXL4PMY4.mjs → chunk-XE5FS7QY.mjs} +291 -7
- package/dist/cli.js +328 -10
- package/dist/edge-light.js +703 -67
- package/dist/edge-light.mjs +703 -67
- package/dist/index.d.mts +131 -9
- package/dist/index.d.ts +131 -9
- package/dist/index.js +891 -532
- package/dist/index.mjs +423 -64
- package/dist/instrumentation/index.d.mts +130 -9
- package/dist/instrumentation/index.d.ts +130 -9
- package/dist/instrumentation/index.js +601 -67
- package/dist/instrumentation/index.mjs +601 -67
- package/dist/vitest-evals-reporter.js +17 -16
- package/dist/vitest-evals-reporter.mjs +3 -2
- package/dist/workerd.js +703 -67
- package/dist/workerd.mjs +703 -67
- package/package.json +3 -3
- package/util/dist/index.js +4 -0
- package/util/dist/index.mjs +4 -0
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
googleADKChannels,
|
|
13
13
|
googleGenAIChannels,
|
|
14
14
|
groqChannels,
|
|
15
|
+
harnessAgentChannels,
|
|
15
16
|
huggingFaceChannels,
|
|
16
17
|
isInstrumentationIntegrationDisabled,
|
|
17
18
|
langChainChannels,
|
|
@@ -29,7 +30,7 @@ import {
|
|
|
29
30
|
smithyClientChannels,
|
|
30
31
|
smithyCoreChannels,
|
|
31
32
|
strandsAgentSDKChannels
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7F6GCRHH.mjs";
|
|
33
34
|
|
|
34
35
|
// src/node/apply-auto-instrumentation-entry.ts
|
|
35
36
|
import * as diagnostics_channel from "node:diagnostics_channel";
|
|
@@ -38,6 +39,27 @@ import { pathToFileURL } from "node:url";
|
|
|
38
39
|
|
|
39
40
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
40
41
|
var aiSDKConfigs = [
|
|
42
|
+
// HarnessAgent turn methods are published only from the package's ESM
|
|
43
|
+
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
44
|
+
// the first async method with each public name instead of a class name.
|
|
45
|
+
...[
|
|
46
|
+
["generate", harnessAgentChannels.generate.channelName],
|
|
47
|
+
["stream", harnessAgentChannels.stream.channelName],
|
|
48
|
+
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
49
|
+
["continueStream", harnessAgentChannels.continueStream.channelName]
|
|
50
|
+
].map(([methodName, channelName]) => ({
|
|
51
|
+
channelName,
|
|
52
|
+
module: {
|
|
53
|
+
name: "@ai-sdk/harness",
|
|
54
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
55
|
+
filePath: "dist/agent/index.js"
|
|
56
|
+
},
|
|
57
|
+
functionQuery: {
|
|
58
|
+
methodName,
|
|
59
|
+
kind: "Async",
|
|
60
|
+
index: 0
|
|
61
|
+
}
|
|
62
|
+
})),
|
|
41
63
|
// generateText - async function
|
|
42
64
|
{
|
|
43
65
|
channelName: aiSDKChannels.generateText.channelName,
|
|
@@ -717,6 +717,7 @@ var DefaultChannel = class {
|
|
|
717
717
|
constructor(name) {
|
|
718
718
|
this.name = name;
|
|
719
719
|
}
|
|
720
|
+
name;
|
|
720
721
|
hasSubscribers = false;
|
|
721
722
|
subscribe(_subscription) {
|
|
722
723
|
}
|
|
@@ -913,9 +914,48 @@ var aiSDKChannels = defineChannels("ai", {
|
|
|
913
914
|
kind: "sync-stream"
|
|
914
915
|
})
|
|
915
916
|
});
|
|
917
|
+
var harnessAgentChannels = defineChannels("@ai-sdk/harness", {
|
|
918
|
+
generate: channel({
|
|
919
|
+
channelName: "HarnessAgent.generate",
|
|
920
|
+
kind: "async"
|
|
921
|
+
}),
|
|
922
|
+
stream: channel({
|
|
923
|
+
channelName: "HarnessAgent.stream",
|
|
924
|
+
kind: "async"
|
|
925
|
+
}),
|
|
926
|
+
continueGenerate: channel({
|
|
927
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
928
|
+
kind: "async"
|
|
929
|
+
}),
|
|
930
|
+
continueStream: channel({
|
|
931
|
+
channelName: "HarnessAgent.continueStream",
|
|
932
|
+
kind: "async"
|
|
933
|
+
})
|
|
934
|
+
});
|
|
916
935
|
|
|
917
936
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
918
937
|
var aiSDKConfigs = [
|
|
938
|
+
// HarnessAgent turn methods are published only from the package's ESM
|
|
939
|
+
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
940
|
+
// the first async method with each public name instead of a class name.
|
|
941
|
+
...[
|
|
942
|
+
["generate", harnessAgentChannels.generate.channelName],
|
|
943
|
+
["stream", harnessAgentChannels.stream.channelName],
|
|
944
|
+
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
945
|
+
["continueStream", harnessAgentChannels.continueStream.channelName]
|
|
946
|
+
].map(([methodName, channelName]) => ({
|
|
947
|
+
channelName,
|
|
948
|
+
module: {
|
|
949
|
+
name: "@ai-sdk/harness",
|
|
950
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
951
|
+
filePath: "dist/agent/index.js"
|
|
952
|
+
},
|
|
953
|
+
functionQuery: {
|
|
954
|
+
methodName,
|
|
955
|
+
kind: "Async",
|
|
956
|
+
index: 0
|
|
957
|
+
}
|
|
958
|
+
})),
|
|
919
959
|
// generateText - async function
|
|
920
960
|
{
|
|
921
961
|
channelName: aiSDKChannels.generateText.channelName,
|
|
@@ -718,6 +718,7 @@ var DefaultChannel = class {
|
|
|
718
718
|
constructor(name) {
|
|
719
719
|
this.name = name;
|
|
720
720
|
}
|
|
721
|
+
name;
|
|
721
722
|
hasSubscribers = false;
|
|
722
723
|
subscribe(_subscription) {
|
|
723
724
|
}
|
|
@@ -914,9 +915,48 @@ var aiSDKChannels = defineChannels("ai", {
|
|
|
914
915
|
kind: "sync-stream"
|
|
915
916
|
})
|
|
916
917
|
});
|
|
918
|
+
var harnessAgentChannels = defineChannels("@ai-sdk/harness", {
|
|
919
|
+
generate: channel({
|
|
920
|
+
channelName: "HarnessAgent.generate",
|
|
921
|
+
kind: "async"
|
|
922
|
+
}),
|
|
923
|
+
stream: channel({
|
|
924
|
+
channelName: "HarnessAgent.stream",
|
|
925
|
+
kind: "async"
|
|
926
|
+
}),
|
|
927
|
+
continueGenerate: channel({
|
|
928
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
929
|
+
kind: "async"
|
|
930
|
+
}),
|
|
931
|
+
continueStream: channel({
|
|
932
|
+
channelName: "HarnessAgent.continueStream",
|
|
933
|
+
kind: "async"
|
|
934
|
+
})
|
|
935
|
+
});
|
|
917
936
|
|
|
918
937
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
919
938
|
var aiSDKConfigs = [
|
|
939
|
+
// HarnessAgent turn methods are published only from the package's ESM
|
|
940
|
+
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
941
|
+
// the first async method with each public name instead of a class name.
|
|
942
|
+
...[
|
|
943
|
+
["generate", harnessAgentChannels.generate.channelName],
|
|
944
|
+
["stream", harnessAgentChannels.stream.channelName],
|
|
945
|
+
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
946
|
+
["continueStream", harnessAgentChannels.continueStream.channelName]
|
|
947
|
+
].map(([methodName, channelName]) => ({
|
|
948
|
+
channelName,
|
|
949
|
+
module: {
|
|
950
|
+
name: "@ai-sdk/harness",
|
|
951
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
952
|
+
filePath: "dist/agent/index.js"
|
|
953
|
+
},
|
|
954
|
+
functionQuery: {
|
|
955
|
+
methodName,
|
|
956
|
+
kind: "Async",
|
|
957
|
+
index: 0
|
|
958
|
+
}
|
|
959
|
+
})),
|
|
920
960
|
// generateText - async function
|
|
921
961
|
{
|
|
922
962
|
channelName: aiSDKChannels.generateText.channelName,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
webpackPlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-BURMPO7L.mjs";
|
|
4
|
+
import "../chunk-GSZHTAQW.mjs";
|
|
5
|
+
import "../chunk-F43DNLPD.mjs";
|
|
6
6
|
import "../chunk-M6DLIJ2Z.mjs";
|
|
7
7
|
|
|
8
8
|
// src/auto-instrumentations/bundler/next.ts
|
|
@@ -717,6 +717,7 @@ var DefaultChannel = class {
|
|
|
717
717
|
constructor(name) {
|
|
718
718
|
this.name = name;
|
|
719
719
|
}
|
|
720
|
+
name;
|
|
720
721
|
hasSubscribers = false;
|
|
721
722
|
subscribe(_subscription) {
|
|
722
723
|
}
|
|
@@ -913,9 +914,48 @@ var aiSDKChannels = defineChannels("ai", {
|
|
|
913
914
|
kind: "sync-stream"
|
|
914
915
|
})
|
|
915
916
|
});
|
|
917
|
+
var harnessAgentChannels = defineChannels("@ai-sdk/harness", {
|
|
918
|
+
generate: channel({
|
|
919
|
+
channelName: "HarnessAgent.generate",
|
|
920
|
+
kind: "async"
|
|
921
|
+
}),
|
|
922
|
+
stream: channel({
|
|
923
|
+
channelName: "HarnessAgent.stream",
|
|
924
|
+
kind: "async"
|
|
925
|
+
}),
|
|
926
|
+
continueGenerate: channel({
|
|
927
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
928
|
+
kind: "async"
|
|
929
|
+
}),
|
|
930
|
+
continueStream: channel({
|
|
931
|
+
channelName: "HarnessAgent.continueStream",
|
|
932
|
+
kind: "async"
|
|
933
|
+
})
|
|
934
|
+
});
|
|
916
935
|
|
|
917
936
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
918
937
|
var aiSDKConfigs = [
|
|
938
|
+
// HarnessAgent turn methods are published only from the package's ESM
|
|
939
|
+
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
940
|
+
// the first async method with each public name instead of a class name.
|
|
941
|
+
...[
|
|
942
|
+
["generate", harnessAgentChannels.generate.channelName],
|
|
943
|
+
["stream", harnessAgentChannels.stream.channelName],
|
|
944
|
+
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
945
|
+
["continueStream", harnessAgentChannels.continueStream.channelName]
|
|
946
|
+
].map(([methodName, channelName]) => ({
|
|
947
|
+
channelName,
|
|
948
|
+
module: {
|
|
949
|
+
name: "@ai-sdk/harness",
|
|
950
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
951
|
+
filePath: "dist/agent/index.js"
|
|
952
|
+
},
|
|
953
|
+
functionQuery: {
|
|
954
|
+
methodName,
|
|
955
|
+
kind: "Async",
|
|
956
|
+
index: 0
|
|
957
|
+
}
|
|
958
|
+
})),
|
|
919
959
|
// generateText - async function
|
|
920
960
|
{
|
|
921
961
|
channelName: aiSDKChannels.generateText.channelName,
|
|
@@ -717,6 +717,7 @@ var DefaultChannel = class {
|
|
|
717
717
|
constructor(name) {
|
|
718
718
|
this.name = name;
|
|
719
719
|
}
|
|
720
|
+
name;
|
|
720
721
|
hasSubscribers = false;
|
|
721
722
|
subscribe(_subscription) {
|
|
722
723
|
}
|
|
@@ -913,9 +914,48 @@ var aiSDKChannels = defineChannels("ai", {
|
|
|
913
914
|
kind: "sync-stream"
|
|
914
915
|
})
|
|
915
916
|
});
|
|
917
|
+
var harnessAgentChannels = defineChannels("@ai-sdk/harness", {
|
|
918
|
+
generate: channel({
|
|
919
|
+
channelName: "HarnessAgent.generate",
|
|
920
|
+
kind: "async"
|
|
921
|
+
}),
|
|
922
|
+
stream: channel({
|
|
923
|
+
channelName: "HarnessAgent.stream",
|
|
924
|
+
kind: "async"
|
|
925
|
+
}),
|
|
926
|
+
continueGenerate: channel({
|
|
927
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
928
|
+
kind: "async"
|
|
929
|
+
}),
|
|
930
|
+
continueStream: channel({
|
|
931
|
+
channelName: "HarnessAgent.continueStream",
|
|
932
|
+
kind: "async"
|
|
933
|
+
})
|
|
934
|
+
});
|
|
916
935
|
|
|
917
936
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
918
937
|
var aiSDKConfigs = [
|
|
938
|
+
// HarnessAgent turn methods are published only from the package's ESM
|
|
939
|
+
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
940
|
+
// the first async method with each public name instead of a class name.
|
|
941
|
+
...[
|
|
942
|
+
["generate", harnessAgentChannels.generate.channelName],
|
|
943
|
+
["stream", harnessAgentChannels.stream.channelName],
|
|
944
|
+
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
945
|
+
["continueStream", harnessAgentChannels.continueStream.channelName]
|
|
946
|
+
].map(([methodName, channelName]) => ({
|
|
947
|
+
channelName,
|
|
948
|
+
module: {
|
|
949
|
+
name: "@ai-sdk/harness",
|
|
950
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
951
|
+
filePath: "dist/agent/index.js"
|
|
952
|
+
},
|
|
953
|
+
functionQuery: {
|
|
954
|
+
methodName,
|
|
955
|
+
kind: "Async",
|
|
956
|
+
index: 0
|
|
957
|
+
}
|
|
958
|
+
})),
|
|
919
959
|
// generateText - async function
|
|
920
960
|
{
|
|
921
961
|
channelName: aiSDKChannels.generateText.channelName,
|
|
@@ -7,6 +7,6 @@ type VitePluginOptions = LegacyBundlerPluginOptions;
|
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated Use {@link braintrustVitePlugin} instead.
|
|
9
9
|
*/
|
|
10
|
-
declare const vitePlugin: (options: LegacyBundlerPluginOptions) =>
|
|
10
|
+
declare const vitePlugin: (options: LegacyBundlerPluginOptions) => any;
|
|
11
11
|
|
|
12
12
|
export { type VitePluginOptions, braintrustVitePlugin, vitePlugin };
|
|
@@ -7,6 +7,6 @@ type VitePluginOptions = LegacyBundlerPluginOptions;
|
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated Use {@link braintrustVitePlugin} instead.
|
|
9
9
|
*/
|
|
10
|
-
declare const vitePlugin: (options: LegacyBundlerPluginOptions) =>
|
|
10
|
+
declare const vitePlugin: (options: LegacyBundlerPluginOptions) => any;
|
|
11
11
|
|
|
12
12
|
export { type VitePluginOptions, braintrustVitePlugin, vitePlugin };
|
|
@@ -700,6 +700,7 @@ var DefaultChannel = class {
|
|
|
700
700
|
constructor(name) {
|
|
701
701
|
this.name = name;
|
|
702
702
|
}
|
|
703
|
+
name;
|
|
703
704
|
hasSubscribers = false;
|
|
704
705
|
subscribe(_subscription) {
|
|
705
706
|
}
|
|
@@ -896,9 +897,48 @@ var aiSDKChannels = defineChannels("ai", {
|
|
|
896
897
|
kind: "sync-stream"
|
|
897
898
|
})
|
|
898
899
|
});
|
|
900
|
+
var harnessAgentChannels = defineChannels("@ai-sdk/harness", {
|
|
901
|
+
generate: channel({
|
|
902
|
+
channelName: "HarnessAgent.generate",
|
|
903
|
+
kind: "async"
|
|
904
|
+
}),
|
|
905
|
+
stream: channel({
|
|
906
|
+
channelName: "HarnessAgent.stream",
|
|
907
|
+
kind: "async"
|
|
908
|
+
}),
|
|
909
|
+
continueGenerate: channel({
|
|
910
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
911
|
+
kind: "async"
|
|
912
|
+
}),
|
|
913
|
+
continueStream: channel({
|
|
914
|
+
channelName: "HarnessAgent.continueStream",
|
|
915
|
+
kind: "async"
|
|
916
|
+
})
|
|
917
|
+
});
|
|
899
918
|
|
|
900
919
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
901
920
|
var aiSDKConfigs = [
|
|
921
|
+
// HarnessAgent turn methods are published only from the package's ESM
|
|
922
|
+
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
923
|
+
// the first async method with each public name instead of a class name.
|
|
924
|
+
...[
|
|
925
|
+
["generate", harnessAgentChannels.generate.channelName],
|
|
926
|
+
["stream", harnessAgentChannels.stream.channelName],
|
|
927
|
+
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
928
|
+
["continueStream", harnessAgentChannels.continueStream.channelName]
|
|
929
|
+
].map(([methodName, channelName]) => ({
|
|
930
|
+
channelName,
|
|
931
|
+
module: {
|
|
932
|
+
name: "@ai-sdk/harness",
|
|
933
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
934
|
+
filePath: "dist/agent/index.js"
|
|
935
|
+
},
|
|
936
|
+
functionQuery: {
|
|
937
|
+
methodName,
|
|
938
|
+
kind: "Async",
|
|
939
|
+
index: 0
|
|
940
|
+
}
|
|
941
|
+
})),
|
|
902
942
|
// generateText - async function
|
|
903
943
|
{
|
|
904
944
|
channelName: aiSDKChannels.generateText.channelName,
|
|
@@ -717,6 +717,7 @@ var DefaultChannel = class {
|
|
|
717
717
|
constructor(name) {
|
|
718
718
|
this.name = name;
|
|
719
719
|
}
|
|
720
|
+
name;
|
|
720
721
|
hasSubscribers = false;
|
|
721
722
|
subscribe(_subscription) {
|
|
722
723
|
}
|
|
@@ -913,9 +914,48 @@ var aiSDKChannels = defineChannels("ai", {
|
|
|
913
914
|
kind: "sync-stream"
|
|
914
915
|
})
|
|
915
916
|
});
|
|
917
|
+
var harnessAgentChannels = defineChannels("@ai-sdk/harness", {
|
|
918
|
+
generate: channel({
|
|
919
|
+
channelName: "HarnessAgent.generate",
|
|
920
|
+
kind: "async"
|
|
921
|
+
}),
|
|
922
|
+
stream: channel({
|
|
923
|
+
channelName: "HarnessAgent.stream",
|
|
924
|
+
kind: "async"
|
|
925
|
+
}),
|
|
926
|
+
continueGenerate: channel({
|
|
927
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
928
|
+
kind: "async"
|
|
929
|
+
}),
|
|
930
|
+
continueStream: channel({
|
|
931
|
+
channelName: "HarnessAgent.continueStream",
|
|
932
|
+
kind: "async"
|
|
933
|
+
})
|
|
934
|
+
});
|
|
916
935
|
|
|
917
936
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
918
937
|
var aiSDKConfigs = [
|
|
938
|
+
// HarnessAgent turn methods are published only from the package's ESM
|
|
939
|
+
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
940
|
+
// the first async method with each public name instead of a class name.
|
|
941
|
+
...[
|
|
942
|
+
["generate", harnessAgentChannels.generate.channelName],
|
|
943
|
+
["stream", harnessAgentChannels.stream.channelName],
|
|
944
|
+
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
945
|
+
["continueStream", harnessAgentChannels.continueStream.channelName]
|
|
946
|
+
].map(([methodName, channelName]) => ({
|
|
947
|
+
channelName,
|
|
948
|
+
module: {
|
|
949
|
+
name: "@ai-sdk/harness",
|
|
950
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
951
|
+
filePath: "dist/agent/index.js"
|
|
952
|
+
},
|
|
953
|
+
functionQuery: {
|
|
954
|
+
methodName,
|
|
955
|
+
kind: "Async",
|
|
956
|
+
index: 0
|
|
957
|
+
}
|
|
958
|
+
})),
|
|
919
959
|
// generateText - async function
|
|
920
960
|
{
|
|
921
961
|
channelName: aiSDKChannels.generateText.channelName,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
braintrustWebpackPlugin,
|
|
3
3
|
webpackPlugin
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-BURMPO7L.mjs";
|
|
5
|
+
import "../chunk-GSZHTAQW.mjs";
|
|
6
|
+
import "../chunk-F43DNLPD.mjs";
|
|
7
7
|
import "../chunk-M6DLIJ2Z.mjs";
|
|
8
8
|
export {
|
|
9
9
|
braintrustWebpackPlugin,
|
|
@@ -15,6 +15,7 @@ var DefaultChannel = class {
|
|
|
15
15
|
constructor(name) {
|
|
16
16
|
this.name = name;
|
|
17
17
|
}
|
|
18
|
+
name;
|
|
18
19
|
hasSubscribers = false;
|
|
19
20
|
subscribe(_subscription) {
|
|
20
21
|
}
|
|
@@ -676,9 +677,48 @@ var aiSDKChannels = defineChannels("ai", {
|
|
|
676
677
|
kind: "sync-stream"
|
|
677
678
|
})
|
|
678
679
|
});
|
|
680
|
+
var harnessAgentChannels = defineChannels("@ai-sdk/harness", {
|
|
681
|
+
generate: channel({
|
|
682
|
+
channelName: "HarnessAgent.generate",
|
|
683
|
+
kind: "async"
|
|
684
|
+
}),
|
|
685
|
+
stream: channel({
|
|
686
|
+
channelName: "HarnessAgent.stream",
|
|
687
|
+
kind: "async"
|
|
688
|
+
}),
|
|
689
|
+
continueGenerate: channel({
|
|
690
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
691
|
+
kind: "async"
|
|
692
|
+
}),
|
|
693
|
+
continueStream: channel({
|
|
694
|
+
channelName: "HarnessAgent.continueStream",
|
|
695
|
+
kind: "async"
|
|
696
|
+
})
|
|
697
|
+
});
|
|
679
698
|
|
|
680
699
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
681
700
|
var aiSDKConfigs = [
|
|
701
|
+
// HarnessAgent turn methods are published only from the package's ESM
|
|
702
|
+
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
703
|
+
// the first async method with each public name instead of a class name.
|
|
704
|
+
...[
|
|
705
|
+
["generate", harnessAgentChannels.generate.channelName],
|
|
706
|
+
["stream", harnessAgentChannels.stream.channelName],
|
|
707
|
+
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
708
|
+
["continueStream", harnessAgentChannels.continueStream.channelName]
|
|
709
|
+
].map(([methodName, channelName]) => ({
|
|
710
|
+
channelName,
|
|
711
|
+
module: {
|
|
712
|
+
name: "@ai-sdk/harness",
|
|
713
|
+
versionRange: ">=1.0.0 <2.0.0",
|
|
714
|
+
filePath: "dist/agent/index.js"
|
|
715
|
+
},
|
|
716
|
+
functionQuery: {
|
|
717
|
+
methodName,
|
|
718
|
+
kind: "Async",
|
|
719
|
+
index: 0
|
|
720
|
+
}
|
|
721
|
+
})),
|
|
682
722
|
// generateText - async function
|
|
683
723
|
{
|
|
684
724
|
channelName: aiSDKChannels.generateText.channelName,
|