braintrust 3.27.0 → 3.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +1 -1
  2. package/dev/dist/index.d.mts +879 -197
  3. package/dev/dist/index.d.ts +879 -197
  4. package/dev/dist/index.js +2960 -1865
  5. package/dev/dist/index.mjs +2217 -1122
  6. package/dist/apply-auto-instrumentation.js +345 -260
  7. package/dist/apply-auto-instrumentation.mjs +137 -52
  8. package/dist/auto-instrumentations/bundler/esbuild.cjs +124 -7
  9. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  10. package/dist/auto-instrumentations/bundler/next.cjs +124 -7
  11. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  12. package/dist/auto-instrumentations/bundler/rollup.cjs +124 -7
  13. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  14. package/dist/auto-instrumentations/bundler/vite.cjs +124 -7
  15. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  16. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +124 -7
  17. package/dist/auto-instrumentations/bundler/webpack.cjs +124 -7
  18. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  19. package/dist/auto-instrumentations/{chunk-ZNHTSSGI.mjs → chunk-AOIYCVEL.mjs} +34 -3
  20. package/dist/auto-instrumentations/{chunk-XEYKUBLY.mjs → chunk-DKTGDNA7.mjs} +91 -5
  21. package/dist/auto-instrumentations/{chunk-BW33ULMW.mjs → chunk-OMCZ3MV2.mjs} +1 -1
  22. package/dist/auto-instrumentations/hook.mjs +1186 -161
  23. package/dist/auto-instrumentations/index.cjs +34 -3
  24. package/dist/auto-instrumentations/index.mjs +1 -1
  25. package/dist/browser.d.mts +1388 -75
  26. package/dist/browser.d.ts +1388 -75
  27. package/dist/browser.js +3954 -1124
  28. package/dist/browser.mjs +3954 -1124
  29. package/dist/{chunk-MF7NU6BT.js → chunk-6Z5S7VOU.js} +175 -25
  30. package/dist/{chunk-CZM5JIQL.mjs → chunk-7FA6VP2S.mjs} +172 -22
  31. package/dist/{chunk-YKD22IMR.mjs → chunk-M6XPNJC4.mjs} +2102 -1113
  32. package/dist/{chunk-QRHGVBKU.js → chunk-XLLGRXGR.js} +3273 -2284
  33. package/dist/cli.js +6353 -1483
  34. package/dist/edge-light.d.mts +1 -1
  35. package/dist/edge-light.d.ts +1 -1
  36. package/dist/edge-light.js +3954 -1124
  37. package/dist/edge-light.mjs +3954 -1124
  38. package/dist/index.d.mts +1972 -659
  39. package/dist/index.d.ts +1972 -659
  40. package/dist/index.js +2453 -676
  41. package/dist/index.mjs +1973 -196
  42. package/dist/instrumentation/index.d.mts +738 -15
  43. package/dist/instrumentation/index.d.ts +738 -15
  44. package/dist/instrumentation/index.js +2791 -874
  45. package/dist/instrumentation/index.mjs +2791 -874
  46. package/dist/vitest-evals-reporter.js +16 -16
  47. package/dist/vitest-evals-reporter.mjs +2 -2
  48. package/dist/workerd.d.mts +1 -1
  49. package/dist/workerd.d.ts +1 -1
  50. package/dist/workerd.js +3954 -1124
  51. package/dist/workerd.mjs +3954 -1124
  52. package/package.json +2 -3
  53. package/util/dist/index.d.mts +1596 -109
  54. package/util/dist/index.d.ts +1596 -109
package/dist/index.d.mts CHANGED
@@ -169,16 +169,108 @@ declare const AsyncScoringControl: z.ZodUnion<[z.ZodObject<{
169
169
  token: z.ZodString;
170
170
  function_ids: z.ZodArray<z.ZodUnknown, "many">;
171
171
  skip_logging: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
172
+ triggered_functions: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodObject<{
173
+ triggered_xact_id: z.ZodString;
174
+ completed_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
175
+ idempotency_key: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
176
+ attempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
177
+ scope: z.ZodUnion<[z.ZodObject<{
178
+ type: z.ZodLiteral<"span">;
179
+ }, "strip", z.ZodTypeAny, {
180
+ type: "span";
181
+ }, {
182
+ type: "span";
183
+ }>, z.ZodObject<{
184
+ type: z.ZodLiteral<"trace">;
185
+ }, "strip", z.ZodTypeAny, {
186
+ type: "trace";
187
+ }, {
188
+ type: "trace";
189
+ }>, z.ZodObject<{
190
+ type: z.ZodLiteral<"group">;
191
+ key: z.ZodString;
192
+ value: z.ZodString;
193
+ }, "strip", z.ZodTypeAny, {
194
+ value: string;
195
+ type: "group";
196
+ key: string;
197
+ }, {
198
+ value: string;
199
+ type: "group";
200
+ key: string;
201
+ }>]>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ triggered_xact_id: string;
204
+ attempts: number;
205
+ scope: {
206
+ type: "span";
207
+ } | {
208
+ type: "trace";
209
+ } | {
210
+ value: string;
211
+ type: "group";
212
+ key: string;
213
+ };
214
+ completed_xact_id?: string | null | undefined;
215
+ idempotency_key?: string | null | undefined;
216
+ }, {
217
+ triggered_xact_id: string;
218
+ scope: {
219
+ type: "span";
220
+ } | {
221
+ type: "trace";
222
+ } | {
223
+ value: string;
224
+ type: "group";
225
+ key: string;
226
+ };
227
+ completed_xact_id?: string | null | undefined;
228
+ idempotency_key?: string | null | undefined;
229
+ attempts?: number | undefined;
230
+ }>>, z.ZodNull]>>;
231
+ last_triggered_xact_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNull]>>;
172
232
  }, "strip", z.ZodTypeAny, {
173
233
  status: "enabled";
174
234
  token: string;
175
235
  function_ids: unknown[];
176
236
  skip_logging?: boolean | null | undefined;
237
+ triggered_functions?: Record<string, {
238
+ triggered_xact_id: string;
239
+ attempts: number;
240
+ scope: {
241
+ type: "span";
242
+ } | {
243
+ type: "trace";
244
+ } | {
245
+ value: string;
246
+ type: "group";
247
+ key: string;
248
+ };
249
+ completed_xact_id?: string | null | undefined;
250
+ idempotency_key?: string | null | undefined;
251
+ }> | null | undefined;
252
+ last_triggered_xact_id?: string | number | null | undefined;
177
253
  }, {
178
254
  status: "enabled";
179
255
  token: string;
180
256
  function_ids: unknown[];
181
257
  skip_logging?: boolean | null | undefined;
258
+ triggered_functions?: Record<string, {
259
+ triggered_xact_id: string;
260
+ scope: {
261
+ type: "span";
262
+ } | {
263
+ type: "trace";
264
+ } | {
265
+ value: string;
266
+ type: "group";
267
+ key: string;
268
+ };
269
+ completed_xact_id?: string | null | undefined;
270
+ idempotency_key?: string | null | undefined;
271
+ attempts?: number | undefined;
272
+ }> | null | undefined;
273
+ last_triggered_xact_id?: string | number | null | undefined;
182
274
  }>, z.ZodObject<{
183
275
  status: z.ZodLiteral<"disabled">;
184
276
  }, "strip", z.ZodTypeAny, {
@@ -193,6 +285,22 @@ declare const AsyncScoringControl: z.ZodUnion<[z.ZodObject<{
193
285
  token: string;
194
286
  function_ids: unknown[];
195
287
  skip_logging?: boolean | null | undefined;
288
+ triggered_functions?: Record<string, {
289
+ triggered_xact_id: string;
290
+ attempts: number;
291
+ scope: {
292
+ type: "span";
293
+ } | {
294
+ type: "trace";
295
+ } | {
296
+ value: string;
297
+ type: "group";
298
+ key: string;
299
+ };
300
+ completed_xact_id?: string | null | undefined;
301
+ idempotency_key?: string | null | undefined;
302
+ }> | null | undefined;
303
+ last_triggered_xact_id?: string | number | null | undefined;
196
304
  } | {
197
305
  status: "disabled";
198
306
  } | null;
@@ -203,6 +311,22 @@ declare const AsyncScoringControl: z.ZodUnion<[z.ZodObject<{
203
311
  token: string;
204
312
  function_ids: unknown[];
205
313
  skip_logging?: boolean | null | undefined;
314
+ triggered_functions?: Record<string, {
315
+ triggered_xact_id: string;
316
+ scope: {
317
+ type: "span";
318
+ } | {
319
+ type: "trace";
320
+ } | {
321
+ value: string;
322
+ type: "group";
323
+ key: string;
324
+ };
325
+ completed_xact_id?: string | null | undefined;
326
+ idempotency_key?: string | null | undefined;
327
+ attempts?: number | undefined;
328
+ }> | null | undefined;
329
+ last_triggered_xact_id?: string | number | null | undefined;
206
330
  } | {
207
331
  status: "disabled";
208
332
  } | null;
@@ -219,26 +343,83 @@ declare const AsyncScoringControl: z.ZodUnion<[z.ZodObject<{
219
343
  }, {
220
344
  kind: "state_enabled_force_rescore";
221
345
  }>, z.ZodObject<{
222
- kind: z.ZodLiteral<"add_triggered_functions">;
223
- triggered_function_ids: z.ZodArray<z.ZodUnknown, "many">;
346
+ kind: z.ZodLiteral<"trigger_functions">;
347
+ triggered_functions: z.ZodArray<z.ZodObject<{
348
+ function_id: z.ZodOptional<z.ZodUnknown>;
349
+ scope: z.ZodUnion<[z.ZodObject<{
350
+ type: z.ZodLiteral<"span">;
351
+ }, "strip", z.ZodTypeAny, {
352
+ type: "span";
353
+ }, {
354
+ type: "span";
355
+ }>, z.ZodObject<{
356
+ type: z.ZodLiteral<"trace">;
357
+ }, "strip", z.ZodTypeAny, {
358
+ type: "trace";
359
+ }, {
360
+ type: "trace";
361
+ }>]>;
362
+ idempotency_key: z.ZodOptional<z.ZodString>;
363
+ }, "strip", z.ZodTypeAny, {
364
+ scope: {
365
+ type: "span";
366
+ } | {
367
+ type: "trace";
368
+ };
369
+ idempotency_key?: string | undefined;
370
+ function_id?: unknown;
371
+ }, {
372
+ scope: {
373
+ type: "span";
374
+ } | {
375
+ type: "trace";
376
+ };
377
+ idempotency_key?: string | undefined;
378
+ function_id?: unknown;
379
+ }>, "many">;
224
380
  }, "strip", z.ZodTypeAny, {
225
- kind: "add_triggered_functions";
226
- triggered_function_ids: unknown[];
381
+ kind: "trigger_functions";
382
+ triggered_functions: {
383
+ scope: {
384
+ type: "span";
385
+ } | {
386
+ type: "trace";
387
+ };
388
+ idempotency_key?: string | undefined;
389
+ function_id?: unknown;
390
+ }[];
227
391
  }, {
228
- kind: "add_triggered_functions";
229
- triggered_function_ids: unknown[];
392
+ kind: "trigger_functions";
393
+ triggered_functions: {
394
+ scope: {
395
+ type: "span";
396
+ } | {
397
+ type: "trace";
398
+ };
399
+ idempotency_key?: string | undefined;
400
+ function_id?: unknown;
401
+ }[];
230
402
  }>, z.ZodObject<{
231
403
  kind: z.ZodLiteral<"complete_triggered_functions">;
232
404
  function_ids: z.ZodArray<z.ZodUnknown, "many">;
233
405
  triggered_xact_id: z.ZodString;
234
406
  }, "strip", z.ZodTypeAny, {
235
- function_ids: unknown[];
236
407
  kind: "complete_triggered_functions";
237
408
  triggered_xact_id: string;
238
- }, {
239
409
  function_ids: unknown[];
410
+ }, {
240
411
  kind: "complete_triggered_functions";
241
412
  triggered_xact_id: string;
413
+ function_ids: unknown[];
414
+ }>, z.ZodObject<{
415
+ kind: z.ZodLiteral<"mark_attempt_failed">;
416
+ function_ids: z.ZodArray<z.ZodUnknown, "many">;
417
+ }, "strip", z.ZodTypeAny, {
418
+ kind: "mark_attempt_failed";
419
+ function_ids: unknown[];
420
+ }, {
421
+ kind: "mark_attempt_failed";
422
+ function_ids: unknown[];
242
423
  }>]>;
243
424
  type AsyncScoringControlType = z.infer<typeof AsyncScoringControl>;
244
425
  declare const ObjectReference$1: z.ZodObject<{
@@ -719,13 +900,13 @@ declare const AnyModelParams: z.ZodObject<{
719
900
  verbosity?: "low" | "medium" | "high" | undefined;
720
901
  top_k?: number | undefined;
721
902
  stop_sequences?: string[] | undefined;
903
+ reasoning_enabled?: boolean | undefined;
904
+ reasoning_budget?: number | undefined;
722
905
  max_tokens_to_sample?: number | undefined;
723
906
  maxOutputTokens?: number | undefined;
724
907
  topP?: number | undefined;
725
908
  topK?: number | undefined;
726
909
  use_cache?: boolean | undefined;
727
- reasoning_enabled?: boolean | undefined;
728
- reasoning_budget?: number | undefined;
729
910
  }, {
730
911
  max_tokens: number;
731
912
  temperature?: number | undefined;
@@ -761,13 +942,13 @@ declare const AnyModelParams: z.ZodObject<{
761
942
  verbosity?: "low" | "medium" | "high" | undefined;
762
943
  top_k?: number | undefined;
763
944
  stop_sequences?: string[] | undefined;
945
+ reasoning_enabled?: boolean | undefined;
946
+ reasoning_budget?: number | undefined;
764
947
  max_tokens_to_sample?: number | undefined;
765
948
  maxOutputTokens?: number | undefined;
766
949
  topP?: number | undefined;
767
950
  topK?: number | undefined;
768
951
  use_cache?: boolean | undefined;
769
- reasoning_enabled?: boolean | undefined;
770
- reasoning_budget?: number | undefined;
771
952
  }>;
772
953
  type AnyModelParamsType = z.infer<typeof AnyModelParams>;
773
954
  declare const BraintrustAttachmentReference: z.ZodObject<{
@@ -777,14 +958,14 @@ declare const BraintrustAttachmentReference: z.ZodObject<{
777
958
  key: z.ZodString;
778
959
  }, "strip", z.ZodTypeAny, {
779
960
  type: "braintrust_attachment";
961
+ key: string;
780
962
  filename: string;
781
963
  content_type: string;
782
- key: string;
783
964
  }, {
784
965
  type: "braintrust_attachment";
966
+ key: string;
785
967
  filename: string;
786
968
  content_type: string;
787
- key: string;
788
969
  }>;
789
970
  type BraintrustAttachmentReferenceType = z.infer<typeof BraintrustAttachmentReference>;
790
971
  declare const ExternalAttachmentReference: z.ZodObject<{
@@ -811,14 +992,14 @@ declare const AttachmentReference: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
811
992
  key: z.ZodString;
812
993
  }, "strip", z.ZodTypeAny, {
813
994
  type: "braintrust_attachment";
995
+ key: string;
814
996
  filename: string;
815
997
  content_type: string;
816
- key: string;
817
998
  }, {
818
999
  type: "braintrust_attachment";
1000
+ key: string;
819
1001
  filename: string;
820
1002
  content_type: string;
821
- key: string;
822
1003
  }>, z.ZodObject<{
823
1004
  type: z.ZodLiteral<"external_attachment">;
824
1005
  filename: z.ZodString;
@@ -849,6 +1030,32 @@ declare const AttachmentStatus: z.ZodObject<{
849
1030
  type AttachmentStatusType = z.infer<typeof AttachmentStatus>;
850
1031
  declare const FunctionTypeEnum: z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>;
851
1032
  type FunctionTypeEnumType = z.infer<typeof FunctionTypeEnum>;
1033
+ declare const SavedFunctionId: z.ZodUnion<[z.ZodObject<{
1034
+ type: z.ZodLiteral<"function">;
1035
+ id: z.ZodString;
1036
+ version: z.ZodOptional<z.ZodString>;
1037
+ }, "strip", z.ZodTypeAny, {
1038
+ id: string;
1039
+ type: "function";
1040
+ version?: string | undefined;
1041
+ }, {
1042
+ id: string;
1043
+ type: "function";
1044
+ version?: string | undefined;
1045
+ }>, z.ZodObject<{
1046
+ type: z.ZodLiteral<"global">;
1047
+ name: z.ZodString;
1048
+ function_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>>>;
1049
+ }, "strip", z.ZodTypeAny, {
1050
+ type: "global";
1051
+ name: string;
1052
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
1053
+ }, {
1054
+ type: "global";
1055
+ name: string;
1056
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
1057
+ }>]>;
1058
+ type SavedFunctionIdType = z.infer<typeof SavedFunctionId>;
852
1059
  declare const CallEvent: z.ZodUnion<[z.ZodObject<{
853
1060
  id: z.ZodOptional<z.ZodString>;
854
1061
  data: z.ZodString;
@@ -1973,32 +2180,6 @@ declare const ChatCompletionTool: z.ZodObject<{
1973
2180
  type: "function";
1974
2181
  }>;
1975
2182
  type ChatCompletionToolType = z.infer<typeof ChatCompletionTool>;
1976
- declare const SavedFunctionId: z.ZodUnion<[z.ZodObject<{
1977
- type: z.ZodLiteral<"function">;
1978
- id: z.ZodString;
1979
- version: z.ZodOptional<z.ZodString>;
1980
- }, "strip", z.ZodTypeAny, {
1981
- id: string;
1982
- type: "function";
1983
- version?: string | undefined;
1984
- }, {
1985
- id: string;
1986
- type: "function";
1987
- version?: string | undefined;
1988
- }>, z.ZodObject<{
1989
- type: z.ZodLiteral<"global">;
1990
- name: z.ZodString;
1991
- function_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>>>;
1992
- }, "strip", z.ZodTypeAny, {
1993
- type: "global";
1994
- name: string;
1995
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
1996
- }, {
1997
- type: "global";
1998
- name: string;
1999
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
2000
- }>]>;
2001
- type SavedFunctionIdType = z.infer<typeof SavedFunctionId>;
2002
2183
  declare const DatasetSnapshot: z.ZodObject<{
2003
2184
  id: z.ZodString;
2004
2185
  dataset_id: z.ZodString;
@@ -2034,9 +2215,9 @@ declare const RepoInfo: z.ZodUnion<[z.ZodObject<{
2034
2215
  git_diff: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
2035
2216
  }, "strip", z.ZodTypeAny, {
2036
2217
  dirty?: boolean | null | undefined;
2218
+ tag?: string | null | undefined;
2037
2219
  commit?: string | null | undefined;
2038
2220
  branch?: string | null | undefined;
2039
- tag?: string | null | undefined;
2040
2221
  author_name?: string | null | undefined;
2041
2222
  author_email?: string | null | undefined;
2042
2223
  commit_message?: string | null | undefined;
@@ -2044,9 +2225,9 @@ declare const RepoInfo: z.ZodUnion<[z.ZodObject<{
2044
2225
  git_diff?: string | null | undefined;
2045
2226
  }, {
2046
2227
  dirty?: boolean | null | undefined;
2228
+ tag?: string | null | undefined;
2047
2229
  commit?: string | null | undefined;
2048
2230
  branch?: string | null | undefined;
2049
- tag?: string | null | undefined;
2050
2231
  author_name?: string | null | undefined;
2051
2232
  author_email?: string | null | undefined;
2052
2233
  commit_message?: string | null | undefined;
@@ -4326,21 +4507,21 @@ declare const GraphEdge: z.ZodObject<{
4326
4507
  node: string;
4327
4508
  variable: string;
4328
4509
  };
4510
+ purpose: "data" | "messages" | "control";
4329
4511
  target: {
4330
4512
  node: string;
4331
4513
  variable: string;
4332
4514
  };
4333
- purpose: "data" | "messages" | "control";
4334
4515
  }, {
4335
4516
  source: {
4336
4517
  node: string;
4337
4518
  variable: string;
4338
4519
  };
4520
+ purpose: "data" | "messages" | "control";
4339
4521
  target: {
4340
4522
  node: string;
4341
4523
  variable: string;
4342
4524
  };
4343
- purpose: "data" | "messages" | "control";
4344
4525
  }>;
4345
4526
  type GraphEdgeType = z.infer<typeof GraphEdge>;
4346
4527
  declare const GraphData: z.ZodObject<{
@@ -5543,21 +5724,21 @@ declare const GraphData: z.ZodObject<{
5543
5724
  node: string;
5544
5725
  variable: string;
5545
5726
  };
5727
+ purpose: "data" | "messages" | "control";
5546
5728
  target: {
5547
5729
  node: string;
5548
5730
  variable: string;
5549
5731
  };
5550
- purpose: "data" | "messages" | "control";
5551
5732
  }, {
5552
5733
  source: {
5553
5734
  node: string;
5554
5735
  variable: string;
5555
5736
  };
5737
+ purpose: "data" | "messages" | "control";
5556
5738
  target: {
5557
5739
  node: string;
5558
5740
  variable: string;
5559
5741
  };
5560
- purpose: "data" | "messages" | "control";
5561
5742
  }>>;
5562
5743
  }, "strip", z.ZodTypeAny, {
5563
5744
  type: "graph";
@@ -5737,11 +5918,11 @@ declare const GraphData: z.ZodObject<{
5737
5918
  node: string;
5738
5919
  variable: string;
5739
5920
  };
5921
+ purpose: "data" | "messages" | "control";
5740
5922
  target: {
5741
5923
  node: string;
5742
5924
  variable: string;
5743
5925
  };
5744
- purpose: "data" | "messages" | "control";
5745
5926
  }>;
5746
5927
  }, {
5747
5928
  type: "graph";
@@ -5921,11 +6102,11 @@ declare const GraphData: z.ZodObject<{
5921
6102
  node: string;
5922
6103
  variable: string;
5923
6104
  };
6105
+ purpose: "data" | "messages" | "control";
5924
6106
  target: {
5925
6107
  node: string;
5926
6108
  variable: string;
5927
6109
  };
5928
- purpose: "data" | "messages" | "control";
5929
6110
  }>;
5930
6111
  }>;
5931
6112
  type GraphDataType = z.infer<typeof GraphData>;
@@ -5948,11 +6129,11 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
5948
6129
  runtime: z.ZodEnum<["node", "python", "browser", "quickjs"]>;
5949
6130
  version: z.ZodString;
5950
6131
  }, "strip", z.ZodTypeAny, {
5951
- runtime: "node" | "python" | "browser" | "quickjs";
5952
6132
  version: string;
5953
- }, {
5954
6133
  runtime: "node" | "python" | "browser" | "quickjs";
6134
+ }, {
5955
6135
  version: string;
6136
+ runtime: "node" | "python" | "browser" | "quickjs";
5956
6137
  }>;
5957
6138
  location: z.ZodUnion<[z.ZodObject<{
5958
6139
  type: z.ZodLiteral<"experiment">;
@@ -6066,8 +6247,8 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6066
6247
  preview: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
6067
6248
  }, "strip", z.ZodTypeAny, {
6068
6249
  runtime_context: {
6069
- runtime: "node" | "python" | "browser" | "quickjs";
6070
6250
  version: string;
6251
+ runtime: "node" | "python" | "browser" | "quickjs";
6071
6252
  };
6072
6253
  location: {
6073
6254
  type: "experiment";
@@ -6101,8 +6282,8 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6101
6282
  preview?: string | null | undefined;
6102
6283
  }, {
6103
6284
  runtime_context: {
6104
- runtime: "node" | "python" | "browser" | "quickjs";
6105
6285
  version: string;
6286
+ runtime: "node" | "python" | "browser" | "quickjs";
6106
6287
  };
6107
6288
  location: {
6108
6289
  type: "experiment";
@@ -6140,11 +6321,11 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6140
6321
  runtime: z.ZodEnum<["node", "python", "browser", "quickjs"]>;
6141
6322
  version: z.ZodString;
6142
6323
  }, "strip", z.ZodTypeAny, {
6143
- runtime: "node" | "python" | "browser" | "quickjs";
6144
6324
  version: string;
6145
- }, {
6146
6325
  runtime: "node" | "python" | "browser" | "quickjs";
6326
+ }, {
6147
6327
  version: string;
6328
+ runtime: "node" | "python" | "browser" | "quickjs";
6148
6329
  }>;
6149
6330
  code: z.ZodString;
6150
6331
  code_hash: z.ZodOptional<z.ZodString>;
@@ -6152,16 +6333,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6152
6333
  code: string;
6153
6334
  type: "inline";
6154
6335
  runtime_context: {
6155
- runtime: "node" | "python" | "browser" | "quickjs";
6156
6336
  version: string;
6337
+ runtime: "node" | "python" | "browser" | "quickjs";
6157
6338
  };
6158
6339
  code_hash?: string | undefined;
6159
6340
  }, {
6160
6341
  code: string;
6161
6342
  type: "inline";
6162
6343
  runtime_context: {
6163
- runtime: "node" | "python" | "browser" | "quickjs";
6164
6344
  version: string;
6345
+ runtime: "node" | "python" | "browser" | "quickjs";
6165
6346
  };
6166
6347
  code_hash?: string | undefined;
6167
6348
  }>]>;
@@ -6171,8 +6352,8 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6171
6352
  type: "bundle";
6172
6353
  } & {
6173
6354
  runtime_context: {
6174
- runtime: "node" | "python" | "browser" | "quickjs";
6175
6355
  version: string;
6356
+ runtime: "node" | "python" | "browser" | "quickjs";
6176
6357
  };
6177
6358
  location: {
6178
6359
  type: "experiment";
@@ -6208,8 +6389,8 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6208
6389
  code: string;
6209
6390
  type: "inline";
6210
6391
  runtime_context: {
6211
- runtime: "node" | "python" | "browser" | "quickjs";
6212
6392
  version: string;
6393
+ runtime: "node" | "python" | "browser" | "quickjs";
6213
6394
  };
6214
6395
  code_hash?: string | undefined;
6215
6396
  };
@@ -6219,8 +6400,8 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6219
6400
  type: "bundle";
6220
6401
  } & {
6221
6402
  runtime_context: {
6222
- runtime: "node" | "python" | "browser" | "quickjs";
6223
6403
  version: string;
6404
+ runtime: "node" | "python" | "browser" | "quickjs";
6224
6405
  };
6225
6406
  location: {
6226
6407
  type: "experiment";
@@ -6256,8 +6437,8 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
6256
6437
  code: string;
6257
6438
  type: "inline";
6258
6439
  runtime_context: {
6259
- runtime: "node" | "python" | "browser" | "quickjs";
6260
6440
  version: string;
6441
+ runtime: "node" | "python" | "browser" | "quickjs";
6261
6442
  };
6262
6443
  code_hash?: string | undefined;
6263
6444
  };
@@ -7461,21 +7642,21 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7461
7642
  node: string;
7462
7643
  variable: string;
7463
7644
  };
7645
+ purpose: "data" | "messages" | "control";
7464
7646
  target: {
7465
7647
  node: string;
7466
7648
  variable: string;
7467
7649
  };
7468
- purpose: "data" | "messages" | "control";
7469
7650
  }, {
7470
7651
  source: {
7471
7652
  node: string;
7472
7653
  variable: string;
7473
7654
  };
7655
+ purpose: "data" | "messages" | "control";
7474
7656
  target: {
7475
7657
  node: string;
7476
7658
  variable: string;
7477
7659
  };
7478
- purpose: "data" | "messages" | "control";
7479
7660
  }>>;
7480
7661
  }, "strip", z.ZodTypeAny, {
7481
7662
  type: "graph";
@@ -7655,11 +7836,11 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7655
7836
  node: string;
7656
7837
  variable: string;
7657
7838
  };
7839
+ purpose: "data" | "messages" | "control";
7658
7840
  target: {
7659
7841
  node: string;
7660
7842
  variable: string;
7661
7843
  };
7662
- purpose: "data" | "messages" | "control";
7663
7844
  }>;
7664
7845
  }, {
7665
7846
  type: "graph";
@@ -7839,11 +8020,11 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7839
8020
  node: string;
7840
8021
  variable: string;
7841
8022
  };
8023
+ purpose: "data" | "messages" | "control";
7842
8024
  target: {
7843
8025
  node: string;
7844
8026
  variable: string;
7845
8027
  };
7846
- purpose: "data" | "messages" | "control";
7847
8028
  }>;
7848
8029
  }>, z.ZodObject<{
7849
8030
  type: z.ZodLiteral<"remote_eval">;
@@ -7875,16 +8056,16 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7875
8056
  }, "strip", z.ZodTypeAny, {
7876
8057
  type: "global";
7877
8058
  name: string;
7878
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
8059
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
7879
8060
  config?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
7880
8061
  }, {
7881
8062
  type: "global";
7882
8063
  name: string;
7883
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
8064
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
7884
8065
  config?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
7885
8066
  }>, z.ZodObject<{
7886
8067
  type: z.ZodLiteral<"facet">;
7887
- preprocessor: z.ZodOptional<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
8068
+ preprocessor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
7888
8069
  type: z.ZodLiteral<"function">;
7889
8070
  id: z.ZodString;
7890
8071
  version: z.ZodOptional<z.ZodString>;
@@ -7903,12 +8084,21 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7903
8084
  }, "strip", z.ZodTypeAny, {
7904
8085
  type: "global";
7905
8086
  name: string;
7906
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
8087
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
7907
8088
  }, {
7908
8089
  type: "global";
7909
8090
  name: string;
7910
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
7911
- }>, z.ZodNull]>, z.ZodUnknown>>;
8091
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8092
+ }>, z.ZodObject<{
8093
+ type: z.ZodLiteral<"inline">;
8094
+ code: z.ZodString;
8095
+ }, "strip", z.ZodTypeAny, {
8096
+ code: string;
8097
+ type: "inline";
8098
+ }, {
8099
+ code: string;
8100
+ type: "inline";
8101
+ }>, z.ZodNull]>>;
7912
8102
  prompt: z.ZodString;
7913
8103
  model: z.ZodOptional<z.ZodString>;
7914
8104
  embedding_model: z.ZodOptional<z.ZodString>;
@@ -7916,7 +8106,6 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7916
8106
  }, "strip", z.ZodTypeAny, {
7917
8107
  type: "facet";
7918
8108
  prompt: string;
7919
- model?: string | undefined;
7920
8109
  preprocessor?: {
7921
8110
  id: string;
7922
8111
  type: "function";
@@ -7924,14 +8113,17 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7924
8113
  } | {
7925
8114
  type: "global";
7926
8115
  name: string;
7927
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
8116
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
8117
+ } | {
8118
+ code: string;
8119
+ type: "inline";
7928
8120
  } | null | undefined;
7929
8121
  embedding_model?: string | undefined;
8122
+ model?: string | undefined;
7930
8123
  no_match_pattern?: string | undefined;
7931
8124
  }, {
7932
8125
  type: "facet";
7933
8126
  prompt: string;
7934
- model?: string | undefined;
7935
8127
  preprocessor?: {
7936
8128
  id: string;
7937
8129
  type: "function";
@@ -7939,13 +8131,17 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7939
8131
  } | {
7940
8132
  type: "global";
7941
8133
  name: string;
7942
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
8134
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8135
+ } | {
8136
+ code: string;
8137
+ type: "inline";
7943
8138
  } | null | undefined;
7944
8139
  embedding_model?: string | undefined;
8140
+ model?: string | undefined;
7945
8141
  no_match_pattern?: string | undefined;
7946
8142
  }>, z.ZodObject<{
7947
8143
  type: z.ZodLiteral<"batched_facet">;
7948
- preprocessor: z.ZodOptional<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
8144
+ preprocessor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
7949
8145
  type: z.ZodLiteral<"function">;
7950
8146
  id: z.ZodString;
7951
8147
  version: z.ZodOptional<z.ZodString>;
@@ -7964,12 +8160,21 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7964
8160
  }, "strip", z.ZodTypeAny, {
7965
8161
  type: "global";
7966
8162
  name: string;
7967
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
8163
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
7968
8164
  }, {
7969
8165
  type: "global";
7970
8166
  name: string;
7971
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
7972
- }>, z.ZodNull]>, z.ZodUnknown>>;
8167
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8168
+ }>, z.ZodObject<{
8169
+ type: z.ZodLiteral<"inline">;
8170
+ code: z.ZodString;
8171
+ }, "strip", z.ZodTypeAny, {
8172
+ code: string;
8173
+ type: "inline";
8174
+ }, {
8175
+ code: string;
8176
+ type: "inline";
8177
+ }>, z.ZodNull]>>;
7973
8178
  facets: z.ZodArray<z.ZodObject<{
7974
8179
  name: z.ZodString;
7975
8180
  prompt: z.ZodString;
@@ -7979,14 +8184,14 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7979
8184
  }, "strip", z.ZodTypeAny, {
7980
8185
  prompt: string;
7981
8186
  name: string;
7982
- model?: string | undefined;
7983
8187
  embedding_model?: string | undefined;
8188
+ model?: string | undefined;
7984
8189
  no_match_pattern?: string | undefined;
7985
8190
  }, {
7986
8191
  prompt: string;
7987
8192
  name: string;
7988
- model?: string | undefined;
7989
8193
  embedding_model?: string | undefined;
8194
+ model?: string | undefined;
7990
8195
  no_match_pattern?: string | undefined;
7991
8196
  }>, "many">;
