braintrust 3.7.1 → 3.9.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 (57) hide show
  1. package/dev/dist/index.d.mts +228 -5
  2. package/dev/dist/index.d.ts +228 -5
  3. package/dev/dist/index.js +6259 -1261
  4. package/dev/dist/index.mjs +6161 -1163
  5. package/dist/auto-instrumentations/bundler/esbuild.cjs +995 -55
  6. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  7. package/dist/auto-instrumentations/bundler/rollup.cjs +995 -55
  8. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/vite.cjs +995 -55
  10. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  11. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +995 -55
  12. package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +11 -9
  13. package/dist/auto-instrumentations/bundler/webpack.cjs +995 -55
  14. package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
  15. package/dist/auto-instrumentations/{chunk-NY4CGTN6.mjs → chunk-G7F6HZGE.mjs} +9 -1
  16. package/dist/auto-instrumentations/{chunk-EVUKFMHG.mjs → chunk-ITP7RAUY.mjs} +21 -3
  17. package/dist/auto-instrumentations/chunk-KIMMUFAK.mjs +1781 -0
  18. package/dist/auto-instrumentations/{chunk-VLEJ5AEK.mjs → chunk-P5YLNB2A.mjs} +21 -3
  19. package/dist/auto-instrumentations/hook.mjs +1206 -82
  20. package/dist/auto-instrumentations/index.cjs +1161 -55
  21. package/dist/auto-instrumentations/index.d.mts +22 -1
  22. package/dist/auto-instrumentations/index.d.ts +22 -1
  23. package/dist/auto-instrumentations/index.mjs +172 -1
  24. package/dist/auto-instrumentations/loader/cjs-patch.cjs +34 -6
  25. package/dist/auto-instrumentations/loader/cjs-patch.d.mts +1 -0
  26. package/dist/auto-instrumentations/loader/cjs-patch.d.ts +1 -0
  27. package/dist/auto-instrumentations/loader/cjs-patch.mjs +15 -5
  28. package/dist/auto-instrumentations/loader/esm-hook.mjs +10 -4
  29. package/dist/auto-instrumentations/loader/get-package-version.cjs +20 -2
  30. package/dist/auto-instrumentations/loader/get-package-version.mjs +1 -1
  31. package/dist/browser.d.mts +501 -18
  32. package/dist/browser.d.ts +501 -18
  33. package/dist/browser.js +6985 -1211
  34. package/dist/browser.mjs +6985 -1211
  35. package/dist/cli.js +6160 -1133
  36. package/dist/edge-light.d.mts +1 -1
  37. package/dist/edge-light.d.ts +1 -1
  38. package/dist/edge-light.js +16054 -10191
  39. package/dist/edge-light.mjs +16054 -10191
  40. package/dist/index.d.mts +501 -18
  41. package/dist/index.d.ts +501 -18
  42. package/dist/index.js +7144 -1370
  43. package/dist/index.mjs +6985 -1211
  44. package/dist/instrumentation/index.d.mts +17 -0
  45. package/dist/instrumentation/index.d.ts +17 -0
  46. package/dist/instrumentation/index.js +5929 -1053
  47. package/dist/instrumentation/index.mjs +5929 -1053
  48. package/dist/workerd.d.mts +1 -1
  49. package/dist/workerd.d.ts +1 -1
  50. package/dist/workerd.js +16054 -10191
  51. package/dist/workerd.mjs +16054 -10191
  52. package/package.json +13 -8
  53. package/util/dist/index.d.mts +42 -1
  54. package/util/dist/index.d.ts +42 -1
  55. package/util/dist/index.js +5 -1
  56. package/util/dist/index.mjs +4 -0
  57. package/dist/auto-instrumentations/chunk-YCKND42U.mjs +0 -839
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "braintrust",
3
- "version": "3.7.1",
3
+ "version": "3.9.0",
4
4
  "description": "SDK for integrating Braintrust",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/braintrustdata/braintrust-sdk-javascript.git",
8
- "directory": "blob/main/js"
8
+ "directory": "js"
9
9
  },
10
10
  "homepage": "https://www.braintrust.dev/docs",
11
11
  "main": "./dist/index.js",
@@ -114,7 +114,7 @@
114
114
  "check:typings": "tsc --noEmit",
115
115
  "watch": "tsup --watch",
116
116
  "clean": "rm -r dist/* && rm -r dev/dist/*",
117
- "docs": "npx typedoc --options typedoc.json src/node/index.ts",
117
+ "docs": "typedoc --options typedoc.json src/node/index.ts",
118
118
  "test": "vitest run --exclude \"src/wrappers/**/*.test.ts\" --exclude \"src/otel/**/*.test.ts\" --exclude \"smoke/**/*.test.ts\" --exclude \"src/zod/**/*.test.ts\" --exclude \"tests/api-compatibility/**\"",
