braintrust 1.0.0-rc.1 → 1.0.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.
package/README.md CHANGED
@@ -2,13 +2,11 @@ An isomorphic JS library for logging data to Braintrust.
2
2
 
3
3
  ## Version information
4
4
 
5
- This SDK has two active version lines:
5
+ **1.x** is the current stable release with improved ESM support. OpenTelemetry integration is available via the separate [`@braintrust/otel`](https://www.npmjs.com/package/@braintrust/otel) package.
6
6
 
7
- - **1.x** (developed on the `js-1.x` branch): The latest major release with improved ESM support. OpenTelemetry integration is now available via the separate [`@braintrust/otel`](https://www.npmjs.com/package/@braintrust/otel) package.
7
+ ### Upgrading from 0.x
8
8
 
9
- - **0.4.x** (developed on the `main` branch): The previous version line, available for backward compatibility. Once 1.x is stable, it will be promoted to the `main` branch.
10
-
11
- **Recommendation**: Use the latest 1.x release. If you encounter any issues, please reach out to [support@braintrust.dev](mailto:support@braintrust.dev).
9
+ If you're on version **0.4.10 or earlier**, we recommend upgrading to **1.x**. See the [TypeScript SDK upgrade guide](https://www.braintrust.dev/docs/reference/sdks/typescript-upgrade-guide) for migration instructions.
12
10
 
13
11
  ### Quickstart
14
12
 
@@ -8428,6 +8428,7 @@ declare class HTTPBackgroundLogger implements BackgroundLogger {
8428
8428
  queueDropLoggingPeriod: number;
8429
8429
  failedPublishPayloadsDir: string | undefined;
8430
8430
  allPublishPayloadsDir: string | undefined;
8431
+ flushChunkSize: number;
8431
8432
  private _disabled;
8432
8433
  private queueDropLoggingState;
8433
8434
  constructor(apiConn: LazyValue<HTTPConnection>, opts?: BackgroundLoggerOpts);
@@ -8435,6 +8436,7 @@ declare class HTTPBackgroundLogger implements BackgroundLogger {
8435
8436
  log(items: LazyValue<BackgroundLogEvent>[]): void;
8436
8437
  flush(): Promise<void>;
8437
8438
  private flushOnce;
8439
+ private flushWrappedItemsChunk;
8438
8440
  private unwrapLazyValues;
8439
8441
  private submitLogsRequest;
8440
8442
  private registerDroppedItemCount;
@@ -8514,6 +8516,7 @@ declare class ObjectFetcher<RecordType> implements AsyncIterable<WithTransaction
8514
8516
  constructor(objectType: "dataset" | "experiment", pinnedVersion: string | undefined, mutateRecord?: ((r: any) => WithTransactionId<RecordType>) | undefined, _internal_btql?: Record<string, unknown> | undefined);
8515
8517
  get id(): Promise<string>;
8516
8518
  protected getState(): Promise<BraintrustState>;
8519
+ private fetchRecordsFromApi;
8517
8520
  fetch(): AsyncGenerator<WithTransactionId<RecordType>>;
8518
8521
  [Symbol.asyncIterator](): AsyncIterator<WithTransactionId<RecordType>>;
8519
8522
  fetchedData(): Promise<WithTransactionId<RecordType>[]>;
@@ -8428,6 +8428,7 @@ declare class HTTPBackgroundLogger implements BackgroundLogger {
8428
8428
  queueDropLoggingPeriod: number;
8429
8429
  failedPublishPayloadsDir: string | undefined;
8430
8430
  allPublishPayloadsDir: string | undefined;
8431
+ flushChunkSize: number;
8431
8432
  private _disabled;
8432
8433
  private queueDropLoggingState;
8433
8434
  constructor(apiConn: LazyValue<HTTPConnection>, opts?: BackgroundLoggerOpts);
@@ -8435,6 +8436,7 @@ declare class HTTPBackgroundLogger implements BackgroundLogger {
8435
8436
  log(items: LazyValue<BackgroundLogEvent>[]): void;
8436
8437
  flush(): Promise<void>;
8437
8438
  private flushOnce;
8439
+ private flushWrappedItemsChunk;
8438
8440
  private unwrapLazyValues;
8439
8441
  private submitLogsRequest;
8440
8442
  private registerDroppedItemCount;
@@ -8514,6 +8516,7 @@ declare class ObjectFetcher<RecordType> implements AsyncIterable<WithTransaction
8514
8516
  constructor(objectType: "dataset" | "experiment", pinnedVersion: string | undefined, mutateRecord?: ((r: any) => WithTransactionId<RecordType>) | undefined, _internal_btql?: Record<string, unknown> | undefined);
8515
8517
  get id(): Promise<string>;
8516
8518
  protected getState(): Promise<BraintrustState>;
8519
+ private fetchRecordsFromApi;
8517
8520
  fetch(): AsyncGenerator<WithTransactionId<RecordType>>;
8518
8521
  [Symbol.asyncIterator](): AsyncIterator<WithTransactionId<RecordType>>;
8519
8522
  fetchedData(): Promise<WithTransactionId<RecordType>[]>;