7992
8197
  topic_maps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
@@ -7995,12 +8200,37 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
7995
8200
  topic_map_data: z.ZodObject<{
7996
8201
  type: z.ZodLiteral<"topic_map">;
7997
8202
  source_facet: z.ZodString;
8203
+ source_facet_function: z.ZodOptional<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
8204
+ type: z.ZodLiteral<"function">;
8205
+ id: z.ZodString;
8206
+ version: z.ZodOptional<z.ZodString>;
8207
+ }, "strip", z.ZodTypeAny, {
8208
+ id: string;
8209
+ type: "function";
8210
+ version?: string | undefined;
8211
+ }, {
8212
+ id: string;
8213
+ type: "function";
8214
+ version?: string | undefined;
8215
+ }>, z.ZodObject<{
8216
+ type: z.ZodLiteral<"global">;
8217
+ name: z.ZodString;
8218
+ function_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>>>;
8219
+ }, "strip", z.ZodTypeAny, {
8220
+ type: "global";
8221
+ name: string;
8222
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
8223
+ }, {
8224
+ type: "global";
8225
+ name: string;
8226
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8227
+ }>]>, z.ZodUnknown>>;
7998
8228
  embedding_model: z.ZodString;
7999
8229
  bundle_key: z.ZodOptional<z.ZodString>;
8000
8230
  report_key: z.ZodOptional<z.ZodString>;
8001
8231
  topic_names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8002
8232
  generation_settings: z.ZodOptional<z.ZodObject<{
8003
- algorithm: z.ZodEnum<["hdbscan", "kmeans"]>;
8233
+ algorithm: z.ZodEnum<["hdbscan", "kmeans", "community"]>;
8004
8234
  dimension_reduction: z.ZodEnum<["umap", "pca", "none"]>;
8005
8235
  sample_size: z.ZodOptional<z.ZodNumber>;
8006
8236
  n_clusters: z.ZodOptional<z.ZodNumber>;
@@ -8009,7 +8239,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8009
8239
  hierarchy_threshold: z.ZodOptional<z.ZodNumber>;
8010
8240
  naming_model: z.ZodOptional<z.ZodString>;
8011
8241
  }, "strip", z.ZodTypeAny, {
8012
- algorithm: "hdbscan" | "kmeans";
8242
+ algorithm: "hdbscan" | "kmeans" | "community";
8013
8243
  dimension_reduction: "none" | "umap" | "pca";
8014
8244
  sample_size?: number | undefined;
8015
8245
  n_clusters?: number | undefined;
@@ -8018,7 +8248,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8018
8248
  hierarchy_threshold?: number | undefined;
8019
8249
  naming_model?: string | undefined;
8020
8250
  }, {
8021
- algorithm: "hdbscan" | "kmeans";
8251
+ algorithm: "hdbscan" | "kmeans" | "community";
8022
8252
  dimension_reduction: "none" | "umap" | "pca";
8023
8253
  sample_size?: number | undefined;
8024
8254
  n_clusters?: number | undefined;
@@ -8036,12 +8266,20 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8036
8266
  type: "topic_map";
8037
8267
  source_facet: string;
8038
8268
  embedding_model: string;
8039
- btql_filter?: string | undefined;
8269
+ source_facet_function?: {
8270
+ id: string;
8271
+ type: "function";
8272
+ version?: string | undefined;
8273
+ } | {
8274
+ type: "global";
8275
+ name: string;
8276
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
8277
+ } | undefined;
8040
8278
  bundle_key?: string | undefined;
8041
8279
  report_key?: string | undefined;
8042
8280
  topic_names?: Record<string, string> | undefined;
8043
8281
  generation_settings?: {
8044
- algorithm: "hdbscan" | "kmeans";
8282
+ algorithm: "hdbscan" | "kmeans" | "community";
8045
8283
  dimension_reduction: "none" | "umap" | "pca";
8046
8284
  sample_size?: number | undefined;
8047
8285
  n_clusters?: number | undefined;
@@ -8053,17 +8291,26 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8053
8291
  disable_reconciliation?: boolean | undefined;
8054
8292
  reconcile_mode?: "evolve" | "names_only" | undefined;
8055
8293
  distance_threshold?: number | undefined;
8294
+ btql_filter?: string | undefined;
8056
8295
  automation_btql_filter?: string | undefined;
8057
8296
  }, {
8058
8297
  type: "topic_map";
8059
8298
  source_facet: string;
8060
8299
  embedding_model: string;
8061
- btql_filter?: string | undefined;
8300
+ source_facet_function?: {
8301
+ id: string;
8302
+ type: "function";
8303
+ version?: string | undefined;
8304
+ } | {
8305
+ type: "global";
8306
+ name: string;
8307
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8308
+ } | undefined;
8062
8309
  bundle_key?: string | undefined;
8063
8310
  report_key?: string | undefined;
8064
8311
  topic_names?: Record<string, string> | undefined;
8065
8312
  generation_settings?: {
8066
- algorithm: "hdbscan" | "kmeans";
8313
+ algorithm: "hdbscan" | "kmeans" | "community";
8067
8314
  dimension_reduction: "none" | "umap" | "pca";
8068
8315
  sample_size?: number | undefined;
8069
8316
  n_clusters?: number | undefined;
@@ -8075,6 +8322,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8075
8322
  disable_reconciliation?: boolean | undefined;
8076
8323
  reconcile_mode?: "evolve" | "names_only" | undefined;
8077
8324
  distance_threshold?: number | undefined;
8325
+ btql_filter?: string | undefined;
8078
8326
  automation_btql_filter?: string | undefined;
8079
8327
  }>;
8080
8328
  }, "strip", z.ZodTypeAny, {
@@ -8083,12 +8331,20 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8083
8331
  type: "topic_map";
8084
8332
  source_facet: string;
8085
8333
  embedding_model: string;
8086
- btql_filter?: string | undefined;
8334
+ source_facet_function?: {
8335
+ id: string;
8336
+ type: "function";
8337
+ version?: string | undefined;
8338
+ } | {
8339
+ type: "global";
8340
+ name: string;
8341
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
8342
+ } | undefined;
8087
8343
  bundle_key?: string | undefined;
8088
8344
  report_key?: string | undefined;
8089
8345
  topic_names?: Record<string, string> | undefined;
8090
8346
  generation_settings?: {
8091
- algorithm: "hdbscan" | "kmeans";
8347
+ algorithm: "hdbscan" | "kmeans" | "community";
8092
8348
  dimension_reduction: "none" | "umap" | "pca";
8093
8349
  sample_size?: number | undefined;
8094
8350
  n_clusters?: number | undefined;
@@ -8100,6 +8356,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8100
8356
  disable_reconciliation?: boolean | undefined;
8101
8357
  reconcile_mode?: "evolve" | "names_only" | undefined;
8102
8358
  distance_threshold?: number | undefined;
8359
+ btql_filter?: string | undefined;
8103
8360
  automation_btql_filter?: string | undefined;
8104
8361
  };
8105
8362
  topic_map_id?: string | undefined;
@@ -8109,12 +8366,20 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8109
8366
  type: "topic_map";
8110
8367
  source_facet: string;
8111
8368
  embedding_model: string;
8112
- btql_filter?: string | undefined;
8369
+ source_facet_function?: {
8370
+ id: string;
8371
+ type: "function";
8372
+ version?: string | undefined;
8373
+ } | {
8374
+ type: "global";
8375
+ name: string;
8376
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8377
+ } | undefined;
8113
8378
  bundle_key?: string | undefined;
8114
8379
  report_key?: string | undefined;
8115
8380
  topic_names?: Record<string, string> | undefined;
8116
8381
  generation_settings?: {
8117
- algorithm: "hdbscan" | "kmeans";
8382
+ algorithm: "hdbscan" | "kmeans" | "community";
8118
8383
  dimension_reduction: "none" | "umap" | "pca";
8119
8384
  sample_size?: number | undefined;
8120
8385
  n_clusters?: number | undefined;
@@ -8126,6 +8391,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8126
8391
  disable_reconciliation?: boolean | undefined;
8127
8392
  reconcile_mode?: "evolve" | "names_only" | undefined;
8128
8393
  distance_threshold?: number | undefined;
8394
+ btql_filter?: string | undefined;
8129
8395
  automation_btql_filter?: string | undefined;
8130
8396
  };
8131
8397
  topic_map_id?: string | undefined;
@@ -8135,8 +8401,8 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8135
8401
  facets: {
8136
8402
  prompt: string;
8137
8403
  name: string;
8138
- model?: string | undefined;
8139
8404
  embedding_model?: string | undefined;
8405
+ model?: string | undefined;
8140
8406
  no_match_pattern?: string | undefined;
8141
8407
  }[];
8142
8408
  preprocessor?: {
@@ -8146,7 +8412,10 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8146
8412
  } | {
8147
8413
  type: "global";
8148
8414
  name: string;
8149
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
8415
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
8416
+ } | {
8417
+ code: string;
8418
+ type: "inline";
8150
8419
  } | null | undefined;
8151
8420
  topic_maps?: Record<string, {
8152
8421
  function_name: string;
@@ -8154,12 +8423,20 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8154
8423
  type: "topic_map";
8155
8424
  source_facet: string;
8156
8425
  embedding_model: string;
8157
- btql_filter?: string | undefined;
8426
+ source_facet_function?: {
8427
+ id: string;
8428
+ type: "function";
8429
+ version?: string | undefined;
8430
+ } | {
8431
+ type: "global";
8432
+ name: string;
8433
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
8434
+ } | undefined;
8158
8435
  bundle_key?: string | undefined;
8159
8436
  report_key?: string | undefined;
8160
8437
  topic_names?: Record<string, string> | undefined;
8161
8438
  generation_settings?: {
8162
- algorithm: "hdbscan" | "kmeans";
8439
+ algorithm: "hdbscan" | "kmeans" | "community";
8163
8440
  dimension_reduction: "none" | "umap" | "pca";
8164
8441
  sample_size?: number | undefined;
8165
8442
  n_clusters?: number | undefined;
@@ -8171,6 +8448,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8171
8448
  disable_reconciliation?: boolean | undefined;
8172
8449
  reconcile_mode?: "evolve" | "names_only" | undefined;
8173
8450
  distance_threshold?: number | undefined;
8451
+ btql_filter?: string | undefined;
8174
8452
  automation_btql_filter?: string | undefined;
8175
8453
  };
8176
8454
  topic_map_id?: string | undefined;
@@ -8180,8 +8458,8 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8180
8458
  facets: {
8181
8459
  prompt: string;
8182
8460
  name: string;
8183
- model?: string | undefined;
8184
8461
  embedding_model?: string | undefined;
8462
+ model?: string | undefined;
8185
8463
  no_match_pattern?: string | undefined;
8186
8464
  }[];
8187
8465
  preprocessor?: {
@@ -8191,7 +8469,10 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8191
8469
  } | {
8192
8470
  type: "global";
8193
8471
  name: string;
8194
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
8472
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8473
+ } | {
8474
+ code: string;
8475
+ type: "inline";
8195
8476
  } | null | undefined;
8196
8477
  topic_maps?: Record<string, {
8197
8478
  function_name: string;
@@ -8199,12 +8480,20 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8199
8480
  type: "topic_map";
8200
8481
  source_facet: string;
8201
8482
  embedding_model: string;
8202
- btql_filter?: string | undefined;
8483
+ source_facet_function?: {
8484
+ id: string;
8485
+ type: "function";
8486
+ version?: string | undefined;
8487
+ } | {
8488
+ type: "global";
8489
+ name: string;
8490
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8491
+ } | undefined;
8203
8492
  bundle_key?: string | undefined;
8204
8493
  report_key?: string | undefined;
8205
8494
  topic_names?: Record<string, string> | undefined;
8206
8495
  generation_settings?: {
8207
- algorithm: "hdbscan" | "kmeans";
8496
+ algorithm: "hdbscan" | "kmeans" | "community";
8208
8497
  dimension_reduction: "none" | "umap" | "pca";
8209
8498
  sample_size?: number | undefined;
8210
8499
  n_clusters?: number | undefined;
@@ -8216,6 +8505,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8216
8505
  disable_reconciliation?: boolean | undefined;
8217
8506
  reconcile_mode?: "evolve" | "names_only" | undefined;
8218
8507
  distance_threshold?: number | undefined;
8508
+ btql_filter?: string | undefined;
8219
8509
  automation_btql_filter?: string | undefined;
8220
8510
  };
8221
8511
  topic_map_id?: string | undefined;
@@ -8264,12 +8554,37 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8264
8554
  }>, z.ZodIntersection<z.ZodObject<{
8265
8555
  type: z.ZodLiteral<"topic_map">;
8266
8556
  source_facet: z.ZodString;
8557
+ source_facet_function: z.ZodOptional<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
8558
+ type: z.ZodLiteral<"function">;
8559
+ id: z.ZodString;
8560
+ version: z.ZodOptional<z.ZodString>;
8561
+ }, "strip", z.ZodTypeAny, {
8562
+ id: string;
8563
+ type: "function";
8564
+ version?: string | undefined;
8565
+ }, {
8566
+ id: string;
8567
+ type: "function";
8568
+ version?: string | undefined;
8569
+ }>, z.ZodObject<{
8570
+ type: z.ZodLiteral<"global">;
8571
+ name: z.ZodString;
8572
+ function_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>>>;
8573
+ }, "strip", z.ZodTypeAny, {
8574
+ type: "global";
8575
+ name: string;
8576
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
8577
+ }, {
8578
+ type: "global";
8579
+ name: string;
8580
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8581
+ }>]>, z.ZodUnknown>>;
8267
8582
  embedding_model: z.ZodString;
8268
8583
  bundle_key: z.ZodOptional<z.ZodString>;
8269
8584
  report_key: z.ZodOptional<z.ZodString>;
8270
8585
  topic_names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8271
8586
  generation_settings: z.ZodOptional<z.ZodObject<{
8272
- algorithm: z.ZodEnum<["hdbscan", "kmeans"]>;
8587
+ algorithm: z.ZodEnum<["hdbscan", "kmeans", "community"]>;
8273
8588
  dimension_reduction: z.ZodEnum<["umap", "pca", "none"]>;
8274
8589
  sample_size: z.ZodOptional<z.ZodNumber>;
8275
8590
  n_clusters: z.ZodOptional<z.ZodNumber>;
@@ -8278,7 +8593,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8278
8593
  hierarchy_threshold: z.ZodOptional<z.ZodNumber>;
8279
8594
  naming_model: z.ZodOptional<z.ZodString>;
8280
8595
  }, "strip", z.ZodTypeAny, {
8281
- algorithm: "hdbscan" | "kmeans";
8596
+ algorithm: "hdbscan" | "kmeans" | "community";
8282
8597
  dimension_reduction: "none" | "umap" | "pca";
8283
8598
  sample_size?: number | undefined;
8284
8599
  n_clusters?: number | undefined;
@@ -8287,7 +8602,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8287
8602
  hierarchy_threshold?: number | undefined;
8288
8603
  naming_model?: string | undefined;
8289
8604
  }, {
8290
- algorithm: "hdbscan" | "kmeans";
8605
+ algorithm: "hdbscan" | "kmeans" | "community";
8291
8606
  dimension_reduction: "none" | "umap" | "pca";
8292
8607
  sample_size?: number | undefined;
8293
8608
  n_clusters?: number | undefined;
@@ -8305,12 +8620,20 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8305
8620
  type: "topic_map";
8306
8621
  source_facet: string;
8307
8622
  embedding_model: string;
8308
- btql_filter?: string | undefined;
8623
+ source_facet_function?: {
8624
+ id: string;
8625
+ type: "function";
8626
+ version?: string | undefined;
8627
+ } | {
8628
+ type: "global";
8629
+ name: string;
8630
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
8631
+ } | undefined;
8309
8632
  bundle_key?: string | undefined;
8310
8633
  report_key?: string | undefined;
8311
8634
  topic_names?: Record<string, string> | undefined;
8312
8635
  generation_settings?: {
8313
- algorithm: "hdbscan" | "kmeans";
8636
+ algorithm: "hdbscan" | "kmeans" | "community";
8314
8637
  dimension_reduction: "none" | "umap" | "pca";
8315
8638
  sample_size?: number | undefined;
8316
8639
  n_clusters?: number | undefined;
@@ -8322,17 +8645,26 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8322
8645
  disable_reconciliation?: boolean | undefined;
8323
8646
  reconcile_mode?: "evolve" | "names_only" | undefined;
8324
8647
  distance_threshold?: number | undefined;
8648
+ btql_filter?: string | undefined;
8325
8649
  automation_btql_filter?: string | undefined;
8326
8650
  }, {
8327
8651
  type: "topic_map";
8328
8652
  source_facet: string;
8329
8653
  embedding_model: string;
8330
- btql_filter?: string | undefined;
8654
+ source_facet_function?: {
8655
+ id: string;
8656
+ type: "function";
8657
+ version?: string | undefined;
8658
+ } | {
8659
+ type: "global";
8660
+ name: string;
8661
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
8662
+ } | undefined;
8331
8663
  bundle_key?: string | undefined;
8332
8664
  report_key?: string | undefined;
8333
8665
  topic_names?: Record<string, string> | undefined;
8334
8666
  generation_settings?: {
8335
- algorithm: "hdbscan" | "kmeans";
8667
+ algorithm: "hdbscan" | "kmeans" | "community";
8336
8668
  dimension_reduction: "none" | "umap" | "pca";
8337
8669
  sample_size?: number | undefined;
8338
8670
  n_clusters?: number | undefined;
@@ -8344,6 +8676,7 @@ declare const FunctionData: z.ZodUnion<[z.ZodObject<{
8344
8676
  disable_reconciliation?: boolean | undefined;
8345
8677
  reconcile_mode?: "evolve" | "names_only" | undefined;
8346
8678
  distance_threshold?: number | undefined;
8679
+ btql_filter?: string | undefined;
8347
8680
  automation_btql_filter?: string | undefined;
8348
8681
  }>, z.ZodUnknown>]>;
8349
8682
  declare const PromptData: z.ZodObject<{
@@ -9711,6 +10044,15 @@ declare const PromptData: z.ZodObject<{
9711
10044
  type: "global";
9712
10045
  name: string;
9713
10046
  function_type?: "preprocessor" | undefined;
10047
+ }>, z.ZodObject<{
10048
+ type: z.ZodLiteral<"inline">;
10049
+ code: z.ZodString;
10050
+ }, "strip", z.ZodTypeAny, {
10051
+ code: string;
10052
+ type: "inline";
10053
+ }, {
10054
+ code: string;
10055
+ type: "inline";
9714
10056
  }>, z.ZodNull]>>;
9715
10057
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
9716
10058
  type: z.ZodLiteral<"function">;
@@ -9731,11 +10073,11 @@ declare const PromptData: z.ZodObject<{
9731
10073
  }, "strip", z.ZodTypeAny, {
9732
10074
  type: "global";
9733
10075
  name: string;
9734
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
10076
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
9735
10077
  }, {
9736
10078
  type: "global";
9737
10079
  name: string;
9738
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
10080
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
9739
10081
  }>]>, "many">, z.ZodNull]>>;
9740
10082
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
9741
10083
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -10013,6 +10355,18 @@ declare const PromptData: z.ZodObject<{
10013
10355
  type: "completion";
10014
10356
  content: string;
10015
10357
  } | null | undefined;
10358
+ preprocessor?: {
10359
+ id: string;
10360
+ type: "function";
10361
+ version?: string | undefined;
10362
+ } | {
10363
+ type: "global";
10364
+ name: string;
10365
+ function_type: "preprocessor";
10366
+ } | {
10367
+ code: string;
10368
+ type: "inline";
10369
+ } | null | undefined;
10016
10370
  origin?: {
10017
10371
  project_id?: string | undefined;
10018
10372
  prompt_id?: string | undefined;
@@ -10033,17 +10387,8 @@ declare const PromptData: z.ZodObject<{
10033
10387
  } | {
10034
10388
  type: "global";
10035
10389
  name: string;
10036
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
10390
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
10037
10391
  })[] | null | undefined;
10038
- preprocessor?: {
10039
- id: string;
10040
- type: "function";
10041
- version?: string | undefined;
10042
- } | {
10043
- type: "global";
10044
- name: string;
10045
- function_type: "preprocessor";
10046
- } | null | undefined;
10047
10392
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
10048
10393
  mcp?: Record<string, {
10049
10394
  id: string;
@@ -10287,6 +10632,18 @@ declare const PromptData: z.ZodObject<{
10287
10632
  type: "completion";
10288
10633
  content: string;
10289
10634
  } | null | undefined;
10635
+ preprocessor?: {
10636
+ id: string;
10637
+ type: "function";
10638
+ version?: string | undefined;
10639
+ } | {
10640
+ type: "global";
10641
+ name: string;
10642
+ function_type?: "preprocessor" | undefined;
10643
+ } | {
10644
+ code: string;
10645
+ type: "inline";
10646
+ } | null | undefined;
10290
10647
  origin?: {
10291
10648
  project_id?: string | undefined;
10292
10649
  prompt_id?: string | undefined;
@@ -10307,17 +10664,8 @@ declare const PromptData: z.ZodObject<{
10307
10664
  } | {
10308
10665
  type: "global";
10309
10666
  name: string;
10310
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
10667
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
10311
10668
  })[] | null | undefined;
10312
- preprocessor?: {
10313
- id: string;
10314
- type: "function";
10315
- version?: string | undefined;
10316
- } | {
10317
- type: "global";
10318
- name: string;
10319
- function_type?: "preprocessor" | undefined;
10320
- } | null | undefined;
10321
10669
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
10322
10670
  mcp?: Record<string, {
10323
10671
  id: string;
@@ -10357,11 +10705,11 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
10357
10705
  global_function: z.ZodString;
10358
10706
  function_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>>>;
10359
10707
  }, "strip", z.ZodTypeAny, {
10360
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
10708
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
10361
10709
  global_function: string;
10362
10710
  }, {
10363
10711
  global_function: string;
10364
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
10712
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
10365
10713
  }>, z.ZodObject<{
10366
10714
  prompt_session_id: z.ZodString;
10367
10715
  prompt_session_function_id: z.ZodString;
@@ -10379,11 +10727,11 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
10379
10727
  runtime: z.ZodEnum<["node", "python", "browser", "quickjs"]>;
10380
10728
  version: z.ZodString;
10381
10729
  }, "strip", z.ZodTypeAny, {
10382
- runtime: "node" | "python" | "browser" | "quickjs";
10383
10730
  version: string;
10384
- }, {
10385
10731
  runtime: "node" | "python" | "browser" | "quickjs";
10732
+ }, {
10386
10733
  version: string;
10734
+ runtime: "node" | "python" | "browser" | "quickjs";
10387
10735
  }>;
10388
10736
  code: z.ZodString;
10389
10737
  function_type: z.ZodOptional<z.ZodIntersection<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>, z.ZodUnknown>>;
@@ -10391,19 +10739,19 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
10391
10739
  }, "strip", z.ZodTypeAny, {
10392
10740
  code: string;
10393
10741
  inline_context: {
10394
- runtime: "node" | "python" | "browser" | "quickjs";
10395
10742
  version: string;
10743
+ runtime: "node" | "python" | "browser" | "quickjs";
10396
10744
  };
10397
10745
  name?: string | null | undefined;
10398
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
10746
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
10399
10747
  }, {
10400
10748
  code: string;
10401
10749
  inline_context: {
10402
- runtime: "node" | "python" | "browser" | "quickjs";
10403
10750
  version: string;
10751
+ runtime: "node" | "python" | "browser" | "quickjs";
10404
10752
  };
10405
10753
  name?: string | null | undefined;
10406
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
10754
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
10407
10755
  }>, z.ZodObject<{
10408
10756
  inline_prompt: z.ZodOptional<z.ZodObject<{
10409
10757
  prompt: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
@@ -11770,6 +12118,15 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
11770
12118
  type: "global";
11771
12119
  name: string;
11772
12120
  function_type?: "preprocessor" | undefined;
12121
+ }>, z.ZodObject<{
12122
+ type: z.ZodLiteral<"inline">;
12123
+ code: z.ZodString;
12124
+ }, "strip", z.ZodTypeAny, {
12125
+ code: string;
12126
+ type: "inline";
12127
+ }, {
12128
+ code: string;
12129
+ type: "inline";
11773
12130
  }>, z.ZodNull]>>;
11774
12131
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
11775
12132
  type: z.ZodLiteral<"function">;
@@ -11790,11 +12147,11 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
11790
12147
  }, "strip", z.ZodTypeAny, {
11791
12148
  type: "global";
11792
12149
  name: string;
11793
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
12150
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
11794
12151
  }, {
11795
12152
  type: "global";
11796
12153
  name: string;
11797
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
12154
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
11798
12155
  }>]>, "many">, z.ZodNull]>>;