119
119
  "test:core": "pnpm prune && pnpm test",
120
120
  "test:checks": "pnpm run test:core && pnpm run test:vitest",
@@ -142,8 +142,7 @@
142
142
  "test:claude-agent-sdk": "pnpm --filter @braintrust/claude-agent-sdk-tests test",
143
143
  "test:vitest": "pnpm --filter @braintrust/vitest-wrapper-tests test",
144
144
  "test:output": "tsx scripts/test-output.ts --with-comparison --with-metrics --with-progress",
145
- "bench": "npx tsx src/queue.bench.ts",
146
- "publish:validate": "./scripts/validate-release.sh && pnpm install --frozen-lockfile && pnpm run build && npm publish",
145
+ "bench": "tsx src/queue.bench.ts",
147
146
  "lint": "eslint .",
148
147
  "fix:lint": "eslint --fix .",
149
148
  "playground": "tsx playground.ts",
@@ -156,6 +155,7 @@
156
155
  "devDependencies": {
157
156
  "@ai-sdk/anthropic": "2.0.37",
158
157
  "@anthropic-ai/sdk": "^0.60.0",
158
+ "@google/adk": "^0.6.1",
159
159
  "@google/genai": "^1.25.0",
160
160
  "@jest/globals": "^29.7.0",
161
161
  "@nodelib/fs.walk": "^1.2.8",
@@ -191,7 +191,7 @@
191
191
  "typedoc": "^0.25.13",
192
192
  "typedoc-plugin-markdown": "^3.17.1",
193
193
  "typescript": "5.4.4",
194
- "vite": "^6.4.1",
194
+ "vite": "^6.4.2",
195
195
  "vite-tsconfig-paths": "^4.3.2",
196
196
  "vitest": "^4.1.2",
197
197
  "webpack": "^5.97.1",
@@ -199,7 +199,7 @@
199
199
  },
200
200
  "dependencies": {
201
201
  "@ai-sdk/provider": "^1.1.3",
202
- "@apm-js-collab/code-transformer": "^0.9.0",
202
+ "@apm-js-collab/code-transformer": "^0.12.0",
203
203
  "@next/env": "^14.2.3",
204
204
  "@vercel/functions": "^1.0.2",
205
205
  "ajv": "^8.17.1",
@@ -209,7 +209,7 @@
209
209
  "cli-progress": "^3.12.0",
210
210
  "cli-table3": "^0.6.5",
211
211
  "cors": "^2.8.5",
212
- "dc-browser": "^1.0.3",
212
+ "dc-browser": "^1.0.4",
213
213
  "dotenv": "^16.4.5",
214
214
  "esbuild": "^0.27.0",
215
215
  "eventsource-parser": "^1.1.2",
@@ -229,5 +229,10 @@
229
229
  },
230
230
  "peerDependencies": {
231
231
  "zod": "^3.25.34 || ^4.0"
232
+ },
233
+ "publishConfig": {
234
+ "access": "public",
235
+ "registry": "https://registry.npmjs.org/",
236
+ "provenance": true
232
237
  }
233
238
  }
