braintrust 3.13.0 → 3.15.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 (50) hide show
  1. package/dev/dist/index.d.mts +6 -8
  2. package/dev/dist/index.d.ts +6 -8
  3. package/dev/dist/index.js +1399 -1466
  4. package/dev/dist/index.mjs +971 -1038
  5. package/dist/apply-auto-instrumentation.js +208 -188
  6. package/dist/apply-auto-instrumentation.mjs +40 -20
  7. package/dist/auto-instrumentations/bundler/esbuild.cjs +230 -40
  8. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -1
  9. package/dist/auto-instrumentations/bundler/next.cjs +230 -40
  10. package/dist/auto-instrumentations/bundler/next.mjs +3 -2
  11. package/dist/auto-instrumentations/bundler/rollup.cjs +230 -40
  12. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -1
  13. package/dist/auto-instrumentations/bundler/vite.cjs +230 -40
  14. package/dist/auto-instrumentations/bundler/vite.mjs +2 -1
  15. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +13 -39
  16. package/dist/auto-instrumentations/bundler/webpack.cjs +230 -40
  17. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -2
  18. package/dist/auto-instrumentations/{chunk-WFEUJACP.mjs → chunk-CNQ7BUKN.mjs} +1 -1
  19. package/dist/auto-instrumentations/chunk-J57YF7WS.mjs +208 -0
  20. package/dist/auto-instrumentations/chunk-QFMACSOL.mjs +280 -0
  21. package/dist/auto-instrumentations/{chunk-GJOO4ESL.mjs → chunk-VXJONZVX.mjs} +28 -40
  22. package/dist/auto-instrumentations/hook.mjs +7985 -46
  23. package/dist/auto-instrumentations/loader/cjs-patch.cjs +194 -4
  24. package/dist/auto-instrumentations/loader/cjs-patch.mjs +13 -27
  25. package/dist/auto-instrumentations/loader/esm-hook.mjs +24 -10
  26. package/dist/browser.d.mts +138 -26
  27. package/dist/browser.d.ts +138 -26
  28. package/dist/browser.js +898 -1063
  29. package/dist/browser.mjs +898 -1063
  30. package/dist/{chunk-75IQCUB2.mjs → chunk-O4ZIWXO3.mjs} +179 -25
  31. package/dist/{chunk-26JGOELH.js → chunk-VMBQETG3.js} +179 -25
  32. package/dist/cli.js +990 -1077
  33. package/dist/edge-light.d.mts +1 -1
  34. package/dist/edge-light.d.ts +1 -1
  35. package/dist/edge-light.js +898 -1063
  36. package/dist/edge-light.mjs +898 -1063
  37. package/dist/index.d.mts +138 -26
  38. package/dist/index.d.ts +138 -26
  39. package/dist/index.js +1690 -1825
  40. package/dist/index.mjs +918 -1053
  41. package/dist/instrumentation/index.d.mts +18 -9
  42. package/dist/instrumentation/index.d.ts +18 -9
  43. package/dist/instrumentation/index.js +711 -1038
  44. package/dist/instrumentation/index.mjs +710 -1038
  45. package/dist/workerd.d.mts +1 -1
  46. package/dist/workerd.d.ts +1 -1
  47. package/dist/workerd.js +898 -1063
  48. package/dist/workerd.mjs +898 -1063
  49. package/package.json +1 -7
  50. package/dist/auto-instrumentations/chunk-MWZXZQUO.mjs +0 -81
@@ -8863,17 +8863,15 @@ interface PromptKey {
8863
8863
  id?: string;
8864
8864
  }
8865
8865
  /**
8866
- * A two-layer cache for Braintrust prompts with both in-memory and filesystem storage.
8866
+ * A configurable cache for Braintrust prompts with optional in-memory and filesystem storage.
8867
8867
  *
8868
- * This cache implements either a one or two-layer caching strategy:
8869
- * 1. A fast in-memory LRU cache for frequently accessed prompts.
8870
- * 2. An optional persistent filesystem-based cache that serves as a backing store.
8868
+ * This cache can use either layer independently, both layers together, or no layers.
8871
8869
  */
8872
8870
  declare class PromptCache {
8873
- private readonly memoryCache;
8871
+ private readonly memoryCache?;
8874
8872
  private readonly diskCache?;
8875
8873
  constructor(options: {
8876
- memoryCache: LRUCache<string, Prompt>;
8874
+ memoryCache?: LRUCache<string, Prompt>;
8877
8875
  diskCache?: DiskCache<Prompt>;
8878
8876
  });
8879
8877
  /**
@@ -8900,10 +8898,10 @@ interface ParametersKey {
8900
8898
  id?: string;
8901
8899
  }
8902
8900
  declare class ParametersCache {
8903
- private readonly memoryCache;
8901
+ private readonly memoryCache?;
8904
8902
  private readonly diskCache?;
8905
8903
  constructor(options: {
8906
- memoryCache: LRUCache<string, RemoteEvalParameters>;
8904
+ memoryCache?: LRUCache<string, RemoteEvalParameters>;
8907
8905
  diskCache?: DiskCache<RemoteEvalParameters>;
8908
8906
  });
8909
8907
  get(key: ParametersKey): Promise<RemoteEvalParameters | undefined>;
@@ -8863,17 +8863,15 @@ interface PromptKey {
8863
8863
  id?: string;
8864
8864
  }
8865
8865
  /**
8866
- * A two-layer cache for Braintrust prompts with both in-memory and filesystem storage.
8866
+ * A configurable cache for Braintrust prompts with optional in-memory and filesystem storage.
8867
8867
  *
8868
- * This cache implements either a one or two-layer caching strategy:
8869
- * 1. A fast in-memory LRU cache for frequently accessed prompts.
8870
- * 2. An optional persistent filesystem-based cache that serves as a backing store.
8868
+ * This cache can use either layer independently, both layers together, or no layers.
8871
8869
  */
8872
8870
  declare class PromptCache {
8873
- private readonly memoryCache;
8871
+ private readonly memoryCache?;
8874
8872
  private readonly diskCache?;
8875
8873
  constructor(options: {
8876
- memoryCache: LRUCache<string, Prompt>;
8874
+ memoryCache?: LRUCache<string, Prompt>;
8877
8875
  diskCache?: DiskCache<Prompt>;
8878
8876
  });
8879
8877
  /**
@@ -8900,10 +8898,10 @@ interface ParametersKey {
8900
8898
  id?: string;
8901
8899
  }
8902
8900
  declare class ParametersCache {
8903
- private readonly memoryCache;
8901
+ private readonly memoryCache?;
8904
8902
  private readonly diskCache?;
8905
8903
  constructor(options: {
8906
- memoryCache: LRUCache<string, RemoteEvalParameters>;
8904
+ memoryCache?: LRUCache<string, RemoteEvalParameters>;
8907
8905
  diskCache?: DiskCache<RemoteEvalParameters>;
8908
8906
  });
8909
8907
  get(key: ParametersKey): Promise<RemoteEvalParameters | undefined>;