11799
12156
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
11800
12157
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -12072,6 +12429,18 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12072
12429
  type: "completion";
12073
12430
  content: string;
12074
12431
  } | null | undefined;
12432
+ preprocessor?: {
12433
+ id: string;
12434
+ type: "function";
12435
+ version?: string | undefined;
12436
+ } | {
12437
+ type: "global";
12438
+ name: string;
12439
+ function_type: "preprocessor";
12440
+ } | {
12441
+ code: string;
12442
+ type: "inline";
12443
+ } | null | undefined;
12075
12444
  origin?: {
12076
12445
  project_id?: string | undefined;
12077
12446
  prompt_id?: string | undefined;
@@ -12092,17 +12461,8 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12092
12461
  } | {
12093
12462
  type: "global";
12094
12463
  name: string;
12095
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
12464
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
12096
12465
  })[] | null | undefined;
12097
- preprocessor?: {
12098
- id: string;
12099
- type: "function";
12100
- version?: string | undefined;
12101
- } | {
12102
- type: "global";
12103
- name: string;
12104
- function_type: "preprocessor";
12105
- } | null | undefined;
12106
12466
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
12107
12467
  mcp?: Record<string, {
12108
12468
  id: string;
@@ -12346,6 +12706,18 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12346
12706
  type: "completion";
12347
12707
  content: string;
12348
12708
  } | null | undefined;
12709
+ preprocessor?: {
12710
+ id: string;
12711
+ type: "function";
12712
+ version?: string | undefined;
12713
+ } | {
12714
+ type: "global";
12715
+ name: string;
12716
+ function_type?: "preprocessor" | undefined;
12717
+ } | {
12718
+ code: string;
12719
+ type: "inline";
12720
+ } | null | undefined;
12349
12721
  origin?: {
12350
12722
  project_id?: string | undefined;
12351
12723
  prompt_id?: string | undefined;
@@ -12366,17 +12738,8 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12366
12738
  } | {
12367
12739
  type: "global";
12368
12740
  name: string;
12369
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
12741
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
12370
12742
  })[] | null | undefined;
12371
- preprocessor?: {
12372
- id: string;
12373
- type: "function";
12374
- version?: string | undefined;
12375
- } | {
12376
- type: "global";
12377
- name: string;
12378
- function_type?: "preprocessor" | undefined;
12379
- } | null | undefined;
12380
12743
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
12381
12744
  mcp?: Record<string, {
12382
12745
  id: string;
@@ -12394,7 +12757,7 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12394
12757
  function_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>>>;
12395
12758
  name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
12396
12759
  }, "strip", z.ZodTypeAny, {
12397
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
12760
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
12398
12761
  inline_function: {} & {
12399
12762
  [k: string]: unknown;
12400
12763
  };
@@ -12630,6 +12993,18 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12630
12993
  type: "completion";
12631
12994
  content: string;
12632
12995
  } | null | undefined;
12996
+ preprocessor?: {
12997
+ id: string;
12998
+ type: "function";
12999
+ version?: string | undefined;
13000
+ } | {
13001
+ type: "global";
13002
+ name: string;
13003
+ function_type: "preprocessor";
13004
+ } | {
13005
+ code: string;
13006
+ type: "inline";
13007
+ } | null | undefined;
12633
13008
  origin?: {
12634
13009
  project_id?: string | undefined;
12635
13010
  prompt_id?: string | undefined;
@@ -12650,17 +13025,8 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12650
13025
  } | {
12651
13026
  type: "global";
12652
13027
  name: string;
12653
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
13028
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
12654
13029
  })[] | null | undefined;
12655
- preprocessor?: {
12656
- id: string;
12657
- type: "function";
12658
- version?: string | undefined;
12659
- } | {
12660
- type: "global";
12661
- name: string;
12662
- function_type: "preprocessor";
12663
- } | null | undefined;
12664
13030
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
12665
13031
  mcp?: Record<string, {
12666
13032
  id: string;
@@ -12679,7 +13045,7 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12679
13045
  [k: string]: unknown;
12680
13046
  };
12681
13047
  name?: string | null | undefined;
12682
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
13048
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
12683
13049
  inline_prompt?: {
12684
13050
  options?: {
12685
13051
  params?: z.objectInputType<{
@@ -12911,6 +13277,18 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12911
13277
  type: "completion";
12912
13278
  content: string;
12913
13279
  } | null | undefined;
13280
+ preprocessor?: {
13281
+ id: string;
13282
+ type: "function";
13283
+ version?: string | undefined;
13284
+ } | {
13285
+ type: "global";
13286
+ name: string;
13287
+ function_type?: "preprocessor" | undefined;
13288
+ } | {
13289
+ code: string;
13290
+ type: "inline";
13291
+ } | null | undefined;
12914
13292
  origin?: {
12915
13293
  project_id?: string | undefined;
12916
13294
  prompt_id?: string | undefined;
@@ -12931,17 +13309,8 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
12931
13309
  } | {
12932
13310
  type: "global";
12933
13311
  name: string;
12934
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
13312
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
12935
13313
  })[] | null | undefined;
12936
- preprocessor?: {
12937
- id: string;
12938
- type: "function";
12939
- version?: string | undefined;
12940
- } | {
12941
- type: "global";
12942
- name: string;
12943
- function_type?: "preprocessor" | undefined;
12944
- } | null | undefined;
12945
13314
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
12946
13315
  mcp?: Record<string, {
12947
13316
  id: string;
@@ -14321,6 +14690,15 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14321
14690
  type: "global";
14322
14691
  name: string;
14323
14692
  function_type?: "preprocessor" | undefined;
14693
+ }>, z.ZodObject<{
14694
+ type: z.ZodLiteral<"inline">;
14695
+ code: z.ZodString;
14696
+ }, "strip", z.ZodTypeAny, {
14697
+ code: string;
14698
+ type: "inline";
14699
+ }, {
14700
+ code: string;
14701
+ type: "inline";
14324
14702
  }>, z.ZodNull]>>;
14325
14703
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
14326
14704
  type: z.ZodLiteral<"function">;
@@ -14341,11 +14719,11 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14341
14719
  }, "strip", z.ZodTypeAny, {
14342
14720
  type: "global";
14343
14721
  name: string;
14344
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
14722
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
14345
14723
  }, {
14346
14724
  type: "global";
14347
14725
  name: string;
14348
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
14726
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
14349
14727
  }>]>, "many">, z.ZodNull]>>;
14350
14728
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
14351
14729
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -14623,6 +15001,18 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14623
15001
  type: "completion";
14624
15002
  content: string;
14625
15003
  } | null | undefined;
15004
+ preprocessor?: {
15005
+ id: string;
15006
+ type: "function";
15007
+ version?: string | undefined;
15008
+ } | {
15009
+ type: "global";
15010
+ name: string;
15011
+ function_type: "preprocessor";
15012
+ } | {
15013
+ code: string;
15014
+ type: "inline";
15015
+ } | null | undefined;
14626
15016
  origin?: {
14627
15017
  project_id?: string | undefined;
14628
15018
  prompt_id?: string | undefined;
@@ -14643,17 +15033,8 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14643
15033
  } | {
14644
15034
  type: "global";
14645
15035
  name: string;
14646
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
15036
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
14647
15037
  })[] | null | undefined;
14648
- preprocessor?: {
14649
- id: string;
14650
- type: "function";
14651
- version?: string | undefined;
14652
- } | {
14653
- type: "global";
14654
- name: string;
14655
- function_type: "preprocessor";
14656
- } | null | undefined;
14657
15038
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
14658
15039
  mcp?: Record<string, {
14659
15040
  id: string;
@@ -14897,6 +15278,18 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14897
15278
  type: "completion";
14898
15279
  content: string;
14899
15280
  } | null | undefined;
15281
+ preprocessor?: {
15282
+ id: string;
15283
+ type: "function";
15284
+ version?: string | undefined;
15285
+ } | {
15286
+ type: "global";
15287
+ name: string;
15288
+ function_type?: "preprocessor" | undefined;
15289
+ } | {
15290
+ code: string;
15291
+ type: "inline";
15292
+ } | null | undefined;
14900
15293
  origin?: {
14901
15294
  project_id?: string | undefined;
14902
15295
  prompt_id?: string | undefined;
@@ -14917,17 +15310,8 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14917
15310
  } | {
14918
15311
  type: "global";
14919
15312
  name: string;
14920
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
15313
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
14921
15314
  })[] | null | undefined;
14922
- preprocessor?: {
14923
- id: string;
14924
- type: "function";
14925
- version?: string | undefined;
14926
- } | {
14927
- type: "global";
14928
- name: string;
14929
- function_type?: "preprocessor" | undefined;
14930
- } | null | undefined;
14931
15315
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
14932
15316
  mcp?: Record<string, {
14933
15317
  id: string;
@@ -14944,7 +15328,7 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
14944
15328
  function_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["llm", "scorer", "task", "tool", "custom_view", "preprocessor", "facet", "classifier", "tag", "parameters", "sandbox"]>>>;
14945
15329
  name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
14946
15330
  }, "strip", z.ZodTypeAny, {
14947
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
15331
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
14948
15332
  inline_prompt: {
14949
15333
  options?: {
14950
15334
  params?: z.objectOutputType<{
@@ -15176,6 +15560,18 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
15176
15560
  type: "completion";
15177
15561
  content: string;
15178
15562
  } | null | undefined;
15563
+ preprocessor?: {
15564
+ id: string;
15565
+ type: "function";
15566
+ version?: string | undefined;
15567
+ } | {
15568
+ type: "global";
15569
+ name: string;
15570
+ function_type: "preprocessor";
15571
+ } | {
15572
+ code: string;
15573
+ type: "inline";
15574
+ } | null | undefined;
15179
15575
  origin?: {
15180
15576
  project_id?: string | undefined;
15181
15577
  prompt_id?: string | undefined;
@@ -15196,17 +15592,8 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
15196
15592
  } | {
15197
15593
  type: "global";
15198
15594
  name: string;
15199
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
15595
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
15200
15596
  })[] | null | undefined;
15201
- preprocessor?: {
15202
- id: string;
15203
- type: "function";
15204
- version?: string | undefined;
15205
- } | {
15206
- type: "global";
15207
- name: string;
15208
- function_type: "preprocessor";
15209
- } | null | undefined;
15210
15597
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
15211
15598
  mcp?: Record<string, {
15212
15599
  id: string;
@@ -15453,6 +15840,18 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
15453
15840
  type: "completion";
15454
15841
  content: string;
15455
15842
  } | null | undefined;
15843
+ preprocessor?: {
15844
+ id: string;
15845
+ type: "function";
15846
+ version?: string | undefined;
15847
+ } | {
15848
+ type: "global";
15849
+ name: string;
15850
+ function_type?: "preprocessor" | undefined;
15851
+ } | {
15852
+ code: string;
15853
+ type: "inline";
15854
+ } | null | undefined;
15456
15855
  origin?: {
15457
15856
  project_id?: string | undefined;
15458
15857
  prompt_id?: string | undefined;
@@ -15473,17 +15872,8 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
15473
15872
  } | {
15474
15873
  type: "global";
15475
15874
  name: string;
15476
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
15875
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
15477
15876
  })[] | null | undefined;
15478
- preprocessor?: {
15479
- id: string;
15480
- type: "function";
15481
- version?: string | undefined;
15482
- } | {
15483
- type: "global";
15484
- name: string;
15485
- function_type?: "preprocessor" | undefined;
15486
- } | null | undefined;
15487
15877
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
15488
15878
  mcp?: Record<string, {
15489
15879
  id: string;
@@ -15498,7 +15888,7 @@ declare const FunctionId: z.ZodUnion<[z.ZodObject<{
15498
15888
  }> | null | undefined;
15499
15889
  };
15500
15890
  name?: string | null | undefined;
15501
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
15891
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
15502
15892
  }>]>;
15503
15893
  type FunctionIdType = z.infer<typeof FunctionId>;
15504
15894
  declare const GitMetadataSettings: z.ZodObject<{
@@ -15506,10 +15896,10 @@ declare const GitMetadataSettings: z.ZodObject<{
15506
15896
  fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["commit", "branch", "tag", "dirty", "author_name", "author_email", "commit_message", "commit_time", "git_diff"]>, "many">>;
15507
15897
  }, "strip", z.ZodTypeAny, {
15508
15898
  collect: "some" | "none" | "all";
15509
- fields?: ("dirty" | "commit" | "branch" | "tag" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
15899
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
15510
15900
  }, {
15511
15901
  collect: "some" | "none" | "all";
15512
- fields?: ("dirty" | "commit" | "branch" | "tag" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
15902
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
15513
15903
  }>;
15514
15904
  type GitMetadataSettingsType = z.infer<typeof GitMetadataSettings>;
15515
15905
  declare const IfExists: z.ZodEnum<["error", "ignore", "replace"]>;
@@ -16911,6 +17301,15 @@ declare const Prompt$1: z.ZodObject<{
16911
17301
  type: "global";
16912
17302
  name: string;
16913
17303
  function_type?: "preprocessor" | undefined;
17304
+ }>, z.ZodObject<{
17305
+ type: z.ZodLiteral<"inline">;
17306
+ code: z.ZodString;
17307
+ }, "strip", z.ZodTypeAny, {
17308
+ code: string;
17309
+ type: "inline";
17310
+ }, {
17311
+ code: string;
17312
+ type: "inline";
16914
17313
  }>, z.ZodNull]>>;
16915
17314
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
16916
17315
  type: z.ZodLiteral<"function">;
@@ -16931,11 +17330,11 @@ declare const Prompt$1: z.ZodObject<{
16931
17330
  }, "strip", z.ZodTypeAny, {
16932
17331
  type: "global";
16933
17332
  name: string;
16934
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
17333
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
16935
17334
  }, {
16936
17335
  type: "global";
16937
17336
  name: string;
16938
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
17337
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
16939
17338
  }>]>, "many">, z.ZodNull]>>;
16940
17339
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
16941
17340
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -17213,6 +17612,18 @@ declare const Prompt$1: z.ZodObject<{
17213
17612
  type: "completion";
17214
17613
  content: string;
17215
17614
  } | null | undefined;
17615
+ preprocessor?: {
17616
+ id: string;
17617
+ type: "function";
17618
+ version?: string | undefined;
17619
+ } | {
17620
+ type: "global";
17621
+ name: string;
17622
+ function_type: "preprocessor";
17623
+ } | {
17624
+ code: string;
17625
+ type: "inline";
17626
+ } | null | undefined;
17216
17627
  origin?: {
17217
17628
  project_id?: string | undefined;
17218
17629
  prompt_id?: string | undefined;
@@ -17233,17 +17644,8 @@ declare const Prompt$1: z.ZodObject<{
17233
17644
  } | {
17234
17645
  type: "global";
17235
17646
  name: string;
17236
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
17647
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
17237
17648
  })[] | null | undefined;
