braintrust 3.8.0 → 3.10.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/dev/dist/index.d.mts +191 -4
- package/dev/dist/index.d.ts +191 -4
- package/dev/dist/index.js +7269 -2590
- package/dev/dist/index.mjs +7281 -2602
- package/dist/auto-instrumentations/bundler/esbuild.cjs +741 -2
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/rollup.cjs +741 -2
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +741 -2
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +738 -2
- package/dist/auto-instrumentations/bundler/webpack.cjs +741 -2
- package/dist/auto-instrumentations/bundler/webpack.mjs +2 -2
- package/dist/auto-instrumentations/{chunk-OLBMPZXE.mjs → chunk-GZNXBBPU.mjs} +741 -3
- package/dist/auto-instrumentations/{chunk-MD7W27YH.mjs → chunk-XWEQQOQH.mjs} +12 -1
- package/dist/auto-instrumentations/hook.mjs +1193 -199
- package/dist/auto-instrumentations/index.cjs +1173 -187
- package/dist/auto-instrumentations/index.d.mts +22 -1
- package/dist/auto-instrumentations/index.d.ts +22 -1
- package/dist/auto-instrumentations/index.mjs +256 -1
- package/dist/auto-instrumentations/loader/esm-hook.mjs +2 -1
- package/dist/browser.d.mts +451 -11
- package/dist/browser.d.ts +451 -11
- package/dist/browser.js +7659 -2321
- package/dist/browser.mjs +7659 -2321
- package/dist/cli.js +7143 -2435
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +7659 -2321
- package/dist/edge-light.mjs +7659 -2321
- package/dist/index.d.mts +451 -11
- package/dist/index.d.ts +451 -11
- package/dist/index.js +8054 -2716
- package/dist/index.mjs +7659 -2321
- package/dist/instrumentation/index.d.mts +17 -0
- package/dist/instrumentation/index.d.ts +17 -0
- package/dist/instrumentation/index.js +6420 -2051
- package/dist/instrumentation/index.mjs +6420 -2051
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +7659 -2321
- package/dist/workerd.mjs +7659 -2321
- package/package.json +56 -51
- package/util/dist/index.d.mts +42 -1
- package/util/dist/index.d.ts +42 -1
- package/util/dist/index.js +5 -1
- package/util/dist/index.mjs +4 -0
- package/LICENSE +0 -201
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braintrust",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.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": "
|
|
8
|
+
"directory": "js"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://www.braintrust.dev/docs",
|
|
11
11
|
"main": "./dist/index.js",
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"types": "./dist/auto-instrumentations/bundler/vite.d.ts",
|
|
80
80
|
"import": "./dist/auto-instrumentations/bundler/vite.mjs",
|
|
81
81
|
"module": "./dist/auto-instrumentations/bundler/vite.mjs",
|
|
82
|
-
"require": "./dist/auto-instrumentations/bundler/vite.
|
|
82
|
+
"require": "./dist/auto-instrumentations/bundler/vite.cjs"
|
|
83
83
|
},
|
|
84
84
|
"./webpack": {
|
|
85
85
|
"types": "./dist/auto-instrumentations/bundler/webpack.d.ts",
|
|
86
86
|
"import": "./dist/auto-instrumentations/bundler/webpack.mjs",
|
|
87
87
|
"module": "./dist/auto-instrumentations/bundler/webpack.mjs",
|
|
88
|
-
"require": "./dist/auto-instrumentations/bundler/webpack.
|
|
88
|
+
"require": "./dist/auto-instrumentations/bundler/webpack.cjs"
|
|
89
89
|
},
|
|
90
90
|
"./webpack-loader": {
|
|
91
91
|
"types": "./dist/auto-instrumentations/bundler/webpack-loader.d.ts",
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
"types": "./dist/auto-instrumentations/bundler/esbuild.d.ts",
|
|
96
96
|
"import": "./dist/auto-instrumentations/bundler/esbuild.mjs",
|
|
97
97
|
"module": "./dist/auto-instrumentations/bundler/esbuild.mjs",
|
|
98
|
-
"require": "./dist/auto-instrumentations/bundler/esbuild.
|
|
98
|
+
"require": "./dist/auto-instrumentations/bundler/esbuild.cjs"
|
|
99
99
|
},
|
|
100
100
|
"./rollup": {
|
|
101
101
|
"types": "./dist/auto-instrumentations/bundler/rollup.d.ts",
|
|
102
102
|
"import": "./dist/auto-instrumentations/bundler/rollup.mjs",
|
|
103
103
|
"module": "./dist/auto-instrumentations/bundler/rollup.mjs",
|
|
104
|
-
"require": "./dist/auto-instrumentations/bundler/rollup.
|
|
104
|
+
"require": "./dist/auto-instrumentations/bundler/rollup.cjs"
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"files": [
|
|
@@ -109,11 +109,53 @@
|
|
|
109
109
|
"dev/dist/**/*",
|
|
110
110
|
"util/dist/**/*"
|
|
111
111
|
],
|
|
112
|
+
"scripts": {
|
|
113
|
+
"build": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" tsup",
|
|
114
|
+
"check:typings": "tsc --noEmit",
|
|
115
|
+
"watch": "tsup --watch",
|
|
116
|
+
"clean": "rm -r dist/* && rm -r dev/dist/* && rm -r util/dist/*",
|
|
117
|
+
"docs": "typedoc --options typedoc.json src/node/index.ts",
|
|
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
|
+
"test:core": "pnpm prune && pnpm test",
|
|
120
|
+
"test:checks": "pnpm run test:core && pnpm run test:vitest",
|
|
121
|
+
"test:external": "pnpm run test:external:openai && pnpm run test:external:anthropic && pnpm run test:external:google-genai && pnpm run test:external:ai-sdk && pnpm run test:external:claude-agent-sdk",
|
|
122
|
+
"test:external:openai": "bash scripts/test-provider.sh test:openai openai",
|
|
123
|
+
"test:external:anthropic": "bash scripts/test-provider.sh test:anthropic @anthropic-ai/sdk",
|
|
124
|
+
"test:external:google-genai": "bash scripts/test-provider.sh test:google-genai @google/genai",
|
|
125
|
+
"test:external:ai-sdk": "pnpm run test:external:ai-sdk-v5 && pnpm run test:external:ai-sdk-v6",
|
|
126
|
+
"test:external:ai-sdk-v5": "cd src/wrappers/ai-sdk/tests/v5 && pnpm install --ignore-workspace && pnpm test",
|
|
127
|
+
"test:external:ai-sdk-v6": "cd src/wrappers/ai-sdk/tests/v6 && pnpm install --ignore-workspace && pnpm test",
|
|
128
|
+
"test:external:claude-agent-sdk": "cd src/wrappers/claude-agent-sdk && pnpm install && pnpm test",
|
|
129
|
+
"test:all": "pnpm run test:checks && pnpm run test:external",
|
|
130
|
+
"test:api-compat": "vitest run tests/api-compatibility/api-compatibility.test.ts",
|
|
131
|
+
"test:anthropic": "vitest run src/wrappers/anthropic.test.ts",
|
|
132
|
+
"test:openai": "vitest run src/wrappers/oai.test.ts",
|
|
133
|
+
"test:otel": "vitest run --dir src/otel",
|
|
134
|
+
"test:otel-no-deps": "vitest run src/otel/otel-no-deps.test.ts --reporter=verbose",
|
|
135
|
+
"test:google-genai": "vitest run src/wrappers/google-genai.test.ts",
|
|
136
|
+
"test:ai-sdk-v1": "vitest run src/wrappers/ai-sdk-v1.test.ts",
|
|
137
|
+
"test:ai-sdk-v2": "vitest run src/wrappers/ai-sdk-v2.test.ts src/wrappers/ai-sdk-v1.test.ts",
|
|
138
|
+
"test:ai-sdk-v3": "vitest run src/wrappers/ai-sdk-v3.test.ts",
|
|
139
|
+
"test:zod-v3": "vitest run src/zod/zod-v3-serialization.test.ts",
|
|
140
|
+
"test:zod-v4": "vitest run src/zod/zod-v4-serialization.test.ts",
|
|
141
|
+
"test:mastra": "vitest run src/wrappers/mastra.test.ts",
|
|
142
|
+
"test:claude-agent-sdk": "pnpm --filter @braintrust/claude-agent-sdk-tests test",
|
|
143
|
+
"test:vitest": "pnpm --filter @braintrust/vitest-wrapper-tests test",
|
|
144
|
+
"test:output": "tsx scripts/test-output.ts --with-comparison --with-metrics --with-progress",
|
|
145
|
+
"bench": "tsx src/queue.bench.ts",
|
|
146
|
+
"lint": "eslint .",
|
|
147
|
+
"fix:lint": "eslint --fix .",
|
|
148
|
+
"playground": "tsx playground.ts",
|
|
149
|
+
"playground:auto": "mkdir -p .context && pnpm exec esbuild playground.ts --platform=node --format=esm --outfile=.context/playground.auto.mjs && node --import ./dist/auto-instrumentations/hook.mjs ./.context/playground.auto.mjs",
|
|
150
|
+
"playground:cli:push": "node dist/cli.js push playground.ts",
|
|
151
|
+
"playground:cli:eval": "node dist/cli.js eval playground.ts"
|
|
152
|
+
},
|
|
112
153
|
"author": "",
|
|
113
154
|
"license": "MIT",
|
|
114
155
|
"devDependencies": {
|
|
115
156
|
"@ai-sdk/anthropic": "2.0.37",
|
|
116
157
|
"@anthropic-ai/sdk": "^0.60.0",
|
|
158
|
+
"@google/adk": "^0.6.1",
|
|
117
159
|
"@google/genai": "^1.25.0",
|
|
118
160
|
"@jest/globals": "^29.7.0",
|
|
119
161
|
"@nodelib/fs.walk": "^1.2.8",
|
|
@@ -149,7 +191,7 @@
|
|
|
149
191
|
"typedoc": "^0.25.13",
|
|
150
192
|
"typedoc-plugin-markdown": "^3.17.1",
|
|
151
193
|
"typescript": "5.4.4",
|
|
152
|
-
"vite": "^6.4.
|
|
194
|
+
"vite": "^6.4.2",
|
|
153
195
|
"vite-tsconfig-paths": "^4.3.2",
|
|
154
196
|
"vitest": "^4.1.2",
|
|
155
197
|
"webpack": "^5.97.1",
|
|
@@ -157,7 +199,7 @@
|
|
|
157
199
|
},
|
|
158
200
|
"dependencies": {
|
|
159
201
|
"@ai-sdk/provider": "^1.1.3",
|
|
160
|
-
"@apm-js-collab/code-transformer": "^0.
|
|
202
|
+
"@apm-js-collab/code-transformer": "^0.12.0",
|
|
161
203
|
"@next/env": "^14.2.3",
|
|
162
204
|
"@vercel/functions": "^1.0.2",
|
|
163
205
|
"ajv": "^8.17.1",
|
|
@@ -167,7 +209,7 @@
|
|
|
167
209
|
"cli-progress": "^3.12.0",
|
|
168
210
|
"cli-table3": "^0.6.5",
|
|
169
211
|
"cors": "^2.8.5",
|
|
170
|
-
"dc-browser": "^1.0.
|
|
212
|
+
"dc-browser": "^1.0.4",
|
|
171
213
|
"dotenv": "^16.4.5",
|
|
172
214
|
"esbuild": "^0.27.0",
|
|
173
215
|
"eventsource-parser": "^1.1.2",
|
|
@@ -188,46 +230,9 @@
|
|
|
188
230
|
"peerDependencies": {
|
|
189
231
|
"zod": "^3.25.34 || ^4.0"
|
|
190
232
|
},
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"clean": "rm -r dist/* && rm -r dev/dist/*",
|
|
196
|
-
"docs": "typedoc --options typedoc.json src/node/index.ts",
|
|
197
|
-
"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/**\"",
|
|
198
|
-
"test:core": "pnpm prune && pnpm test",
|
|
199
|
-
"test:checks": "pnpm run test:core && pnpm run test:vitest",
|
|
200
|
-
"test:external": "pnpm run test:external:openai && pnpm run test:external:anthropic && pnpm run test:external:google-genai && pnpm run test:external:ai-sdk && pnpm run test:external:claude-agent-sdk",
|
|
201
|
-
"test:external:openai": "bash scripts/test-provider.sh test:openai openai",
|
|
202
|
-
"test:external:anthropic": "bash scripts/test-provider.sh test:anthropic @anthropic-ai/sdk",
|
|
203
|
-
"test:external:google-genai": "bash scripts/test-provider.sh test:google-genai @google/genai",
|
|
204
|
-
"test:external:ai-sdk": "pnpm run test:external:ai-sdk-v5 && pnpm run test:external:ai-sdk-v6",
|
|
205
|
-
"test:external:ai-sdk-v5": "cd src/wrappers/ai-sdk/tests/v5 && pnpm install --ignore-workspace && pnpm test",
|
|
206
|
-
"test:external:ai-sdk-v6": "cd src/wrappers/ai-sdk/tests/v6 && pnpm install --ignore-workspace && pnpm test",
|
|
207
|
-
"test:external:claude-agent-sdk": "cd src/wrappers/claude-agent-sdk && pnpm install && pnpm test",
|
|
208
|
-
"test:all": "pnpm run test:checks && pnpm run test:external",
|
|
209
|
-
"test:api-compat": "vitest run tests/api-compatibility/api-compatibility.test.ts",
|
|
210
|
-
"test:anthropic": "vitest run src/wrappers/anthropic.test.ts",
|
|
211
|
-
"test:openai": "vitest run src/wrappers/oai.test.ts",
|
|
212
|
-
"test:otel": "vitest run --dir src/otel",
|
|
213
|
-
"test:otel-no-deps": "vitest run src/otel/otel-no-deps.test.ts --reporter=verbose",
|
|
214
|
-
"test:google-genai": "vitest run src/wrappers/google-genai.test.ts",
|
|
215
|
-
"test:ai-sdk-v1": "vitest run src/wrappers/ai-sdk-v1.test.ts",
|
|
216
|
-
"test:ai-sdk-v2": "vitest run src/wrappers/ai-sdk-v2.test.ts src/wrappers/ai-sdk-v1.test.ts",
|
|
217
|
-
"test:ai-sdk-v3": "vitest run src/wrappers/ai-sdk-v3.test.ts",
|
|
218
|
-
"test:zod-v3": "vitest run src/zod/zod-v3-serialization.test.ts",
|
|
219
|
-
"test:zod-v4": "vitest run src/zod/zod-v4-serialization.test.ts",
|
|
220
|
-
"test:mastra": "vitest run src/wrappers/mastra.test.ts",
|
|
221
|
-
"test:claude-agent-sdk": "pnpm --filter @braintrust/claude-agent-sdk-tests test",
|
|
222
|
-
"test:vitest": "pnpm --filter @braintrust/vitest-wrapper-tests test",
|
|
223
|
-
"test:output": "tsx scripts/test-output.ts --with-comparison --with-metrics --with-progress",
|
|
224
|
-
"bench": "tsx src/queue.bench.ts",
|
|
225
|
-
"publish:validate": "./scripts/validate-release.sh && pnpm install --frozen-lockfile && pnpm run build && pnpm publish",
|
|
226
|
-
"lint": "eslint .",
|
|
227
|
-
"fix:lint": "eslint --fix .",
|
|
228
|
-
"playground": "tsx playground.ts",
|
|
229
|
-
"playground:auto": "mkdir -p .context && pnpm exec esbuild playground.ts --platform=node --format=esm --outfile=.context/playground.auto.mjs && node --import ./dist/auto-instrumentations/hook.mjs ./.context/playground.auto.mjs",
|
|
230
|
-
"playground:cli:push": "node dist/cli.js push playground.ts",
|
|
231
|
-
"playground:cli:eval": "node dist/cli.js eval playground.ts"
|
|
233
|
+
"publishConfig": {
|
|
234
|
+
"access": "public",
|
|
235
|
+
"registry": "https://registry.npmjs.org/",
|
|
236
|
+
"provenance": true
|
|
232
237
|
}
|
|
233
|
-
}
|
|
238
|
+
}
|
package/util/dist/index.d.mts
CHANGED
|
@@ -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 };
|
package/util/dist/index.d.ts
CHANGED
|
@@ -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 };
|
package/util/dist/index.js
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/util/dist/index.mjs
CHANGED
|
@@ -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,
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2023 Braintrust Data LLC
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|