braintrust 0.2.3 → 0.2.4

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.
@@ -191,6 +191,8 @@ declare class LazyValue<T> {
191
191
  get hasSucceeded(): boolean;
192
192
  }
193
193
 
194
+ /// <reference lib="dom" />
195
+
194
196
  type SetCurrentArg = {
195
197
  setCurrent?: boolean;
196
198
  };
@@ -382,10 +384,10 @@ declare const loginSchema: z.ZodObject<{
382
384
  fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["dirty", "tag", "commit", "branch", "author_name", "author_email", "commit_message", "commit_time", "git_diff"]>, "many">>;
383
385
  }, "strict", z.ZodTypeAny, {
384
386
  collect: "some" | "none" | "all";
385
- fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
387
+ fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
386
388
  }, {
387
389
  collect: "some" | "none" | "all";
388
- fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
390
+ fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
389
391
  }>>>;
390
392
  }, "strict", z.ZodTypeAny, {
391
393
  appUrl: string;
@@ -397,7 +399,7 @@ declare const loginSchema: z.ZodObject<{
397
399
  orgId?: string | null | undefined;
398
400
  gitMetadataSettings?: {
399
401
  collect: "some" | "none" | "all";
400
- fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
402
+ fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
401
403
  } | null | undefined;
402
404
  }, {
403
405
  appUrl: string;
@@ -409,7 +411,7 @@ declare const loginSchema: z.ZodObject<{
409
411
  orgId?: string | null | undefined;
410
412
  gitMetadataSettings?: {
411
413
  collect: "some" | "none" | "all";
412
- fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
414
+ fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
413
415
  } | null | undefined;
414
416
  }>;
415
417
  type SerializedBraintrustState = z.infer<typeof loginSchema>;
@@ -1268,23 +1270,23 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1268
1270
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
1269
1271
  }, "strip", z.ZodTypeAny, {
1270
1272
  url: string;
1271
- detail?: "auto" | "low" | "high" | undefined;
1273
+ detail?: "auto" | "high" | "low" | undefined;
1272
1274
  }, {
1273
1275
  url?: unknown;
1274
- detail?: "auto" | "low" | "high" | undefined;
1276
+ detail?: "auto" | "high" | "low" | undefined;
1275
1277
  }>;
1276
1278
  type: z.ZodLiteral<"image_url">;
1277
1279
  }, "strip", z.ZodTypeAny, {
1278
1280
  type: "image_url";
1279
1281
  image_url: {
1280
1282
  url: string;
1281
- detail?: "auto" | "low" | "high" | undefined;
1283
+ detail?: "auto" | "high" | "low" | undefined;
1282
1284
  };
1283
1285
  }, {
1284
1286
  type: "image_url";
1285
1287
  image_url: {
1286
1288
  url?: unknown;
1287
- detail?: "auto" | "low" | "high" | undefined;
1289
+ detail?: "auto" | "high" | "low" | undefined;
1288
1290
  };
1289
1291
  }>]>, "many">]>;
1290
1292
  role: z.ZodLiteral<"user">;
@@ -1300,7 +1302,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1300
1302
  type: "image_url";
1301
1303
  image_url: {
1302
1304
  url: string;
1303
- detail?: "auto" | "low" | "high" | undefined;
1305
+ detail?: "auto" | "high" | "low" | undefined;
1304
1306
  };
1305
1307
  })[];
1306
1308
  role: "user";
@@ -1318,7 +1320,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1318
1320
  type: "image_url";
1319
1321
  image_url: {
1320
1322
  url?: unknown;
1321
- detail?: "auto" | "low" | "high" | undefined;
1323
+ detail?: "auto" | "high" | "low" | undefined;
1322
1324
  };
1323
1325
  })[] | undefined;
1324
1326
  }>, z.ZodObject<{
@@ -1609,7 +1611,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1609
1611
  type: "image_url";
1610
1612
  image_url: {
1611
1613
  url: string;
1612
- detail?: "auto" | "low" | "high" | undefined;
1614
+ detail?: "auto" | "high" | "low" | undefined;
1613
1615
  };
1614
1616
  })[];
1615
1617
  role: "user";
@@ -1692,7 +1694,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1692
1694
  type: "image_url";
1693
1695
  image_url: {
1694
1696
  url?: unknown;
1695
- detail?: "auto" | "low" | "high" | undefined;
1697
+ detail?: "auto" | "high" | "low" | undefined;
1696
1698
  };