17238
- preprocessor?: {
17239
- id: string;
17240
- type: "function";
17241
- version?: string | undefined;
17242
- } | {
17243
- type: "global";
17244
- name: string;
17245
- function_type: "preprocessor";
17246
- } | null | undefined;
17247
17649
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
17248
17650
  mcp?: Record<string, {
17249
17651
  id: string;
@@ -17487,6 +17889,18 @@ declare const Prompt$1: z.ZodObject<{
17487
17889
  type: "completion";
17488
17890
  content: string;
17489
17891
  } | null | undefined;
17892
+ preprocessor?: {
17893
+ id: string;
17894
+ type: "function";
17895
+ version?: string | undefined;
17896
+ } | {
17897
+ type: "global";
17898
+ name: string;
17899
+ function_type?: "preprocessor" | undefined;
17900
+ } | {
17901
+ code: string;
17902
+ type: "inline";
17903
+ } | null | undefined;
17490
17904
  origin?: {
17491
17905
  project_id?: string | undefined;
17492
17906
  prompt_id?: string | undefined;
@@ -17507,17 +17921,8 @@ declare const Prompt$1: z.ZodObject<{
17507
17921
  } | {
17508
17922
  type: "global";
17509
17923
  name: string;
17510
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
17924
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
17511
17925
  })[] | null | undefined;
17512
- preprocessor?: {
17513
- id: string;
17514
- type: "function";
17515
- version?: string | undefined;
17516
- } | {
17517
- type: "global";
17518
- name: string;
17519
- function_type?: "preprocessor" | undefined;
17520
- } | null | undefined;
17521
17926
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
17522
17927
  mcp?: Record<string, {
17523
17928
  id: string;
@@ -17539,12 +17944,13 @@ declare const Prompt$1: z.ZodObject<{
17539
17944
  id: string;
17540
17945
  project_id: string;
17541
17946
  log_id: "p";
17542
- org_id: string;
17543
17947
  name: string;
17544
17948
  slug: string;
17949
+ org_id: string;
17545
17950
  created?: string | null | undefined;
17546
- metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
17547
17951
  description?: string | null | undefined;
17952
+ metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
17953
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
17548
17954
  tags?: string[] | null | undefined;
17549
17955
  prompt_data?: {
17550
17956
  options?: {
@@ -17777,6 +18183,18 @@ declare const Prompt$1: z.ZodObject<{
17777
18183
  type: "completion";
17778
18184
  content: string;
17779
18185
  } | null | undefined;
18186
+ preprocessor?: {
18187
+ id: string;
18188
+ type: "function";
18189
+ version?: string | undefined;
18190
+ } | {
18191
+ type: "global";
18192
+ name: string;
18193
+ function_type: "preprocessor";
18194
+ } | {
18195
+ code: string;
18196
+ type: "inline";
18197
+ } | null | undefined;
17780
18198
  origin?: {
17781
18199
  project_id?: string | undefined;
17782
18200
  prompt_id?: string | undefined;
@@ -17797,17 +18215,8 @@ declare const Prompt$1: z.ZodObject<{
17797
18215
  } | {
17798
18216
  type: "global";
17799
18217
  name: string;
17800
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
18218
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
17801
18219
  })[] | null | undefined;
17802
- preprocessor?: {
17803
- id: string;
17804
- type: "function";
17805
- version?: string | undefined;
17806
- } | {
17807
- type: "global";
17808
- name: string;
17809
- function_type: "preprocessor";
17810
- } | null | undefined;
17811
18220
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
17812
18221
  mcp?: Record<string, {
17813
18222
  id: string;
@@ -17821,18 +18230,18 @@ declare const Prompt$1: z.ZodObject<{
17821
18230
  enabled_tools?: string[] | null | undefined;
17822
18231
  }> | null | undefined;
17823
18232
  } | null | undefined;
17824
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | null | undefined;
17825
18233
  }, {
17826
18234
  _xact_id: string;
17827
18235
  id: string;
17828
18236
  project_id: string;
17829
18237
  log_id: "p";
17830
- org_id: string;
17831
18238
  name: string;
17832
18239
  slug: string;
18240
+ org_id: string;
17833
18241
  created?: string | null | undefined;
17834
- metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
17835
18242
  description?: string | null | undefined;
18243
+ metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
18244
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
17836
18245
  tags?: string[] | null | undefined;
17837
18246
  prompt_data?: {
17838
18247
  options?: {
@@ -18065,6 +18474,18 @@ declare const Prompt$1: z.ZodObject<{
18065
18474
  type: "completion";
18066
18475
  content: string;
18067
18476
  } | null | undefined;
18477
+ preprocessor?: {
18478
+ id: string;
18479
+ type: "function";
18480
+ version?: string | undefined;
18481
+ } | {
18482
+ type: "global";
18483
+ name: string;
18484
+ function_type?: "preprocessor" | undefined;
18485
+ } | {
18486
+ code: string;
18487
+ type: "inline";
18488
+ } | null | undefined;
18068
18489
  origin?: {
18069
18490
  project_id?: string | undefined;
18070
18491
  prompt_id?: string | undefined;
@@ -18085,17 +18506,8 @@ declare const Prompt$1: z.ZodObject<{
18085
18506
  } | {
18086
18507
  type: "global";
18087
18508
  name: string;
18088
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
18509
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
18089
18510
  })[] | null | undefined;
18090
- preprocessor?: {
18091
- id: string;
18092
- type: "function";
18093
- version?: string | undefined;
18094
- } | {
18095
- type: "global";
18096
- name: string;
18097
- function_type?: "preprocessor" | undefined;
18098
- } | null | undefined;
18099
18511
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
18100
18512
  mcp?: Record<string, {
18101
18513
  id: string;
@@ -18109,7 +18521,6 @@ declare const Prompt$1: z.ZodObject<{
18109
18521
  enabled_tools?: string[] | null | undefined;
18110
18522
  }> | null | undefined;
18111
18523
  } | null | undefined;
18112
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | null | undefined;
18113
18524
  }>;
18114
18525
  type PromptType = z.infer<typeof Prompt$1>;
18115
18526
  declare const PromptSessionEvent: z.ZodObject<{
@@ -18133,11 +18544,11 @@ declare const PromptSessionEvent: z.ZodObject<{
18133
18544
  prompt_session_id: string;
18134
18545
  project_id: string;
18135
18546
  function_data?: unknown;
18136
- _pagination_key?: string | null | undefined;
18547
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
18137
18548
  tags?: string[] | null | undefined;
18549
+ _pagination_key?: string | null | undefined;
18138
18550
  completion?: unknown;
18139
18551
  prompt_data?: unknown;
18140
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | null | undefined;
18141
18552
  prompt_session_data?: unknown;
18142
18553
  object_data?: unknown;
18143
18554
  }, {
@@ -18147,11 +18558,11 @@ declare const PromptSessionEvent: z.ZodObject<{
18147
18558
  prompt_session_id: string;
18148
18559
  project_id: string;
18149
18560
  function_data?: unknown;
18150
- _pagination_key?: string | null | undefined;
18561
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
18151
18562
  tags?: string[] | null | undefined;
18563
+ _pagination_key?: string | null | undefined;
18152
18564
  completion?: unknown;
18153
18565
  prompt_data?: unknown;
18154
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | null | undefined;
18155
18566
  prompt_session_data?: unknown;
18156
18567
  object_data?: unknown;
18157
18568
  }>;
@@ -18185,12 +18596,12 @@ declare const SSEProgressEventData: z.ZodObject<{
18185
18596
  data: z.ZodString;
18186
18597
  }, "strip", z.ZodTypeAny, {
18187
18598
  id: string;
18188
- object_type: "prompt" | "tool" | "parameters" | "task" | "scorer" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | "workflow";
18599
+ object_type: "prompt" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "parameters" | "sandbox" | "workflow";
18189
18600
  name: string;
18190
18601
  data: string;
18191
18602
  event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
18192
- format: "code" | "llm" | "global" | "graph" | "topic_map";
18193
- output_type: "score" | "completion" | "any" | "facet" | "classification";
18603
+ format: "code" | "llm" | "global" | "topic_map" | "graph";
18604
+ output_type: "facet" | "score" | "completion" | "classification" | "any";
18194
18605
  origin?: {
18195
18606
  id: string;
18196
18607
  object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
@@ -18200,12 +18611,12 @@ declare const SSEProgressEventData: z.ZodObject<{
18200
18611
  } | null | undefined;
18201
18612
  }, {
18202
18613
  id: string;
18203
- object_type: "prompt" | "tool" | "parameters" | "task" | "scorer" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | "workflow";
18614
+ object_type: "prompt" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "parameters" | "sandbox" | "workflow";
18204
18615
  name: string;
18205
18616
  data: string;
18206
18617
  event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
18207
- format: "code" | "llm" | "global" | "graph" | "topic_map";
18208
- output_type: "score" | "completion" | "any" | "facet" | "classification";
18618
+ format: "code" | "llm" | "global" | "topic_map" | "graph";
18619
+ output_type: "facet" | "score" | "completion" | "classification" | "any";
18209
18620
  origin?: {
18210
18621
  id: string;
18211
18622
  object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
@@ -18338,7 +18749,6 @@ declare const registerTemplatePlugin: (plugin: TemplateRendererPlugin) => void;
18338
18749
  declare const getTemplateRenderer: (name: string) => TemplateRenderer | undefined;
18339
18750
 
18340
18751
  interface GlobalHookAsyncLocalStorage<T> {
18341
- enterWith(store: T): void;
18342
18752
  run<R>(store: T | undefined, callback: () => R): R;
18343
18753
  getStore(): T | undefined;
18344
18754
  }
@@ -18419,7 +18829,7 @@ interface Common {
18419
18829
  mkdir?: (path: string, opts?: {
18420
18830
  recursive?: boolean;
18421
18831
  }) => Promise<string | undefined>;
18422
- writeFile?: (filename: string, data: string) => Promise<void>;
18832
+ writeFile?: (filename: string, data: string | Uint8Array) => Promise<void>;
18423
18833
  readFile?: (filename: string) => Promise<Uint8Array>;
18424
18834
  readdir?: (path: string) => Promise<string[]>;
18425
18835
  utimes?: (path: string, atime: Date, mtime: Date) => Promise<void>;
@@ -18597,6 +19007,14 @@ interface PromptKey {
18597
19007
  */
18598
19008
  id?: string;
18599
19009
  }
19010
+ type PromptMemoryCacheEntry = {
19011
+ value: Prompt;
19012
+ resolvedOrgIdentity?: string;
19013
+ };
19014
+ type PromptDiskCacheEntry = {
19015
+ value: ReturnType<Prompt["_internalSerializeForCache"]>;
19016
+ resolvedOrgIdentity?: string;
19017
+ };
18600
19018
  /**
18601
19019
  * A configurable cache for Braintrust prompts with optional in-memory and filesystem storage.
18602
19020
  *
@@ -18605,10 +19023,19 @@ interface PromptKey {
18605
19023
  declare class PromptCache {
18606
19024
  private readonly memoryCache?;
18607
19025
  private readonly diskCache?;
19026
+ private readonly namespace?;
19027
+ private readonly expectedResolvedOrgIdentity?;
18608
19028
  constructor(options: {
18609
- memoryCache?: LRUCache<string, Prompt>;
18610
- diskCache?: DiskCache<Prompt>;
19029
+ memoryCache?: LRUCache<string, PromptMemoryCacheEntry>;
19030
+ diskCache?: DiskCache<PromptDiskCacheEntry>;
19031
+ namespace?: string;
19032
+ expectedResolvedOrgIdentity?: string;
18611
19033
  });
19034
+ /**
19035
+ * Returns a cache view that shares the same storage layers but isolates all
19036
+ * entries under the provided namespace.
19037
+ */
19038
+ withNamespace(namespace: string, expectedResolvedOrgIdentity?: string): PromptCache;
18612
19039
  /**
18613
19040
  * Retrieves a prompt from the cache.
18614
19041
  * First checks the in-memory LRU cache, then falls back to checking the disk cache if available.
@@ -18632,13 +19059,26 @@ interface ParametersKey {
18632
19059
  projectName?: string;
18633
19060
  id?: string;
18634
19061
  }
19062
+ type ParametersMemoryCacheEntry = {
19063
+ value: RemoteEvalParameters;
19064
+ resolvedOrgIdentity?: string;
19065
+ };
19066
+ type ParametersDiskCacheEntry = {
19067
+ value: ReturnType<RemoteEvalParameters["_internalSerializeForCache"]>;
19068
+ resolvedOrgIdentity?: string;
19069
+ };
18635
19070
  declare class ParametersCache {
18636
19071
  private readonly memoryCache?;
18637
19072
  private readonly diskCache?;
19073
+ private readonly namespace?;
19074
+ private readonly expectedResolvedOrgIdentity?;
18638
19075
  constructor(options: {
18639
- memoryCache?: LRUCache<string, RemoteEvalParameters>;
18640
- diskCache?: DiskCache<RemoteEvalParameters>;
19076
+ memoryCache?: LRUCache<string, ParametersMemoryCacheEntry>;
19077
+ diskCache?: DiskCache<ParametersDiskCacheEntry>;
19078
+ namespace?: string;
19079
+ expectedResolvedOrgIdentity?: string;
18641
19080
  });
19081
+ withNamespace(namespace: string, expectedResolvedOrgIdentity?: string): ParametersCache;
18642
19082
  get(key: ParametersKey): Promise<RemoteEvalParameters | undefined>;
18643
19083
  set(key: ParametersKey, value: RemoteEvalParameters): Promise<void>;
18644
19084
  }
@@ -20709,8 +21149,8 @@ declare const parametersRowSchema: z.ZodObject<{
20709
21149
  name: string;
20710
21150
  slug: string;
20711
21151
  function_type: "parameters";
20712
- metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
20713
21152
  description?: string | null | undefined;
21153
+ metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
20714
21154
  }, {
20715
21155
  _xact_id: string;
20716
21156
  id: string;
@@ -20723,8 +21163,8 @@ declare const parametersRowSchema: z.ZodObject<{
20723
21163
  name: string;
20724
21164
  slug: string;
20725
21165
  function_type: "parameters";
20726
- metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
20727
21166
  description?: string | null | undefined;
21167
+ metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
20728
21168
  }>;
20729
21169
  type ParametersRow = z.infer<typeof parametersRowSchema>;
20730
21170
 
@@ -20741,9 +21181,11 @@ type SetCurrentArg = {
20741
21181
  };
20742
21182
  type StartSpanEventArgs = ExperimentLogPartialArgs & Partial<IdField>;
20743
21183
  declare const INITIAL_SPAN_WRITE_AS_MERGE: unique symbol;
21184
+ declare const RESUME_SPAN_WITHOUT_INITIAL_WRITE: unique symbol;
20744
21185
  declare const INTERNAL_SPAN_CONTEXT: unique symbol;
20745
21186
  type InitialSpanWriteAsMergeArg = {
20746
21187
  readonly [INITIAL_SPAN_WRITE_AS_MERGE]?: true;
21188
+ readonly [RESUME_SPAN_WITHOUT_INITIAL_WRITE]?: true;
20747
21189
  };
20748
21190
  type InternalSpanContextArg = {
20749
21191
  readonly [INTERNAL_SPAN_CONTEXT]?: Record<string, unknown>;
@@ -21001,10 +21443,10 @@ declare const loginSchema: z.ZodObject<{
21001
21443
  fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["commit", "branch", "tag", "dirty", "author_name", "author_email", "commit_message", "commit_time", "git_diff"]>, "many">>;
21002
21444
  }, "strip", z.ZodTypeAny, {
21003
21445
  collect: "some" | "none" | "all";
21004
- fields?: ("dirty" | "commit" | "branch" | "tag" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
21446
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
21005
21447
  }, {
21006
21448
  collect: "some" | "none" | "all";
21007
- fields?: ("dirty" | "commit" | "branch" | "tag" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
21449
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
21008
21450
  }>>>;
21009
21451
  debugLogLevel: z.ZodOptional<z.ZodEnum<["error", "warn", "info", "debug"]>>;
21010
21452
  debugLogLevelDisabled: z.ZodOptional<z.ZodBoolean>;
@@ -21018,7 +21460,7 @@ declare const loginSchema: z.ZodObject<{
21018
21460
  orgId?: string | null | undefined;
21019
21461
  gitMetadataSettings?: {
21020
21462
  collect: "some" | "none" | "all";
21021
- fields?: ("dirty" | "commit" | "branch" | "tag" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
21463
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
21022
21464
  } | null | undefined;
21023
21465
  debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
21024
21466
  debugLogLevelDisabled?: boolean | undefined;
@@ -21032,14 +21474,23 @@ declare const loginSchema: z.ZodObject<{
21032
21474
  orgId?: string | null | undefined;
21033
21475
  gitMetadataSettings?: {
21034
21476
  collect: "some" | "none" | "all";
21035
- fields?: ("dirty" | "commit" | "branch" | "tag" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
21477
+ fields?: ("dirty" | "tag" | "commit" | "branch" | "author_name" | "author_email" | "commit_message" | "commit_time" | "git_diff")[] | undefined;
21036
21478
  } | null | undefined;
21037
21479
  debugLogLevel?: "error" | "warn" | "info" | "debug" | undefined;
21038
21480
  debugLogLevelDisabled?: boolean | undefined;
21039
21481
  }>;
21040
21482
  type SerializedBraintrustState = z.infer<typeof loginSchema>;
21483
+ type ResolvedLoaderLoginOptions = Required<Pick<LoginOptions, "apiKey" | "appUrl" | "fetch">> & Pick<LoginOptions, "orgName"> & {
21484
+ forceLogin?: boolean;
21485
+ credentialCacheNamespace: string;
21486
+ existingState?: BraintrustState;
21487
+ };
21488
+ type LoaderCacheViews = {
21489
+ promptCache: PromptCache;
21490
+ parametersCache: ParametersCache;
21491
+ };
21492
+ type LoaderRequestState = Pick<BraintrustState, "appUrl" | "orgId" | "apiConn">;
21041
21493
  declare class BraintrustState {
21042
- private loginParams;
21043
21494
  id: string;
21044
21495
  currentExperiment: Experiment | undefined;
21045
21496
  currentLogger: Logger<false> | undefined;
@@ -21070,12 +21521,23 @@ declare class BraintrustState {
21070
21521
  private _otelFlushCallback;
21071
21522
  spanOriginEnvironment: SpanOriginEnvironment | undefined;
21072
21523
  private traceContextSigningSecret;
21524
+ private loaderLoginCache;
21525
+ private readonly loginParams;
21526
+ private activeLoginOrgNameSelector;
21073
21527
  constructor(loginParams: LoginOptions);
21074
21528
  /** @internal */
21075
21529
  _internalSetTraceContextSigningSecret(secret: string | undefined): void;
21076
21530
  /** @internal */
21077
21531
  _internalGetTraceContextSigningSecret(): string | undefined;
21078
21532
  resetLoginInfo(): void;
21533
+ /** @internal */
21534
+ _internalResolveLoaderLoginOptions({ apiKey, appUrl, orgName, fetch, forceLogin, }: Pick<LoginOptions, "apiKey" | "appUrl" | "orgName" | "fetch"> & {
21535
+ forceLogin?: boolean;
21536
+ }): Promise<ResolvedLoaderLoginOptions>;
21537
+ /** @internal */
21538
+ _internalGetLoaderCacheViews(loginOptions: ResolvedLoaderLoginOptions, requestState?: LoaderRequestState): LoaderCacheViews;
21539
+ /** @internal */
21540
+ _internalGetLoaderState({ apiKey, appUrl, orgName, fetch, forceLogin, existingState, }: ResolvedLoaderLoginOptions): Promise<LoaderRequestState>;
21079
21541
  resetIdGenState(): void;
21080
21542
  [RESET_CONTEXT_MANAGER_STATE](): void;
21081
21543
  get idGenerator(): IDGenerator;
@@ -21145,14 +21607,16 @@ declare class FailedHTTPResponse extends Error {
21145
21607
  status: number;
21146
21608
  text: string;
21147
21609
  data: string;
21148
- constructor(status: number, text: string, data: string);
21610
+ readonly cause?: unknown;
21611
+ constructor(status: number, text: string, data: string, cause?: unknown);
21149
21612
  }
21150
21613
  declare class HTTPConnection {
21614
+ private readonly classifyTransportErrors;
21151
21615
  base_url: string;
21152
21616
  token: string | null;
21153
21617
  headers: Record<string, string>;
21154
21618
  fetch: typeof globalThis.fetch;
21155
- constructor(base_url: string, fetch: typeof globalThis.fetch);
21619
+ constructor(base_url: string, fetch: typeof globalThis.fetch, classifyTransportErrors?: boolean);
21156
21620
  setFetch(fetch: typeof globalThis.fetch): void;
21157
21621
  ping(): Promise<boolean>;
21158
21622
  make_long_lived(): void;
@@ -21806,6 +22270,7 @@ declare global {
21806
22270
  }
21807
22271
  type InitDatasetOptions<IsLegacyDataset extends boolean> = FullLoginOptions & {
21808
22272
  dataset?: string;
22273
+ datasetId?: string;
21809
22274
  description?: string;
21810
22275
  version?: string;
21811
22276
  environment?: string;
@@ -21819,22 +22284,23 @@ type FullInitDatasetOptions<IsLegacyDataset extends boolean> = {
21819
22284
  project?: string;
21820
22285
  } & InitDatasetOptions<IsLegacyDataset>;
21821
22286
  /**
21822
- * Create a new dataset in a specified project. If the project does not exist, it will be created.
22287
+ * Initialize a dataset by name or ID. When initializing by name, the dataset and its project will be created if they do not exist.
21823
22288
  *
21824
22289
  * @param options Options for configuring initDataset().
21825
- * @param options.project The name of the project to create the dataset in. Must specify at least one of `project` or `projectId`.
21826
- * @param options.dataset The name of the dataset to create. If not specified, a name will be generated automatically.
21827
- * @param options.description An optional description of the dataset.
22290
+ * @param options.project The name of the project to create the dataset in. Must specify at least one of `project` or `projectId` unless `datasetId` is provided.
22291
+ * @param options.dataset The name of the dataset to create. If not specified, a name will be generated automatically. Ignored if `datasetId` is provided.
22292
+ * @param options.datasetId The ID of an existing dataset. Takes precedence over `dataset` and does not require `project` or `projectId`.
22293
+ * @param options.description An optional description when initializing a dataset by name. Cannot be used with `datasetId`.
21828
22294
  * @param options.version Pin the dataset to a specific version xact_id. If `snapshotName` or `environment` are also provided, `version` takes precedence.
21829
22295
  * @param options.snapshotName Pin the dataset to the version captured by this named snapshot. If `environment` is also provided, `snapshotName` takes precedence.
21830
22296
  * @param options.environment Pin the dataset to the version tagged with this environment slug.
21831
22297
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
21832
22298
  * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
21833
22299
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
21834
- * @param options.projectId The id of the project to create the dataset in. This takes precedence over `project` if specified.
21835
- * @param options.metadata A dictionary with additional data about the dataset. The values in `metadata` can be any JSON-serializable type, but its keys must be strings.
22300
+ * @param options.projectId The id of the project to create the dataset in. This takes precedence over `project` if specified and is not required when `datasetId` is provided.
22301
+ * @param options.metadata A dictionary with additional data when initializing a dataset by name. Cannot be used with `datasetId`. The values in `metadata` can be any JSON-serializable type, but its keys must be strings.
21836
22302
  * @param options.useOutput (Deprecated) If true, records will be fetched from this dataset in the legacy format, with the "expected" field renamed to "output". This option will be removed in a future version of Braintrust.
21837
- * @returns The newly created Dataset.
22303
+ * @returns The initialized Dataset.
21838
22304
  */
21839
22305
  declare function initDataset<IsLegacyDataset extends boolean = typeof DEFAULT_IS_LEGACY_DATASET>(options: Readonly<FullInitDatasetOptions<IsLegacyDataset>>): Dataset<IsLegacyDataset>;
21840
22306
  /**
@@ -21934,7 +22400,7 @@ type LoadParametersByProjectIdWithEnvOptions = LoadParametersBaseOptions & {
21934
22400
  * @param options.defaults (Optional) A dictionary of default values to use when rendering the prompt. Prompt values will override these defaults.
21935
22401
  * @param options.noTrace If true, do not include logging metadata for this prompt when build() is called.
21936
22402
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
21937
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js,
22403
+ * @param options.apiKey The API key to use for this request, independently of any existing global login. If the parameter is not specified, will use an existing login or try the `BRAINTRUST_API_KEY` environment variable. In Node.js,
21938
22404
  * if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories. If no API key is specified, will prompt the user to login.
21939
22405
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
21940
22406
  * @returns The prompt object.
@@ -21961,7 +22427,7 @@ declare function loadPrompt({ projectName, projectId, slug, version, environment
21961
22427
  * @param options.environment Fetch the version of the parameters assigned to the specified environment (e.g. "production", "staging"). If both `version` and `environment` are provided, `version` takes precedence.
21962
22428
  * @param options.id The id of specific parameters to load. If specified, this takes precedence over all other parameters (project and slug).
21963
22429
  * @param options.appUrl The URL of the Braintrust App. Defaults to https://www.braintrust.dev.
21964
- * @param options.apiKey The API key to use. If the parameter is not specified, will try to use the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories.
22430
+ * @param options.apiKey The API key to use for this request, independently of any existing global login. If the parameter is not specified, will use an existing login or try the `BRAINTRUST_API_KEY` environment variable. In Node.js, if that is unset, will try the nearest `.env.braintrust` file in the current working directory or parent directories.
21965
22431
  * @param options.orgName (Optional) The name of a specific organization to connect to. This is useful if you belong to multiple.
21966
22432
  * @returns The parameters object.
21967
22433
  * @throws If the parameters are not found.
@@ -22740,6 +23206,251 @@ declare class Prompt<HasId extends boolean = true, HasVersion extends boolean =
22740
23206
  }): PromptBlockDataType;
22741
23207
  private getParsedPromptData;
22742
23208
  static isPrompt(data: unknown): data is Prompt<boolean, boolean>;
23209
+ /** @internal */
23210
+ _internalSerializeForCache(): {
23211
+ metadata: {
23212
+ _xact_id: string;
23213
+ created: string;
23214
+ id: string;
23215
+ prompt_session_id: string;
23216
+ project_id: string;
23217
+ function_data?: unknown;
23218
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | null | undefined;
23219
+ tags?: string[] | null | undefined;
23220
+ _pagination_key?: string | null | undefined;
23221
+ completion?: unknown;
23222
+ prompt_data?: unknown;
23223
+ prompt_session_data?: unknown;
23224
+ object_data?: unknown;
23225
+ } | PromptRowWithId<HasId, HasVersion>;
23226
+ defaults: Partial<Omit<z.objectOutputType<{
23227
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23228
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23229
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23230
+ temperature: z.ZodOptional<z.ZodNumber>;
23231
+ top_p: z.ZodOptional<z.ZodNumber>;
23232
+ max_tokens: z.ZodOptional<z.ZodNumber>;
23233
+ max_completion_tokens: z.ZodOptional<z.ZodNumber>;
23234
+ frequency_penalty: z.ZodOptional<z.ZodNumber>;
23235
+ presence_penalty: z.ZodOptional<z.ZodNumber>;
23236
+ response_format: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
23237
+ type: z.ZodLiteral<"json_object">;
23238
+ }, "strip", z.ZodTypeAny, {
23239
+ type: "json_object";
23240
+ }, {
23241
+ type: "json_object";
23242
+ }>, z.ZodObject<{
23243
+ type: z.ZodLiteral<"json_schema">;
23244
+ json_schema: z.ZodObject<{
23245
+ name: z.ZodString;
23246
+ description: z.ZodOptional<z.ZodString>;
23247
+ schema: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodString]>>;
23248
+ strict: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
23249
+ }, "strip", z.ZodTypeAny, {
23250
+ name: string;
23251
+ description?: string | undefined;
23252
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23253
+ strict?: boolean | null | undefined;
23254
+ }, {
23255
+ name: string;
23256
+ description?: string | undefined;
23257
+ schema?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23258
+ strict?: boolean | null | undefined;
23259
+ }>;
23260
+ }, "strip", z.ZodTypeAny, {
23261
+ type: "json_schema";
23262
+ json_schema: {
23263
+ name: string;
23264
+ description?: string | undefined;
23265
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23266
+ strict?: boolean | null | undefined;
23267
+ };
23268
+ }, {
23269
+ type: "json_schema";
23270
+ json_schema: {
23271
+ name: string;
23272
+ description?: string | undefined;
23273
+ schema?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23274
+ strict?: boolean | null | undefined;
23275
+ };
23276
+ }>, z.ZodObject<{
23277
+ type: z.ZodLiteral<"text">;
23278
+ }, "strip", z.ZodTypeAny, {
23279
+ type: "text";
23280
+ }, {
23281
+ type: "text";
23282
+ }>, z.ZodNull]>>;
23283
+ tool_choice: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{
23284
+ type: z.ZodLiteral<"function">;
23285
+ function: z.ZodObject<{
23286
+ name: z.ZodString;
23287
+ }, "strip", z.ZodTypeAny, {
23288
+ name: string;
23289
+ }, {
23290
+ name: string;
23291
+ }>;
23292
+ }, "strip", z.ZodTypeAny, {
23293
+ function: {
23294
+ name: string;
23295
+ };
23296
+ type: "function";
23297
+ }, {
23298
+ function: {
23299
+ name: string;
23300
+ };
23301
+ type: "function";
23302
+ }>]>>;
23303
+ function_call: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"none">, z.ZodObject<{
23304
+ name: z.ZodString;
23305
+ }, "strip", z.ZodTypeAny, {
23306
+ name: string;
23307
+ }, {
23308
+ name: string;
23309
+ }>]>>;
23310
+ n: z.ZodOptional<z.ZodNumber>;
23311
+ stop: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23312
+ reasoning_effort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high"]>>;
23313
+ verbosity: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
23314
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
23315
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23316
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23317
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23318
+ max_tokens: z.ZodNumber;
23319
+ temperature: z.ZodNumber;
23320
+ top_p: z.ZodOptional<z.ZodNumber>;
23321
+ top_k: z.ZodOptional<z.ZodNumber>;
23322
+ stop_sequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23323
+ max_tokens_to_sample: z.ZodOptional<z.ZodNumber>;
23324
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
23325
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23326
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23327
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23328
+ temperature: z.ZodOptional<z.ZodNumber>;
23329
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
23330
+ topP: z.ZodOptional<z.ZodNumber>;
23331
+ topK: z.ZodOptional<z.ZodNumber>;
23332
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
23333
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23334
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23335
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23336
+ temperature: z.ZodOptional<z.ZodNumber>;
23337
+ topK: z.ZodOptional<z.ZodNumber>;
23338
+ }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
23339
+ use_cache: z.ZodOptional<z.ZodBoolean>;
23340
+ reasoning_enabled: z.ZodOptional<z.ZodBoolean>;
23341
+ reasoning_budget: z.ZodOptional<z.ZodNumber>;
23342
+ }, z.ZodTypeAny, "passthrough"> | undefined, "response_format" | "reasoning_effort" | "use_cache"> & Omit<{
23343
+ max_tokens: number;
23344
+ temperature?: number | undefined;
23345
+ top_p?: number | undefined;
23346
+ max_completion_tokens?: number | undefined;
23347
+ frequency_penalty?: number | undefined;
23348
+ presence_penalty?: number | undefined;
23349
+ response_format?: {
23350
+ type: "json_object";
23351
+ } | {
23352
+ type: "json_schema";
23353
+ json_schema: {
23354
+ name: string;
23355
+ description?: string | undefined;
23356
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23357
+ strict?: boolean | null | undefined;
23358
+ };
23359
+ } | {
23360
+ type: "text";
23361
+ } | null | undefined;
23362
+ tool_choice?: "auto" | "none" | "required" | {
23363
+ function: {
23364
+ name: string;
23365
+ };
23366
+ type: "function";
23367
+ } | undefined;
23368
+ function_call?: "auto" | "none" | {
23369
+ name: string;
23370
+ } | undefined;
23371
+ n?: number | undefined;
23372
+ stop?: string[] | undefined;
23373
+ reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | undefined;
23374
+ verbosity?: "low" | "medium" | "high" | undefined;
23375
+ top_k?: number | undefined;
23376
+ stop_sequences?: string[] | undefined;
23377
+ reasoning_enabled?: boolean | undefined;
23378
+ reasoning_budget?: number | undefined;
23379
+ max_tokens_to_sample?: number | undefined;
23380
+ maxOutputTokens?: number | undefined;
23381
+ topP?: number | undefined;
23382
+ topK?: number | undefined;
23383
+ use_cache?: boolean | undefined;
23384
+ }, "response_format" | "reasoning_effort" | "use_cache"> & {
23385
+ reasoning_effort?: CompiledPromptReasoningEffort;
23386
+ response_format?: {
23387
+ type: "json_object";
23388
+ } | {
23389
+ type: "text";
23390
+ } | (Omit<{
23391
+ type: "json_schema";
23392
+ json_schema: {
23393
+ name: string;
23394
+ description?: string | undefined;
23395
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23396
+ strict?: boolean | null | undefined;
23397
+ };
23398
+ }, "json_schema"> & {
23399
+ json_schema: Omit<{
23400
+ name: string;
23401
+ description?: string | undefined;
23402
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23403
+ strict?: boolean | null | undefined;
23404
+ }, "schema"> & {
23405
+ schema?: Record<string, unknown> | undefined;
23406
+ };
23407
+ }) | undefined;
23408
+ model: string;
23409
+ } & {
23410
+ max_tokens: number;
23411
+ temperature?: number | undefined;
23412
+ top_p?: number | undefined;
23413
+ max_completion_tokens?: number | undefined;
23414
+ frequency_penalty?: number | undefined;
23415
+ presence_penalty?: number | undefined;
23416
+ response_format?: {
23417
+ type: "json_object";
23418
+ } | {
23419
+ type: "json_schema";
23420
+ json_schema: {
23421
+ name: string;
23422
+ description?: string | undefined;
23423
+ schema?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
23424
+ strict?: boolean | null | undefined;
23425
+ };
23426
+ } | {
23427
+ type: "text";
23428
+ } | null | undefined;
23429
+ tool_choice?: "auto" | "none" | "required" | {
23430
+ function: {
23431
+ name: string;
23432
+ };
23433
+ type: "function";
23434
+ } | undefined;
23435
+ function_call?: "auto" | "none" | {
23436
+ name: string;
23437
+ } | undefined;
23438
+ n?: number | undefined;
23439
+ stop?: string[] | undefined;
23440
+ reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | undefined;
23441
+ verbosity?: "low" | "medium" | "high" | undefined;
23442
+ top_k?: number | undefined;
23443
+ stop_sequences?: string[] | undefined;
23444
+ reasoning_enabled?: boolean | undefined;
23445
+ reasoning_budget?: number | undefined;
23446
+ max_tokens_to_sample?: number | undefined;
23447
+ maxOutputTokens?: number | undefined;
23448
+ topP?: number | undefined;
23449
+ topK?: number | undefined;
23450
+ use_cache?: boolean | undefined;
23451
+ } & ChatPrompt & CompletionPrompt>;
23452
+ noTrace: boolean;
23453
+ };
22743
23454
  static fromPromptData(name: string, promptData: PromptDataType): Prompt<false, false>;
22744
23455
  }
22745
23456
  declare class RemoteEvalParameters<HasId extends boolean = true, HasVersion extends boolean = true, T extends Record<string, unknown> = Record<string, unknown>> {
@@ -22753,6 +23464,24 @@ declare class RemoteEvalParameters<HasId extends boolean = true, HasVersion exte
22753
23464
  get version(): HasVersion extends true ? TransactionId : TransactionId | undefined;
22754
23465
  get schema(): Record<string, unknown>;
22755
23466
  get data(): T;
23467
+ /** @internal */
23468
+ _internalSerializeForCache(): {
23469
+ metadata: {
23470
+ _xact_id: string;
23471
+ id: string;
23472
+ project_id: string;
23473
+ function_data: {
23474
+ type: "parameters";
23475
+ __schema: Record<string, unknown>;
23476
+ data?: Record<string, unknown> | undefined;
23477
+ };
23478
+ name: string;
23479
+ slug: string;
23480
+ function_type: "parameters";
23481
+ description?: string | null | undefined;
23482
+ metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
23483
+ };
23484
+ };
22756
23485
  validate(data: unknown): boolean;
22757
23486
  static isParameters(x: unknown): x is RemoteEvalParameters<boolean, boolean, Record<string, unknown>>;
22758
23487
  }
@@ -23048,12 +23777,12 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
23048
23777
  data: z.ZodString;
23049
23778
  }, "strip", z.ZodTypeAny, {
23050
23779
  id: string;
23051
- object_type: "prompt" | "tool" | "parameters" | "task" | "scorer" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | "workflow";
23780
+ object_type: "prompt" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "parameters" | "sandbox" | "workflow";
23052
23781
  name: string;
23053
23782
  data: string;
23054
23783
  event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
23055
- format: "code" | "llm" | "global" | "graph" | "topic_map";
23056
- output_type: "score" | "completion" | "any" | "facet" | "classification";
23784
+ format: "code" | "llm" | "global" | "topic_map" | "graph";
23785
+ output_type: "facet" | "score" | "completion" | "classification" | "any";
23057
23786
  origin?: {
23058
23787
  id: string;
23059
23788
  object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
@@ -23063,12 +23792,12 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
23063
23792
  } | null | undefined;
23064
23793
  }, {
23065
23794
  id: string;
23066
- object_type: "prompt" | "tool" | "parameters" | "task" | "scorer" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | "workflow";
23795
+ object_type: "prompt" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "parameters" | "sandbox" | "workflow";
23067
23796
  name: string;
23068
23797
  data: string;
23069
23798
  event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
23070
- format: "code" | "llm" | "global" | "graph" | "topic_map";
23071
- output_type: "score" | "completion" | "any" | "facet" | "classification";
23799
+ format: "code" | "llm" | "global" | "topic_map" | "graph";
23800
+ output_type: "facet" | "score" | "completion" | "classification" | "any";
23072
23801
  origin?: {
23073
23802
  id: string;
23074
23803
  object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
@@ -23081,12 +23810,12 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
23081
23810
  type: "progress";
23082
23811
  data: {
23083
23812
  id: string;
23084
- object_type: "prompt" | "tool" | "parameters" | "task" | "scorer" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | "workflow";
23813
+ object_type: "prompt" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "parameters" | "sandbox" | "workflow";
23085
23814
  name: string;
23086
23815
  data: string;
23087
23816
  event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
23088
- format: "code" | "llm" | "global" | "graph" | "topic_map";
23089
- output_type: "score" | "completion" | "any" | "facet" | "classification";
23817
+ format: "code" | "llm" | "global" | "topic_map" | "graph";
23818
+ output_type: "facet" | "score" | "completion" | "classification" | "any";
23090
23819
  origin?: {
23091
23820
  id: string;
23092
23821
  object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
@@ -23099,12 +23828,12 @@ declare const braintrustStreamChunkSchema: z.ZodUnion<[z.ZodObject<{
23099
23828
  type: "progress";
23100
23829
  data: {
23101
23830
  id: string;
23102
- object_type: "prompt" | "tool" | "parameters" | "task" | "scorer" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | "workflow";
23831
+ object_type: "prompt" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "parameters" | "sandbox" | "workflow";
23103
23832
  name: string;
23104
23833
  data: string;
23105
23834
  event: "done" | "error" | "text_delta" | "reasoning_delta" | "json_delta" | "progress" | "console" | "start";
23106
- format: "code" | "llm" | "global" | "graph" | "topic_map";
23107
- output_type: "score" | "completion" | "any" | "facet" | "classification";
23835
+ format: "code" | "llm" | "global" | "topic_map" | "graph";
23836
+ output_type: "facet" | "score" | "completion" | "classification" | "any";
23108
23837
  origin?: {
23109
23838
  id: string;
23110
23839
  object_type: "function" | "experiment" | "dataset" | "prompt" | "prompt_session" | "project_logs";
@@ -23411,12 +24140,24 @@ interface OpenAIChatToolFunction {
23411
24140
  name?: string;
23412
24141
  [key: string]: unknown;
23413
24142
  }
24143
+ interface OpenAIChatToolFunctionDelta {
24144
+ arguments?: string;
24145
+ name?: string;
24146
+ [key: string]: unknown;
24147
+ }
23414
24148
  interface OpenAIChatToolCall {
23415
24149
  id?: string;
23416
24150
  type?: string;
23417
24151
  function: OpenAIChatToolFunction;
23418
24152
  [key: string]: unknown;
23419
24153
  }
24154
+ interface OpenAIChatToolCallDelta {
24155
+ index: number;
24156
+ id?: string;
24157
+ type?: string;
24158
+ function?: OpenAIChatToolFunctionDelta;
24159
+ [key: string]: unknown;
24160
+ }
23420
24161
  interface OpenAIChatMessage {
23421
24162
  role?: string;
23422
24163
  content?: unknown;
@@ -23452,11 +24193,12 @@ interface OpenAIChatDelta {
23452
24193
  role?: string;
23453
24194
  content?: string;
23454
24195
  refusal?: string;
23455
- tool_calls?: OpenAIChatToolCall[];
24196
+ tool_calls?: OpenAIChatToolCallDelta[];
23456
24197
  finish_reason?: string | null;
23457
24198
  [key: string]: unknown;
23458
24199
  }
23459
24200
  interface OpenAIChatChunkChoice {
24201
+ index: number;
23460
24202
  delta?: OpenAIChatDelta;
23461
24203
  finish_reason?: string | null;
23462
24204
  logprobs?: OpenAIChatLogprobs | null;
@@ -24013,7 +24755,7 @@ type EveModelMessage = EveSystemModelMessage | {
24013
24755
  readonly role: "tool";
24014
24756
  };
24015
24757
  interface EveInstrumentationModelInput {
24016
- readonly instructions?: string | readonly EveSystemModelMessage[];
24758
+ readonly instructions?: string | EveSystemModelMessage | readonly EveSystemModelMessage[];
24017
24759
  readonly messages: readonly EveModelMessage[];
24018
24760
  }
24019
24761
  interface EveInstrumentationStepStartedEventInput {
@@ -24042,6 +24784,183 @@ interface EveInstrumentationDefinition {
24042
24784
  readonly recordOutputs?: boolean;
24043
24785
  readonly setup?: (context: EveInstrumentationSetupContext) => void;
24044
24786
  }
24787
+ /**
24788
+ * Vendored types for Eve's instrumentation-provider API, introduced in
24789
+ * eve@0.34.0. Keep this limited to lifecycle events consumed by Braintrust.
24790
+ */
24791
+ interface EveProviderSetupContext {
24792
+ readonly agentName: string;
24793
+ readonly environment?: "development" | "preview" | "production";
24794
+ readonly evaluation?: {
24795
+ readonly runId: string;
24796
+ };
24797
+ readonly frameworkVersion?: string;
24798
+ }
24799
+ interface EveProviderState {
24800
+ get(): EveJsonValue | undefined;
24801
+ set(value: EveJsonValue | undefined): void;
24802
+ }
24803
+ interface EveProviderContext {
24804
+ readonly state: EveProviderState;
24805
+ }
24806
+ interface EveInstrumentationAttemptScope {
24807
+ readonly attemptId: string;
24808
+ readonly attemptIndex: number;
24809
+ readonly functionId?: string;
24810
+ readonly rootSessionId?: string;
24811
+ readonly sessionId: string;
24812
+ readonly stepIndex: number;
24813
+ readonly turnId: string;
24814
+ }
24815
+ interface EveInstrumentationParentLineage {
24816
+ readonly callId: string;
24817
+ readonly sessionId: string;
24818
+ readonly subagentName?: string;
24819
+ readonly turnId: string;
24820
+ }
24821
+ interface EveInstrumentationTraceContext {
24822
+ readonly isRemote?: boolean;
24823
+ readonly spanId: string;
24824
+ readonly traceFlags: number;
24825
+ readonly traceId: string;
24826
+ }
24827
+ interface EveProviderTurnStartedEvent {
24828
+ readonly idempotencyKey: string;
24829
+ readonly parentLineage?: EveInstrumentationParentLineage;
24830
+ readonly parentTraceContext?: EveInstrumentationTraceContext;
24831
+ readonly rootSessionId: string;
24832
+ readonly sequence: number;
24833
+ readonly sessionId: string;
24834
+ readonly turnId: string;
24835
+ readonly type: "turn.started";
24836
+ }
24837
+ type EveProviderTurnTerminalEvent = {
24838
+ readonly idempotencyKey: string;
24839
+ readonly sessionId: string;
24840
+ readonly turnId: string;
24841
+ readonly type: "turn.cancelled" | "turn.completed";
24842
+ } | {
24843
+ readonly error?: unknown;
24844
+ readonly idempotencyKey: string;
24845
+ readonly sessionId: string;
24846
+ readonly turnId: string;
24847
+ readonly type: "turn.failed";
24848
+ };
24849
+ interface EveProviderModelCallStartedEvent {
24850
+ readonly idempotencyKey: string;
24851
+ readonly input?: EveInstrumentationModelInput;
24852
+ readonly model: {
24853
+ readonly modelId: string;
24854
+ readonly provider: string;
24855
+ };
24856
+ readonly scope: EveInstrumentationAttemptScope;
24857
+ readonly type: "model.call.started";
24858
+ }
24859
+ type EveProviderContentPart = {
24860
+ readonly text: string;
24861
+ readonly type: "text";
24862
+ } | {
24863
+ readonly text: string;
24864
+ readonly type: "reasoning";
24865
+ } | {
24866
+ readonly callId: string;
24867
+ readonly input: unknown;
24868
+ readonly toolName: string;
24869
+ readonly type: "tool-call";
24870
+ } | {
24871
+ readonly callId: string;
24872
+ readonly input: unknown;
24873
+ readonly output: unknown;
24874
+ readonly toolName: string;
24875
+ readonly type: "tool-result";
24876
+ } | {
24877
+ readonly callId: string;
24878
+ readonly error: unknown;
24879
+ readonly input: unknown;
24880
+ readonly toolName: string;
24881
+ readonly type: "tool-error";
24882
+ };
24883
+ interface EveProviderUsage {
24884
+ readonly inputTokenDetails?: {
24885
+ readonly cacheReadTokens?: number;
24886
+ readonly cacheWriteTokens?: number;
24887
+ };
24888
+ readonly inputTokens?: number;
24889
+ readonly outputTokens?: number;
24890
+ }
24891
+ type EveProviderModelCallTerminalEvent = {
24892
+ readonly content?: readonly EveProviderContentPart[];
24893
+ readonly finishReason: string;
24894
+ readonly idempotencyKey: string;
24895
+ readonly scope: EveInstrumentationAttemptScope;
24896
+ readonly type: "model.call.completed";
24897
+ readonly usage: EveProviderUsage;
24898
+ } | {
24899
+ readonly error?: unknown;
24900
+ readonly idempotencyKey: string;
24901
+ readonly scope: EveInstrumentationAttemptScope;
24902
+ readonly type: "model.call.failed";
24903
+ };
24904
+ type EveProviderActionKind = "load-skill" | "remote-agent-call" | "subagent-call" | "tool-call";
24905
+ interface EveProviderActionStartedEvent {
24906
+ readonly callId: string;
24907
+ readonly idempotencyKey: string;
24908
+ readonly input?: unknown;
24909
+ readonly kind: EveProviderActionKind;
24910
+ readonly name: string;
24911
+ readonly scope: EveInstrumentationAttemptScope;
24912
+ readonly type: "action.started";
24913
+ }
24914
+ type EveProviderActionTerminalEvent = {
24915
+ readonly acceptedAtMs?: number;
24916
+ readonly idempotencyKey: string;
24917
+ readonly outcome: "completed";
24918
+ readonly output: {
24919
+ readonly output?: unknown;
24920
+ readonly type: "result";
24921
+ } | {
24922
+ readonly error?: unknown;
24923
+ readonly type: "error";
24924
+ };
24925
+ readonly scope: EveInstrumentationAttemptScope;
24926
+ readonly type: "action.completed";
24927
+ readonly usage?: EveProviderUsage;
24928
+ } | {
24929
+ readonly acceptedAtMs?: number;
24930
+ readonly error?: unknown;
24931
+ readonly errorCode?: string;
24932
+ readonly idempotencyKey: string;
24933
+ readonly outcome: "abandoned" | "cancelled" | "failed" | "rejected";
24934
+ readonly scope: EveInstrumentationAttemptScope;
24935
+ readonly type: "action.failed";
24936
+ };
24937
+ type EveProviderStepAttemptTerminalEvent = {
24938
+ readonly error?: unknown;
24939
+ readonly idempotencyKey: string;
24940
+ readonly scope: EveInstrumentationAttemptScope;
24941
+ readonly type: "step.attempt.completed" | "step.attempt.failed";
24942
+ };
24943
+ type EveProviderHandler<TEvent> = (event: TEvent, context: EveProviderContext) => void | PromiseLike<void>;
24944
+ interface EveProviderDefinition {
24945
+ readonly capture?: "content" | "metadata";
24946
+ readonly events?: {
24947
+ readonly "action.completed"?: EveProviderHandler<EveProviderActionTerminalEvent>;
24948
+ readonly "action.failed"?: EveProviderHandler<EveProviderActionTerminalEvent>;
24949
+ readonly "action.started"?: EveProviderHandler<EveProviderActionStartedEvent>;
24950
+ readonly "model.call.completed"?: EveProviderHandler<EveProviderModelCallTerminalEvent>;
24951
+ readonly "model.call.failed"?: EveProviderHandler<EveProviderModelCallTerminalEvent>;
24952
+ readonly "model.call.started"?: EveProviderHandler<EveProviderModelCallStartedEvent>;
24953
+ readonly "step.attempt.completed"?: EveProviderHandler<EveProviderStepAttemptTerminalEvent>;
24954
+ readonly "step.attempt.failed"?: EveProviderHandler<EveProviderStepAttemptTerminalEvent>;
24955
+ readonly "turn.cancelled"?: EveProviderHandler<EveProviderTurnTerminalEvent>;
24956
+ readonly "turn.completed"?: EveProviderHandler<EveProviderTurnTerminalEvent>;
24957
+ readonly "turn.failed"?: EveProviderHandler<EveProviderTurnTerminalEvent>;
24958
+ readonly "turn.started"?: EveProviderHandler<EveProviderTurnStartedEvent>;
24959
+ };
24960
+ readonly flush?: () => void | PromiseLike<void>;
24961
+ readonly setup?: (context: EveProviderSetupContext) => void | PromiseLike<void>;
24962
+ readonly shutdown?: () => void | PromiseLike<void>;
24963
+ }
24045
24964
 
24046
24965
  type EveStateHandle<T> = {
24047
24966
  get(): T;
@@ -24053,7 +24972,20 @@ declare function braintrustEveHook(options: {
24053
24972
  defineState: EveDefineState;
24054
24973
  metadata?: Record<string, unknown>;
24055
24974
  }): EveHookDefinition;
24056
- /** Eve instrumentation helper for logger setup and durable LLM input capture. */
24975
+
24976
+ type EveProviderInstrumentationOptions = {
24977
+ metadata?: Record<string, unknown>;
24978
+ setup?: EveProviderDefinition["setup"];
24979
+ };
24980
+ /**
24981
+ * Braintrust instrumentation for Eve.
24982
+ *
24983
+ * Pass `defineState` when using Eve's legacy authored instrumentation API.
24984
+ * With Eve 0.34+, omit `defineState` to use the instrumentation-provider
24985
+ * lifecycle and enable `experimental.instrumentationProviders` on the agent.
24986
+ * The result is ready to export directly from the instrumentation module.
24987
+ */
24988
+ declare function braintrustEveInstrumentation(options: EveProviderInstrumentationOptions): EveProviderDefinition;
24057
24989
  declare function braintrustEveInstrumentation(options: {
24058
24990
  defineState: EveDefineState;
24059
24991
  setup?: EveInstrumentationDefinition["setup"];
@@ -24258,8 +25190,8 @@ declare function wrapPiCodingAgentSDK<T>(sdk: T): T;
24258
25190
  declare function wrapCloudflareAgent<T>(Agent: T): T;
24259
25191
 
24260
25192
  /**
24261
- * Wraps the Strands Agent SDK with Braintrust tracing. The wrapper emits
24262
- * diagnostics-channel events; the Strands plugin owns span lifecycle.
25193
+ * Wraps the Strands Agent SDK with Braintrust tracing. The wrapper invokes
25194
+ * typed instrumentation channels; the Strands plugin owns span lifecycle.
24263
25195
  */
24264
25196
  declare function wrapStrandsAgentSDK<T>(sdk: T): T;
24265
25197
 
@@ -24528,6 +25460,12 @@ declare function wrapOllama<T>(ollama: T): T;
24528
25460
  */
24529
25461
  declare function wrapCohere<T>(cohere: T): T;
24530
25462
 
25463
+ /**
25464
+ * Wrap a Voyage AI client so method calls pass through the Braintrust
25465
+ * instrumentation hooks.
25466
+ */
25467
+ declare function wrapVoyageAI<T>(client: T): T;
25468
+
24531
25469
  /**
24532
25470
  * Wrap a Groq client (created with `new Groq(...)`) with Braintrust tracing.
24533
25471
  */
@@ -29951,6 +30889,15 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
29951
30889
  type: "global";
29952
30890
  name: string;
29953
30891
  function_type?: "preprocessor" | undefined;
30892
+ }>, z.ZodObject<{
30893
+ type: z.ZodLiteral<"inline">;
30894
+ code: z.ZodString;
30895
+ }, "strip", z.ZodTypeAny, {
30896
+ code: string;
30897
+ type: "inline";
30898
+ }, {
30899
+ code: string;
30900
+ type: "inline";
29954
30901
  }>, z.ZodNull]>>;
29955
30902
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
29956
30903
  type: z.ZodLiteral<"function">;
@@ -29971,11 +30918,11 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
29971
30918
  }, "strip", z.ZodTypeAny, {
29972
30919
  type: "global";
29973
30920
  name: string;
29974
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
30921
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
29975
30922
  }, {
29976
30923
  type: "global";
29977
30924
  name: string;
29978
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
30925
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
29979
30926
  }>]>, "many">, z.ZodNull]>>;
29980
30927
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
29981
30928
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -30253,6 +31200,18 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30253
31200
  type: "completion";
30254
31201
  content: string;
30255
31202
  } | null | undefined;
31203
+ preprocessor?: {
31204
+ id: string;
31205
+ type: "function";
31206
+ version?: string | undefined;
31207
+ } | {
31208
+ type: "global";
31209
+ name: string;
31210
+ function_type: "preprocessor";
31211
+ } | {
31212
+ code: string;
31213
+ type: "inline";
31214
+ } | null | undefined;
30256
31215
  origin?: {
30257
31216
  project_id?: string | undefined;
30258
31217
  prompt_id?: string | undefined;
@@ -30273,17 +31232,8 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30273
31232
  } | {
30274
31233
  type: "global";
30275
31234
  name: string;
30276
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
31235
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
30277
31236
  })[] | null | undefined;
30278
- preprocessor?: {
30279
- id: string;
30280
- type: "function";
30281
- version?: string | undefined;
30282
- } | {
30283
- type: "global";
30284
- name: string;
30285
- function_type: "preprocessor";
30286
- } | null | undefined;
30287
31237
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
30288
31238
  mcp?: Record<string, {
30289
31239
  id: string;
@@ -30527,6 +31477,18 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30527
31477
  type: "completion";
30528
31478
  content: string;
30529
31479
  } | null | undefined;
31480
+ preprocessor?: {
31481
+ id: string;
31482
+ type: "function";
31483
+ version?: string | undefined;
31484
+ } | {
31485
+ type: "global";
31486
+ name: string;
31487
+ function_type?: "preprocessor" | undefined;
31488
+ } | {
31489
+ code: string;
31490
+ type: "inline";
31491
+ } | null | undefined;
30530
31492
  origin?: {
30531
31493
  project_id?: string | undefined;
30532
31494
  prompt_id?: string | undefined;
@@ -30547,17 +31509,8 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30547
31509
  } | {
30548
31510
  type: "global";
30549
31511
  name: string;
30550
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
31512
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
30551
31513
  })[] | null | undefined;
30552
- preprocessor?: {
30553
- id: string;
30554
- type: "function";
30555
- version?: string | undefined;
30556
- } | {
30557
- type: "global";
30558
- name: string;
30559
- function_type?: "preprocessor" | undefined;
30560
- } | null | undefined;
30561
31514
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
30562
31515
  mcp?: Record<string, {
30563
31516
  id: string;
@@ -30806,6 +31759,18 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30806
31759
  type: "completion";
30807
31760
  content: string;
30808
31761
  } | null | undefined;
31762
+ preprocessor?: {
31763
+ id: string;
31764
+ type: "function";
31765
+ version?: string | undefined;
31766
+ } | {
31767
+ type: "global";
31768
+ name: string;
31769
+ function_type: "preprocessor";
31770
+ } | {
31771
+ code: string;
31772
+ type: "inline";
31773
+ } | null | undefined;
30809
31774
  origin?: {
30810
31775
  project_id?: string | undefined;
30811
31776
  prompt_id?: string | undefined;
@@ -30826,17 +31791,8 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
30826
31791
  } | {
30827
31792
  type: "global";
30828
31793
  name: string;
30829
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
31794
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
30830
31795
  })[] | null | undefined;
30831
- preprocessor?: {
30832
- id: string;
30833
- type: "function";
30834
- version?: string | undefined;
30835
- } | {
30836
- type: "global";
30837
- name: string;
30838
- function_type: "preprocessor";
30839
- } | null | undefined;
30840
31796
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
30841
31797
  mcp?: Record<string, {
30842
31798
  id: string;
@@ -31084,6 +32040,18 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
31084
32040
  type: "completion";
31085
32041
  content: string;
31086
32042
  } | null | undefined;
32043
+ preprocessor?: {
32044
+ id: string;
32045
+ type: "function";
32046
+ version?: string | undefined;
32047
+ } | {
32048
+ type: "global";
32049
+ name: string;
32050
+ function_type?: "preprocessor" | undefined;
32051
+ } | {
32052
+ code: string;
32053
+ type: "inline";
32054
+ } | null | undefined;
31087
32055
  origin?: {
31088
32056
  project_id?: string | undefined;
31089
32057
  prompt_id?: string | undefined;
@@ -31104,17 +32072,8 @@ declare const evalParametersSerializedSchema: z.ZodRecord<z.ZodString, z.ZodUnio
31104
32072
  } | {
31105
32073
  type: "global";
31106
32074
  name: string;
31107
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
32075
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
31108
32076
  })[] | null | undefined;
31109
- preprocessor?: {
31110
- id: string;
31111
- type: "function";
31112
- version?: string | undefined;
31113
- } | {
31114
- type: "global";
31115
- name: string;
31116
- function_type?: "preprocessor" | undefined;
31117
- } | null | undefined;
31118
32077
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
31119
32078
  mcp?: Record<string, {
31120
32079
  id: string;
@@ -32614,6 +33573,15 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32614
33573
  type: "global";
32615
33574
  name: string;
32616
33575
  function_type?: "preprocessor" | undefined;
33576
+ }>, z.ZodObject<{
33577
+ type: z.ZodLiteral<"inline">;
33578
+ code: z.ZodString;
33579
+ }, "strip", z.ZodTypeAny, {
33580
+ code: string;
33581
+ type: "inline";
33582
+ }, {
33583
+ code: string;
33584
+ type: "inline";
32617
33585
  }>, z.ZodNull]>>;
32618
33586
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
32619
33587
  type: z.ZodLiteral<"function">;
@@ -32634,11 +33602,11 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32634
33602
  }, "strip", z.ZodTypeAny, {
32635
33603
  type: "global";
32636
33604
  name: string;
32637
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
33605
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
32638
33606
  }, {
32639
33607
  type: "global";
32640
33608
  name: string;
32641
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
33609
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
32642
33610
  }>]>, "many">, z.ZodNull]>>;
32643
33611
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
32644
33612
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -32916,6 +33884,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32916
33884
  type: "completion";
32917
33885
  content: string;
32918
33886
  } | null | undefined;
33887
+ preprocessor?: {
33888
+ id: string;
33889
+ type: "function";
33890
+ version?: string | undefined;
33891
+ } | {
33892
+ type: "global";
33893
+ name: string;
33894
+ function_type: "preprocessor";
33895
+ } | {
33896
+ code: string;
33897
+ type: "inline";
33898
+ } | null | undefined;
32919
33899
  origin?: {
32920
33900
  project_id?: string | undefined;
32921
33901
  prompt_id?: string | undefined;
@@ -32936,17 +33916,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
32936
33916
  } | {
32937
33917
  type: "global";
32938
33918
  name: string;
32939
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
33919
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
32940
33920
  })[] | null | undefined;
32941
- preprocessor?: {
32942
- id: string;
32943
- type: "function";
32944
- version?: string | undefined;
32945
- } | {
32946
- type: "global";
32947
- name: string;
32948
- function_type: "preprocessor";
32949
- } | null | undefined;
32950
33921
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
32951
33922
  mcp?: Record<string, {
32952
33923
  id: string;
@@ -33190,6 +34161,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33190
34161
  type: "completion";
33191
34162
  content: string;
33192
34163
  } | null | undefined;
34164
+ preprocessor?: {
34165
+ id: string;
34166
+ type: "function";
34167
+ version?: string | undefined;
34168
+ } | {
34169
+ type: "global";
34170
+ name: string;
34171
+ function_type?: "preprocessor" | undefined;
34172
+ } | {
34173
+ code: string;
34174
+ type: "inline";
34175
+ } | null | undefined;
33193
34176
  origin?: {
33194
34177
  project_id?: string | undefined;
33195
34178
  prompt_id?: string | undefined;
@@ -33210,17 +34193,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33210
34193
  } | {
33211
34194
  type: "global";
33212
34195
  name: string;
33213
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
34196
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
33214
34197
  })[] | null | undefined;
33215
- preprocessor?: {
33216
- id: string;
33217
- type: "function";
33218
- version?: string | undefined;
33219
- } | {
33220
- type: "global";
33221
- name: string;
33222
- function_type?: "preprocessor" | undefined;
33223
- } | null | undefined;
33224
34198
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
33225
34199
  mcp?: Record<string, {
33226
34200
  id: string;
@@ -33469,6 +34443,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33469
34443
  type: "completion";
33470
34444
  content: string;
33471
34445
  } | null | undefined;
34446
+ preprocessor?: {
34447
+ id: string;
34448
+ type: "function";
34449
+ version?: string | undefined;
34450
+ } | {
34451
+ type: "global";
34452
+ name: string;
34453
+ function_type: "preprocessor";
34454
+ } | {
34455
+ code: string;
34456
+ type: "inline";
34457
+ } | null | undefined;
33472
34458
  origin?: {
33473
34459
  project_id?: string | undefined;
33474
34460
  prompt_id?: string | undefined;
@@ -33489,17 +34475,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33489
34475
  } | {
33490
34476
  type: "global";
33491
34477
  name: string;
33492
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
34478
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
33493
34479
  })[] | null | undefined;
33494
- preprocessor?: {
33495
- id: string;
33496
- type: "function";
33497
- version?: string | undefined;
33498
- } | {
33499
- type: "global";
33500
- name: string;
33501
- function_type: "preprocessor";
33502
- } | null | undefined;
33503
34480
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
33504
34481
  mcp?: Record<string, {
33505
34482
  id: string;
@@ -33747,6 +34724,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33747
34724
  type: "completion";
33748
34725
  content: string;
33749
34726
  } | null | undefined;
34727
+ preprocessor?: {
34728
+ id: string;
34729
+ type: "function";
34730
+ version?: string | undefined;
34731
+ } | {
34732
+ type: "global";
34733
+ name: string;
34734
+ function_type?: "preprocessor" | undefined;
34735
+ } | {
34736
+ code: string;
34737
+ type: "inline";
34738
+ } | null | undefined;
33750
34739
  origin?: {
33751
34740
  project_id?: string | undefined;
33752
34741
  prompt_id?: string | undefined;
@@ -33767,17 +34756,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
33767
34756
  } | {
33768
34757
  type: "global";
33769
34758
  name: string;
33770
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
34759
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
33771
34760
  })[] | null | undefined;
33772
- preprocessor?: {
33773
- id: string;
33774
- type: "function";
33775
- version?: string | undefined;
33776
- } | {
33777
- type: "global";
33778
- name: string;
33779
- function_type?: "preprocessor" | undefined;
33780
- } | null | undefined;
33781
34761
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
33782
34762
  mcp?: Record<string, {
33783
34763
  id: string;
@@ -34056,6 +35036,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
34056
35036
  type: "completion";
34057
35037
  content: string;
34058
35038
  } | null | undefined;
35039
+ preprocessor?: {
35040
+ id: string;
35041
+ type: "function";
35042
+ version?: string | undefined;
35043
+ } | {
35044
+ type: "global";
35045
+ name: string;
35046
+ function_type: "preprocessor";
35047
+ } | {
35048
+ code: string;
35049
+ type: "inline";
35050
+ } | null | undefined;
34059
35051
  origin?: {
34060
35052
  project_id?: string | undefined;
34061
35053
  prompt_id?: string | undefined;
@@ -34076,17 +35068,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
34076
35068
  } | {
34077
35069
  type: "global";
34078
35070
  name: string;
34079
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
35071
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
34080
35072
  })[] | null | undefined;
