braintrust 3.22.0 → 3.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +43 -0
  2. package/dev/dist/index.d.mts +1 -1
  3. package/dev/dist/index.d.ts +1 -1
  4. package/dev/dist/index.js +1354 -654
  5. package/dev/dist/index.mjs +736 -36
  6. package/dist/apply-auto-instrumentation.js +222 -186
  7. package/dist/apply-auto-instrumentation.mjs +37 -1
  8. package/dist/auto-instrumentations/bundler/esbuild.cjs +53 -1
  9. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  10. package/dist/auto-instrumentations/bundler/next.cjs +53 -1
  11. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  12. package/dist/auto-instrumentations/bundler/rollup.cjs +53 -1
  13. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  14. package/dist/auto-instrumentations/bundler/vite.cjs +53 -1
  15. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  16. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +53 -1
  17. package/dist/auto-instrumentations/bundler/webpack.cjs +53 -1
  18. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  19. package/dist/auto-instrumentations/{chunk-TKRPRPGD.mjs → chunk-EXY7QCJD.mjs} +5 -2
  20. package/dist/auto-instrumentations/{chunk-T6J4C7LX.mjs → chunk-KIMLYPRW.mjs} +1 -1
  21. package/dist/auto-instrumentations/{chunk-BRQX23KL.mjs → chunk-YXLNSAMJ.mjs} +51 -0
  22. package/dist/auto-instrumentations/hook.mjs +149 -20
  23. package/dist/auto-instrumentations/index.cjs +52 -0
  24. package/dist/auto-instrumentations/index.d.mts +3 -1
  25. package/dist/auto-instrumentations/index.d.ts +3 -1
  26. package/dist/auto-instrumentations/index.mjs +3 -1
  27. package/dist/browser.d.mts +11 -13
  28. package/dist/browser.d.ts +11 -13
  29. package/dist/browser.js +1098 -205
  30. package/dist/browser.mjs +1098 -205
  31. package/dist/{chunk-KMGUTPB7.mjs → chunk-36IPYKMG.mjs} +20 -1
  32. package/dist/{chunk-MWVVR5LR.js → chunk-B6ZQIAK3.js} +1506 -822
  33. package/dist/{chunk-BFGIH2ZJ.js → chunk-CDIKAHDZ.js} +21 -2
  34. package/dist/{chunk-ZG2O3XVF.mjs → chunk-RBXD2KYN.mjs} +719 -35
  35. package/dist/cli.js +737 -37
  36. package/dist/edge-light.d.mts +1 -1
  37. package/dist/edge-light.d.ts +1 -1
  38. package/dist/edge-light.js +1098 -205
  39. package/dist/edge-light.mjs +1098 -205
  40. package/dist/index.d.mts +11 -13
  41. package/dist/index.d.ts +11 -13
  42. package/dist/index.js +786 -593
  43. package/dist/index.mjs +346 -153
  44. package/dist/instrumentation/index.d.mts +3 -11
  45. package/dist/instrumentation/index.d.ts +3 -11
  46. package/dist/instrumentation/index.js +788 -183
  47. package/dist/instrumentation/index.mjs +788 -183
  48. package/dist/vitest-evals-reporter.js +16 -16
  49. package/dist/vitest-evals-reporter.mjs +2 -2
  50. package/dist/workerd.d.mts +1 -1
  51. package/dist/workerd.d.ts +1 -1
  52. package/dist/workerd.js +1098 -205
  53. package/dist/workerd.mjs +1098 -205
  54. package/package.json +1 -1
@@ -6757,6 +6757,7 @@ interface InstrumentationIntegrationsConfig {
6757
6757
  strandsAgentSDK?: boolean;
6758
6758
  langchain?: boolean;
6759
6759
  langgraph?: boolean;
6760
+ langsmith?: boolean;
6760
6761
  }