1697
1699
  })[] | undefined;
1698
1700
  } | {
@@ -2420,23 +2422,23 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2420
2422
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
2421
2423
  }, "strip", z.ZodTypeAny, {
2422
2424
  url: string;
2423
- detail?: "auto" | "low" | "high" | undefined;
2425
+ detail?: "auto" | "high" | "low" | undefined;
2424
2426
  }, {
2425
2427
  url?: unknown;
2426
- detail?: "auto" | "low" | "high" | undefined;
2428
+ detail?: "auto" | "high" | "low" | undefined;
2427
2429
  }>;
2428
2430
  type: z.ZodLiteral<"image_url">;
2429
2431
  }, "strip", z.ZodTypeAny, {
2430
2432
  type: "image_url";
2431
2433
  image_url: {
2432
2434
  url: string;
2433
- detail?: "auto" | "low" | "high" | undefined;
2435
+ detail?: "auto" | "high" | "low" | undefined;
2434
2436
  };
2435
2437
  }, {
2436
2438
  type: "image_url";
2437
2439
  image_url: {
2438
2440
  url?: unknown;
2439
- detail?: "auto" | "low" | "high" | undefined;
2441
+ detail?: "auto" | "high" | "low" | undefined;
2440
2442
  };
2441
2443
  }>]>, "many">]>;
2442
2444
  role: z.ZodLiteral<"user">;
@@ -2452,7 +2454,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2452
2454
  type: "image_url";
2453
2455
  image_url: {
2454
2456
  url: string;
2455
- detail?: "auto" | "low" | "high" | undefined;
2457
+ detail?: "auto" | "high" | "low" | undefined;
2456
2458
  };
2457
2459
  })[];
2458
2460
  role: "user";
@@ -2470,7 +2472,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2470
2472
  type: "image_url";
2471
2473
  image_url: {
2472
2474
  url?: unknown;
2473
- detail?: "auto" | "low" | "high" | undefined;
2475
+ detail?: "auto" | "high" | "low" | undefined;
2474
2476
  };
2475
2477
  })[] | undefined;
2476
2478
  }>, z.ZodObject<{
@@ -2761,7 +2763,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2761
2763
  type: "image_url";
2762
2764
  image_url: {
2763
2765
  url: string;
2764
- detail?: "auto" | "low" | "high" | undefined;
2766
+ detail?: "auto" | "high" | "low" | undefined;
2765
2767
  };
2766
2768
  })[];
2767
2769
  role: "user";
@@ -2844,7 +2846,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2844
2846
  type: "image_url";
2845
2847
  image_url: {
2846
2848
  url?: unknown;
2847
- detail?: "auto" | "low" | "high" | undefined;
2849
+ detail?: "auto" | "high" | "low" | undefined;
2848
2850
  };
2849
2851
  })[] | undefined;
2850
2852
  } | {
@@ -3544,7 +3546,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
3544
3546
  type: "image_url";
3545
3547
  image_url: {
3546
3548
  url: string;
3547
- detail?: "auto" | "low" | "high" | undefined;
3549
+ detail?: "auto" | "high" | "low" | undefined;
3548
3550
  };
3549
3551
  })[];
3550
3552
  role: "user";
@@ -3756,7 +3758,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
3756
3758
  type: "image_url";
3757
3759
  image_url: {
3758
3760
  url?: unknown;
3759
- detail?: "auto" | "low" | "high" | undefined;
3761
+ detail?: "auto" | "high" | "low" | undefined;
3760
3762
  };
3761
3763
  })[] | undefined;