34081
- preprocessor?: {
34082
- id: string;
34083
- type: "function";
34084
- version?: string | undefined;
34085
- } | {
34086
- type: "global";
34087
- name: string;
34088
- function_type: "preprocessor";
34089
- } | null | undefined;
34090
35073
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
34091
35074
  mcp?: Record<string, {
34092
35075
  id: string;
@@ -34347,6 +35330,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
34347
35330
  type: "completion";
34348
35331
  content: string;
34349
35332
  } | null | undefined;
35333
+ preprocessor?: {
35334
+ id: string;
35335
+ type: "function";
35336
+ version?: string | undefined;
35337
+ } | {
35338
+ type: "global";
35339
+ name: string;
35340
+ function_type?: "preprocessor" | undefined;
35341
+ } | {
35342
+ code: string;
35343
+ type: "inline";
35344
+ } | null | undefined;
34350
35345
  origin?: {
34351
35346
  project_id?: string | undefined;
34352
35347
  prompt_id?: string | undefined;
@@ -34367,17 +35362,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
34367
35362
  } | {
34368
35363
  type: "global";
34369
35364
  name: string;
34370
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
35365
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
34371
35366
  })[] | null | undefined;
34372
- preprocessor?: {
34373
- id: string;
34374
- type: "function";
34375
- version?: string | undefined;
34376
- } | {
34377
- type: "global";
34378
- name: string;
34379
- function_type?: "preprocessor" | undefined;
34380
- } | null | undefined;
34381
35367
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
34382
35368
  mcp?: Record<string, {
34383
35369
  id: string;
@@ -35769,6 +36755,15 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
35769
36755
  type: "global";
35770
36756
  name: string;
35771
36757
  function_type?: "preprocessor" | undefined;
36758
+ }>, z.ZodObject<{
36759
+ type: z.ZodLiteral<"inline">;
36760
+ code: z.ZodString;
36761
+ }, "strip", z.ZodTypeAny, {
36762
+ code: string;
36763
+ type: "inline";
36764
+ }, {
36765
+ code: string;
36766
+ type: "inline";
35772
36767
  }>, z.ZodNull]>>;
