braintrust 0.1.1 → 0.2.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.
- package/dev/dist/index.d.mts +26 -24
- package/dev/dist/index.d.ts +26 -24
- package/dev/dist/index.js +34 -14
- package/dev/dist/index.mjs +34 -14
- package/dist/browser.d.mts +80 -76
- package/dist/browser.d.ts +80 -76
- package/dist/browser.js +20 -5
- package/dist/browser.mjs +20 -5
- package/dist/{chunk-WEZHHYVU.js → chunk-CDBUTZMH.js} +94 -94
- package/dist/chunk-NB5AEJPK.mjs +19 -0
- package/dist/{chunk-K3GLD6I7.js → chunk-VKR7HDRS.js} +4 -4
- package/dist/{chunk-64O3VXT4.mjs → chunk-WKBXJQ57.mjs} +94 -94
- package/dist/cli.js +95 -73
- package/dist/getMachineId-bsd-7YM2UMB4.js +37 -0
- package/dist/{getMachineId-bsd-232NBLGZ.mjs → getMachineId-bsd-L7QQYES7.mjs} +4 -4
- package/dist/getMachineId-darwin-QV3NVG7H.js +37 -0
- package/dist/{getMachineId-darwin-C7F2HXMI.mjs → getMachineId-darwin-YXDFFCXM.mjs} +4 -4
- package/dist/getMachineId-linux-HKJ2YLJC.js +29 -0
- package/dist/{getMachineId-linux-VLB6DDHP.mjs → getMachineId-linux-LWEEVKPU.mjs} +3 -3
- package/dist/getMachineId-unsupported-EGJSIDYQ.mjs +20 -0
- package/dist/getMachineId-unsupported-TX34Q66M.js +20 -0
- package/dist/{getMachineId-win-4OSXYWMY.js → getMachineId-win-M5YW2KGK.js} +9 -9
- package/dist/{getMachineId-win-U7W7AAJX.mjs → getMachineId-win-UDA4B6X2.mjs} +4 -4
- package/dist/index.d.mts +212 -98
- package/dist/index.d.ts +212 -98
- package/dist/index.js +783 -465
- package/dist/index.mjs +596 -278
- package/package.json +7 -5
- package/dist/chunk-C527YOOG.mjs +0 -19
- package/dist/getMachineId-bsd-BCB626OV.js +0 -37
- package/dist/getMachineId-darwin-TV4MHNE6.js +0 -37
- package/dist/getMachineId-linux-RTVYWQL7.js +0 -29
- package/dist/getMachineId-unsupported-7RHYOLDR.js +0 -20
- package/dist/getMachineId-unsupported-IF5IGKUD.mjs +0 -20
package/dist/cli.js
CHANGED
|
@@ -31,9 +31,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
));
|
|
32
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
33
|
|
|
34
|
-
//
|
|
34
|
+
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js
|
|
35
35
|
var require_async = __commonJS({
|
|
36
|
-
"
|
|
36
|
+
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) {
|
|
37
37
|
"use strict";
|
|
38
38
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
39
39
|
exports2.read = void 0;
|
|
@@ -73,9 +73,9 @@ var require_async = __commonJS({
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
//
|
|
76
|
+
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js
|
|
77
77
|
var require_sync = __commonJS({
|
|
78
|
-
"
|
|
78
|
+
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) {
|
|
79
79
|
"use strict";
|
|
80
80
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
81
81
|
exports2.read = void 0;
|
|
@@ -101,9 +101,9 @@ var require_sync = __commonJS({
|
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
-
//
|
|
104
|
+
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js
|
|
105
105
|
var require_fs = __commonJS({
|
|
106
|
-
"
|
|
106
|
+
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) {
|
|
107
107
|
"use strict";
|
|
108
108
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
109
109
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
@@ -124,9 +124,9 @@ var require_fs = __commonJS({
|
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
-
//
|
|
127
|
+
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js
|
|
128
128
|
var require_settings = __commonJS({
|
|
129
|
-
"
|
|
129
|
+
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
|
|
130
130
|
"use strict";
|
|
131
131
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
132
132
|
var fs6 = require_fs();
|
|
@@ -146,9 +146,9 @@ var require_settings = __commonJS({
|
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
//
|
|
149
|
+
// ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js
|
|
150
150
|
var require_out = __commonJS({
|
|
151
|
-
"
|
|
151
|
+
"../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js"(exports2) {
|
|
152
152
|
"use strict";
|
|
153
153
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
154
154
|
exports2.statSync = exports2.stat = exports2.Settings = void 0;
|
|
@@ -178,9 +178,9 @@ var require_out = __commonJS({
|
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
|
|
181
|
-
//
|
|
181
|
+
// ../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js
|
|
182
182
|
var require_queue_microtask = __commonJS({
|
|
183
|
-
"
|
|
183
|
+
"../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js"(exports2, module2) {
|
|
184
184
|
"use strict";
|
|
185
185
|
var promise;
|
|
186
186
|
module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => {
|
|
@@ -189,9 +189,9 @@ var require_queue_microtask = __commonJS({
|
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
|
|
192
|
-
//
|
|
192
|
+
// ../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js
|
|
193
193
|
var require_run_parallel = __commonJS({
|
|
194
|
-
"
|
|
194
|
+
"../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js"(exports2, module2) {
|
|
195
195
|
"use strict";
|
|
196
196
|
module2.exports = runParallel;
|
|
197
197
|
var queueMicrotask2 = require_queue_microtask();
|
|
@@ -240,9 +240,9 @@ var require_run_parallel = __commonJS({
|
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
|
|
243
|
-
//
|
|
243
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js
|
|
244
244
|
var require_constants = __commonJS({
|
|
245
|
-
"
|
|
245
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) {
|
|
246
246
|
"use strict";
|
|
247
247
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
248
248
|
exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
|
@@ -260,9 +260,9 @@ var require_constants = __commonJS({
|
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
|
|
263
|
-
//
|
|
263
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js
|
|
264
264
|
var require_fs2 = __commonJS({
|
|
265
|
-
"
|
|
265
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) {
|
|
266
266
|
"use strict";
|
|
267
267
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
268
268
|
exports2.createDirentFromStats = void 0;
|
|
@@ -285,9 +285,9 @@ var require_fs2 = __commonJS({
|
|
|
285
285
|
}
|
|
286
286
|
});
|
|
287
287
|
|
|
288
|
-
//
|
|
288
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js
|
|
289
289
|
var require_utils = __commonJS({
|
|
290
|
-
"
|
|
290
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) {
|
|
291
291
|
"use strict";
|
|
292
292
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
293
293
|
exports2.fs = void 0;
|
|
@@ -296,9 +296,9 @@ var require_utils = __commonJS({
|
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
298
|
|
|
299
|
-
//
|
|
299
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js
|
|
300
300
|
var require_common = __commonJS({
|
|
301
|
-
"
|
|
301
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) {
|
|
302
302
|
"use strict";
|
|
303
303
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
304
304
|
exports2.joinPathSegments = void 0;
|
|
@@ -312,9 +312,9 @@ var require_common = __commonJS({
|
|
|
312
312
|
}
|
|
313
313
|
});
|
|
314
314
|
|
|
315
|
-
//
|
|
315
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js
|
|
316
316
|
var require_async2 = __commonJS({
|
|
317
|
-
"
|
|
317
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) {
|
|
318
318
|
"use strict";
|
|
319
319
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
320
320
|
exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
|
|
@@ -422,9 +422,9 @@ var require_async2 = __commonJS({
|
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
424
|
|
|
425
|
-
//
|
|
425
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js
|
|
426
426
|
var require_sync2 = __commonJS({
|
|
427
|
-
"
|
|
427
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) {
|
|
428
428
|
"use strict";
|
|
429
429
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
430
430
|
exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
|
|
@@ -481,9 +481,9 @@ var require_sync2 = __commonJS({
|
|
|
481
481
|
}
|
|
482
482
|
});
|
|
483
483
|
|
|
484
|
-
//
|
|
484
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js
|
|
485
485
|
var require_fs3 = __commonJS({
|
|
486
|
-
"
|
|
486
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) {
|
|
487
487
|
"use strict";
|
|
488
488
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
489
489
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
@@ -506,9 +506,9 @@ var require_fs3 = __commonJS({
|
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
508
|
|
|
509
|
-
//
|
|
509
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js
|
|
510
510
|
var require_settings2 = __commonJS({
|
|
511
|
-
"
|
|
511
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
|
|
512
512
|
"use strict";
|
|
513
513
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
514
514
|
var path9 = require("path");
|
|
@@ -536,9 +536,9 @@ var require_settings2 = __commonJS({
|
|
|
536
536
|
}
|
|
537
537
|
});
|
|
538
538
|
|
|
539
|
-
//
|
|
539
|
+
// ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js
|
|
540
540
|
var require_out2 = __commonJS({
|
|
541
|
-
"
|
|
541
|
+
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js"(exports2) {
|
|
542
542
|
"use strict";
|
|
543
543
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
544
544
|
exports2.Settings = exports2.scandirSync = exports2.scandir = void 0;
|
|
@@ -568,9 +568,9 @@ var require_out2 = __commonJS({
|
|
|
568
568
|
}
|
|
569
569
|
});
|
|
570
570
|
|
|
571
|
-
//
|
|
571
|
+
// ../../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js
|
|
572
572
|
var require_reusify = __commonJS({
|
|
573
|
-
"
|
|
573
|
+
"../../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js"(exports2, module2) {
|
|
574
574
|
"use strict";
|
|
575
575
|
function reusify(Constructor) {
|
|
576
576
|
var head = new Constructor();
|
|
@@ -599,9 +599,9 @@ var require_reusify = __commonJS({
|
|
|
599
599
|
}
|
|
600
600
|
});
|
|
601
601
|
|
|
602
|
-
//
|
|
602
|
+
// ../../node_modules/.pnpm/fastq@1.16.0/node_modules/fastq/queue.js
|
|
603
603
|
var require_queue = __commonJS({
|
|
604
|
-
"
|
|
604
|
+
"../../node_modules/.pnpm/fastq@1.16.0/node_modules/fastq/queue.js"(exports2, module2) {
|
|
605
605
|
"use strict";
|
|
606
606
|
var reusify = require_reusify();
|
|
607
607
|
function fastqueue(context2, worker, concurrency) {
|
|
@@ -840,9 +840,9 @@ var require_queue = __commonJS({
|
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
842
|
|
|
843
|
-
//
|
|
843
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js
|
|
844
844
|
var require_common2 = __commonJS({
|
|
845
|
-
"
|
|
845
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) {
|
|
846
846
|
"use strict";
|
|
847
847
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
848
848
|
exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0;
|
|
@@ -874,9 +874,9 @@ var require_common2 = __commonJS({
|
|
|
874
874
|
}
|
|
875
875
|
});
|
|
876
876
|
|
|
877
|
-
//
|
|
877
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js
|
|
878
878
|
var require_reader = __commonJS({
|
|
879
|
-
"
|
|
879
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) {
|
|
880
880
|
"use strict";
|
|
881
881
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
882
882
|
var common = require_common2();
|
|
@@ -891,9 +891,9 @@ var require_reader = __commonJS({
|
|
|
891
891
|
}
|
|
892
892
|
});
|
|
893
893
|
|
|
894
|
-
//
|
|
894
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js
|
|
895
895
|
var require_async3 = __commonJS({
|
|
896
|
-
"
|
|
896
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) {
|
|
897
897
|
"use strict";
|
|
898
898
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
899
899
|
var events_1 = require("events");
|
|
@@ -994,9 +994,9 @@ var require_async3 = __commonJS({
|
|
|
994
994
|
}
|
|
995
995
|
});
|
|
996
996
|
|
|
997
|
-
//
|
|
997
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js
|
|
998
998
|
var require_async4 = __commonJS({
|
|
999
|
-
"
|
|
999
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) {
|
|
1000
1000
|
"use strict";
|
|
1001
1001
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1002
1002
|
var async_1 = require_async3();
|
|
@@ -1030,9 +1030,9 @@ var require_async4 = __commonJS({
|
|
|
1030
1030
|
}
|
|
1031
1031
|
});
|
|
1032
1032
|
|
|
1033
|
-
//
|
|
1033
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js
|
|
1034
1034
|
var require_stream = __commonJS({
|
|
1035
|
-
"
|
|
1035
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) {
|
|
1036
1036
|
"use strict";
|
|
1037
1037
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1038
1038
|
var stream_1 = require("stream");
|
|
@@ -1071,9 +1071,9 @@ var require_stream = __commonJS({
|
|
|
1071
1071
|
}
|
|
1072
1072
|
});
|
|
1073
1073
|
|
|
1074
|
-
//
|
|
1074
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js
|
|
1075
1075
|
var require_sync3 = __commonJS({
|
|
1076
|
-
"
|
|
1076
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) {
|
|
1077
1077
|
"use strict";
|
|
1078
1078
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1079
1079
|
var fsScandir = require_out2();
|
|
@@ -1135,9 +1135,9 @@ var require_sync3 = __commonJS({
|
|
|
1135
1135
|
}
|
|
1136
1136
|
});
|
|
1137
1137
|
|
|
1138
|
-
//
|
|
1138
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js
|
|
1139
1139
|
var require_sync4 = __commonJS({
|
|
1140
|
-
"
|
|
1140
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) {
|
|
1141
1141
|
"use strict";
|
|
1142
1142
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1143
1143
|
var sync_1 = require_sync3();
|
|
@@ -1155,9 +1155,9 @@ var require_sync4 = __commonJS({
|
|
|
1155
1155
|
}
|
|
1156
1156
|
});
|
|
1157
1157
|
|
|
1158
|
-
//
|
|
1158
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js
|
|
1159
1159
|
var require_settings3 = __commonJS({
|
|
1160
|
-
"
|
|
1160
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
|
|
1161
1161
|
"use strict";
|
|
1162
1162
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1163
1163
|
var path9 = require("path");
|
|
@@ -1187,9 +1187,9 @@ var require_settings3 = __commonJS({
|
|
|
1187
1187
|
}
|
|
1188
1188
|
});
|
|
1189
1189
|
|
|
1190
|
-
//
|
|
1190
|
+
// ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js
|
|
1191
1191
|
var require_out3 = __commonJS({
|
|
1192
|
-
"
|
|
1192
|
+
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js"(exports2) {
|
|
1193
1193
|
"use strict";
|
|
1194
1194
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1195
1195
|
exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0;
|
|
@@ -1232,7 +1232,7 @@ var require_package = __commonJS({
|
|
|
1232
1232
|
"package.json"(exports2, module2) {
|
|
1233
1233
|
module2.exports = {
|
|
1234
1234
|
name: "braintrust",
|
|
1235
|
-
version: "0.
|
|
1235
|
+
version: "0.2.1",
|
|
1236
1236
|
description: "SDK for integrating Braintrust",
|
|
1237
1237
|
repository: {
|
|
1238
1238
|
type: "git",
|
|
@@ -1283,11 +1283,13 @@ var require_package = __commonJS({
|
|
|
1283
1283
|
docs: "npx typedoc --options typedoc.json src/index.ts",
|
|
1284
1284
|
prepublishOnly: "../../scripts/node_prepublish_sdk.py",
|
|
1285
1285
|
postpublish: "../../scripts/node_postpublish_sdk.py",
|
|
1286
|
-
test: "vitest run --exclude src/wrappers/anthropic.test.ts --exclude src/wrappers/oai.test.ts --exclude src/otel.test.ts --exclude src/otel-no-deps.test.ts",
|
|
1286
|
+
test: "vitest run --exclude src/wrappers/anthropic.test.ts --exclude src/wrappers/oai.test.ts --exclude src/otel.test.ts --exclude src/otel-no-deps.test.ts --exclude src/wrappers/ai-sdk-v1.test.ts --exclude src/wrappers/ai-sdk-v2.test.ts",
|
|
1287
1287
|
"test:anthropic": "vitest run src/wrappers/anthropic.test.ts",
|
|
1288
1288
|
"test:openai": "vitest run src/wrappers/oai.test.ts",
|
|
1289
1289
|
"test:otel": "vitest run src/otel.test.ts",
|
|
1290
|
-
"test:otel-no-deps": "vitest run src/otel-no-deps.test.ts --reporter=verbose"
|
|
1290
|
+
"test:otel-no-deps": "vitest run src/otel-no-deps.test.ts --reporter=verbose",
|
|
1291
|
+
"test:ai-sdk-v1": "vitest run src/wrappers/ai-sdk-v1.test.ts",
|
|
1292
|
+
"test:ai-sdk-v2": "vitest run src/wrappers/ai-sdk-v2.test.ts src/wrappers/ai-sdk-v1.test.ts"
|
|
1291
1293
|
},
|
|
1292
1294
|
author: "",
|
|
1293
1295
|
license: "MIT",
|
|
@@ -1322,7 +1324,7 @@ var require_package = __commonJS({
|
|
|
1322
1324
|
},
|
|
1323
1325
|
dependencies: {
|
|
1324
1326
|
"@ai-sdk/provider": "^1.1.3",
|
|
1325
|
-
"@braintrust/core": "0.0.
|
|
1327
|
+
"@braintrust/core": "0.0.91",
|
|
1326
1328
|
"@next/env": "^14.2.3",
|
|
1327
1329
|
"@vercel/functions": "^1.0.2",
|
|
1328
1330
|
argparse: "^2.0.1",
|
|
@@ -1330,7 +1332,7 @@ var require_package = __commonJS({
|
|
|
1330
1332
|
"cli-progress": "^3.12.0",
|
|
1331
1333
|
cors: "^2.8.5",
|
|
1332
1334
|
dotenv: "^16.4.5",
|
|
1333
|
-
esbuild: "^0.25.
|
|
1335
|
+
esbuild: "^0.25.8",
|
|
1334
1336
|
"eventsource-parser": "^1.1.2",
|
|
1335
1337
|
express: "^4.21.2",
|
|
1336
1338
|
"graceful-fs": "^4.2.11",
|
|
@@ -5571,7 +5573,7 @@ var BarProgressReporter = class {
|
|
|
5571
5573
|
// src/framework.ts
|
|
5572
5574
|
var import_core4 = require("@braintrust/core");
|
|
5573
5575
|
|
|
5574
|
-
//
|
|
5576
|
+
// ../../node_modules/.pnpm/async@3.2.5/node_modules/async/dist/async.mjs
|
|
5575
5577
|
function initialParams(fn) {
|
|
5576
5578
|
return function(...args) {
|
|
5577
5579
|
var callback = args.pop();
|
|
@@ -7265,14 +7267,20 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
7265
7267
|
} else {
|
|
7266
7268
|
data = dataResult;
|
|
7267
7269
|
}
|
|
7268
|
-
|
|
7269
|
-
(datum) => [...Array(evaluator.trialCount ?? 1).keys()].map(() =>
|
|
7270
|
+
const dataWithTrials = data.filter((d) => filters.every((f) => evaluateFilter(d, f))).flatMap(
|
|
7271
|
+
(datum) => [...Array(evaluator.trialCount ?? 1).keys()].map((trialIndex) => ({
|
|
7272
|
+
datum,
|
|
7273
|
+
trialIndex
|
|
7274
|
+
}))
|
|
7270
7275
|
);
|
|
7271
|
-
progressReporter.start(evaluator.evalName,
|
|
7276
|
+
progressReporter.start(evaluator.evalName, dataWithTrials.length);
|
|
7272
7277
|
const results = [];
|
|
7273
7278
|
const q = queue(
|
|
7274
7279
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7275
|
-
async (
|
|
7280
|
+
async ({
|
|
7281
|
+
datum,
|
|
7282
|
+
trialIndex
|
|
7283
|
+
}) => {
|
|
7276
7284
|
const eventDataset = experiment ? experiment.dataset : Dataset.isDataset(evaluator.data) ? evaluator.data : void 0;
|
|
7277
7285
|
const baseEvent = {
|
|
7278
7286
|
name: "eval",
|
|
@@ -7321,7 +7329,8 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
7321
7329
|
name: evaluator.evalName,
|
|
7322
7330
|
object_type: "task"
|
|
7323
7331
|
});
|
|
7324
|
-
}
|
|
7332
|
+
},
|
|
7333
|
+
trialIndex
|
|
7325
7334
|
});
|
|
7326
7335
|
if (outputResult instanceof Promise) {
|
|
7327
7336
|
output = await outputResult;
|
|
@@ -7471,9 +7480,9 @@ async function runEvaluatorInternal(experiment, evaluator, progressReporter, fil
|
|
|
7471
7480
|
return await experiment.traced(callback, baseEvent);
|
|
7472
7481
|
}
|
|
7473
7482
|
},
|
|
7474
|
-
Math.max(evaluator.maxConcurrency ??
|
|
7483
|
+
Math.max(evaluator.maxConcurrency ?? dataWithTrials.length, 1)
|
|
7475
7484
|
);
|
|
7476
|
-
q.push(
|
|
7485
|
+
q.push(dataWithTrials);
|
|
7477
7486
|
const cancel = async () => {
|
|
7478
7487
|
await new Promise((_, reject2) => {
|
|
7479
7488
|
if (evaluator.timeout) {
|
|
@@ -7692,7 +7701,7 @@ async function getBaseBranchAncestor(remote = void 0) {
|
|
|
7692
7701
|
return void 0;
|
|
7693
7702
|
}
|
|
7694
7703
|
}
|
|
7695
|
-
async function getPastNAncestors(n =
|
|
7704
|
+
async function getPastNAncestors(n = 1e3, remote = void 0) {
|
|
7696
7705
|
const git = await currentRepo();
|
|
7697
7706
|
if (git === null) {
|
|
7698
7707
|
return [];
|
|
@@ -7709,7 +7718,7 @@ async function getPastNAncestors(n = 10, remote = void 0) {
|
|
|
7709
7718
|
if (!ancestor) {
|
|
7710
7719
|
return [];
|
|
7711
7720
|
}
|
|
7712
|
-
const commits = await git.log({ from: ancestor, to: "HEAD" });
|
|
7721
|
+
const commits = await git.log({ from: ancestor, to: "HEAD", maxCount: n });
|
|
7713
7722
|
return commits.all.map((c) => c.hash);
|
|
7714
7723
|
}
|
|
7715
7724
|
async function attempt(fn) {
|
|
@@ -8868,6 +8877,8 @@ var evalBodySchema = import_zod8.z.object({
|
|
|
8868
8877
|
name: import_zod8.z.string()
|
|
8869
8878
|
})
|
|
8870
8879
|
).nullish(),
|
|
8880
|
+
experiment_name: import_zod8.z.string().nullish(),
|
|
8881
|
+
project_id: import_zod8.z.string().nullish(),
|
|
8871
8882
|
parent: import_typespecs6.invokeParent.optional(),
|
|
8872
8883
|
stream: import_zod8.z.boolean().optional()
|
|
8873
8884
|
});
|
|
@@ -8950,7 +8961,16 @@ function runDevServer(evaluators, opts) {
|
|
|
8950
8961
|
"/eval",
|
|
8951
8962
|
checkAuthorized,
|
|
8952
8963
|
asyncHandler(async (req, res) => {
|
|
8953
|
-
const {
|
|
8964
|
+
const {
|
|
8965
|
+
name,
|
|
8966
|
+
parameters,
|
|
8967
|
+
parent,
|
|
8968
|
+
experiment_name,
|
|
8969
|
+
project_id,
|
|
8970
|
+
data,
|
|
8971
|
+
scores,
|
|
8972
|
+
stream
|
|
8973
|
+
} = evalBodySchema.parse(req.body);
|
|
8954
8974
|
const state = await cachedLogin({ apiKey: req.ctx?.token });
|
|
8955
8975
|
const evaluator = allEvaluators[name];
|
|
8956
8976
|
if (!evaluator) {
|
|
@@ -9009,17 +9029,19 @@ function runDevServer(evaluators, opts) {
|
|
|
9009
9029
|
) ?? []
|
|
9010
9030
|
),
|
|
9011
9031
|
task,
|
|
9012
|
-
state
|
|
9032
|
+
state,
|
|
9033
|
+
experimentName: experiment_name ?? void 0,
|
|
9034
|
+
projectId: project_id ?? void 0
|
|
9013
9035
|
},
|
|
9014
9036
|
{
|
|
9015
9037
|
// Avoid printing the bar to the console.
|
|
9016
9038
|
progress: {
|
|
9017
|
-
start: (
|
|
9039
|
+
start: () => {
|
|
9018
9040
|
},
|
|
9019
9041
|
stop: () => {
|
|
9020
9042
|
console.log("Finished running experiment");
|
|
9021
9043
|
},
|
|
9022
|
-
increment: (
|
|
9044
|
+
increment: () => {
|
|
9023
9045
|
}
|
|
9024
9046
|
},
|
|
9025
9047
|
stream: (data2) => {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkVKR7HDRSjs = require('./chunk-VKR7HDRS.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkCDBUTZMHjs = require('./chunk-CDBUTZMH.js');
|
|
10
|
+
|
|
11
|
+
// ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js
|
|
12
|
+
var _fs = require('fs');
|
|
13
|
+
async function getMachineId() {
|
|
14
|
+
try {
|
|
15
|
+
const result = await _fs.promises.readFile("/etc/hostid", { encoding: "utf8" });
|
|
16
|
+
return result.trim();
|
|
17
|
+
} catch (e) {
|
|
18
|
+
_chunkCDBUTZMHjs.diag.debug(`error reading machine id: ${e}`);
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const result = await _chunkVKR7HDRSjs.execAsync.call(void 0, "kenv -q smbios.system.uuid");
|
|
22
|
+
return result.stdout.trim();
|
|
23
|
+
} catch (e) {
|
|
24
|
+
_chunkCDBUTZMHjs.diag.debug(`error reading machine id: ${e}`);
|
|
25
|
+
}
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
var init_getMachineId_bsd = _chunkCDBUTZMHjs.__esm.call(void 0, {
|
|
29
|
+
"../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js"() {
|
|
30
|
+
_chunkVKR7HDRSjs.init_execAsync.call(void 0, );
|
|
31
|
+
_chunkCDBUTZMHjs.init_esm.call(void 0, );
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
init_getMachineId_bsd();
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
exports.getMachineId = getMachineId;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
execAsync,
|
|
3
3
|
init_execAsync
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NB5AEJPK.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__esm,
|
|
7
7
|
diag,
|
|
8
8
|
init_esm
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WKBXJQ57.mjs";
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js
|
|
12
12
|
import { promises as fs } from "fs";
|
|
13
13
|
async function getMachineId() {
|
|
14
14
|
try {
|
|
@@ -26,7 +26,7 @@ async function getMachineId() {
|
|
|
26
26
|
return void 0;
|
|
27
27
|
}
|
|
28
28
|
var init_getMachineId_bsd = __esm({
|
|
29
|
-
"
|
|
29
|
+
"../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-bsd.js"() {
|
|
30
30
|
init_execAsync();
|
|
31
31
|
init_esm();
|
|
32
32
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkVKR7HDRSjs = require('./chunk-VKR7HDRS.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkCDBUTZMHjs = require('./chunk-CDBUTZMH.js');
|
|
10
|
+
|
|
11
|
+
// ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js
|
|
12
|
+
async function getMachineId() {
|
|
13
|
+
try {
|
|
14
|
+
const result = await _chunkVKR7HDRSjs.execAsync.call(void 0, 'ioreg -rd1 -c "IOPlatformExpertDevice"');
|
|
15
|
+
const idLine = result.stdout.split("\n").find((line) => line.includes("IOPlatformUUID"));
|
|
16
|
+
if (!idLine) {
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
const parts = idLine.split('" = "');
|
|
20
|
+
if (parts.length === 2) {
|
|
21
|
+
return parts[1].slice(0, -1);
|
|
22
|
+
}
|
|
23
|
+
} catch (e) {
|
|
24
|
+
_chunkCDBUTZMHjs.diag.debug(`error reading machine id: ${e}`);
|
|
25
|
+
}
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
var init_getMachineId_darwin = _chunkCDBUTZMHjs.__esm.call(void 0, {
|
|
29
|
+
"../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js"() {
|
|
30
|
+
_chunkVKR7HDRSjs.init_execAsync.call(void 0, );
|
|
31
|
+
_chunkCDBUTZMHjs.init_esm.call(void 0, );
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
init_getMachineId_darwin();
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
exports.getMachineId = getMachineId;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
execAsync,
|
|
3
3
|
init_execAsync
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NB5AEJPK.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__esm,
|
|
7
7
|
diag,
|
|
8
8
|
init_esm
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WKBXJQ57.mjs";
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js
|
|
12
12
|
async function getMachineId() {
|
|
13
13
|
try {
|
|
14
14
|
const result = await execAsync('ioreg -rd1 -c "IOPlatformExpertDevice"');
|
|
@@ -26,7 +26,7 @@ async function getMachineId() {
|
|
|
26
26
|
return void 0;
|
|
27
27
|
}
|
|
28
28
|
var init_getMachineId_darwin = __esm({
|
|
29
|
-
"
|
|
29
|
+
"../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-darwin.js"() {
|
|
30
30
|
init_execAsync();
|
|
31
31
|
init_esm();
|
|
32
32
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkCDBUTZMHjs = require('./chunk-CDBUTZMH.js');
|
|
6
|
+
|
|
7
|
+
// ../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js
|
|
8
|
+
var _fs = require('fs');
|
|
9
|
+
async function getMachineId() {
|
|
10
|
+
const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
|
|
11
|
+
for (const path of paths) {
|
|
12
|
+
try {
|
|
13
|
+
const result = await _fs.promises.readFile(path, { encoding: "utf8" });
|
|
14
|
+
return result.trim();
|
|
15
|
+
} catch (e) {
|
|
16
|
+
_chunkCDBUTZMHjs.diag.debug(`error reading machine id: ${e}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return void 0;
|
|
20
|
+
}
|
|
21
|
+
var init_getMachineId_linux = _chunkCDBUTZMHjs.__esm.call(void 0, {
|
|
22
|
+
"../../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/detectors/platform/node/machine-id/getMachineId-linux.js"() {
|
|
23
|
+
_chunkCDBUTZMHjs.init_esm.call(void 0, );
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
init_getMachineId_linux();
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
exports.getMachineId = getMachineId;
|