3762
3764
  } | {
@@ -191,6 +191,8 @@ declare class LazyValue<T> {
191
191
  get hasSucceeded(): boolean;
192
192
  }
193
193
 
194
+ /// <reference lib="dom" />
195
+
194
196
  type SetCurrentArg = {
195
197
  setCurrent?: boolean;
196
198
  };
@@ -382,10 +384,10 @@ declare const loginSchema: z.ZodObject<{
382
384
  fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["dirty", "tag", "commit", "branch", "author_name", "author_email", "commit_message", "commit_time", "git_diff"]>, "many">>;
383
385
  }, "strict", z.ZodTypeAny, {
384
386
  collect: "some" | "none" | "all";
385
- fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
387
+ fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
386
388
  }, {
387
389
  collect: "some" | "none" | "all";
388
- fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
390
+ fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
389
391
  }>>>;
390
392
  }, "strict", z.ZodTypeAny, {
391
393
  appUrl: string;
@@ -397,7 +399,7 @@ declare const loginSchema: z.ZodObject<{
397
399
  orgId?: string | null | undefined;
398
400
  gitMetadataSettings?: {
399
401
  collect: "some" | "none" | "all";
400
- fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
402
+ fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
401
403
  } | null | undefined;
402
404
  }, {
403
405
  appUrl: string;
@@ -409,7 +411,7 @@ declare const loginSchema: z.ZodObject<{
409
411
  orgId?: string | null | undefined;
410
412
  gitMetadataSettings?: {
411
413
  collect: "some" | "none" | "all";
412
- fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
414
+ fields?: ("branch" | "dirty" | "tag" | "commit" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
413
415
  } | null | undefined;
414
416
  }>;
415
417
  type SerializedBraintrustState = z.infer<typeof loginSchema>;
@@ -1268,23 +1270,23 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1268
1270
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
1269
1271
  }, "strip", z.ZodTypeAny, {
1270
1272
  url: string;
1271
- detail?: "auto" | "low" | "high" | undefined;
1273
+ detail?: "auto" | "high" | "low" | undefined;
1272
1274
  }, {
1273
1275
  url?: unknown;
1274
- detail?: "auto" | "low" | "high" | undefined;
1276
+ detail?: "auto" | "high" | "low" | undefined;
1275
1277
  }>;
1276
1278
  type: z.ZodLiteral<"image_url">;
1277
1279
  }, "strip", z.ZodTypeAny, {
1278
1280
  type: "image_url";
1279
1281
  image_url: {
1280
1282
  url: string;
1281
- detail?: "auto" | "low" | "high" | undefined;
1283
+ detail?: "auto" | "high" | "low" | undefined;
1282
1284
  };
1283
1285
  }, {
1284
1286
  type: "image_url";
1285
1287
  image_url: {
1286
1288
  url?: unknown;
1287
- detail?: "auto" | "low" | "high" | undefined;
1289
+ detail?: "auto" | "high" | "low" | undefined;
1288
1290
  };
1289
1291
  }>]>, "many">]>;
1290
1292
  role: z.ZodLiteral<"user">;
@@ -1300,7 +1302,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1300
1302
  type: "image_url";
1301
1303
  image_url: {
1302
1304
  url: string;
1303
- detail?: "auto" | "low" | "high" | undefined;
1305
+ detail?: "auto" | "high" | "low" | undefined;
1304
1306
  };
1305
1307
  })[];
1306
1308
  role: "user";
@@ -1318,7 +1320,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1318
1320
  type: "image_url";
1319
1321
  image_url: {
1320
1322
  url?: unknown;
1321
- detail?: "auto" | "low" | "high" | undefined;
1323
+ detail?: "auto" | "high" | "low" | undefined;
1322
1324
  };
1323
1325
  })[] | undefined;
1324
1326
  }>, z.ZodObject<{
@@ -1609,7 +1611,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1609
1611
  type: "image_url";
1610
1612
  image_url: {
1611
1613
  url: string;
1612
- detail?: "auto" | "low" | "high" | undefined;
1614
+ detail?: "auto" | "high" | "low" | undefined;
1613
1615
  };
1614
1616
  })[];
1615
1617
  role: "user";
@@ -1692,7 +1694,7 @@ declare const promptDefinitionSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<
1692
1694
  type: "image_url";
1693
1695
  image_url: {
1694
1696
  url?: unknown;
1695
- detail?: "auto" | "low" | "high" | undefined;
1697
+ detail?: "auto" | "high" | "low" | undefined;
1696
1698
  };
1697
1699
  })[] | undefined;
1698
1700
  } | {
@@ -2420,23 +2422,23 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2420
2422
  detail: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"low">, z.ZodLiteral<"high">]>>;
2421
2423
  }, "strip", z.ZodTypeAny, {
2422
2424
  url: string;
2423
- detail?: "auto" | "low" | "high" | undefined;
2425
+ detail?: "auto" | "high" | "low" | undefined;
2424
2426
  }, {
2425
2427
  url?: unknown;
2426
- detail?: "auto" | "low" | "high" | undefined;
2428
+ detail?: "auto" | "high" | "low" | undefined;
2427
2429
  }>;