35773
36768
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
35774
36769
  type: z.ZodLiteral<"function">;
@@ -35789,11 +36784,11 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
35789
36784
  }, "strip", z.ZodTypeAny, {
35790
36785
  type: "global";
35791
36786
  name: string;
35792
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
36787
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
35793
36788
  }, {
35794
36789
  type: "global";
35795
36790
  name: string;
35796
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
36791
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
35797
36792
  }>]>, "many">, z.ZodNull]>>;
35798
36793
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
35799
36794
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -36071,6 +37066,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36071
37066
  type: "completion";
36072
37067
  content: string;
36073
37068
  } | null | undefined;
37069
+ preprocessor?: {
37070
+ id: string;
37071
+ type: "function";
37072
+ version?: string | undefined;
37073
+ } | {
37074
+ type: "global";
37075
+ name: string;
37076
+ function_type: "preprocessor";
37077
+ } | {
37078
+ code: string;
37079
+ type: "inline";
37080
+ } | null | undefined;
36074
37081
  origin?: {
36075
37082
  project_id?: string | undefined;
36076
37083
  prompt_id?: string | undefined;
@@ -36091,17 +37098,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36091
37098
  } | {
36092
37099
  type: "global";
36093
37100
  name: string;
36094
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
37101
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
36095
37102
  })[] | null | undefined;
36096
- preprocessor?: {
36097
- id: string;
36098
- type: "function";
36099
- version?: string | undefined;
36100
- } | {
36101
- type: "global";
36102
- name: string;
36103
- function_type: "preprocessor";
36104
- } | null | undefined;
36105
37103
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
36106
37104
  mcp?: Record<string, {
36107
37105
  id: string;
@@ -36345,6 +37343,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36345
37343
  type: "completion";
36346
37344
  content: string;
36347
37345
  } | null | undefined;
37346
+ preprocessor?: {
37347
+ id: string;
37348
+ type: "function";
37349
+ version?: string | undefined;
37350
+ } | {
37351
+ type: "global";
37352
+ name: string;
37353
+ function_type?: "preprocessor" | undefined;
37354
+ } | {
37355
+ code: string;
37356
+ type: "inline";
37357
+ } | null | undefined;
36348
37358
  origin?: {
36349
37359
  project_id?: string | undefined;
36350
37360
  prompt_id?: string | undefined;
@@ -36365,17 +37375,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36365
37375
  } | {
36366
37376
  type: "global";
36367
37377
  name: string;
36368
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
37378
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
36369
37379
  })[] | null | undefined;
36370
- preprocessor?: {
36371
- id: string;
36372
- type: "function";
36373
- version?: string | undefined;
36374
- } | {
36375
- type: "global";
36376
- name: string;
36377
- function_type?: "preprocessor" | undefined;
36378
- } | null | undefined;
36379
37380
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
36380
37381
  mcp?: Record<string, {
36381
37382
  id: string;
@@ -36624,6 +37625,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36624
37625
  type: "completion";
36625
37626
  content: string;
36626
37627
  } | null | undefined;
37628
+ preprocessor?: {
37629
+ id: string;
37630
+ type: "function";
37631
+ version?: string | undefined;
37632
+ } | {
37633
+ type: "global";
37634
+ name: string;
37635
+ function_type: "preprocessor";
37636
+ } | {
37637
+ code: string;
37638
+ type: "inline";
37639
+ } | null | undefined;
36627
37640
  origin?: {
36628
37641
  project_id?: string | undefined;
36629
37642
  prompt_id?: string | undefined;
@@ -36644,17 +37657,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36644
37657
  } | {
36645
37658
  type: "global";
36646
37659
  name: string;
36647
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
37660
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
36648
37661
  })[] | null | undefined;
36649
- preprocessor?: {
36650
- id: string;
36651
- type: "function";
36652
- version?: string | undefined;
36653
- } | {
36654
- type: "global";
36655
- name: string;
36656
- function_type: "preprocessor";
36657
- } | null | undefined;
36658
37662
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
36659
37663
  mcp?: Record<string, {
36660
37664
  id: string;
@@ -36902,6 +37906,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36902
37906
  type: "completion";
36903
37907
  content: string;
36904
37908
  } | null | undefined;
37909
+ preprocessor?: {
37910
+ id: string;
37911
+ type: "function";
37912
+ version?: string | undefined;
37913
+ } | {
37914
+ type: "global";
37915
+ name: string;
37916
+ function_type?: "preprocessor" | undefined;
37917
+ } | {
37918
+ code: string;
37919
+ type: "inline";
37920
+ } | null | undefined;
36905
37921
  origin?: {
36906
37922
  project_id?: string | undefined;
36907
37923
  prompt_id?: string | undefined;
@@ -36922,17 +37938,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
36922
37938
  } | {
36923
37939
  type: "global";
36924
37940
  name: string;
36925
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
37941
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
36926
37942
  })[] | null | undefined;
36927
- preprocessor?: {
36928
- id: string;
36929
- type: "function";
36930
- version?: string | undefined;
36931
- } | {
36932
- type: "global";
36933
- name: string;
36934
- function_type?: "preprocessor" | undefined;
36935
- } | null | undefined;
36936
37943
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
36937
37944
  mcp?: Record<string, {
36938
37945
  id: string;
@@ -37223,6 +38230,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37223
38230
  type: "completion";
37224
38231
  content: string;
37225
38232
  } | null | undefined;
38233
+ preprocessor?: {
38234
+ id: string;
38235
+ type: "function";
38236
+ version?: string | undefined;
38237
+ } | {
38238
+ type: "global";
38239
+ name: string;
38240
+ function_type: "preprocessor";
38241
+ } | {
38242
+ code: string;
38243
+ type: "inline";
38244
+ } | null | undefined;
37226
38245
  origin?: {
37227
38246
  project_id?: string | undefined;
37228
38247
  prompt_id?: string | undefined;
@@ -37243,17 +38262,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37243
38262
  } | {
37244
38263
  type: "global";
37245
38264
  name: string;
37246
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
38265
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
37247
38266
  })[] | null | undefined;
37248
- preprocessor?: {
37249
- id: string;
37250
- type: "function";
37251
- version?: string | undefined;
37252
- } | {
37253
- type: "global";
37254
- name: string;
37255
- function_type: "preprocessor";
37256
- } | null | undefined;
37257
38267
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
37258
38268
  mcp?: Record<string, {
37259
38269
  id: string;
@@ -37527,6 +38537,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37527
38537
  type: "completion";
37528
38538
  content: string;
37529
38539
  } | null | undefined;
38540
+ preprocessor?: {
38541
+ id: string;
38542
+ type: "function";
38543
+ version?: string | undefined;
38544
+ } | {
38545
+ type: "global";
38546
+ name: string;
38547
+ function_type: "preprocessor";
38548
+ } | {
38549
+ code: string;
38550
+ type: "inline";
38551
+ } | null | undefined;
37530
38552
  origin?: {
37531
38553
  project_id?: string | undefined;
37532
38554
  prompt_id?: string | undefined;
@@ -37547,17 +38569,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37547
38569
  } | {
37548
38570
  type: "global";
37549
38571
  name: string;
37550
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
38572
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
37551
38573
  })[] | null | undefined;
37552
- preprocessor?: {
37553
- id: string;
37554
- type: "function";
37555
- version?: string | undefined;
37556
- } | {
37557
- type: "global";
37558
- name: string;
37559
- function_type: "preprocessor";
37560
- } | null | undefined;
37561
38574
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
37562
38575
  mcp?: Record<string, {
37563
38576
  id: string;
@@ -37824,6 +38837,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37824
38837
  type: "completion";
37825
38838
  content: string;
37826
38839
  } | null | undefined;
38840
+ preprocessor?: {
38841
+ id: string;
38842
+ type: "function";
38843
+ version?: string | undefined;
38844
+ } | {
38845
+ type: "global";
38846
+ name: string;
38847
+ function_type?: "preprocessor" | undefined;
38848
+ } | {
38849
+ code: string;
38850
+ type: "inline";
38851
+ } | null | undefined;
37827
38852
  origin?: {
37828
38853
  project_id?: string | undefined;
37829
38854
  prompt_id?: string | undefined;
@@ -37844,17 +38869,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
37844
38869
  } | {
37845
38870
  type: "global";
37846
38871
  name: string;
37847
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
38872
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
37848
38873
  })[] | null | undefined;
37849
- preprocessor?: {
37850
- id: string;
37851
- type: "function";
37852
- version?: string | undefined;
37853
- } | {
37854
- type: "global";
37855
- name: string;
37856
- function_type?: "preprocessor" | undefined;
37857
- } | null | undefined;
37858
38874
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
37859
38875
  mcp?: Record<string, {
37860
38876
  id: string;
@@ -38128,6 +39144,18 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
38128
39144
  type: "completion";
38129
39145
  content: string;
38130
39146
  } | null | undefined;
39147
+ preprocessor?: {
39148
+ id: string;
39149
+ type: "function";
39150
+ version?: string | undefined;
39151
+ } | {
39152
+ type: "global";
39153
+ name: string;
39154
+ function_type?: "preprocessor" | undefined;
39155
+ } | {
39156
+ code: string;
39157
+ type: "inline";
39158
+ } | null | undefined;
38131
39159
  origin?: {
38132
39160
  project_id?: string | undefined;
38133
39161
  prompt_id?: string | undefined;
@@ -38148,17 +39176,8 @@ declare const evaluatorDefinitionSchema: z.ZodObject<{
38148
39176
  } | {
38149
39177
  type: "global";
38150
39178
  name: string;
38151
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
39179
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
38152
39180
  })[] | null | undefined;
38153
- preprocessor?: {
38154
- id: string;
38155
- type: "function";
38156
- version?: string | undefined;
38157
- } | {
38158
- type: "global";
38159
- name: string;
38160
- function_type?: "preprocessor" | undefined;
38161
- } | null | undefined;
38162
39181
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
38163
39182
  mcp?: Record<string, {
38164
39183
  id: string;
@@ -39629,6 +40648,15 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39629
40648
  type: "global";
39630
40649
  name: string;
39631
40650
  function_type?: "preprocessor" | undefined;
40651
+ }>, z.ZodObject<{
40652
+ type: z.ZodLiteral<"inline">;
40653
+ code: z.ZodString;
40654
+ }, "strip", z.ZodTypeAny, {
40655
+ code: string;
40656
+ type: "inline";
40657
+ }, {
40658
+ code: string;
40659
+ type: "inline";
39632
40660
  }>, z.ZodNull]>>;
39633
40661
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
39634
40662
  type: z.ZodLiteral<"function">;
@@ -39649,11 +40677,11 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39649
40677
  }, "strip", z.ZodTypeAny, {
39650
40678
  type: "global";
39651
40679
  name: string;
39652
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
40680
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
39653
40681
  }, {
39654
40682
  type: "global";
39655
40683
  name: string;
39656
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
40684
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
39657
40685
  }>]>, "many">, z.ZodNull]>>;
39658
40686
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
39659
40687
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -39931,6 +40959,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39931
40959
  type: "completion";
39932
40960
  content: string;
39933
40961
  } | null | undefined;
40962
+ preprocessor?: {
40963
+ id: string;
40964
+ type: "function";
40965
+ version?: string | undefined;
40966
+ } | {
40967
+ type: "global";
40968
+ name: string;
40969
+ function_type: "preprocessor";
40970
+ } | {
40971
+ code: string;
40972
+ type: "inline";
40973
+ } | null | undefined;
39934
40974
  origin?: {
39935
40975
  project_id?: string | undefined;
39936
40976
  prompt_id?: string | undefined;
@@ -39951,17 +40991,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
39951
40991
  } | {
39952
40992
  type: "global";
39953
40993
  name: string;
39954
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
40994
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
39955
40995
  })[] | null | undefined;
39956
- preprocessor?: {
39957
- id: string;
39958
- type: "function";
39959
- version?: string | undefined;
39960
- } | {
39961
- type: "global";
39962
- name: string;
39963
- function_type: "preprocessor";
39964
- } | null | undefined;
39965
40996
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
39966
40997
  mcp?: Record<string, {
39967
40998
  id: string;
@@ -40205,6 +41236,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40205
41236
  type: "completion";
40206
41237
  content: string;
40207
41238
  } | null | undefined;
41239
+ preprocessor?: {
41240
+ id: string;
41241
+ type: "function";
41242
+ version?: string | undefined;
41243
+ } | {
41244
+ type: "global";
41245
+ name: string;
41246
+ function_type?: "preprocessor" | undefined;
41247
+ } | {
41248
+ code: string;
41249
+ type: "inline";
41250
+ } | null | undefined;
40208
41251
  origin?: {
40209
41252
  project_id?: string | undefined;
40210
41253
  prompt_id?: string | undefined;
@@ -40225,17 +41268,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40225
41268
  } | {
40226
41269
  type: "global";
40227
41270
  name: string;
40228
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
41271
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
40229
41272
  })[] | null | undefined;
40230
- preprocessor?: {
40231
- id: string;
40232
- type: "function";
40233
- version?: string | undefined;
40234
- } | {
40235
- type: "global";
40236
- name: string;
40237
- function_type?: "preprocessor" | undefined;
40238
- } | null | undefined;
40239
41273
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
40240
41274
  mcp?: Record<string, {
40241
41275
  id: string;
@@ -40484,6 +41518,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40484
41518
  type: "completion";
40485
41519
  content: string;
40486
41520
  } | null | undefined;
41521
+ preprocessor?: {
41522
+ id: string;
41523
+ type: "function";
41524
+ version?: string | undefined;
41525
+ } | {
41526
+ type: "global";
41527
+ name: string;
41528
+ function_type: "preprocessor";
41529
+ } | {
41530
+ code: string;
41531
+ type: "inline";
41532
+ } | null | undefined;
40487
41533
  origin?: {
40488
41534
  project_id?: string | undefined;
40489
41535
  prompt_id?: string | undefined;
@@ -40504,17 +41550,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40504
41550
  } | {
40505
41551
  type: "global";
40506
41552
  name: string;
40507
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
41553
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
40508
41554
  })[] | null | undefined;
40509
- preprocessor?: {
40510
- id: string;
40511
- type: "function";
40512
- version?: string | undefined;
40513
- } | {
40514
- type: "global";
40515
- name: string;
40516
- function_type: "preprocessor";
40517
- } | null | undefined;
40518
41555
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
40519
41556
  mcp?: Record<string, {
40520
41557
  id: string;
@@ -40762,6 +41799,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40762
41799
  type: "completion";
40763
41800
  content: string;
40764
41801
  } | null | undefined;
41802
+ preprocessor?: {
41803
+ id: string;
41804
+ type: "function";
41805
+ version?: string | undefined;
41806
+ } | {
41807
+ type: "global";
41808
+ name: string;
41809
+ function_type?: "preprocessor" | undefined;
41810
+ } | {
41811
+ code: string;
41812
+ type: "inline";
41813
+ } | null | undefined;
40765
41814
  origin?: {
40766
41815
  project_id?: string | undefined;
40767
41816
  prompt_id?: string | undefined;
@@ -40782,17 +41831,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
40782
41831
  } | {
40783
41832
  type: "global";
40784
41833
  name: string;
40785
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
41834
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
40786
41835
  })[] | null | undefined;
40787
- preprocessor?: {
40788
- id: string;
40789
- type: "function";
40790
- version?: string | undefined;
40791
- } | {
40792
- type: "global";
40793
- name: string;
40794
- function_type?: "preprocessor" | undefined;
40795
- } | null | undefined;
40796
41836
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
40797
41837
  mcp?: Record<string, {
40798
41838
  id: string;
@@ -41071,6 +42111,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
41071
42111
  type: "completion";
41072
42112
  content: string;
41073
42113
  } | null | undefined;
42114
+ preprocessor?: {
42115
+ id: string;
42116
+ type: "function";
42117
+ version?: string | undefined;
42118
+ } | {
42119
+ type: "global";
42120
+ name: string;
42121
+ function_type: "preprocessor";
42122
+ } | {
42123
+ code: string;
42124
+ type: "inline";
42125
+ } | null | undefined;
41074
42126
  origin?: {
41075
42127
  project_id?: string | undefined;
41076
42128
  prompt_id?: string | undefined;
@@ -41091,17 +42143,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
41091
42143
  } | {
41092
42144
  type: "global";
41093
42145
  name: string;
41094
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
42146
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
41095
42147
  })[] | null | undefined;
41096
- preprocessor?: {
41097
- id: string;
41098
- type: "function";
41099
- version?: string | undefined;
41100
- } | {
41101
- type: "global";
41102
- name: string;
41103
- function_type: "preprocessor";
41104
- } | null | undefined;
41105
42148
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
41106
42149
  mcp?: Record<string, {
41107
42150
  id: string;
@@ -41362,6 +42405,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
41362
42405
  type: "completion";
41363
42406
  content: string;
41364
42407
  } | null | undefined;
42408
+ preprocessor?: {
42409
+ id: string;
42410
+ type: "function";
42411
+ version?: string | undefined;
42412
+ } | {
42413
+ type: "global";
42414
+ name: string;
42415
+ function_type?: "preprocessor" | undefined;
42416
+ } | {
42417
+ code: string;
42418
+ type: "inline";
42419
+ } | null | undefined;
41365
42420
  origin?: {
41366
42421
  project_id?: string | undefined;
41367
42422
  prompt_id?: string | undefined;
@@ -41382,17 +42437,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
41382
42437
  } | {
41383
42438
  type: "global";
41384
42439
  name: string;
41385
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
42440
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
41386
42441
  })[] | null | undefined;
41387
- preprocessor?: {
41388
- id: string;
41389
- type: "function";
41390
- version?: string | undefined;
41391
- } | {
41392
- type: "global";
41393
- name: string;
41394
- function_type?: "preprocessor" | undefined;
41395
- } | null | undefined;
41396
42442
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
41397
42443
  mcp?: Record<string, {
41398
42444
  id: string;
@@ -42784,6 +43830,15 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
42784
43830
  type: "global";
42785
43831
  name: string;
42786
43832
  function_type?: "preprocessor" | undefined;
43833
+ }>, z.ZodObject<{
43834
+ type: z.ZodLiteral<"inline">;
43835
+ code: z.ZodString;
43836
+ }, "strip", z.ZodTypeAny, {
43837
+ code: string;
43838
+ type: "inline";
43839
+ }, {
43840
+ code: string;
43841
+ type: "inline";
42787
43842
  }>, z.ZodNull]>>;
42788
43843
  tool_functions: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodObject<{
42789
43844
  type: z.ZodLiteral<"function">;
@@ -42804,11 +43859,11 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
42804
43859
  }, "strip", z.ZodTypeAny, {
42805
43860
  type: "global";
42806
43861
  name: string;
42807
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
43862
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
42808
43863
  }, {
42809
43864
  type: "global";
42810
43865
  name: string;
42811
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
43866
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
42812
43867
  }>]>, "many">, z.ZodNull]>>;
42813
43868
  template_format: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mustache", "nunjucks", "none"]>, z.ZodNull]>>;
42814
43869
  mcp: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -43086,6 +44141,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43086
44141
  type: "completion";
43087
44142
  content: string;
43088
44143
  } | null | undefined;
44144
+ preprocessor?: {
44145
+ id: string;
44146
+ type: "function";
44147
+ version?: string | undefined;
44148
+ } | {
44149
+ type: "global";
44150
+ name: string;
44151
+ function_type: "preprocessor";
44152
+ } | {
44153
+ code: string;
44154
+ type: "inline";
44155
+ } | null | undefined;
43089
44156
  origin?: {
43090
44157
  project_id?: string | undefined;
43091
44158
  prompt_id?: string | undefined;
@@ -43106,17 +44173,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43106
44173
  } | {
43107
44174
  type: "global";
43108
44175
  name: string;
43109
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
44176
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
43110
44177
  })[] | null | undefined;
43111
- preprocessor?: {
43112
- id: string;
43113
- type: "function";
43114
- version?: string | undefined;
43115
- } | {
43116
- type: "global";
43117
- name: string;
43118
- function_type: "preprocessor";
43119
- } | null | undefined;
43120
44178
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
43121
44179
  mcp?: Record<string, {
43122
44180
  id: string;
@@ -43360,6 +44418,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43360
44418
  type: "completion";
43361
44419
  content: string;
43362
44420
  } | null | undefined;
44421
+ preprocessor?: {
44422
+ id: string;
44423
+ type: "function";
44424
+ version?: string | undefined;
44425
+ } | {
44426
+ type: "global";
44427
+ name: string;
44428
+ function_type?: "preprocessor" | undefined;
44429
+ } | {
44430
+ code: string;
44431
+ type: "inline";
44432
+ } | null | undefined;
43363
44433
  origin?: {
43364
44434
  project_id?: string | undefined;
43365
44435
  prompt_id?: string | undefined;
@@ -43380,17 +44450,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43380
44450
  } | {
43381
44451
  type: "global";
43382
44452
  name: string;
43383
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
44453
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
43384
44454
  })[] | null | undefined;
43385
- preprocessor?: {
43386
- id: string;
43387
- type: "function";
43388
- version?: string | undefined;
43389
- } | {
43390
- type: "global";
43391
- name: string;
43392
- function_type?: "preprocessor" | undefined;
43393
- } | null | undefined;
43394
44455
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
43395
44456
  mcp?: Record<string, {
43396
44457
  id: string;
@@ -43639,6 +44700,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43639
44700
  type: "completion";
43640
44701
  content: string;
43641
44702
  } | null | undefined;
44703
+ preprocessor?: {
44704
+ id: string;
44705
+ type: "function";
44706
+ version?: string | undefined;
44707
+ } | {
44708
+ type: "global";
44709
+ name: string;
44710
+ function_type: "preprocessor";
44711
+ } | {
44712
+ code: string;
44713
+ type: "inline";
44714
+ } | null | undefined;
43642
44715
  origin?: {
43643
44716
  project_id?: string | undefined;
43644
44717
  prompt_id?: string | undefined;
@@ -43659,17 +44732,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43659
44732
  } | {
43660
44733
  type: "global";
43661
44734
  name: string;
43662
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
44735
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
43663
44736
  })[] | null | undefined;
43664
- preprocessor?: {
43665
- id: string;
43666
- type: "function";
43667
- version?: string | undefined;
43668
- } | {
43669
- type: "global";
43670
- name: string;
43671
- function_type: "preprocessor";
43672
- } | null | undefined;
43673
44737
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
43674
44738
  mcp?: Record<string, {
43675
44739
  id: string;
@@ -43917,6 +44981,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43917
44981
  type: "completion";
43918
44982
  content: string;
43919
44983
  } | null | undefined;
44984
+ preprocessor?: {
44985
+ id: string;
44986
+ type: "function";
44987
+ version?: string | undefined;
44988
+ } | {
44989
+ type: "global";
44990
+ name: string;
44991
+ function_type?: "preprocessor" | undefined;
44992
+ } | {
44993
+ code: string;
44994
+ type: "inline";
44995
+ } | null | undefined;
43920
44996
  origin?: {
43921
44997
  project_id?: string | undefined;
43922
44998
  prompt_id?: string | undefined;
@@ -43937,17 +45013,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
43937
45013
  } | {
43938
45014
  type: "global";
43939
45015
  name: string;
43940
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
45016
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
43941
45017
  })[] | null | undefined;
43942
- preprocessor?: {
43943
- id: string;
43944
- type: "function";
43945
- version?: string | undefined;
43946
- } | {
43947
- type: "global";
43948
- name: string;
43949
- function_type?: "preprocessor" | undefined;
43950
- } | null | undefined;
43951
45018
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
43952
45019
  mcp?: Record<string, {
43953
45020
  id: string;
@@ -44238,6 +45305,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44238
45305
  type: "completion";
44239
45306
  content: string;
44240
45307
  } | null | undefined;
45308
+ preprocessor?: {
45309
+ id: string;
45310
+ type: "function";
45311
+ version?: string | undefined;
45312
+ } | {
45313
+ type: "global";
45314
+ name: string;
45315
+ function_type: "preprocessor";
45316
+ } | {
45317
+ code: string;
45318
+ type: "inline";
45319
+ } | null | undefined;
44241
45320
  origin?: {
44242
45321
  project_id?: string | undefined;
44243
45322
  prompt_id?: string | undefined;
@@ -44258,17 +45337,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44258
45337
  } | {
44259
45338
  type: "global";
44260
45339
  name: string;
44261
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
45340
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
44262
45341
  })[] | null | undefined;
44263
- preprocessor?: {
44264
- id: string;
44265
- type: "function";
44266
- version?: string | undefined;
44267
- } | {
44268
- type: "global";
44269
- name: string;
44270
- function_type: "preprocessor";
44271
- } | null | undefined;
44272
45342
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
44273
45343
  mcp?: Record<string, {
44274
45344
  id: string;
@@ -44542,6 +45612,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44542
45612
  type: "completion";
44543
45613
  content: string;
44544
45614
  } | null | undefined;
45615
+ preprocessor?: {
45616
+ id: string;
45617
+ type: "function";
45618
+ version?: string | undefined;
45619
+ } | {
45620
+ type: "global";
45621
+ name: string;
45622
+ function_type: "preprocessor";
45623
+ } | {
45624
+ code: string;
45625
+ type: "inline";
45626
+ } | null | undefined;
44545
45627
  origin?: {
44546
45628
  project_id?: string | undefined;
44547
45629
  prompt_id?: string | undefined;
@@ -44562,17 +45644,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44562
45644
  } | {
44563
45645
  type: "global";
44564
45646
  name: string;
44565
- function_type: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox";
45647
+ function_type: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox";
44566
45648
  })[] | null | undefined;
44567
- preprocessor?: {
44568
- id: string;
44569
- type: "function";
44570
- version?: string | undefined;
44571
- } | {
44572
- type: "global";
44573
- name: string;
44574
- function_type: "preprocessor";
44575
- } | null | undefined;
44576
45649
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
44577
45650
  mcp?: Record<string, {
44578
45651
  id: string;
@@ -44839,6 +45912,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44839
45912
  type: "completion";
44840
45913
  content: string;
44841
45914
  } | null | undefined;
45915
+ preprocessor?: {
45916
+ id: string;
45917
+ type: "function";
45918
+ version?: string | undefined;
45919
+ } | {
45920
+ type: "global";
45921
+ name: string;
45922
+ function_type?: "preprocessor" | undefined;
45923
+ } | {
45924
+ code: string;
45925
+ type: "inline";
45926
+ } | null | undefined;
44842
45927
  origin?: {
44843
45928
  project_id?: string | undefined;
44844
45929
  prompt_id?: string | undefined;
@@ -44859,17 +45944,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
44859
45944
  } | {
44860
45945
  type: "global";
44861
45946
  name: string;
44862
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
45947
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
44863
45948
  })[] | null | undefined;
44864
- preprocessor?: {
44865
- id: string;
44866
- type: "function";
44867
- version?: string | undefined;
44868
- } | {
44869
- type: "global";
44870
- name: string;
44871
- function_type?: "preprocessor" | undefined;
44872
- } | null | undefined;
44873
45949
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
44874
45950
  mcp?: Record<string, {
44875
45951
  id: string;
@@ -45143,6 +46219,18 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
45143
46219
  type: "completion";
45144
46220
  content: string;
45145
46221
  } | null | undefined;
46222
+ preprocessor?: {
46223
+ id: string;
46224
+ type: "function";
46225
+ version?: string | undefined;
46226
+ } | {
46227
+ type: "global";
46228
+ name: string;
46229
+ function_type?: "preprocessor" | undefined;
46230
+ } | {
46231
+ code: string;
46232
+ type: "inline";
46233
+ } | null | undefined;
45146
46234
  origin?: {
45147
46235
  project_id?: string | undefined;
45148
46236
  prompt_id?: string | undefined;
@@ -45163,17 +46251,8 @@ declare const evaluatorDefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
45163
46251
  } | {
45164
46252
  type: "global";
45165
46253
  name: string;
45166
- function_type?: "tool" | "parameters" | "task" | "scorer" | "tag" | "llm" | "custom_view" | "facet" | "preprocessor" | "classifier" | "sandbox" | undefined;
46254
+ function_type?: "llm" | "scorer" | "task" | "tool" | "custom_view" | "preprocessor" | "facet" | "classifier" | "tag" | "parameters" | "sandbox" | undefined;
45167
46255
  })[] | null | undefined;