@@ -4855,6 +4855,10 @@ type OtherExperimentLogFields = {
4855
4855
  error: unknown;
4856
4856
  tags: string[];
4857
4857
  scores: Record<string, number | null>;
4858
+ classifications?: Record<string, {
4859
+ id: string;
4860
+ label?: string;
4861
+ }[]>;
4858
4862
  metadata: Record<string, unknown>;
4859
4863
  metrics: Record<string, unknown>;
4860
4864
  datasetRecordId: string;
@@ -5052,6 +5056,42 @@ declare function batchItems<T>(args: {
5052
5056
  getByteSize: (item: T) => number;
5053
5057
  }): T[][];
5054
5058
 
5059
+ /**
5060
+ * The result returned by a classifier function. Unlike `Score`, `id` is
5061
+ * required and the span will be recorded as a classifier span.
5062
+ */
5063
+ interface Classification {
5064
+ /**
5065
+ * The name of this classification result. Used as the key in the
5066
+ * `classifications` log record. If omitted, defaults to the classifier
5067
+ * function's name.
5068
+ */
5069
+ name: string;
5070
+ /**
5071
+ * A machine-readable identifier for the classification outcome
5072
+ * (e.g. `"positive"`, `"negative"`, `"neutral"`). This value is stored
5073
+ * in the log and used for programmatic analysis.
5074
+ */
5075
+ id: string;
5076
+ /**
5077
+ * An optional human-readable display label for this outcome. If omitted,
5078
+ * defaults to `id`. Use this when you want a friendlier label in the UI
5079
+ * while keeping a stable `id` for programmatic use.
5080
+ */
5081
+ label?: string;
5082
+ /**
5083
+ * Optional arbitrary metadata to attach to this classification result.
5084
+ */
5085
+ metadata?: Record<string, unknown>;
5086
+ }
5087
+ /**
5088
+ * The serialized form of a classification stored in the `classifications` log record.
5089
+ */
5090
+ interface ClassificationItem {
5091
+ id: string;
5092
+ label: string;
5093
+ metadata?: Record<string, unknown>;
5094
+ }
5055
5095
  interface Score {
5056
5096
  name: string;
5057
5097
  score: number | null;
@@ -5129,6 +5169,7 @@ declare function isObjectOrArray(value: unknown): value is {
5129
5169
  declare function isEmpty(a: unknown): a is null | undefined;
5130
5170
  declare function notEmpty<T>(a: T | null | undefined): T;
5131
5171
  declare function isNumber(a: unknown): a is number | bigint;
5172
+ declare function isPromiseLike(value: unknown): value is PromiseLike<unknown>;
5132
5173
 
5133
5174
  declare enum SpanObjectTypeV1 {
5134
5175
  EXPERIMENT = 1,
@@ -5327,4 +5368,4 @@ declare function base64ToUint8Array(base64: string): Uint8Array;
5327
5368
  declare function uint8ArrayToString(uint8Array: Uint8Array): string;
5328
5369
  declare function stringToUint8Array(str: string): Uint8Array;
5329
5370
 
5330
- export { ARRAY_DELETE_FIELD, ASYNC_SCORING_CONTROL_FIELD, AUDIT_METADATA_FIELD, AUDIT_SOURCE_FIELD, type AnyDatasetRecord, BT_CURSOR_HEADER, BT_FOUND_EXISTING_HEADER, BT_IMPERSONATE_USER, BT_PARENT, type BackgroundLogEvent, CREATED_FIELD, type CommentEvent, DEFAULT_IS_LEGACY_DATASET, type DatasetEvent, type DatasetRecord, type ExperimentEvent, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, ExtraFieldsError, ID_FIELD, IS_MERGE_FIELD, type IdField, type InputField, type LogCommentFullArgs, type LogFeedbackFullArgs, type LoggingEvent, MERGE_PATHS_FIELD, OBJECT_DELETE_FIELD, OBJECT_ID_KEYS, type OtherExperimentLogFields, PARENT_ID_FIELD, type ParentExperimentIds, type ParentPlaygroundLogIds, type ParentProjectLogIds, type PlaygroundLogEvent, SKIP_ASYNC_SCORING_FIELD, type SanitizedExperimentLogPartialArgs, type Score, type Scorer, type ScorerArgs, type Source, SpanComponentsV1, SpanComponentsV2, SpanComponentsV3, type SpanComponentsV3Data, SpanComponentsV4, type SpanComponentsV4Data, SpanObjectTypeV1, SpanObjectTypeV2, SpanObjectTypeV3, type SpanPurpose, SpanRowIdsV1, SpanRowIdsV2, type SpanType, SpanTypeAttribute, TRANSACTION_ID_FIELD, type TransactionId, VALID_SOURCES, _urljoin, base64ToUint8Array, batchItems, camelToSnakeCase, capitalize, concatUint8Arrays, constructJsonArray, deterministicReplacer, ensureDatasetRecord, ensureLegacyDatasetRecord, ensureNewDatasetRecord, forEachMissingKey, getObjValueByPath, getRecordKeys, isArray, isEmpty, isNumber, isObject, isObjectOrArray, loadPrettyXact, lowercase, makeScorerPropagatedEvent, mapAt, mapSetDefault, mapSetNotPresent, mergeDicts, mergeDictsWithPaths, mergeGitMetadataSettings, mergeRowBatch, notEmpty, objectNullish, parseNoStrip, parseParent, prettifyXact, recordAt, recordFind, recordSetDefault, resolveParentHeader, snakeToCamelCase, snakeToTitleCase, spanComponentsV3Schema, spanComponentsV4Schema, spanObjectTypeV3EnumSchema, spanObjectTypeV3ToString, spanObjectTypeV3ToTypedString, spanPurposeAttributeValues, spanTypeAttributeValues, stringToUint8Array, uint8ArrayToBase64, uint8ArrayToString };
5371
+ export { ARRAY_DELETE_FIELD, ASYNC_SCORING_CONTROL_FIELD, AUDIT_METADATA_FIELD, AUDIT_SOURCE_FIELD, type AnyDatasetRecord, BT_CURSOR_HEADER, BT_FOUND_EXISTING_HEADER, BT_IMPERSONATE_USER, BT_PARENT, type BackgroundLogEvent, CREATED_FIELD, type Classification, type ClassificationItem, type CommentEvent, DEFAULT_IS_LEGACY_DATASET, type DatasetEvent, type DatasetRecord, type ExperimentEvent, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, ExtraFieldsError, ID_FIELD, IS_MERGE_FIELD, type IdField, type InputField, type LogCommentFullArgs, type LogFeedbackFullArgs, type LoggingEvent, MERGE_PATHS_FIELD, OBJECT_DELETE_FIELD, OBJECT_ID_KEYS, type OtherExperimentLogFields, PARENT_ID_FIELD, type ParentExperimentIds, type ParentPlaygroundLogIds, type ParentProjectLogIds, type PlaygroundLogEvent, SKIP_ASYNC_SCORING_FIELD, type SanitizedExperimentLogPartialArgs, type Score, type Scorer, type ScorerArgs, type Source, SpanComponentsV1, SpanComponentsV2, SpanComponentsV3, type SpanComponentsV3Data, SpanComponentsV4, type SpanComponentsV4Data, SpanObjectTypeV1, SpanObjectTypeV2, SpanObjectTypeV3, type SpanPurpose, SpanRowIdsV1, SpanRowIdsV2, type SpanType, SpanTypeAttribute, TRANSACTION_ID_FIELD, type TransactionId, VALID_SOURCES, _urljoin, base64ToUint8Array, batchItems, camelToSnakeCase, capitalize, concatUint8Arrays, constructJsonArray, deterministicReplacer, ensureDatasetRecord, ensureLegacyDatasetRecord, ensureNewDatasetRecord, forEachMissingKey, getObjValueByPath, getRecordKeys, isArray, isEmpty, isNumber, isObject, isObjectOrArray, isPromiseLike, loadPrettyXact, lowercase, makeScorerPropagatedEvent, mapAt, mapSetDefault, mapSetNotPresent, mergeDicts, mergeDictsWithPaths, mergeGitMetadataSettings, mergeRowBatch, notEmpty, objectNullish, parseNoStrip, parseParent, prettifyXact, recordAt, recordFind, recordSetDefault, resolveParentHeader, snakeToCamelCase, snakeToTitleCase, spanComponentsV3Schema, spanComponentsV4Schema, spanObjectTypeV3EnumSchema, spanObjectTypeV3ToString, spanObjectTypeV3ToTypedString, spanPurposeAttributeValues, spanTypeAttributeValues, stringToUint8Array, uint8ArrayToBase64, uint8ArrayToString };
@@ -4855,6 +4855,10 @@ type OtherExperimentLogFields = {
4855
4855
  error: unknown;
4856
4856
  tags: string[];
4857
4857
  scores: Record<string, number | null>;
4858
+ classifications?: Record<string, {
4859
+ id: string;
4860
+ label?: string;
4861
+ }[]>;
4858
4862
  metadata: Record<string, unknown>;
4859
4863
  metrics: Record<string, unknown>;
4860
4864
  datasetRecordId: string;
@@ -5052,6 +5056,42 @@ declare function batchItems<T>(args: {
5052
5056
  getByteSize: (item: T) => number;
5053
5057
  }): T[][];
5054
5058
 
5059
+ /**
5060
+ * The result returned by a classifier function. Unlike `Score`, `id` is
5061
+ * required and the span will be recorded as a classifier span.
5062
+ */
5063
+ interface Classification {
5064
+ /**
5065
+ * The name of this classification result. Used as the key in the
5066
+ * `classifications` log record. If omitted, defaults to the classifier
5067
+ * function's name.
5068
+ */
5069
+ name: string;
5070
+ /**
5071
+ * A machine-readable identifier for the classification outcome
5072
+ * (e.g. `"positive"`, `"negative"`, `"neutral"`). This value is stored
5073
+ * in the log and used for programmatic analysis.
5074
+ */
5075
+ id: string;
5076
+ /**
5077
+ * An optional human-readable display label for this outcome. If omitted,
5078
+ * defaults to `id`. Use this when you want a friendlier label in the UI
5079
+ * while keeping a stable `id` for programmatic use.
5080
+ */
5081
+ label?: string;
5082
+ /**
5083
+ * Optional arbitrary metadata to attach to this classification result.
5084
+ */
5085
+ metadata?: Record<string, unknown>;
5086
+ }
5087
+ /**
5088
+ * The serialized form of a classification stored in the `classifications` log record.
5089
+ */
5090
+ interface ClassificationItem {
5091
+ id: string;
5092
+ label: string;
5093
+ metadata?: Record<string, unknown>;
5094
+ }
5055
5095
  interface Score {
5056
5096
  name: string;
5057
5097
  score: number | null;
@@ -5129,6 +5169,7 @@ declare function isObjectOrArray(value: unknown): value is {
5129
5169
  declare function isEmpty(a: unknown): a is null | undefined;
5130
5170
  declare function notEmpty<T>(a: T | null | undefined): T;
5131
5171
  declare function isNumber(a: unknown): a is number | bigint;
5172
+ declare function isPromiseLike(value: unknown): value is PromiseLike<unknown>;
5132
5173
 
5133
5174
  declare enum SpanObjectTypeV1 {
5134
5175
  EXPERIMENT = 1,
@@ -5327,4 +5368,4 @@ declare function base64ToUint8Array(base64: string): Uint8Array;
5327
5368
  declare function uint8ArrayToString(uint8Array: Uint8Array): string;
5328
5369
  declare function stringToUint8Array(str: string): Uint8Array;
5329
5370
 
5330
- export { ARRAY_DELETE_FIELD, ASYNC_SCORING_CONTROL_FIELD, AUDIT_METADATA_FIELD, AUDIT_SOURCE_FIELD, type AnyDatasetRecord, BT_CURSOR_HEADER, BT_FOUND_EXISTING_HEADER, BT_IMPERSONATE_USER, BT_PARENT, type BackgroundLogEvent, CREATED_FIELD, type CommentEvent, DEFAULT_IS_LEGACY_DATASET, type DatasetEvent, type DatasetRecord, type ExperimentEvent, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, ExtraFieldsError, ID_FIELD, IS_MERGE_FIELD, type IdField, type InputField, type LogCommentFullArgs, type LogFeedbackFullArgs, type LoggingEvent, MERGE_PATHS_FIELD, OBJECT_DELETE_FIELD, OBJECT_ID_KEYS, type OtherExperimentLogFields, PARENT_ID_FIELD, type ParentExperimentIds, type ParentPlaygroundLogIds, type ParentProjectLogIds, type PlaygroundLogEvent, SKIP_ASYNC_SCORING_FIELD, type SanitizedExperimentLogPartialArgs, type Score, type Scorer, type ScorerArgs, type Source, SpanComponentsV1, SpanComponentsV2, SpanComponentsV3, type SpanComponentsV3Data, SpanComponentsV4, type SpanComponentsV4Data, SpanObjectTypeV1, SpanObjectTypeV2, SpanObjectTypeV3, type SpanPurpose, SpanRowIdsV1, SpanRowIdsV2, type SpanType, SpanTypeAttribute, TRANSACTION_ID_FIELD, type TransactionId, VALID_SOURCES, _urljoin, base64ToUint8Array, batchItems, camelToSnakeCase, capitalize, concatUint8Arrays, constructJsonArray, deterministicReplacer, ensureDatasetRecord, ensureLegacyDatasetRecord, ensureNewDatasetRecord, forEachMissingKey, getObjValueByPath, getRecordKeys, isArray, isEmpty, isNumber, isObject, isObjectOrArray, loadPrettyXact, lowercase, makeScorerPropagatedEvent, mapAt, mapSetDefault, mapSetNotPresent, mergeDicts, mergeDictsWithPaths, mergeGitMetadataSettings, mergeRowBatch, notEmpty, objectNullish, parseNoStrip, parseParent, prettifyXact, recordAt, recordFind, recordSetDefault, resolveParentHeader, snakeToCamelCase, snakeToTitleCase, spanComponentsV3Schema, spanComponentsV4Schema, spanObjectTypeV3EnumSchema, spanObjectTypeV3ToString, spanObjectTypeV3ToTypedString, spanPurposeAttributeValues, spanTypeAttributeValues, stringToUint8Array, uint8ArrayToBase64, uint8ArrayToString };
5371
+ export { ARRAY_DELETE_FIELD, ASYNC_SCORING_CONTROL_FIELD, AUDIT_METADATA_FIELD, AUDIT_SOURCE_FIELD, type AnyDatasetRecord, BT_CURSOR_HEADER, BT_FOUND_EXISTING_HEADER, BT_IMPERSONATE_USER, BT_PARENT, type BackgroundLogEvent, CREATED_FIELD, type Classification, type ClassificationItem, type CommentEvent, DEFAULT_IS_LEGACY_DATASET, type DatasetEvent, type DatasetRecord, type ExperimentEvent, type ExperimentLogFullArgs, type ExperimentLogPartialArgs, ExtraFieldsError, ID_FIELD, IS_MERGE_FIELD, type IdField, type InputField, type LogCommentFullArgs, type LogFeedbackFullArgs, type LoggingEvent, MERGE_PATHS_FIELD, OBJECT_DELETE_FIELD, OBJECT_ID_KEYS, type OtherExperimentLogFields, PARENT_ID_FIELD, type ParentExperimentIds, type ParentPlaygroundLogIds, type ParentProjectLogIds, type PlaygroundLogEvent, SKIP_ASYNC_SCORING_FIELD, type SanitizedExperimentLogPartialArgs, type Score, type Scorer, type ScorerArgs, type Source, SpanComponentsV1, SpanComponentsV2, SpanComponentsV3, type SpanComponentsV3Data, SpanComponentsV4, type SpanComponentsV4Data, SpanObjectTypeV1, SpanObjectTypeV2, SpanObjectTypeV3, type SpanPurpose, SpanRowIdsV1, SpanRowIdsV2, type SpanType, SpanTypeAttribute, TRANSACTION_ID_FIELD, type TransactionId, VALID_SOURCES, _urljoin, base64ToUint8Array, batchItems, camelToSnakeCase, capitalize, concatUint8Arrays, constructJsonArray, deterministicReplacer, ensureDatasetRecord, ensureLegacyDatasetRecord, ensureNewDatasetRecord, forEachMissingKey, getObjValueByPath, getRecordKeys, isArray, isEmpty, isNumber, isObject, isObjectOrArray, isPromiseLike, loadPrettyXact, lowercase, makeScorerPropagatedEvent, mapAt, mapSetDefault, mapSetNotPresent, mergeDicts, mergeDictsWithPaths, mergeGitMetadataSettings, mergeRowBatch, notEmpty, objectNullish, parseNoStrip, parseParent, prettifyXact, recordAt, recordFind, recordSetDefault, resolveParentHeader, snakeToCamelCase, snakeToTitleCase, spanComponentsV3Schema, spanComponentsV4Schema, spanObjectTypeV3EnumSchema, spanObjectTypeV3ToString, spanObjectTypeV3ToTypedString, spanPurposeAttributeValues, spanTypeAttributeValues, stringToUint8Array, uint8ArrayToBase64, uint8ArrayToString };
@@ -682,6 +682,9 @@ function notEmpty(a) {
682
682
  function isNumber(a) {
683
683
  return typeof a === "number" || typeof a === "bigint";
684
684
  }
685
+ function isPromiseLike(value) {
686
+ return value != null && (typeof value === "object" || typeof value === "function") && "then" in value && typeof value.then === "function";
687
+ }
685
688
 
686
689
  // util/object_util.ts
687
690
  var SET_UNION_FIELDS = /* @__PURE__ */ new Set(["tags"]);
@@ -1395,4 +1398,5 @@ function objectNullish(object) {
1395
1398
 
1396
1399
 
1397
1400
 
1398
- exports.ARRAY_DELETE_FIELD = ARRAY_DELETE_FIELD; exports.ASYNC_SCORING_CONTROL_FIELD = ASYNC_SCORING_CONTROL_FIELD; exports.AUDIT_METADATA_FIELD = AUDIT_METADATA_FIELD; exports.AUDIT_SOURCE_FIELD = AUDIT_SOURCE_FIELD; exports.BT_CURSOR_HEADER = BT_CURSOR_HEADER; exports.BT_FOUND_EXISTING_HEADER = BT_FOUND_EXISTING_HEADER; exports.BT_IMPERSONATE_USER = BT_IMPERSONATE_USER; exports.BT_PARENT = BT_PARENT; exports.CREATED_FIELD = CREATED_FIELD; exports.DEFAULT_IS_LEGACY_DATASET = DEFAULT_IS_LEGACY_DATASET; exports.ExtraFieldsError = ExtraFieldsError; exports.ID_FIELD = ID_FIELD; exports.IS_MERGE_FIELD = IS_MERGE_FIELD; exports.MERGE_PATHS_FIELD = MERGE_PATHS_FIELD; exports.OBJECT_DELETE_FIELD = OBJECT_DELETE_FIELD; exports.OBJECT_ID_KEYS = OBJECT_ID_KEYS; exports.PARENT_ID_FIELD = PARENT_ID_FIELD; exports.SKIP_ASYNC_SCORING_FIELD = SKIP_ASYNC_SCORING_FIELD; exports.SpanComponentsV1 = SpanComponentsV1; exports.SpanComponentsV2 = SpanComponentsV2; exports.SpanComponentsV3 = SpanComponentsV3; exports.SpanComponentsV4 = SpanComponentsV4; exports.SpanObjectTypeV1 = SpanObjectTypeV1; exports.SpanObjectTypeV2 = SpanObjectTypeV2; exports.SpanObjectTypeV3 = SpanObjectTypeV3; exports.SpanRowIdsV1 = SpanRowIdsV1; exports.SpanRowIdsV2 = SpanRowIdsV2; exports.SpanTypeAttribute = SpanTypeAttribute; exports.TRANSACTION_ID_FIELD = TRANSACTION_ID_FIELD; exports.VALID_SOURCES = VALID_SOURCES; exports._urljoin = _urljoin; exports.base64ToUint8Array = base64ToUint8Array; exports.batchItems = batchItems; exports.camelToSnakeCase = camelToSnakeCase; exports.capitalize = capitalize; exports.concatUint8Arrays = concatUint8Arrays; exports.constructJsonArray = constructJsonArray; exports.deterministicReplacer = deterministicReplacer; exports.ensureDatasetRecord = ensureDatasetRecord; exports.ensureLegacyDatasetRecord = ensureLegacyDatasetRecord; exports.ensureNewDatasetRecord = ensureNewDatasetRecord; exports.forEachMissingKey = forEachMissingKey; exports.getObjValueByPath = getObjValueByPath; exports.getRecordKeys = getRecordKeys; exports.isArray = isArray; exports.isEmpty = isEmpty; exports.isNumber = isNumber; exports.isObject = isObject; exports.isObjectOrArray = isObjectOrArray; exports.loadPrettyXact = loadPrettyXact; exports.lowercase = lowercase; exports.makeScorerPropagatedEvent = makeScorerPropagatedEvent; exports.mapAt = mapAt; exports.mapSetDefault = mapSetDefault; exports.mapSetNotPresent = mapSetNotPresent; exports.mergeDicts = mergeDicts; exports.mergeDictsWithPaths = mergeDictsWithPaths; exports.mergeGitMetadataSettings = mergeGitMetadataSettings; exports.mergeRowBatch = mergeRowBatch; exports.notEmpty = notEmpty; exports.objectNullish = objectNullish; exports.parseNoStrip = parseNoStrip; exports.parseParent = parseParent; exports.prettifyXact = prettifyXact; exports.recordAt = recordAt; exports.recordFind = recordFind; exports.recordSetDefault = recordSetDefault; exports.resolveParentHeader = resolveParentHeader; exports.snakeToCamelCase = snakeToCamelCase; exports.snakeToTitleCase = snakeToTitleCase; exports.spanComponentsV3Schema = spanComponentsV3Schema; exports.spanComponentsV4Schema = spanComponentsV4Schema; exports.spanObjectTypeV3EnumSchema = spanObjectTypeV3EnumSchema; exports.spanObjectTypeV3ToString = spanObjectTypeV3ToString; exports.spanObjectTypeV3ToTypedString = spanObjectTypeV3ToTypedString; exports.spanPurposeAttributeValues = spanPurposeAttributeValues; exports.spanTypeAttributeValues = spanTypeAttributeValues; exports.stringToUint8Array = stringToUint8Array; exports.uint8ArrayToBase64 = uint8ArrayToBase64; exports.uint8ArrayToString = uint8ArrayToString;
1401
+
1402
+ exports.ARRAY_DELETE_FIELD = ARRAY_DELETE_FIELD; exports.ASYNC_SCORING_CONTROL_FIELD = ASYNC_SCORING_CONTROL_FIELD; exports.AUDIT_METADATA_FIELD = AUDIT_METADATA_FIELD; exports.AUDIT_SOURCE_FIELD = AUDIT_SOURCE_FIELD; exports.BT_CURSOR_HEADER = BT_CURSOR_HEADER; exports.BT_FOUND_EXISTING_HEADER = BT_FOUND_EXISTING_HEADER; exports.BT_IMPERSONATE_USER = BT_IMPERSONATE_USER; exports.BT_PARENT = BT_PARENT; exports.CREATED_FIELD = CREATED_FIELD; exports.DEFAULT_IS_LEGACY_DATASET = DEFAULT_IS_LEGACY_DATASET; exports.ExtraFieldsError = ExtraFieldsError; exports.ID_FIELD = ID_FIELD; exports.IS_MERGE_FIELD = IS_MERGE_FIELD; exports.MERGE_PATHS_FIELD = MERGE_PATHS_FIELD; exports.OBJECT_DELETE_FIELD = OBJECT_DELETE_FIELD; exports.OBJECT_ID_KEYS = OBJECT_ID_KEYS; exports.PARENT_ID_FIELD = PARENT_ID_FIELD; exports.SKIP_ASYNC_SCORING_FIELD = SKIP_ASYNC_SCORING_FIELD; exports.SpanComponentsV1 = SpanComponentsV1; exports.SpanComponentsV2 = SpanComponentsV2; exports.SpanComponentsV3 = SpanComponentsV3; exports.SpanComponentsV4 = SpanComponentsV4; exports.SpanObjectTypeV1 = SpanObjectTypeV1; exports.SpanObjectTypeV2 = SpanObjectTypeV2; exports.SpanObjectTypeV3 = SpanObjectTypeV3; exports.SpanRowIdsV1 = SpanRowIdsV1; exports.SpanRowIdsV2 = SpanRowIdsV2; exports.SpanTypeAttribute = SpanTypeAttribute; exports.TRANSACTION_ID_FIELD = TRANSACTION_ID_FIELD; exports.VALID_SOURCES = VALID_SOURCES; exports._urljoin = _urljoin; exports.base64ToUint8Array = base64ToUint8Array; exports.batchItems = batchItems; exports.camelToSnakeCase = camelToSnakeCase; exports.capitalize = capitalize; exports.concatUint8Arrays = concatUint8Arrays; exports.constructJsonArray = constructJsonArray; exports.deterministicReplacer = deterministicReplacer; exports.ensureDatasetRecord = ensureDatasetRecord; exports.ensureLegacyDatasetRecord = ensureLegacyDatasetRecord; exports.ensureNewDatasetRecord = ensureNewDatasetRecord; exports.forEachMissingKey = forEachMissingKey; exports.getObjValueByPath = getObjValueByPath; exports.getRecordKeys = getRecordKeys; exports.isArray = isArray; exports.isEmpty = isEmpty; exports.isNumber = isNumber; exports.isObject = isObject; exports.isObjectOrArray = isObjectOrArray; exports.isPromiseLike = isPromiseLike; exports.loadPrettyXact = loadPrettyXact; exports.lowercase = lowercase; exports.makeScorerPropagatedEvent = makeScorerPropagatedEvent; exports.mapAt = mapAt; exports.mapSetDefault = mapSetDefault; exports.mapSetNotPresent = mapSetNotPresent; exports.mergeDicts = mergeDicts; exports.mergeDictsWithPaths = mergeDictsWithPaths; exports.mergeGitMetadataSettings = mergeGitMetadataSettings; exports.mergeRowBatch = mergeRowBatch; exports.notEmpty = notEmpty; exports.objectNullish = objectNullish; exports.parseNoStrip = parseNoStrip; exports.parseParent = parseParent; exports.prettifyXact = prettifyXact; exports.recordAt = recordAt; exports.recordFind = recordFind; exports.recordSetDefault = recordSetDefault; exports.resolveParentHeader = resolveParentHeader; exports.snakeToCamelCase = snakeToCamelCase; exports.snakeToTitleCase = snakeToTitleCase; exports.spanComponentsV3Schema = spanComponentsV3Schema; exports.spanComponentsV4Schema = spanComponentsV4Schema; exports.spanObjectTypeV3EnumSchema = spanObjectTypeV3EnumSchema; exports.spanObjectTypeV3ToString = spanObjectTypeV3ToString; exports.spanObjectTypeV3ToTypedString = spanObjectTypeV3ToTypedString; exports.spanPurposeAttributeValues = spanPurposeAttributeValues; exports.spanTypeAttributeValues = spanTypeAttributeValues; exports.stringToUint8Array = stringToUint8Array; exports.uint8ArrayToBase64 = uint8ArrayToBase64; exports.uint8ArrayToString = uint8ArrayToString;
@@ -682,6 +682,9 @@ function notEmpty(a) {
682
682
  function isNumber(a) {
683
683
  return typeof a === "number" || typeof a === "bigint";
684
684
  }
685
+ function isPromiseLike(value) {
686
+ return value != null && (typeof value === "object" || typeof value === "function") && "then" in value && typeof value.then === "function";
687
+ }
685
688
 
686
689
  // util/object_util.ts
687
690
  var SET_UNION_FIELDS = /* @__PURE__ */ new Set(["tags"]);
@@ -1364,6 +1367,7 @@ export {
1364
1367
  isNumber,
1365
1368
  isObject,
1366
1369
  isObjectOrArray,
1370
+ isPromiseLike,
1367
1371
  loadPrettyXact,
1368
1372
  lowercase,
1369
1373
  makeScorerPropagatedEvent,