2428
2430
  type: z.ZodLiteral<"image_url">;
2429
2431
  }, "strip", z.ZodTypeAny, {
2430
2432
  type: "image_url";
2431
2433
  image_url: {
2432
2434
  url: string;
2433
- detail?: "auto" | "low" | "high" | undefined;
2435
+ detail?: "auto" | "high" | "low" | undefined;
2434
2436
  };
2435
2437
  }, {
2436
2438
  type: "image_url";
2437
2439
  image_url: {
2438
2440
  url?: unknown;
2439
- detail?: "auto" | "low" | "high" | undefined;
2441
+ detail?: "auto" | "high" | "low" | undefined;
2440
2442
  };
2441
2443
  }>]>, "many">]>;
2442
2444
  role: z.ZodLiteral<"user">;
@@ -2452,7 +2454,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2452
2454
  type: "image_url";
2453
2455
  image_url: {
2454
2456
  url: string;
2455
- detail?: "auto" | "low" | "high" | undefined;
2457
+ detail?: "auto" | "high" | "low" | undefined;
2456
2458
  };
2457
2459
  })[];
2458
2460
  role: "user";
@@ -2470,7 +2472,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2470
2472
  type: "image_url";
2471
2473
  image_url: {
2472
2474
  url?: unknown;
2473
- detail?: "auto" | "low" | "high" | undefined;
2475
+ detail?: "auto" | "high" | "low" | undefined;
2474
2476
  };
2475
2477
  })[] | undefined;
2476
2478
  }>, z.ZodObject<{
@@ -2761,7 +2763,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2761
2763
  type: "image_url";
2762
2764
  image_url: {
2763
2765
  url: string;
2764
- detail?: "auto" | "low" | "high" | undefined;
2766
+ detail?: "auto" | "high" | "low" | undefined;
2765
2767
  };
2766
2768
  })[];
2767
2769
  role: "user";
@@ -2844,7 +2846,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
2844
2846
  type: "image_url";
2845
2847
  image_url: {
2846
2848
  url?: unknown;
2847
- detail?: "auto" | "low" | "high" | undefined;
2849
+ detail?: "auto" | "high" | "low" | undefined;
2848
2850
  };
2849
2851
  })[] | undefined;
2850
2852
  } | {
@@ -3544,7 +3546,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
3544
3546
  type: "image_url";
3545
3547
  image_url: {
3546
3548
  url: string;
3547
- detail?: "auto" | "low" | "high" | undefined;
3549
+ detail?: "auto" | "high" | "low" | undefined;
3548
3550
  };
3549
3551
  })[];
3550
3552
  role: "user";
@@ -3756,7 +3758,7 @@ declare const evalParametersSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodOb
3756
3758
  type: "image_url";
3757
3759
  image_url: {
3758
3760
  url?: unknown;
3759
- detail?: "auto" | "low" | "high" | undefined;
3761
+ detail?: "auto" | "high" | "low" | undefined;
3760
3762
  };
3761
3763
  })[] | undefined;
3762
3764
  } | {
package/dev/dist/index.js CHANGED
@@ -4441,7 +4441,7 @@ var _cors = require('cors'); var _cors2 = _interopRequireDefault(_cors);
4441
4441
  // src/framework.ts
4442
4442
 
4443
4443
 
4444
- // ../../node_modules/.pnpm/async@3.2.5/node_modules/async/dist/async.mjs
4444
+ // ../node_modules/.pnpm/async@3.2.5/node_modules/async/dist/async.mjs
4445
4445
  function initialParams(fn) {
4446
4446
  return function(...args) {
4447
4447
  var callback = args.pop();
@@ -4441,7 +4441,7 @@ import cors from "cors";
4441
4441
  // src/framework.ts
4442
4442
  import { SpanTypeAttribute as SpanTypeAttribute2, mergeDicts as mergeDicts2 } from "@braintrust/core";
4443
4443
 
4444
- // ../../node_modules/.pnpm/async@3.2.5/node_modules/async/dist/async.mjs
4444
+ // ../node_modules/.pnpm/async@3.2.5/node_modules/async/dist/async.mjs
4445
4445
  function initialParams(fn) {
4446
4446
  return function(...args) {
4447
4447
  var callback = args.pop();