45168
- preprocessor?: {
45169
- id: string;
45170
- type: "function";
45171
- version?: string | undefined;
45172
- } | {
45173
- type: "global";
45174
- name: string;
45175
- function_type?: "preprocessor" | undefined;
45176
- } | null | undefined;
45177
46256
  template_format?: "none" | "mustache" | "nunjucks" | null | undefined;
45178
46257
  mcp?: Record<string, {
45179
46258
  id: string;
@@ -45773,6 +46852,228 @@ type ScoreAccumulator = {
45773
46852
  declare function buildLocalSummary(evaluator: EvaluatorDef<any, any, any, any>, results: EvalResult<any, any, any, any>[], precomputedScores?: ScoreAccumulator): ExperimentSummary;
45774
46853
  declare function reportFailures<Input, Output, Expected, Metadata extends BaseMetadata>(evaluator: EvaluatorDef<Input, Output, Expected, Metadata>, failingResults: EvalResult<Input, Output, Expected, Metadata>[], { verbose, jsonl }: ReporterOpts): void;
45775
46854
 
46855
+ declare const BATCH_TASK_KIND = "braintrust.durable.batch-task";
46856
+ declare const BATCH_SCORER_KIND = "braintrust.durable.batch-scorer";
46857
+ type JsonPrimitive = string | number | boolean | null;
46858
+ type JsonValue = JsonPrimitive | JsonValue[] | {
46859
+ [key: string]: JsonValue;
46860
+ };
46861
+ /**
46862
+ * Minimal persistence used to reconnect provider webhooks with submitted
46863
+ * batches. Each run, case, and batch is stored under its own key. Durable
46864
+ * evaluations do not require any Braintrust backend changes.
46865
+ *
46866
+ * @experimental - The API for this interface is not yet stabilized and may change or be removed across non-major versions. Functionality is not guaranteed.
46867
+ */
46868
+ interface DurableEvalStore {
46869
+ read(key: string): Promise<Uint8Array | undefined>;
46870
+ write(key: string, value: Uint8Array): Promise<void>;
46871
+ /** Atomically stores `value` when `key` is absent and returns its stored value. */
46872
+ getOrSet(key: string, value: Uint8Array): Promise<{
46873
+ value: Uint8Array;
46874
+ created: boolean;
46875
+ }>;
46876
+ }
46877
+ /**
46878
+ * Stores durable evaluation state in memory. State is lost when the current
46879
+ * JavaScript process exits.
46880
+ *
46881
+ * @experimental - The API for this class is not yet stabilized and may change or be removed across non-major versions. Functionality is not guaranteed.
46882
+ */
46883
+ declare class DurableEvalMemoryStore implements DurableEvalStore {
46884
+ private readonly values;
46885
+ read(key: string): Promise<Uint8Array | undefined>;
46886
+ write(key: string, value: Uint8Array): Promise<void>;
46887
+ getOrSet(key: string, value: Uint8Array): Promise<{
46888
+ value: Uint8Array;
46889
+ created: boolean;
46890
+ }>;
46891
+ }
46892
+ /**
46893
+ * Stores durable evaluation state in Redis using an existing Redis client.
46894
+ * Values are base64 encoded so only string `GET` and `SET` operations are
46895
+ * required from the client. Clients from `redis` (node-redis), `ioredis`, and
46896
+ * `@upstash/redis` can be passed directly.
46897
+ *
46898
+ * @experimental - The API for this class is not yet stabilized and may change or be removed across non-major versions. Functionality is not guaranteed.
46899
+ */
46900
+ declare class DurableEvalRedisStore implements DurableEvalStore {
46901
+ private readonly client;
46902
+ private readonly keyPrefix;
46903
+ private readonly ttlMs;
46904
+ constructor(options: {
46905
+ /** A connected node-redis, ioredis, or Upstash Redis client. */
46906
+ client: {
46907
+ get(key: string): Promise<unknown>;
46908
+ set(key: string, value: string): Promise<unknown>;
46909
+ };
46910
+ /** Prefix for Redis keys. Defaults to `braintrust-eval:`. */
46911
+ keyPrefix?: string;
46912
+ /** Entry lifetime in milliseconds. Defaults to seven days. */
46913
+ ttlMs?: number;
46914
+ });
46915
+ read(key: string): Promise<Uint8Array | undefined>;
46916
+ write(key: string, value: Uint8Array): Promise<void>;
46917
+ getOrSet(key: string, value: Uint8Array): Promise<{
46918
+ value: Uint8Array;
46919
+ created: boolean;
46920
+ }>;
46921
+ }
46922
+ interface DurableBatchContext {
46923
+ runId: string;
46924
+ batchId: string;
46925
+ }
46926
+ type DurableBatchPoll = {
46927
+ status: "pending";
46928
+ } | {
46929
+ status: "complete";
46930
+ } | {
46931
+ status: "failed";
46932
+ error: unknown;
46933
+ };
46934
+ type DurableBatchCompletion<SubmissionData extends JsonValue> = {
46935
+ mode: "poll";
46936
+ /** Checks whether the submitted provider batch is ready to collect. */
46937
+ poll(submissionData: SubmissionData, context: DurableBatchContext): Promise<DurableBatchPoll>;
46938
+ } | {
46939
+ mode: "webhook";
46940
+ /** Returns the provider ID used to match an incoming webhook to this batch. */
46941
+ getExternalId(submissionData: SubmissionData, context: DurableBatchContext): string;
46942
+ };
46943
+ interface DurableBatchTaskItem<Input, Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters> {
46944
+ /** Stable identifier for this case and trial within the durable run. */
46945
+ id: string;
46946
+ /** Input value from the evaluation case. */
46947
+ input: Input;
46948
+ /** Expected value from the evaluation case. */
46949
+ expected: Expected;
46950
+ /** Metadata associated with the evaluation case. */
46951
+ metadata: Metadata;
46952
+ /** Tags associated with the evaluation case. */
46953
+ tags: string[] | undefined;
46954
+ /** Parameters supplied when the durable evaluation started. */
46955
+ parameters: InferParameters<Parameters>;
46956
+ /** Zero-based trial index for this case. */
46957
+ trialIndex: number;
46958
+ }
46959
+ type DurableBatchTaskResult<Output, Metadata extends BaseMetadata> = {
46960
+ /** ID of the submitted item this result belongs to. */
46961
+ id: string;
46962
+ /** Task output for the item. */
46963
+ output: Output;
46964
+ /** Metadata to merge into the evaluation case. */
46965
+ metadata?: Metadata;
46966
+ /** Tags to replace those from the evaluation case. */
46967
+ tags?: string[];
46968
+ };
46969
+ type DurableBatchScorerItem<Input, Output, Expected, Metadata extends BaseMetadata> = EvalScorerArgs<Input, Output, Expected, Metadata> & {
46970
+ /** Stable identifier for this case and trial within the durable run. */
46971
+ id: string;
46972
+ /** Zero-based trial index for this case. */
46973
+ trialIndex: number;
46974
+ };
46975
+ type DurableBatchScorerResult = {
46976
+ /** ID of the submitted item this result belongs to. */
46977
+ id: string;
46978
+ /** Score or named scores produced for the item. */
46979
+ score: OneOrMoreScores;
46980
+ };
46981
+ interface DurableBatchProcessor<Item, Result, SubmissionData extends JsonValue> {
46982
+ /** Maximum items submitted in one provider batch. Defaults to 1,000. */
46983
+ batchSize?: number;
46984
+ /** Submits a batch and returns the provider-specific submission data. */
46985
+ submit(items: Item[], context: DurableBatchContext): Promise<SubmissionData>;
46986
+ /** Configures how the SDK learns that the submitted batch completed. */
46987
+ completion: DurableBatchCompletion<SubmissionData>;
46988
+ /** Collects one result for every item in a completed provider batch. */
46989
+ collect(submissionData: SubmissionData, context: DurableBatchContext): Promise<Result[]>;
46990
+ }
46991
+ interface DurableBatchTask<Input, Output, Expected, Metadata extends BaseMetadata, Parameters extends EvalParameters, SubmissionData extends JsonValue> {
46992
+ readonly kind: typeof BATCH_TASK_KIND;
46993
+ readonly processor: DurableBatchProcessor<DurableBatchTaskItem<Input, Expected, Metadata, Parameters>, DurableBatchTaskResult<Output, Metadata>, SubmissionData>;
46994
+ }
46995
+ interface DurableBatchScorer<Input, Output, Expected, Metadata extends BaseMetadata, SubmissionData extends JsonValue> {
46996
+ readonly kind: typeof BATCH_SCORER_KIND;
46997
+ name: string;
46998
+ readonly processor: DurableBatchProcessor<DurableBatchScorerItem<Input, Output, Expected, Metadata>, DurableBatchScorerResult, SubmissionData>;
46999
+ }
47000
+ /**
47001
+ * Defines a task that runs through asynchronous provider batch operations.
47002
+ *
47003
+ * @experimental - The API for this class is not yet stabilized and may change or be removed across non-major versions. Functionality is not guaranteed.
47004
+ */
47005
+ declare class BatchTask<Input, Output, Expected = void, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters, SubmissionData extends JsonValue = JsonValue> implements DurableBatchTask<Input, Output, Expected, Metadata, Parameters, SubmissionData> {
47006
+ readonly processor: DurableBatchProcessor<DurableBatchTaskItem<Input, Expected, Metadata, Parameters>, DurableBatchTaskResult<Output, Metadata>, SubmissionData>;
47007
+ readonly kind: typeof BATCH_TASK_KIND;
47008
+ constructor(processor: DurableBatchProcessor<DurableBatchTaskItem<Input, Expected, Metadata, Parameters>, DurableBatchTaskResult<Output, Metadata>, SubmissionData>);
47009
+ }
47010
+ /**
47011
+ * Defines a scorer that runs through asynchronous provider batch operations.
47012
+ *
47013
+ * @experimental - The API for this class is not yet stabilized and may change or be removed across non-major versions. Functionality is not guaranteed.
47014
+ */
47015
+ declare class BatchScorer<Input, Output, Expected = void, Metadata extends BaseMetadata = DefaultMetadataType, SubmissionData extends JsonValue = JsonValue> implements DurableBatchScorer<Input, Output, Expected, Metadata, SubmissionData> {
47016
+ readonly processor: DurableBatchProcessor<DurableBatchScorerItem<Input, Output, Expected, Metadata>, DurableBatchScorerResult, SubmissionData> & {
47017
+ name: string;
47018
+ };
47019
+ readonly kind: typeof BATCH_SCORER_KIND;
47020
+ readonly name: string;
47021
+ constructor(processor: DurableBatchProcessor<DurableBatchScorerItem<Input, Output, Expected, Metadata>, DurableBatchScorerResult, SubmissionData> & {
47022
+ name: string;
47023
+ });
47024
+ }
47025
+ type DurableEvaluator<Input, Output, Expected = void, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters> = Omit<Evaluator<Input, Output, Expected, Metadata, Parameters>, "task" | "scores" | "timeout" | "signal" | "maxConcurrency" | "update"> & {
47026
+ store: DurableEvalStore;
47027
+ /**
47028
+ * Returns a stable case ID when a data item has neither `id` nor `upsert_id`.
47029
+ * The ID is shared by all trials of the same case.
47030
+ */
47031
+ caseId?: (datum: EvalCase<Input, Expected, Metadata>) => string | Promise<string>;
47032
+ task: EvalTask<Input, Output, Expected, Metadata, Parameters> | DurableBatchTask<Input, Output, Expected, Metadata, Parameters, JsonValue>;
47033
+ scores?: Array<EvalScorer<Input, Output, Expected, Metadata> | DurableBatchScorer<Input, Output, Expected, Metadata, JsonValue>>;
47034
+ };
47035
+ interface DurableEvalStartOptions<Parameters extends EvalParameters = EvalParameters> {
47036
+ parameters?: InferParameters<Parameters>;
47037
+ noSendLogs?: boolean;
47038
+ }
47039
+ type DurableBatchResult = {
47040
+ runId: string;
47041
+ batchId?: string;
47042
+ externalId?: string;
47043
+ };
47044
+ type DurableEvalResult = {
47045
+ status: "waiting";
47046
+ runId: string;
47047
+ pending: {
47048
+ poll: number;
47049
+ webhook: number;
47050
+ };
47051
+ } | {
47052
+ status: "completed";
47053
+ runId: string;
47054
+ pending: {
47055
+ poll: 0;
47056
+ webhook: 0;
47057
+ };
47058
+ summary: ExperimentSummary;
47059
+ };
47060
+ interface DurableEvalDefinition<Parameters extends EvalParameters> {
47061
+ start(options?: DurableEvalStartOptions<Parameters>): Promise<DurableEvalResult>;
47062
+ status(options: {
47063
+ runId: string;
47064
+ }): Promise<DurableEvalResult>;
47065
+ poll(options: {
47066
+ runId: string;
47067
+ }): Promise<DurableEvalResult>;
47068
+ processBatchResult(result: DurableBatchResult): Promise<DurableEvalResult>;
47069
+ }
47070
+ /**
47071
+ * Defines a durable evaluation backed by a user-provided store.
47072
+ *
47073
+ * @experimental - The API for this function is not yet stabilized and may change or be removed across non-major versions. Functionality is not guaranteed.
47074
+ */
47075
+ declare function defineDurableEval<Input, Output, Expected = void, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters>(projectName: string, evaluator: DurableEvaluator<Input, Output, Expected, Metadata, Parameters>): DurableEvalDefinition<Parameters>;
47076
+
45776
47077
  type MaybePromise<T> = T | Promise<T>;
45777
47078
  type AssertionMatcher = RegExp | ((value: unknown) => boolean) | readonly AssertionMatcher[] | {
45778
47079
  [key: string]: AssertionMatcher;
@@ -46081,6 +47382,7 @@ interface InstrumentationIntegrationsConfig {
46081
47382
  langchain?: boolean;
46082
47383
  langgraph?: boolean;
46083
47384
  langsmith?: boolean;
47385
+ voyageai?: boolean;
46084
47386
  }
46085
47387
  interface InstrumentationConfig {
46086
47388
  /**
@@ -46217,6 +47519,10 @@ type exports$1_BaseAttachment = BaseAttachment;
46217
47519
  declare const exports$1_BaseAttachment: typeof BaseAttachment;
46218
47520
  declare const exports$1_BaseExperiment: typeof BaseExperiment;
46219
47521
  type exports$1_BaseMetadata = BaseMetadata;
47522
+ type exports$1_BatchScorer<Input, Output, Expected = void, Metadata extends BaseMetadata = DefaultMetadataType, SubmissionData extends JsonValue = JsonValue> = BatchScorer<Input, Output, Expected, Metadata, SubmissionData>;
47523
+ declare const exports$1_BatchScorer: typeof BatchScorer;
47524
+ type exports$1_BatchTask<Input, Output, Expected = void, Metadata extends BaseMetadata = DefaultMetadataType, Parameters extends EvalParameters = EvalParameters, SubmissionData extends JsonValue = JsonValue> = BatchTask<Input, Output, Expected, Metadata, Parameters, SubmissionData>;
47525
+ declare const exports$1_BatchTask: typeof BatchTask;
46220
47526
  type exports$1_BraintrustLangChainCallbackHandler<IsAsyncFlush extends boolean = true> = BraintrustLangChainCallbackHandler<IsAsyncFlush>;
46221
47527
  declare const exports$1_BraintrustLangChainCallbackHandler: typeof BraintrustLangChainCallbackHandler;
46222
47528
  declare const exports$1_BraintrustMiddleware: typeof BraintrustMiddleware;
@@ -46256,6 +47562,11 @@ type exports$1_DatasetRestoreResult = DatasetRestoreResult;
46256
47562
  type exports$1_DatasetSummary = DatasetSummary;
46257
47563
  type exports$1_DefaultMetadataType = DefaultMetadataType;
46258
47564
  type exports$1_DefaultPromptArgs = DefaultPromptArgs;
47565
+ type exports$1_DurableEvalMemoryStore = DurableEvalMemoryStore;
47566
+ declare const exports$1_DurableEvalMemoryStore: typeof DurableEvalMemoryStore;
47567
+ type exports$1_DurableEvalRedisStore = DurableEvalRedisStore;
47568
+ declare const exports$1_DurableEvalRedisStore: typeof DurableEvalRedisStore;
47569
+ type exports$1_DurableEvalStore = DurableEvalStore;
46259
47570
  declare const exports$1_ERR_PERMALINK: typeof ERR_PERMALINK;
46260
47571
  type exports$1_EndSpanArgs = EndSpanArgs;
46261
47572
  declare const exports$1_Eval: typeof Eval;
@@ -46414,6 +47725,7 @@ declare const exports$1_currentLogger: typeof currentLogger;
46414
47725
  declare const exports$1_currentSpan: typeof currentSpan;
46415
47726
  declare const exports$1_deepCopyEvent: typeof deepCopyEvent;
46416
47727
  declare const exports$1_defaultErrorScoreHandler: typeof defaultErrorScoreHandler;
47728
+ declare const exports$1_defineDurableEval: typeof defineDurableEval;
46417
47729
  declare const exports$1_deserializePlainStringAsJSON: typeof deserializePlainStringAsJSON;
46418
47730
  declare const exports$1_devNullWritableStream: typeof devNullWritableStream;
46419
47731
  declare const exports$1_evaluatorDefinitionSchema: typeof evaluatorDefinitionSchema;
@@ -46508,8 +47820,9 @@ declare const exports$1_wrapPiCodingAgentSDK: typeof wrapPiCodingAgentSDK;
46508
47820
  declare const exports$1_wrapStrandsAgentSDK: typeof wrapStrandsAgentSDK;
46509
47821
  declare const exports$1_wrapTraced: typeof wrapTraced;
46510
47822
  declare const exports$1_wrapVitest: typeof wrapVitest;
47823
+ declare const exports$1_wrapVoyageAI: typeof wrapVoyageAI;
46511
47824
  declare namespace exports$1 {
46512
- export { type exports$1_AnyDataset as AnyDataset, exports$1_Attachment as Attachment, type exports$1_AttachmentParams as AttachmentParams, exports$1_AttachmentReference as AttachmentReference, exports$1_BAGGAGE_HEADER as BAGGAGE_HEADER, exports$1_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, exports$1_BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME as BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, exports$1_BRAINTRUST_PARENT_KEY as BRAINTRUST_PARENT_KEY, type exports$1_BackgroundLoggerOpts as BackgroundLoggerOpts, exports$1_BaseAttachment as BaseAttachment, exports$1_BaseExperiment as BaseExperiment, type exports$1_BaseMetadata as BaseMetadata, exports$1_BraintrustLangChainCallbackHandler as BraintrustLangChainCallbackHandler, exports$1_BraintrustMiddleware as BraintrustMiddleware, exports$1_BraintrustObservabilityExporter as BraintrustObservabilityExporter, exports$1_BraintrustState as BraintrustState, exports$1_BraintrustStream as BraintrustStream, type exports$1_BraintrustStreamChunk as BraintrustStreamChunk, exports$1_CachedSpanFetcher as CachedSpanFetcher, type exports$1_ChatPrompt as ChatPrompt, exports$1_CodeFunction as CodeFunction, type exports$1_CodeOpts as CodeOpts, exports$1_CodePrompt as CodePrompt, type exports$1_CommentEvent as CommentEvent, type exports$1_CompiledPrompt as CompiledPrompt, type exports$1_CompiledPromptParams as CompiledPromptParams, type exports$1_CompletionPrompt as CompletionPrompt, exports$1_ContextManager as ContextManager, type exports$1_ContextParentSpanIds as ContextParentSpanIds, type exports$1_CreateProjectOpts as CreateProjectOpts, type exports$1_CurrentSpanStore as CurrentSpanStore, exports$1_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports$1_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports$1_DataSummary as DataSummary, exports$1_Dataset as Dataset, exports$1_DatasetPipeline as DatasetPipeline, type exports$1_DatasetRecord as DatasetRecord, type exports$1_DatasetRestorePreviewResult as DatasetRestorePreviewResult, type exports$1_DatasetRestoreResult as DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type exports$1_DatasetSummary as DatasetSummary, type exports$1_DefaultMetadataType as DefaultMetadataType, type exports$1_DefaultPromptArgs as DefaultPromptArgs, exports$1_ERR_PERMALINK as ERR_PERMALINK, type exports$1_EndSpanArgs as EndSpanArgs, exports$1_Eval as Eval, type exports$1_EvalCase as EvalCase, type exports$1_EvalClassifier as EvalClassifier, type exports$1_EvalHooks as EvalHooks, type exports$1_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports$1_EvalParameters as EvalParameters, type exports$1_EvalResult as EvalResult, exports$1_EvalResultWithSummary as EvalResultWithSummary, type exports$1_EvalScorer as EvalScorer, type exports$1_EvalScorerArgs as EvalScorerArgs, type exports$1_EvalTask as EvalTask, type exports$1_Evaluator as Evaluator, type exports$1_EvaluatorDef as EvaluatorDef, type exports$1_EvaluatorDefinition as EvaluatorDefinition, type exports$1_EvaluatorDefinitions as EvaluatorDefinitions, type exports$1_EvaluatorFile as EvaluatorFile, type exports$1_EvaluatorManifest as EvaluatorManifest, exports$1_Experiment as Experiment, type exports$1_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports$1_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports$1_ExperimentSummary as ExperimentSummary, type exports$1_Exportable as Exportable, exports$1_ExternalAttachment as ExternalAttachment, type exports$1_ExternalAttachmentParams as ExternalAttachmentParams, exports$1_FailedHTTPResponse as FailedHTTPResponse, type exports$1_FullInitDatasetOptions as FullInitDatasetOptions, type exports$1_FullInitOptions as FullInitOptions, type exports$1_FullLoginOptions as FullLoginOptions, type exports$1_FunctionEvent as FunctionEvent, type exports$1_GetThreadOptions as GetThreadOptions, exports$1_IDGenerator as IDGenerator, type exports$1_IdField as IdField, type exports$1_InitDatasetOptions as InitDatasetOptions, type exports$1_InitLoggerOptions as InitLoggerOptions, type exports$1_InitOptions as InitOptions, type exports$1_InputField as InputField, type exports$1_InstrumentationConfig as InstrumentationConfig, type exports$1_InvokeFunctionArgs as InvokeFunctionArgs, type exports$1_InvokeReturn as InvokeReturn, exports$1_JSONAttachment as JSONAttachment, exports$1_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports$1_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, type exports$1_LangChainCallbackHandlerOptions as LangChainCallbackHandlerOptions, exports$1_LazyValue as LazyValue, type exports$1_LoadPromptOptions as LoadPromptOptions, exports$1_LocalTrace as LocalTrace, type exports$1_LogCommentFullArgs as LogCommentFullArgs, type exports$1_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports$1_LogOptions as LogOptions, exports$1_Logger as Logger, exports$1_LoginInvalidOrgError as LoginInvalidOrgError, type exports$1_LoginOptions as LoginOptions, type exports$1_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports$1_Logs3OverflowUpload as Logs3OverflowUpload, type exports$1_MastraObservabilityExporter as MastraObservabilityExporter, type exports$1_MetricSummary as MetricSummary, exports$1_NOOP_SPAN as NOOP_SPAN, exports$1_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports$1_NoopSpan as NoopSpan, exports$1_OTELIDGenerator as OTELIDGenerator, exports$1_ObjectFetcher as ObjectFetcher, type exports$1_ObjectMetadata as ObjectMetadata, type exports$1_OtherExperimentLogFields as OtherExperimentLogFields, type exports$1_ParametersSource as ParametersSource, type exports$1_ParentExperimentIds as ParentExperimentIds, type exports$1_ParentProjectLogIds as ParentProjectLogIds, type exports$1_ParsedTraceparent as ParsedTraceparent, exports$1_Project as Project, exports$1_ProjectNameIdMap as ProjectNameIdMap, type exports$1_PromiseUnless as PromiseUnless, exports$1_Prompt as Prompt, exports$1_PromptBuilder as PromptBuilder, type exports$1_PromptContents as PromptContents, type exports$1_PromptDefinition as PromptDefinition, type exports$1_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports$1_PromptOpts as PromptOpts, type exports$1_PromptRowWithId as PromptRowWithId, type exports$1_PropagatedState as PropagatedState, type exports$1_PropagationContext as PropagationContext, exports$1_ReadonlyAttachment as ReadonlyAttachment, exports$1_ReadonlyExperiment as ReadonlyExperiment, type exports$1_RegisterSandboxOptions as RegisterSandboxOptions, type exports$1_RegisterSandboxResult as RegisterSandboxResult, exports$1_Reporter as Reporter, type exports$1_ReporterBody as ReporterBody, type exports$1_SandboxConfig as SandboxConfig, type exports$1_ScoreSummary as ScoreSummary, exports$1_ScorerBuilder as ScorerBuilder, type exports$1_ScorerOpts as ScorerOpts, type exports$1_SerializedBraintrustState as SerializedBraintrustState, type exports$1_SetCurrentArg as SetCurrentArg, type exports$1_Span as Span, type exports$1_SpanContext as SpanContext, type exports$1_SpanData as SpanData, exports$1_SpanFetcher as SpanFetcher, exports$1_SpanImpl as SpanImpl, type exports$1_StartSpanArgs as StartSpanArgs, exports$1_TRACEPARENT_HEADER as TRACEPARENT_HEADER, exports$1_TRACESTATE_HEADER as TRACESTATE_HEADER, type exports$1_TemplateFormat as TemplateFormat, type exports$1_TemplateRenderer as TemplateRenderer, type exports$1_TemplateRendererPlugin as TemplateRendererPlugin, exports$1_TestBackgroundLogger as TestBackgroundLogger, exports$1_ToolBuilder as ToolBuilder, type exports$1_Trace as Trace, type exports$1_TraceContextCarrier as TraceContextCarrier, type exports$1_TraceContextHeaders as TraceContextHeaders, exports$1_UUIDGenerator as UUIDGenerator, type exports$1_WithTransactionId as WithTransactionId, exports$1_X_CACHED_HEADER as X_CACHED_HEADER, exports$1__exportsForTestingOnly as _exportsForTestingOnly, exports$1__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports$1__internalSetInitialState as _internalSetInitialState, exports$1_addAzureBlobHeaders as addAzureBlobHeaders, exports$1_agentAssertionScorer as agentAssertionScorer, exports$1_braintrustAISDKTelemetry as braintrustAISDKTelemetry, exports$1_braintrustEveHook as braintrustEveHook, exports$1_braintrustEveInstrumentation as braintrustEveInstrumentation, exports$1_braintrustFlueInstrumentation as braintrustFlueInstrumentation, exports$1_braintrustFlueObserver as braintrustFlueObserver, exports$1_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports$1_buildLocalSummary as buildLocalSummary, exports$1_collectAnthropicSession as collectAnthropicSession, exports$1_configureInstrumentation as configureInstrumentation, exports$1_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports$1_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports$1_currentExperiment as currentExperiment, exports$1_currentLogger as currentLogger, exports$1_currentSpan as currentSpan, exports$1_deepCopyEvent as deepCopyEvent, exports$1_defaultErrorScoreHandler as defaultErrorScoreHandler, exports$1_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports$1_devNullWritableStream as devNullWritableStream, exports$1_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports$1_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports$1_extractTraceContextFromHeaders as extractTraceContextFromHeaders, exports$1_flush as flush, exports$1_getContextManager as getContextManager, exports$1_getIdGenerator as getIdGenerator, exports$1_getPromptVersions as getPromptVersions, exports$1_getSpanParentObject as getSpanParentObject, exports$1_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports$1_init as init, exports$1_initDataset as initDataset, exports$1_initExperiment as initExperiment, exports$1_initFunction as initFunction, exports$1_initLogger as initLogger, exports$1_initNodeTestSuite as initNodeTestSuite, exports$1_injectTraceContext as injectTraceContext, exports$1_invoke as invoke, exports$1_isTemplateFormat as isTemplateFormat, exports$1_loadParameters as loadParameters, exports$1_loadPrompt as loadPrompt, exports$1_log as log, exports$1_logError as logError, exports$1_login as login, exports$1_loginToState as loginToState, exports$1_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports$1_newId as newId, exports$1_parseCachedHeader as parseCachedHeader, exports$1_parseTemplateFormat as parseTemplateFormat, exports$1_permalink as permalink, exports$1_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports$1_projects as projects, exports$1_promptContentsSchema as promptContentsSchema, exports$1_promptDefinitionSchema as promptDefinitionSchema, exports$1_promptDefinitionToPromptData as promptDefinitionToPromptData, exports$1_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports$1_registerOtelFlush as registerOtelFlush, exports$1_registerSandbox as registerSandbox, exports$1_registerTemplatePlugin as registerTemplatePlugin, exports$1_renderMessage as renderMessage, exports$1_renderPromptParams as renderPromptParams, exports$1_renderTemplateContent as renderTemplateContent, exports$1_reportFailures as reportFailures, exports$1_runEvaluator as runEvaluator, exports$1_setFetch as setFetch, exports$1_setMaskingFunction as setMaskingFunction, exports$1_spanComponentsToObjectId as spanComponentsToObjectId, exports$1_startSpan as startSpan, exports$1_summarize as summarize, exports$1_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports$1_traceable as traceable, exports$1_traced as traced, exports$1_updateSpan as updateSpan, exports$1_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports$1_utf8ByteLength as utf8ByteLength, exports$1_withCurrent as withCurrent, exports$1_withDataset as withDataset, exports$1_withExperiment as withExperiment, exports$1_withLogger as withLogger, exports$1_withParent as withParent, exports$1_wrapAISDK as wrapAISDK, exports$1_wrapAISDKModel as wrapAISDKModel, exports$1_wrapAgentClass as wrapAgentClass, exports$1_wrapAnthropic as wrapAnthropic, exports$1_wrapBedrockRuntime as wrapBedrockRuntime, exports$1_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports$1_wrapCloudflareAIChat as wrapCloudflareAIChat, exports$1_wrapCloudflareAgent as wrapCloudflareAgent, exports$1_wrapCloudflareThink as wrapCloudflareThink, exports$1_wrapCohere as wrapCohere, exports$1_wrapCopilotClient as wrapCopilotClient, exports$1_wrapCursorSDK as wrapCursorSDK, exports$1_wrapGenkit as wrapGenkit, exports$1_wrapGoogleADK as wrapGoogleADK, exports$1_wrapGoogleGenAI as wrapGoogleGenAI, exports$1_wrapGroq as wrapGroq, exports$1_wrapHuggingFace as wrapHuggingFace, exports$1_wrapHuggingFaceTransformers as wrapHuggingFaceTransformers, exports$1_wrapLangSmithClient as wrapLangSmithClient, exports$1_wrapLangSmithRunTrees as wrapLangSmithRunTrees, exports$1_wrapLangSmithTraceable as wrapLangSmithTraceable, exports$1_wrapMastraAgent as wrapMastraAgent, exports$1_wrapMistral as wrapMistral, exports$1_wrapOllama as wrapOllama, exports$1_wrapOpenAI as wrapOpenAI, exports$1_wrapOpenAICodexSDK as wrapOpenAICodexSDK, exports$1_wrapOpenAIv4 as wrapOpenAIv4, exports$1_wrapOpenRouter as wrapOpenRouter, exports$1_wrapOpenRouterAgent as wrapOpenRouterAgent, exports$1_wrapPiCodingAgentSDK as wrapPiCodingAgentSDK, exports$1_wrapStrandsAgentSDK as wrapStrandsAgentSDK, exports$1_wrapTraced as wrapTraced, exports$1_wrapVitest as wrapVitest };
47825
+ export { type exports$1_AnyDataset as AnyDataset, exports$1_Attachment as Attachment, type exports$1_AttachmentParams as AttachmentParams, exports$1_AttachmentReference as AttachmentReference, exports$1_BAGGAGE_HEADER as BAGGAGE_HEADER, exports$1_BRAINTRUST_CURRENT_SPAN_STORE as BRAINTRUST_CURRENT_SPAN_STORE, exports$1_BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME as BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, exports$1_BRAINTRUST_PARENT_KEY as BRAINTRUST_PARENT_KEY, type exports$1_BackgroundLoggerOpts as BackgroundLoggerOpts, exports$1_BaseAttachment as BaseAttachment, exports$1_BaseExperiment as BaseExperiment, type exports$1_BaseMetadata as BaseMetadata, exports$1_BatchScorer as BatchScorer, exports$1_BatchTask as BatchTask, exports$1_BraintrustLangChainCallbackHandler as BraintrustLangChainCallbackHandler, exports$1_BraintrustMiddleware as BraintrustMiddleware, exports$1_BraintrustObservabilityExporter as BraintrustObservabilityExporter, exports$1_BraintrustState as BraintrustState, exports$1_BraintrustStream as BraintrustStream, type exports$1_BraintrustStreamChunk as BraintrustStreamChunk, exports$1_CachedSpanFetcher as CachedSpanFetcher, type exports$1_ChatPrompt as ChatPrompt, exports$1_CodeFunction as CodeFunction, type exports$1_CodeOpts as CodeOpts, exports$1_CodePrompt as CodePrompt, type exports$1_CommentEvent as CommentEvent, type exports$1_CompiledPrompt as CompiledPrompt, type exports$1_CompiledPromptParams as CompiledPromptParams, type exports$1_CompletionPrompt as CompletionPrompt, exports$1_ContextManager as ContextManager, type exports$1_ContextParentSpanIds as ContextParentSpanIds, type exports$1_CreateProjectOpts as CreateProjectOpts, type exports$1_CurrentSpanStore as CurrentSpanStore, exports$1_DEFAULT_FETCH_BATCH_SIZE as DEFAULT_FETCH_BATCH_SIZE, exports$1_DEFAULT_MAX_REQUEST_SIZE as DEFAULT_MAX_REQUEST_SIZE, type exports$1_DataSummary as DataSummary, exports$1_Dataset as Dataset, exports$1_DatasetPipeline as DatasetPipeline, type exports$1_DatasetRecord as DatasetRecord, type exports$1_DatasetRestorePreviewResult as DatasetRestorePreviewResult, type exports$1_DatasetRestoreResult as DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type exports$1_DatasetSummary as DatasetSummary, type exports$1_DefaultMetadataType as DefaultMetadataType, type exports$1_DefaultPromptArgs as DefaultPromptArgs, exports$1_DurableEvalMemoryStore as DurableEvalMemoryStore, exports$1_DurableEvalRedisStore as DurableEvalRedisStore, type exports$1_DurableEvalStore as DurableEvalStore, exports$1_ERR_PERMALINK as ERR_PERMALINK, type exports$1_EndSpanArgs as EndSpanArgs, exports$1_Eval as Eval, type exports$1_EvalCase as EvalCase, type exports$1_EvalClassifier as EvalClassifier, type exports$1_EvalHooks as EvalHooks, type exports$1_EvalParameterSerializedSchema as EvalParameterSerializedSchema, type exports$1_EvalParameters as EvalParameters, type exports$1_EvalResult as EvalResult, exports$1_EvalResultWithSummary as EvalResultWithSummary, type exports$1_EvalScorer as EvalScorer, type exports$1_EvalScorerArgs as EvalScorerArgs, type exports$1_EvalTask as EvalTask, type exports$1_Evaluator as Evaluator, type exports$1_EvaluatorDef as EvaluatorDef, type exports$1_EvaluatorDefinition as EvaluatorDefinition, type exports$1_EvaluatorDefinitions as EvaluatorDefinitions, type exports$1_EvaluatorFile as EvaluatorFile, type exports$1_EvaluatorManifest as EvaluatorManifest, exports$1_Experiment as Experiment, type exports$1_ExperimentLogFullArgs as ExperimentLogFullArgs, type exports$1_ExperimentLogPartialArgs as ExperimentLogPartialArgs, type exports$1_ExperimentSummary as ExperimentSummary, type exports$1_Exportable as Exportable, exports$1_ExternalAttachment as ExternalAttachment, type exports$1_ExternalAttachmentParams as ExternalAttachmentParams, exports$1_FailedHTTPResponse as FailedHTTPResponse, type exports$1_FullInitDatasetOptions as FullInitDatasetOptions, type exports$1_FullInitOptions as FullInitOptions, type exports$1_FullLoginOptions as FullLoginOptions, type exports$1_FunctionEvent as FunctionEvent, type exports$1_GetThreadOptions as GetThreadOptions, exports$1_IDGenerator as IDGenerator, type exports$1_IdField as IdField, type exports$1_InitDatasetOptions as InitDatasetOptions, type exports$1_InitLoggerOptions as InitLoggerOptions, type exports$1_InitOptions as InitOptions, type exports$1_InputField as InputField, type exports$1_InstrumentationConfig as InstrumentationConfig, type exports$1_InvokeFunctionArgs as InvokeFunctionArgs, type exports$1_InvokeReturn as InvokeReturn, exports$1_JSONAttachment as JSONAttachment, exports$1_LEGACY_CACHED_HEADER as LEGACY_CACHED_HEADER, exports$1_LOGS3_OVERFLOW_REFERENCE_TYPE as LOGS3_OVERFLOW_REFERENCE_TYPE, type exports$1_LangChainCallbackHandlerOptions as LangChainCallbackHandlerOptions, exports$1_LazyValue as LazyValue, type exports$1_LoadPromptOptions as LoadPromptOptions, exports$1_LocalTrace as LocalTrace, type exports$1_LogCommentFullArgs as LogCommentFullArgs, type exports$1_LogFeedbackFullArgs as LogFeedbackFullArgs, type exports$1_LogOptions as LogOptions, exports$1_Logger as Logger, exports$1_LoginInvalidOrgError as LoginInvalidOrgError, type exports$1_LoginOptions as LoginOptions, type exports$1_Logs3OverflowInputRow as Logs3OverflowInputRow, type exports$1_Logs3OverflowUpload as Logs3OverflowUpload, type exports$1_MastraObservabilityExporter as MastraObservabilityExporter, type exports$1_MetricSummary as MetricSummary, exports$1_NOOP_SPAN as NOOP_SPAN, exports$1_NOOP_SPAN_PERMALINK as NOOP_SPAN_PERMALINK, exports$1_NoopSpan as NoopSpan, exports$1_OTELIDGenerator as OTELIDGenerator, exports$1_ObjectFetcher as ObjectFetcher, type exports$1_ObjectMetadata as ObjectMetadata, type exports$1_OtherExperimentLogFields as OtherExperimentLogFields, type exports$1_ParametersSource as ParametersSource, type exports$1_ParentExperimentIds as ParentExperimentIds, type exports$1_ParentProjectLogIds as ParentProjectLogIds, type exports$1_ParsedTraceparent as ParsedTraceparent, exports$1_Project as Project, exports$1_ProjectNameIdMap as ProjectNameIdMap, type exports$1_PromiseUnless as PromiseUnless, exports$1_Prompt as Prompt, exports$1_PromptBuilder as PromptBuilder, type exports$1_PromptContents as PromptContents, type exports$1_PromptDefinition as PromptDefinition, type exports$1_PromptDefinitionWithTools as PromptDefinitionWithTools, type exports$1_PromptOpts as PromptOpts, type exports$1_PromptRowWithId as PromptRowWithId, type exports$1_PropagatedState as PropagatedState, type exports$1_PropagationContext as PropagationContext, exports$1_ReadonlyAttachment as ReadonlyAttachment, exports$1_ReadonlyExperiment as ReadonlyExperiment, type exports$1_RegisterSandboxOptions as RegisterSandboxOptions, type exports$1_RegisterSandboxResult as RegisterSandboxResult, exports$1_Reporter as Reporter, type exports$1_ReporterBody as ReporterBody, type exports$1_SandboxConfig as SandboxConfig, type exports$1_ScoreSummary as ScoreSummary, exports$1_ScorerBuilder as ScorerBuilder, type exports$1_ScorerOpts as ScorerOpts, type exports$1_SerializedBraintrustState as SerializedBraintrustState, type exports$1_SetCurrentArg as SetCurrentArg, type exports$1_Span as Span, type exports$1_SpanContext as SpanContext, type exports$1_SpanData as SpanData, exports$1_SpanFetcher as SpanFetcher, exports$1_SpanImpl as SpanImpl, type exports$1_StartSpanArgs as StartSpanArgs, exports$1_TRACEPARENT_HEADER as TRACEPARENT_HEADER, exports$1_TRACESTATE_HEADER as TRACESTATE_HEADER, type exports$1_TemplateFormat as TemplateFormat, type exports$1_TemplateRenderer as TemplateRenderer, type exports$1_TemplateRendererPlugin as TemplateRendererPlugin, exports$1_TestBackgroundLogger as TestBackgroundLogger, exports$1_ToolBuilder as ToolBuilder, type exports$1_Trace as Trace, type exports$1_TraceContextCarrier as TraceContextCarrier, type exports$1_TraceContextHeaders as TraceContextHeaders, exports$1_UUIDGenerator as UUIDGenerator, type exports$1_WithTransactionId as WithTransactionId, exports$1_X_CACHED_HEADER as X_CACHED_HEADER, exports$1__exportsForTestingOnly as _exportsForTestingOnly, exports$1__internalGetGlobalState as _internalGetGlobalState, iso as _internalIso, exports$1__internalSetInitialState as _internalSetInitialState, exports$1_addAzureBlobHeaders as addAzureBlobHeaders, exports$1_agentAssertionScorer as agentAssertionScorer, exports$1_braintrustAISDKTelemetry as braintrustAISDKTelemetry, exports$1_braintrustEveHook as braintrustEveHook, exports$1_braintrustEveInstrumentation as braintrustEveInstrumentation, exports$1_braintrustFlueInstrumentation as braintrustFlueInstrumentation, exports$1_braintrustFlueObserver as braintrustFlueObserver, exports$1_braintrustStreamChunkSchema as braintrustStreamChunkSchema, exports$1_buildLocalSummary as buildLocalSummary, exports$1_collectAnthropicSession as collectAnthropicSession, exports$1_configureInstrumentation as configureInstrumentation, exports$1_constructLogs3OverflowRequest as constructLogs3OverflowRequest, exports$1_createFinalValuePassThroughStream as createFinalValuePassThroughStream, exports$1_currentExperiment as currentExperiment, exports$1_currentLogger as currentLogger, exports$1_currentSpan as currentSpan, exports$1_deepCopyEvent as deepCopyEvent, exports$1_defaultErrorScoreHandler as defaultErrorScoreHandler, exports$1_defineDurableEval as defineDurableEval, exports$1_deserializePlainStringAsJSON as deserializePlainStringAsJSON, exports$1_devNullWritableStream as devNullWritableStream, exports$1_evaluatorDefinitionSchema as evaluatorDefinitionSchema, exports$1_evaluatorDefinitionsSchema as evaluatorDefinitionsSchema, exports$1_extractTraceContextFromHeaders as extractTraceContextFromHeaders, exports$1_flush as flush, exports$1_getContextManager as getContextManager, exports$1_getIdGenerator as getIdGenerator, exports$1_getPromptVersions as getPromptVersions, exports$1_getSpanParentObject as getSpanParentObject, exports$1_getTemplateRenderer as getTemplateRenderer, graphFramework as graph, exports$1_init as init, exports$1_initDataset as initDataset, exports$1_initExperiment as initExperiment, exports$1_initFunction as initFunction, exports$1_initLogger as initLogger, exports$1_initNodeTestSuite as initNodeTestSuite, exports$1_injectTraceContext as injectTraceContext, exports$1_invoke as invoke, exports$1_isTemplateFormat as isTemplateFormat, exports$1_loadParameters as loadParameters, exports$1_loadPrompt as loadPrompt, exports$1_log as log, exports$1_logError as logError, exports$1_login as login, exports$1_loginToState as loginToState, exports$1_logs3OverflowUploadSchema as logs3OverflowUploadSchema, exports$1_newId as newId, exports$1_parseCachedHeader as parseCachedHeader, exports$1_parseTemplateFormat as parseTemplateFormat, exports$1_permalink as permalink, exports$1_pickLogs3OverflowObjectIds as pickLogs3OverflowObjectIds, exports$1_projects as projects, exports$1_promptContentsSchema as promptContentsSchema, exports$1_promptDefinitionSchema as promptDefinitionSchema, exports$1_promptDefinitionToPromptData as promptDefinitionToPromptData, exports$1_promptDefinitionWithToolsSchema as promptDefinitionWithToolsSchema, exports$1_registerOtelFlush as registerOtelFlush, exports$1_registerSandbox as registerSandbox, exports$1_registerTemplatePlugin as registerTemplatePlugin, exports$1_renderMessage as renderMessage, exports$1_renderPromptParams as renderPromptParams, exports$1_renderTemplateContent as renderTemplateContent, exports$1_reportFailures as reportFailures, exports$1_runEvaluator as runEvaluator, exports$1_setFetch as setFetch, exports$1_setMaskingFunction as setMaskingFunction, exports$1_spanComponentsToObjectId as spanComponentsToObjectId, exports$1_startSpan as startSpan, exports$1_summarize as summarize, exports$1_templateRegistry as templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, exports$1_traceable as traceable, exports$1_traced as traced, exports$1_updateSpan as updateSpan, exports$1_uploadLogs3OverflowPayload as uploadLogs3OverflowPayload, exports$1_utf8ByteLength as utf8ByteLength, exports$1_withCurrent as withCurrent, exports$1_withDataset as withDataset, exports$1_withExperiment as withExperiment, exports$1_withLogger as withLogger, exports$1_withParent as withParent, exports$1_wrapAISDK as wrapAISDK, exports$1_wrapAISDKModel as wrapAISDKModel, exports$1_wrapAgentClass as wrapAgentClass, exports$1_wrapAnthropic as wrapAnthropic, exports$1_wrapBedrockRuntime as wrapBedrockRuntime, exports$1_wrapClaudeAgentSDK as wrapClaudeAgentSDK, exports$1_wrapCloudflareAIChat as wrapCloudflareAIChat, exports$1_wrapCloudflareAgent as wrapCloudflareAgent, exports$1_wrapCloudflareThink as wrapCloudflareThink, exports$1_wrapCohere as wrapCohere, exports$1_wrapCopilotClient as wrapCopilotClient, exports$1_wrapCursorSDK as wrapCursorSDK, exports$1_wrapGenkit as wrapGenkit, exports$1_wrapGoogleADK as wrapGoogleADK, exports$1_wrapGoogleGenAI as wrapGoogleGenAI, exports$1_wrapGroq as wrapGroq, exports$1_wrapHuggingFace as wrapHuggingFace, exports$1_wrapHuggingFaceTransformers as wrapHuggingFaceTransformers, exports$1_wrapLangSmithClient as wrapLangSmithClient, exports$1_wrapLangSmithRunTrees as wrapLangSmithRunTrees, exports$1_wrapLangSmithTraceable as wrapLangSmithTraceable, exports$1_wrapMastraAgent as wrapMastraAgent, exports$1_wrapMistral as wrapMistral, exports$1_wrapOllama as wrapOllama, exports$1_wrapOpenAI as wrapOpenAI, exports$1_wrapOpenAICodexSDK as wrapOpenAICodexSDK, exports$1_wrapOpenAIv4 as wrapOpenAIv4, exports$1_wrapOpenRouter as wrapOpenRouter, exports$1_wrapOpenRouterAgent as wrapOpenRouterAgent, exports$1_wrapPiCodingAgentSDK as wrapPiCodingAgentSDK, exports$1_wrapStrandsAgentSDK as wrapStrandsAgentSDK, exports$1_wrapTraced as wrapTraced, exports$1_wrapVitest as wrapVitest, exports$1_wrapVoyageAI as wrapVoyageAI };
46513
47826
  }
46514
47827
 
46515
- export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BAGGAGE_HEADER, BRAINTRUST_CURRENT_SPAN_STORE, BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, BRAINTRUST_PARENT_KEY, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BraintrustLangChainCallbackHandler, BraintrustMiddleware, BraintrustObservabilityExporter, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, DatasetPipeline, type DatasetRecord, type DatasetRestorePreviewResult, type DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalClassifier, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, type LangChainCallbackHandlerOptions, LazyValue, type LoadPromptOptions, LocalTrace, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MastraObservabilityExporter, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, OTELIDGenerator, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, type ParsedTraceparent, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, type PropagatedState, type PropagationContext, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, TRACEPARENT_HEADER, TRACESTATE_HEADER, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, type TraceContextCarrier, type TraceContextHeaders, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, agentAssertionScorer, braintrustAISDKTelemetry, braintrustEveHook, braintrustEveInstrumentation, braintrustFlueInstrumentation, braintrustFlueObserver, braintrustStreamChunkSchema, buildLocalSummary, collectAnthropicSession, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports$1 as default, defaultErrorScoreHandler, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, extractTraceContextFromHeaders, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, injectTraceContext, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapBedrockRuntime, wrapClaudeAgentSDK, wrapCloudflareAIChat, wrapCloudflareAgent, wrapCloudflareThink, wrapCohere, wrapCopilotClient, wrapCursorSDK, wrapGenkit, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapHuggingFaceTransformers, wrapLangSmithClient, wrapLangSmithRunTrees, wrapLangSmithTraceable, wrapMastraAgent, wrapMistral, wrapOllama, wrapOpenAI, wrapOpenAICodexSDK, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapPiCodingAgentSDK, wrapStrandsAgentSDK, wrapTraced, wrapVitest };
47828
+ export { type AnyDataset, Attachment, type AttachmentParams, AttachmentReference, BAGGAGE_HEADER, BRAINTRUST_CURRENT_SPAN_STORE, BRAINTRUST_LANGCHAIN_CALLBACK_HANDLER_NAME, BRAINTRUST_PARENT_KEY, type BackgroundLoggerOpts, BaseAttachment, BaseExperiment, type BaseMetadata, BatchScorer, BatchTask, BraintrustLangChainCallbackHandler, BraintrustMiddleware, BraintrustObservabilityExporter, BraintrustState, BraintrustStream, type BraintrustStreamChunk, CachedSpanFetcher, type ChatPrompt, CodeFunction, type CodeOpts, CodePrompt, type CommentEvent, type CompiledPrompt, type CompiledPromptParams, type CompletionPrompt, ContextManager, type ContextParentSpanIds, type CreateProjectOpts, type CurrentSpanStore, DEFAULT_FETCH_BATCH_SIZE, DEFAULT_MAX_REQUEST_SIZE, type DataSummary, Dataset, DatasetPipeline, type DatasetRecord, type DatasetRestorePreviewResult, type DatasetRestoreResult, type DatasetSnapshotType as DatasetSnapshot, type DatasetSummary, type DefaultMetadataType, type DefaultPromptArgs, DurableEvalMemoryStore, DurableEvalRedisStore, type DurableEvalStore, ERR_PERMALINK, type EndSpanArgs, Eval, type EvalCase, type EvalClassifier, type EvalHooks, type EvalParameterSerializedSchema, type EvalParameters, type EvalResult, EvalResultWithSummary, type EvalScorer, type EvalScorerArgs, type EvalTask, type Evaluator, type EvaluatorDef, type EvaluatorDefinition, type EvaluatorDefinitions, type EvaluatorFile, type EvaluatorManifest, Experiment, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, type ExperimentSummary, type Exportable, ExternalAttachment, type ExternalAttachmentParams, FailedHTTPResponse, type FullInitDatasetOptions, type FullInitOptions, type FullLoginOptions, type FunctionEvent, type GetThreadOptions, IDGenerator, type IdField, type InitDatasetOptions, type InitLoggerOptions, type InitOptions, type InputField, type InstrumentationConfig, type InvokeFunctionArgs, type InvokeReturn, JSONAttachment, LEGACY_CACHED_HEADER, LOGS3_OVERFLOW_REFERENCE_TYPE, type LangChainCallbackHandlerOptions, LazyValue, type LoadPromptOptions, LocalTrace, type LogCommentFullArgs, type LogFeedbackFullArgs, type LogOptions, Logger, LoginInvalidOrgError, type LoginOptions, type Logs3OverflowInputRow, type Logs3OverflowUpload, type MastraObservabilityExporter, type MetricSummary, NOOP_SPAN, NOOP_SPAN_PERMALINK, NoopSpan, OTELIDGenerator, ObjectFetcher, type ObjectMetadata, type OtherExperimentLogFields, type ParametersSource, type ParentExperimentIds, type ParentProjectLogIds, type ParsedTraceparent, Project, ProjectNameIdMap, type PromiseUnless, Prompt, PromptBuilder, type PromptContents, type PromptDefinition, type PromptDefinitionWithTools, type PromptOpts, type PromptRowWithId, type PropagatedState, type PropagationContext, ReadonlyAttachment, ReadonlyExperiment, type RegisterSandboxOptions, type RegisterSandboxResult, Reporter, type ReporterBody, type SandboxConfig, type ScoreSummary, ScorerBuilder, type ScorerOpts, type SerializedBraintrustState, type SetCurrentArg, type Span, type SpanContext, type SpanData, SpanFetcher, SpanImpl, type StartSpanArgs, TRACEPARENT_HEADER, TRACESTATE_HEADER, type TemplateFormat, type TemplateRenderer, type TemplateRendererPlugin, TestBackgroundLogger, ToolBuilder, type Trace, type TraceContextCarrier, type TraceContextHeaders, UUIDGenerator, type WithTransactionId, X_CACHED_HEADER, _exportsForTestingOnly, _internalGetGlobalState, iso as _internalIso, _internalSetInitialState, addAzureBlobHeaders, agentAssertionScorer, braintrustAISDKTelemetry, braintrustEveHook, braintrustEveInstrumentation, braintrustFlueInstrumentation, braintrustFlueObserver, braintrustStreamChunkSchema, buildLocalSummary, collectAnthropicSession, configureInstrumentation, constructLogs3OverflowRequest, createFinalValuePassThroughStream, currentExperiment, currentLogger, currentSpan, deepCopyEvent, exports$1 as default, defaultErrorScoreHandler, defineDurableEval, deserializePlainStringAsJSON, devNullWritableStream, evaluatorDefinitionSchema, evaluatorDefinitionsSchema, extractTraceContextFromHeaders, flush, getContextManager, getIdGenerator, getPromptVersions, getSpanParentObject, getTemplateRenderer, graphFramework as graph, init, initDataset, initExperiment, initFunction, initLogger, initNodeTestSuite, injectTraceContext, invoke, isTemplateFormat, loadParameters, loadPrompt, log, logError, login, loginToState, logs3OverflowUploadSchema, newId, parseCachedHeader, parseTemplateFormat, permalink, pickLogs3OverflowObjectIds, projects, promptContentsSchema, promptDefinitionSchema, promptDefinitionToPromptData, promptDefinitionWithToolsSchema, registerOtelFlush, registerSandbox, registerTemplatePlugin, renderMessage, renderPromptParams, renderTemplateContent, reportFailures, runEvaluator, setFetch, setMaskingFunction, spanComponentsToObjectId, startSpan, summarize, templateRegistry, ToolFunctionDefinition as toolFunctionDefinitionSchema, traceable, traced, updateSpan, uploadLogs3OverflowPayload, utf8ByteLength, withCurrent, withDataset, withExperiment, withLogger, withParent, wrapAISDK, wrapAISDKModel, wrapAgentClass, wrapAnthropic, wrapBedrockRuntime, wrapClaudeAgentSDK, wrapCloudflareAIChat, wrapCloudflareAgent, wrapCloudflareThink, wrapCohere, wrapCopilotClient, wrapCursorSDK, wrapGenkit, wrapGoogleADK, wrapGoogleGenAI, wrapGroq, wrapHuggingFace, wrapHuggingFaceTransformers, wrapLangSmithClient, wrapLangSmithRunTrees, wrapLangSmithTraceable, wrapMastraAgent, wrapMistral, wrapOllama, wrapOpenAI, wrapOpenAICodexSDK, wrapOpenAIv4, wrapOpenRouter, wrapOpenRouterAgent, wrapPiCodingAgentSDK, wrapStrandsAgentSDK, wrapTraced, wrapVitest, wrapVoyageAI };