6761
6762
  interface InstrumentationConfig {
6762
6763
  /**
@@ -6808,6 +6809,7 @@ declare class BraintrustPlugin extends BasePlugin {
6808
6809
  private gitHubCopilotPlugin;
6809
6810
  private fluePlugin;
6810
6811
  private langChainPlugin;
6812
+ private langSmithPlugin;
6811
6813
  private piCodingAgentPlugin;
6812
6814
  private strandsAgentSDKPlugin;
6813
6815
  constructor(config?: BraintrustPluginConfig);
@@ -7986,7 +7988,7 @@ declare class HTTPConnection {
7986
7988
  set_token(token: string): void;
7987
7989
  _reset(): void;
7988
7990
  get(path: string, params?: Record<string, string | string[] | undefined> | undefined, config?: RequestInit): Promise<Response>;
7989
- post(path: string, params?: Record<string, unknown> | string, config?: RequestInit): Promise<Response>;
7991
+ post(path: string, params?: Record<string, unknown> | string, config?: RequestInit, retries?: number): Promise<Response>;
7990
7992
  get_json(object_type: string, args?: Record<string, string | string[] | undefined> | undefined, retries?: number): Promise<any>;
7991
7993
  post_json(object_type: string, args?: Record<string, unknown> | string | undefined): Promise<any>;
7992
7994
  toString(): string;
@@ -8961,23 +8963,13 @@ type EveJsonObject = {
8961
8963
  readonly [key: string]: EveJsonValue;
8962
8964
  };
8963
8965
  interface EveHookContext {
8964
- readonly agent?: {
8965
- readonly name?: string;
8966
- readonly nodeId?: string;
8967
- };
8968
- readonly channel?: {
8969
- readonly kind?: string;
8970
- readonly continuationToken?: string;
8971
- };
8972
8966
  readonly session?: {
8973
8967
  readonly id?: string;
8974
8968
  readonly parent?: {
8975
8969
  readonly callId?: string;
8976
- readonly rootSessionId?: string;
8977
8970
  readonly sessionId?: string;
8978
8971
  readonly turn?: {
8979
8972
  readonly id?: string;
8980
- readonly sequence?: number;
8981
8973
  };
8982
8974
  };
8983
8975
  };
@@ -6757,6 +6757,7 @@ interface InstrumentationIntegrationsConfig {
6757
6757
  strandsAgentSDK?: boolean;
6758
6758
  langchain?: boolean;
6759
6759
  langgraph?: boolean;
6760
+ langsmith?: boolean;
6760
6761
  }
6761
6762
  interface InstrumentationConfig {
6762
6763
  /**
@@ -6808,6 +6809,7 @@ declare class BraintrustPlugin extends BasePlugin {
6808
6809
  private gitHubCopilotPlugin;
6809
6810
  private fluePlugin;
6810
6811
  private langChainPlugin;
6812
+ private langSmithPlugin;
6811
6813
  private piCodingAgentPlugin;
6812
6814
  private strandsAgentSDKPlugin;
6813
6815
  constructor(config?: BraintrustPluginConfig);
@@ -7986,7 +7988,7 @@ declare class HTTPConnection {
7986
7988
  set_token(token: string): void;
7987
7989
  _reset(): void;
7988
7990
  get(path: string, params?: Record<string, string | string[] | undefined> | undefined, config?: RequestInit): Promise<Response>;
7989
- post(path: string, params?: Record<string, unknown> | string, config?: RequestInit): Promise<Response>;
7991
+ post(path: string, params?: Record<string, unknown> | string, config?: RequestInit, retries?: number): Promise<Response>;
7990
7992
  get_json(object_type: string, args?: Record<string, string | string[] | undefined> | undefined, retries?: number): Promise<any>;
7991
7993
  post_json(object_type: string, args?: Record<string, unknown> | string | undefined): Promise<any>;
7992
7994
  toString(): string;
@@ -8961,23 +8963,13 @@ type EveJsonObject = {
8961
8963
  readonly [key: string]: EveJsonValue;
8962
8964
  };
8963
8965
  interface EveHookContext {
8964
- readonly agent?: {
8965
- readonly name?: string;
8966
- readonly nodeId?: string;
8967
- };
8968
- readonly channel?: {
8969
- readonly kind?: string;
8970
- readonly continuationToken?: string;
8971
- };
8972
8966
  readonly session?: {
8973
8967
  readonly id?: string;
8974
8968
  readonly parent?: {
8975
8969
  readonly callId?: string;
8976
- readonly rootSessionId?: string;
8977
8970
  readonly sessionId?: string;
8978
8971
  readonly turn?: {
8979
8972
  readonly id?: string;
8980
- readonly sequence?: number;
8981
8973
  };
8982
8974
  };
8983
8975
  };