raindrop-ai 2.0.0 → 3.0.0-otelv2
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 +1 -1
- package/dist/{chunk-F5TJSGNA.mjs → chunk-24GTHPYP.mjs} +2 -2
- package/dist/{chunk-PYMV6B3M.mjs → chunk-XAV5H3AL.mjs} +54 -102
- package/dist/evals/cli.js +5 -105
- package/dist/evals/cli.mjs +5 -11
- package/dist/{index-BJJ273dz.d.mts → index-B3Rns98r.d.mts} +1 -22
- package/dist/{index-BJJ273dz.d.ts → index-B3Rns98r.d.ts} +1 -22
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +53 -102
- package/dist/index.mjs +2 -4
- package/dist/tracing/index.d.mts +1 -1
- package/dist/tracing/index.d.ts +1 -1
- package/dist/tracing/index.js +2 -2
- package/dist/tracing/index.mjs +1 -1
- package/package.json +23 -23
package/README.md
CHANGED
|
@@ -165,7 +165,7 @@ Use `publishEvalDataset` when supplying captured reference traces. Local evaluat
|
|
|
165
165
|
|
|
166
166
|
The Query SDK organization `apiKey` authenticates evals, dataset publication/reads, and replay trace uploads. Browser login and production `writeKey` credentials do not replace it. The agent's model credentials and test environment are separate. Running locally describes where your callback executes, not where results are stored.
|
|
167
167
|
|
|
168
|
-
Use the returned `runId` with `readEvalRun
|
|
168
|
+
Use the returned `runId` with `readEvalRun` or `evaluateEvalRun`. To compare two runs, use the suite comparison in the Raindrop app (Runs tab "Compare runs", or "Compare with…" on a run) or the Raindrop MCP tool `compare_suite_runs`. To execute a queued run, pass `{ runId }` to `runEvalSuite`. Use `traceTools.getOutput(trace)` and `traceTools.getToolCalls(trace, name)` in local evaluators.
|
|
169
169
|
|
|
170
170
|
### Run eval agents on your server
|
|
171
171
|
|
|
@@ -90,7 +90,7 @@ if (!globalThis.RAINDROP_ASYNC_LOCAL_STORAGE) {
|
|
|
90
90
|
// package.json
|
|
91
91
|
var package_default = {
|
|
92
92
|
name: "raindrop-ai",
|
|
93
|
-
version: "
|
|
93
|
+
version: "3.0.0",
|
|
94
94
|
main: "dist/index.js",
|
|
95
95
|
module: "dist/index.mjs",
|
|
96
96
|
types: "dist/index.d.ts",
|
|
@@ -157,7 +157,7 @@ var package_default = {
|
|
|
157
157
|
tsup: "^9.0.0",
|
|
158
158
|
tsx: "^4.22.0",
|
|
159
159
|
typescript: "^5.3.3",
|
|
160
|
-
vite: "^7.3.
|
|
160
|
+
vite: "^7.3.8",
|
|
161
161
|
vitest: "^4.1.12",
|
|
162
162
|
"zod-4-copy": "npm:zod@4.1.8"
|
|
163
163
|
},
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
package_default,
|
|
4
4
|
tracing,
|
|
5
5
|
withTask
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-24GTHPYP.mjs";
|
|
7
7
|
import {
|
|
8
8
|
DatasetRowSchema,
|
|
9
9
|
EvalRowTracePairSchema,
|
|
@@ -22343,59 +22343,6 @@ function createEvalHandler(client, options) {
|
|
|
22343
22343
|
|
|
22344
22344
|
// src/evals/publish.ts
|
|
22345
22345
|
import { z as z6 } from "zod/v4";
|
|
22346
|
-
|
|
22347
|
-
// src/evals/runs.ts
|
|
22348
|
-
async function readEvalRun(client, runId, options = {}) {
|
|
22349
|
-
const detail = await readReplayDetails(client, runId, options);
|
|
22350
|
-
if (detail.eval_runs.length >= 200) {
|
|
22351
|
-
throw new Error("Run evaluation history exceeds the read limit");
|
|
22352
|
-
}
|
|
22353
|
-
const evaluators = await Promise.all(
|
|
22354
|
-
detail.eval_runs.map(async (evaluation) => {
|
|
22355
|
-
var _a5;
|
|
22356
|
-
const result = await readReplayEvaluatorRun(
|
|
22357
|
-
client,
|
|
22358
|
-
(_a5 = options.queryUrl) != null ? _a5 : DEFAULT_QUERY_URL,
|
|
22359
|
-
evaluation.id
|
|
22360
|
-
);
|
|
22361
|
-
if (result.id !== evaluation.id) throw new Error("Raindrop returned a different evaluation");
|
|
22362
|
-
return {
|
|
22363
|
-
...result,
|
|
22364
|
-
evaluator: result.evalSlug,
|
|
22365
|
-
evaluatorId: evaluation.eval_id,
|
|
22366
|
-
programVersion: evaluation.program_version,
|
|
22367
|
-
executedBy: evaluation.executed_by
|
|
22368
|
-
};
|
|
22369
|
-
})
|
|
22370
|
-
);
|
|
22371
|
-
return {
|
|
22372
|
-
runId: detail.replay.id,
|
|
22373
|
-
datasetId: detail.replay.dataset_id,
|
|
22374
|
-
datasetVersionId: detail.replay.dataset_version_id,
|
|
22375
|
-
status: detail.replay.status,
|
|
22376
|
-
counts: detail.replay.counts,
|
|
22377
|
-
tracesExpireAt: detail.replay.traces_expire_at,
|
|
22378
|
-
tracesExpired: detail.replay.traces_expired,
|
|
22379
|
-
rows: detail.rows.map((row) => {
|
|
22380
|
-
var _a5;
|
|
22381
|
-
return {
|
|
22382
|
-
rowId: row.row_id,
|
|
22383
|
-
datasetRowId: (_a5 = row.dataset_row_id) != null ? _a5 : row.row_id,
|
|
22384
|
-
repetition: row.repetition,
|
|
22385
|
-
attempt: row.attempt,
|
|
22386
|
-
status: row.status,
|
|
22387
|
-
traceId: row.trace_id,
|
|
22388
|
-
error: row.error
|
|
22389
|
-
};
|
|
22390
|
-
}),
|
|
22391
|
-
evaluators
|
|
22392
|
-
};
|
|
22393
|
-
}
|
|
22394
|
-
async function evaluateEvalRun(client, runId, options) {
|
|
22395
|
-
return { runId, evaluators: await evaluateReplay(client, runId, options) };
|
|
22396
|
-
}
|
|
22397
|
-
|
|
22398
|
-
// src/evals/publish.ts
|
|
22399
22346
|
var EvaluatorIdentitySchema = z6.object({
|
|
22400
22347
|
id: z6.string().uuid(),
|
|
22401
22348
|
slug: z6.string(),
|
|
@@ -22417,51 +22364,6 @@ var EvalPublishError = class extends Error {
|
|
|
22417
22364
|
this.name = "EvalPublishError";
|
|
22418
22365
|
}
|
|
22419
22366
|
};
|
|
22420
|
-
var ComparisonRunSchema = z6.object({
|
|
22421
|
-
id: z6.string().uuid(),
|
|
22422
|
-
programVersion: z6.number().int().positive()
|
|
22423
|
-
});
|
|
22424
|
-
var ComparisonLinkSchema = z6.object({
|
|
22425
|
-
url: z6.string().url(),
|
|
22426
|
-
first: ComparisonRunSchema,
|
|
22427
|
-
second: ComparisonRunSchema
|
|
22428
|
-
});
|
|
22429
|
-
async function compareEvalRuns(client, options) {
|
|
22430
|
-
const [first, second] = await Promise.all([
|
|
22431
|
-
readEvalRun(client, options.beforeRunId, options),
|
|
22432
|
-
readEvalRun(client, options.afterRunId, options)
|
|
22433
|
-
]);
|
|
22434
|
-
const candidates = first.evaluators.filter(
|
|
22435
|
-
(entry) => (!options.evaluator || entry.evaluator === options.evaluator) && second.evaluators.some((other) => other.evaluatorId === entry.evaluatorId)
|
|
22436
|
-
);
|
|
22437
|
-
const selected = candidates[0];
|
|
22438
|
-
if (!selected || candidates.length !== 1) {
|
|
22439
|
-
throw new Error(
|
|
22440
|
-
"Comparison requires one shared evaluator; specify evaluator when comparing a suite"
|
|
22441
|
-
);
|
|
22442
|
-
}
|
|
22443
|
-
const matches = second.evaluators.filter((entry) => entry.evaluatorId === selected.evaluatorId);
|
|
22444
|
-
const counterpart = matches[0];
|
|
22445
|
-
if (!counterpart || matches.length !== 1) {
|
|
22446
|
-
throw new Error("Comparison is ambiguous because this evaluator graded the run more than once");
|
|
22447
|
-
}
|
|
22448
|
-
if (selected.status === "running" || counterpart.status === "running") {
|
|
22449
|
-
throw new Error("Wait for both evaluations to finish before comparing");
|
|
22450
|
-
}
|
|
22451
|
-
const before = selected.id;
|
|
22452
|
-
const after = counterpart.id;
|
|
22453
|
-
const { data } = z6.object({ data: ComparisonLinkSchema }).parse(await evalRequest(client, `/v1/eval-runs/${before}/compare/${after}`, options));
|
|
22454
|
-
if (data.first.id !== before || data.second.id !== after) {
|
|
22455
|
-
throw new Error("Raindrop returned a different comparison pair");
|
|
22456
|
-
}
|
|
22457
|
-
return {
|
|
22458
|
-
...data,
|
|
22459
|
-
beforeRunId: first.runId,
|
|
22460
|
-
afterRunId: second.runId,
|
|
22461
|
-
evaluator: selected.evaluator,
|
|
22462
|
-
sameEvaluatorVersion: data.first.programVersion === data.second.programVersion
|
|
22463
|
-
};
|
|
22464
|
-
}
|
|
22465
22367
|
async function readEvaluator(client, slug, options = {}) {
|
|
22466
22368
|
const { data } = z6.object({ data: EvaluatorSourceSchema }).parse(await evalRequest(client, `/v1/evals/${encodeURIComponent(slug)}`, options));
|
|
22467
22369
|
if (data.slug !== slug) throw new Error("Raindrop returned a different evaluator slug");
|
|
@@ -22558,6 +22460,57 @@ var traceTools = Object.freeze({
|
|
|
22558
22460
|
getToolCalls: traceToolCalls
|
|
22559
22461
|
});
|
|
22560
22462
|
|
|
22463
|
+
// src/evals/runs.ts
|
|
22464
|
+
async function readEvalRun(client, runId, options = {}) {
|
|
22465
|
+
const detail = await readReplayDetails(client, runId, options);
|
|
22466
|
+
if (detail.eval_runs.length >= 200) {
|
|
22467
|
+
throw new Error("Run evaluation history exceeds the read limit");
|
|
22468
|
+
}
|
|
22469
|
+
const evaluators = await Promise.all(
|
|
22470
|
+
detail.eval_runs.map(async (evaluation) => {
|
|
22471
|
+
var _a5;
|
|
22472
|
+
const result = await readReplayEvaluatorRun(
|
|
22473
|
+
client,
|
|
22474
|
+
(_a5 = options.queryUrl) != null ? _a5 : DEFAULT_QUERY_URL,
|
|
22475
|
+
evaluation.id
|
|
22476
|
+
);
|
|
22477
|
+
if (result.id !== evaluation.id) throw new Error("Raindrop returned a different evaluation");
|
|
22478
|
+
return {
|
|
22479
|
+
...result,
|
|
22480
|
+
evaluator: result.evalSlug,
|
|
22481
|
+
evaluatorId: evaluation.eval_id,
|
|
22482
|
+
programVersion: evaluation.program_version,
|
|
22483
|
+
executedBy: evaluation.executed_by
|
|
22484
|
+
};
|
|
22485
|
+
})
|
|
22486
|
+
);
|
|
22487
|
+
return {
|
|
22488
|
+
runId: detail.replay.id,
|
|
22489
|
+
datasetId: detail.replay.dataset_id,
|
|
22490
|
+
datasetVersionId: detail.replay.dataset_version_id,
|
|
22491
|
+
status: detail.replay.status,
|
|
22492
|
+
counts: detail.replay.counts,
|
|
22493
|
+
tracesExpireAt: detail.replay.traces_expire_at,
|
|
22494
|
+
tracesExpired: detail.replay.traces_expired,
|
|
22495
|
+
rows: detail.rows.map((row) => {
|
|
22496
|
+
var _a5;
|
|
22497
|
+
return {
|
|
22498
|
+
rowId: row.row_id,
|
|
22499
|
+
datasetRowId: (_a5 = row.dataset_row_id) != null ? _a5 : row.row_id,
|
|
22500
|
+
repetition: row.repetition,
|
|
22501
|
+
attempt: row.attempt,
|
|
22502
|
+
status: row.status,
|
|
22503
|
+
traceId: row.trace_id,
|
|
22504
|
+
error: row.error
|
|
22505
|
+
};
|
|
22506
|
+
}),
|
|
22507
|
+
evaluators
|
|
22508
|
+
};
|
|
22509
|
+
}
|
|
22510
|
+
async function evaluateEvalRun(client, runId, options) {
|
|
22511
|
+
return { runId, evaluators: await evaluateReplay(client, runId, options) };
|
|
22512
|
+
}
|
|
22513
|
+
|
|
22561
22514
|
// src/evals/run.ts
|
|
22562
22515
|
import { z as z7 } from "zod";
|
|
22563
22516
|
|
|
@@ -24330,13 +24283,12 @@ export {
|
|
|
24330
24283
|
EvalParameterError,
|
|
24331
24284
|
defineAgent,
|
|
24332
24285
|
createEvalHandler,
|
|
24333
|
-
readEvalRun,
|
|
24334
|
-
evaluateEvalRun,
|
|
24335
24286
|
EvalPublishError,
|
|
24336
|
-
compareEvalRuns,
|
|
24337
24287
|
readEvaluator,
|
|
24338
24288
|
publishEvalSuite,
|
|
24339
24289
|
traceTools,
|
|
24290
|
+
readEvalRun,
|
|
24291
|
+
evaluateEvalRun,
|
|
24340
24292
|
createEvalSuiteRun,
|
|
24341
24293
|
runEvalSuite,
|
|
24342
24294
|
MAX_INGEST_SIZE_BYTES,
|
package/dist/evals/cli.js
CHANGED
|
@@ -25734,7 +25734,7 @@ var SignalEventSchema = external_exports.object({
|
|
|
25734
25734
|
// package.json
|
|
25735
25735
|
var package_default = {
|
|
25736
25736
|
name: "raindrop-ai",
|
|
25737
|
-
version: "
|
|
25737
|
+
version: "3.0.0",
|
|
25738
25738
|
main: "dist/index.js",
|
|
25739
25739
|
module: "dist/index.mjs",
|
|
25740
25740
|
types: "dist/index.d.ts",
|
|
@@ -25801,7 +25801,7 @@ var package_default = {
|
|
|
25801
25801
|
tsup: "^9.0.0",
|
|
25802
25802
|
tsx: "^4.22.0",
|
|
25803
25803
|
typescript: "^5.3.3",
|
|
25804
|
-
vite: "^7.3.
|
|
25804
|
+
vite: "^7.3.8",
|
|
25805
25805
|
vitest: "^4.1.12",
|
|
25806
25806
|
"zod-4-copy": "npm:zod@4.1.8"
|
|
25807
25807
|
},
|
|
@@ -31801,56 +31801,6 @@ var import_v49 = require("zod/v4");
|
|
|
31801
31801
|
init_endpoint();
|
|
31802
31802
|
init_dataset();
|
|
31803
31803
|
init_definition();
|
|
31804
|
-
|
|
31805
|
-
// src/evals/runs.ts
|
|
31806
|
-
async function readEvalRun(client, runId, options = {}) {
|
|
31807
|
-
const detail = await readReplayDetails(client, runId, options);
|
|
31808
|
-
if (detail.eval_runs.length >= 200) {
|
|
31809
|
-
throw new Error("Run evaluation history exceeds the read limit");
|
|
31810
|
-
}
|
|
31811
|
-
const evaluators = await Promise.all(
|
|
31812
|
-
detail.eval_runs.map(async (evaluation) => {
|
|
31813
|
-
var _a5;
|
|
31814
|
-
const result = await readReplayEvaluatorRun(
|
|
31815
|
-
client,
|
|
31816
|
-
(_a5 = options.queryUrl) != null ? _a5 : DEFAULT_QUERY_URL2,
|
|
31817
|
-
evaluation.id
|
|
31818
|
-
);
|
|
31819
|
-
if (result.id !== evaluation.id) throw new Error("Raindrop returned a different evaluation");
|
|
31820
|
-
return {
|
|
31821
|
-
...result,
|
|
31822
|
-
evaluator: result.evalSlug,
|
|
31823
|
-
evaluatorId: evaluation.eval_id,
|
|
31824
|
-
programVersion: evaluation.program_version,
|
|
31825
|
-
executedBy: evaluation.executed_by
|
|
31826
|
-
};
|
|
31827
|
-
})
|
|
31828
|
-
);
|
|
31829
|
-
return {
|
|
31830
|
-
runId: detail.replay.id,
|
|
31831
|
-
datasetId: detail.replay.dataset_id,
|
|
31832
|
-
datasetVersionId: detail.replay.dataset_version_id,
|
|
31833
|
-
status: detail.replay.status,
|
|
31834
|
-
counts: detail.replay.counts,
|
|
31835
|
-
tracesExpireAt: detail.replay.traces_expire_at,
|
|
31836
|
-
tracesExpired: detail.replay.traces_expired,
|
|
31837
|
-
rows: detail.rows.map((row) => {
|
|
31838
|
-
var _a5;
|
|
31839
|
-
return {
|
|
31840
|
-
rowId: row.row_id,
|
|
31841
|
-
datasetRowId: (_a5 = row.dataset_row_id) != null ? _a5 : row.row_id,
|
|
31842
|
-
repetition: row.repetition,
|
|
31843
|
-
attempt: row.attempt,
|
|
31844
|
-
status: row.status,
|
|
31845
|
-
traceId: row.trace_id,
|
|
31846
|
-
error: row.error
|
|
31847
|
-
};
|
|
31848
|
-
}),
|
|
31849
|
-
evaluators
|
|
31850
|
-
};
|
|
31851
|
-
}
|
|
31852
|
-
|
|
31853
|
-
// src/evals/publish.ts
|
|
31854
31804
|
var EvaluatorIdentitySchema = import_v49.z.object({
|
|
31855
31805
|
id: import_v49.z.string().uuid(),
|
|
31856
31806
|
slug: import_v49.z.string(),
|
|
@@ -31872,51 +31822,6 @@ var EvalPublishError = class extends Error {
|
|
|
31872
31822
|
this.name = "EvalPublishError";
|
|
31873
31823
|
}
|
|
31874
31824
|
};
|
|
31875
|
-
var ComparisonRunSchema = import_v49.z.object({
|
|
31876
|
-
id: import_v49.z.string().uuid(),
|
|
31877
|
-
programVersion: import_v49.z.number().int().positive()
|
|
31878
|
-
});
|
|
31879
|
-
var ComparisonLinkSchema = import_v49.z.object({
|
|
31880
|
-
url: import_v49.z.string().url(),
|
|
31881
|
-
first: ComparisonRunSchema,
|
|
31882
|
-
second: ComparisonRunSchema
|
|
31883
|
-
});
|
|
31884
|
-
async function compareEvalRuns(client, options) {
|
|
31885
|
-
const [first, second] = await Promise.all([
|
|
31886
|
-
readEvalRun(client, options.beforeRunId, options),
|
|
31887
|
-
readEvalRun(client, options.afterRunId, options)
|
|
31888
|
-
]);
|
|
31889
|
-
const candidates = first.evaluators.filter(
|
|
31890
|
-
(entry) => (!options.evaluator || entry.evaluator === options.evaluator) && second.evaluators.some((other) => other.evaluatorId === entry.evaluatorId)
|
|
31891
|
-
);
|
|
31892
|
-
const selected = candidates[0];
|
|
31893
|
-
if (!selected || candidates.length !== 1) {
|
|
31894
|
-
throw new Error(
|
|
31895
|
-
"Comparison requires one shared evaluator; specify evaluator when comparing a suite"
|
|
31896
|
-
);
|
|
31897
|
-
}
|
|
31898
|
-
const matches = second.evaluators.filter((entry) => entry.evaluatorId === selected.evaluatorId);
|
|
31899
|
-
const counterpart = matches[0];
|
|
31900
|
-
if (!counterpart || matches.length !== 1) {
|
|
31901
|
-
throw new Error("Comparison is ambiguous because this evaluator graded the run more than once");
|
|
31902
|
-
}
|
|
31903
|
-
if (selected.status === "running" || counterpart.status === "running") {
|
|
31904
|
-
throw new Error("Wait for both evaluations to finish before comparing");
|
|
31905
|
-
}
|
|
31906
|
-
const before = selected.id;
|
|
31907
|
-
const after = counterpart.id;
|
|
31908
|
-
const { data } = import_v49.z.object({ data: ComparisonLinkSchema }).parse(await evalRequest(client, `/v1/eval-runs/${before}/compare/${after}`, options));
|
|
31909
|
-
if (data.first.id !== before || data.second.id !== after) {
|
|
31910
|
-
throw new Error("Raindrop returned a different comparison pair");
|
|
31911
|
-
}
|
|
31912
|
-
return {
|
|
31913
|
-
...data,
|
|
31914
|
-
beforeRunId: first.runId,
|
|
31915
|
-
afterRunId: second.runId,
|
|
31916
|
-
evaluator: selected.evaluator,
|
|
31917
|
-
sameEvaluatorVersion: data.first.programVersion === data.second.programVersion
|
|
31918
|
-
};
|
|
31919
|
-
}
|
|
31920
31825
|
async function readEvaluator(client, slug, options = {}) {
|
|
31921
31826
|
const { data } = import_v49.z.object({ data: EvaluatorSourceSchema }).parse(await evalRequest(client, `/v1/evals/${encodeURIComponent(slug)}`, options));
|
|
31922
31827
|
if (data.slug !== slug) throw new Error("Raindrop returned a different evaluator slug");
|
|
@@ -33765,19 +33670,17 @@ async function main() {
|
|
|
33765
33670
|
"replay-ingest-url": { type: "string" },
|
|
33766
33671
|
"run-id": { type: "string" },
|
|
33767
33672
|
repetitions: { type: "string" },
|
|
33768
|
-
evaluator: { type: "string" },
|
|
33769
33673
|
json: { type: "boolean" },
|
|
33770
33674
|
help: { type: "boolean" }
|
|
33771
33675
|
}
|
|
33772
33676
|
});
|
|
33773
|
-
const [command, file2
|
|
33677
|
+
const [command, file2] = positionals;
|
|
33774
33678
|
if (values.help || !command) {
|
|
33775
33679
|
process.stdout.write(
|
|
33776
33680
|
[
|
|
33777
33681
|
"raindrop-evals publish <suite.mjs> [--project slug] [--json]",
|
|
33778
33682
|
"raindrop-evals run <suite.mjs> [--run-id queued-run-id] [--repetitions n] [--project slug] [--json]",
|
|
33779
33683
|
"raindrop-evals read <evaluator-slug> [--json]",
|
|
33780
|
-
"raindrop-evals compare <before-run-id> <after-run-id> [--evaluator slug] [--json]",
|
|
33781
33684
|
"",
|
|
33782
33685
|
"Publish resolves the dataset version and pins existing evaluators without running them.",
|
|
33783
33686
|
"The module must default-export defineEvalSuite(...) with a dataset UUID from list_datasets.",
|
|
@@ -33793,7 +33696,7 @@ async function main() {
|
|
|
33793
33696
|
);
|
|
33794
33697
|
return;
|
|
33795
33698
|
}
|
|
33796
|
-
if (!file2 || !["publish", "run", "read"
|
|
33699
|
+
if (!file2 || !["publish", "run", "read"].includes(command))
|
|
33797
33700
|
throw new Error("Invalid command. Use --help.");
|
|
33798
33701
|
const apiKey = process.env.RAINDROP_QUERY_API_KEY;
|
|
33799
33702
|
if (!apiKey) throw new Error("Set RAINDROP_QUERY_API_KEY to a Query SDK organization key");
|
|
@@ -33804,10 +33707,7 @@ async function main() {
|
|
|
33804
33707
|
});
|
|
33805
33708
|
const options = { queryUrl: values["query-url"] };
|
|
33806
33709
|
try {
|
|
33807
|
-
if (command === "
|
|
33808
|
-
if (!afterRunId) throw new Error("Compare requires before and after run IDs");
|
|
33809
|
-
print(await compareEvalRuns(client, { ...options, beforeRunId: file2, afterRunId, evaluator: values.evaluator }));
|
|
33810
|
-
} else if (command === "read") {
|
|
33710
|
+
if (command === "read") {
|
|
33811
33711
|
print(await readEvaluator(client, file2, options));
|
|
33812
33712
|
} else {
|
|
33813
33713
|
const module2 = SuiteModuleSchema.parse(await import((0, import_node_url.pathToFileURL)((0, import_node_path.resolve)(file2)).href));
|
package/dist/evals/cli.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
compareEvalRuns,
|
|
4
3
|
index_default,
|
|
5
4
|
publishEvalSuite,
|
|
6
5
|
readEvaluator,
|
|
7
6
|
runEvalSuite
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-XAV5H3AL.mjs";
|
|
8
|
+
import "../chunk-24GTHPYP.mjs";
|
|
10
9
|
import {
|
|
11
10
|
isEvalSuiteDefinition
|
|
12
11
|
} from "../chunk-BU322D7Q.mjs";
|
|
@@ -30,19 +29,17 @@ async function main() {
|
|
|
30
29
|
"replay-ingest-url": { type: "string" },
|
|
31
30
|
"run-id": { type: "string" },
|
|
32
31
|
repetitions: { type: "string" },
|
|
33
|
-
evaluator: { type: "string" },
|
|
34
32
|
json: { type: "boolean" },
|
|
35
33
|
help: { type: "boolean" }
|
|
36
34
|
}
|
|
37
35
|
});
|
|
38
|
-
const [command, file
|
|
36
|
+
const [command, file] = positionals;
|
|
39
37
|
if (values.help || !command) {
|
|
40
38
|
process.stdout.write(
|
|
41
39
|
[
|
|
42
40
|
"raindrop-evals publish <suite.mjs> [--project slug] [--json]",
|
|
43
41
|
"raindrop-evals run <suite.mjs> [--run-id queued-run-id] [--repetitions n] [--project slug] [--json]",
|
|
44
42
|
"raindrop-evals read <evaluator-slug> [--json]",
|
|
45
|
-
"raindrop-evals compare <before-run-id> <after-run-id> [--evaluator slug] [--json]",
|
|
46
43
|
"",
|
|
47
44
|
"Publish resolves the dataset version and pins existing evaluators without running them.",
|
|
48
45
|
"The module must default-export defineEvalSuite(...) with a dataset UUID from list_datasets.",
|
|
@@ -58,7 +55,7 @@ async function main() {
|
|
|
58
55
|
);
|
|
59
56
|
return;
|
|
60
57
|
}
|
|
61
|
-
if (!file || !["publish", "run", "read"
|
|
58
|
+
if (!file || !["publish", "run", "read"].includes(command))
|
|
62
59
|
throw new Error("Invalid command. Use --help.");
|
|
63
60
|
const apiKey = process.env.RAINDROP_QUERY_API_KEY;
|
|
64
61
|
if (!apiKey) throw new Error("Set RAINDROP_QUERY_API_KEY to a Query SDK organization key");
|
|
@@ -69,10 +66,7 @@ async function main() {
|
|
|
69
66
|
});
|
|
70
67
|
const options = { queryUrl: values["query-url"] };
|
|
71
68
|
try {
|
|
72
|
-
if (command === "
|
|
73
|
-
if (!afterRunId) throw new Error("Compare requires before and after run IDs");
|
|
74
|
-
print(await compareEvalRuns(client, { ...options, beforeRunId: file, afterRunId, evaluator: values.evaluator }));
|
|
75
|
-
} else if (command === "read") {
|
|
69
|
+
if (command === "read") {
|
|
76
70
|
print(await readEvaluator(client, file, options));
|
|
77
71
|
} else {
|
|
78
72
|
const module = SuiteModuleSchema.parse(await import(pathToFileURL(resolve(file)).href));
|
|
@@ -14405,27 +14405,6 @@ declare class EvalPublishError extends Error {
|
|
|
14405
14405
|
type PublishEvalSuiteOptions = {
|
|
14406
14406
|
readonly queryUrl?: string;
|
|
14407
14407
|
};
|
|
14408
|
-
/** Resolves a scoped before/after link using the backend's existing comparison. */
|
|
14409
|
-
declare function compareEvalRuns(client: ReplayClient, options: {
|
|
14410
|
-
readonly beforeRunId: string;
|
|
14411
|
-
readonly afterRunId: string;
|
|
14412
|
-
readonly evaluator?: string;
|
|
14413
|
-
readonly queryUrl?: string;
|
|
14414
|
-
}): Promise<{
|
|
14415
|
-
beforeRunId: string;
|
|
14416
|
-
afterRunId: string;
|
|
14417
|
-
evaluator: string;
|
|
14418
|
-
sameEvaluatorVersion: boolean;
|
|
14419
|
-
url: string;
|
|
14420
|
-
first: {
|
|
14421
|
-
id: string;
|
|
14422
|
-
programVersion: number;
|
|
14423
|
-
};
|
|
14424
|
-
second: {
|
|
14425
|
-
id: string;
|
|
14426
|
-
programVersion: number;
|
|
14427
|
-
};
|
|
14428
|
-
}>;
|
|
14429
14408
|
/** Reads an existing hosted evaluator and pins its version for execution. */
|
|
14430
14409
|
declare function readEvaluator(client: ReplayClient, slug: string, options?: {
|
|
14431
14410
|
readonly queryUrl?: string;
|
|
@@ -15223,5 +15202,5 @@ declare const EVAL_CORRELATION_ID_ATTRIBUTE: "raindrop.eval_correlation_id";
|
|
|
15223
15202
|
declare const currentEvalScope: () => EvalScope | undefined;
|
|
15224
15203
|
declare const withEvalScope: <Result>(scope: EvalScope, callback: () => Result) => Result;
|
|
15225
15204
|
|
|
15226
|
-
export { EvalPublishError as $, DEFAULT_EVAL_POLL_INTERVAL_MS as D, EVAL_CORRELATION_ID_ATTRIBUTE as G, EvalContextSchema as N, Raindrop as R, EvalParameterError as W, ReplayEvaluatorSummarySchema as a$, EvalSuiteManifestSchema as a8, ReferenceOutputSchema as aQ, ReferenceOutputSourceSchema as aR, ReplayCountsSchema as aU, ReplayEvaluatorCountsSchema as aX, ReplayEvaluatorStatsSchema as aZ, LocalBooleanVerdictSchema as ah, LocalNumberVerdictSchema as am, LocalPreferenceVerdictSchema as ao, LocalScoreVerdictSchema as aq, LocalVerdictSchema as as, MAX_EVAL_STATUS_RETRIES as at, MAX_INGEST_SIZE_BYTES as au, NumericThresholdSchema as ax,
|
|
15205
|
+
export { EvalPublishError as $, DEFAULT_EVAL_POLL_INTERVAL_MS as D, EVAL_CORRELATION_ID_ATTRIBUTE as G, EvalContextSchema as N, Raindrop as R, EvalParameterError as W, ReplayEvaluatorSummarySchema as a$, EvalSuiteManifestSchema as a8, ReferenceOutputSchema as aQ, ReferenceOutputSourceSchema as aR, ReplayCountsSchema as aU, ReplayEvaluatorCountsSchema as aX, ReplayEvaluatorStatsSchema as aZ, LocalBooleanVerdictSchema as ah, LocalNumberVerdictSchema as am, LocalPreferenceVerdictSchema as ao, LocalScoreVerdictSchema as aq, LocalVerdictSchema as as, MAX_EVAL_STATUS_RETRIES as at, MAX_INGEST_SIZE_BYTES as au, NumericThresholdSchema as ax, readEvaluator as b$, ReplayMessageContentPartSchema as b4, ReplayMessageSchema as b5, ReplayMessageToolCallSchema as b7, TraceSchema as bC, claimReplay as bF, createEvalHandler as bG, createEvalSuiteRun as bH, createReplay as bI, currentEvalScope as bJ, defaultAgentInput as bK, defineAgent as bL, defineEvalSuite as bM, defineEvaluatorProgram as bN, defineLocalEvaluator as bO, evaluateEvalRun as bP, evaluatePortableEvaluator as bQ, evaluateReplay as bR, formatTrace as bS, importPortableEvaluator as bT, isEvalSuiteDefinition as bU, isPublishedEvalSuite as bV, parseDatasetId as bW, projectWorkshopTrace as bX, publishEvalSuite as bY, readDataset as bZ, readEvalRun as b_, ReplayResultRowSchema as bd, ReplayVerdictSchema as bi, readReplay as c0, replay as c1, resolveDisableBatching as c2, runEvalSuite as c3, runReplay as c4, traceOutput as c5, traceToolCalls as c6, traceTools as c7, verifyPortableEvalArtifact as c8, withEvalScope as c9, BooleanThresholdSchema as n, DEFAULT_EVAL_WAIT_MS as q, DEFAULT_QUERY_URL as r, DEFAULT_TRACE_WAIT_MS as s, DatasetColumnSchema as v, DatasetIdSchema as w };
|
|
15227
15206
|
export type { AiTrackUsage as A, BeginParams as B, CarrierHeaders as C, DefinedEvalAgent as E, FlushResultCompat as F, EvalAgentDefinition as H, InitializeOptions as I, EvalAgentExecution as J, EvalClient as K, EvalContext as L, MaskFunction as M, EvalDestination as O, PiiFieldMap as P, EvalEvaluator as Q, SpanProcessorOptions as S, TraceCarrier as T, EvalHandlerOptions as U, EvalLocalEvaluator as V, EvalParameterField as X, EvalParameterFields as Y, EvalParameters as Z, EvalProgram as _, RaindropSpanProcessor as a, EvalRepetitionSummary as a0, EvalRowResult as a1, EvalRowTracePair as a2, EvalRunReading as a3, EvalScope as a4, EvalSuiteDefinition as a5, EvalSuiteDefinitionInput as a6, EvalSuiteManifest as a7, EvalSuiteResult as a9, PortableEvalLimits as aA, PortableEvalOutcome as aB, PortableEvalResult as aC, PortableEvaluator as aD, PortableJudgeRequest as aE, PortableJudgeVerdict as aF, PreparedAgentInvocation as aG, PublishEvalSuiteOptions as aH, RaindropConnection as aI, RaindropFeatureFlagValue as aJ, RaindropFeatureFlags as aK, RaindropProperties as aL, RaindropPropertyLeaf as aM, RaindropPropertyValue as aN, ReadDatasetOptions as aO, ReferenceOutput as aP, ReplayClient as aS, ReplayCounts as aT, ReplayEvaluator as aV, ReplayEvaluatorCounts as aW, ReplayEvaluatorStats as aY, ReplayEvaluatorSummary as a_, EvalSuiteRunSession as aa, EvalVerdictAssessment as ab, EvaluateReplayOptions as ac, FinishInteractionOptions as ad, HostedEvaluatorPin as ae, IdentifyEvent as af, LocalBooleanVerdict as ag, LocalDebuggerLiveEventInput as ai, LocalEvaluator as aj, LocalEvaluatorContext as ak, LocalNumberVerdict as al, LocalPreferenceVerdict as an, LocalScoreVerdict as ap, LocalVerdict as ar, MaskContext as av, NumericThreshold as aw, PartialAiTrackEvent as ay, PortableEvalArtifact as az, Interaction as b, ReplayHandle as b0, LocalEvaluatorContext$1 as b1, ReplayMessage as b2, ReplayMessageContentPart as b3, ReplayMessageToolCall as b6, ReplayOptions as b8, ReplayReading as b9, Trace as bA, TraceContext as bB, TrackToolParams as bD, WorkflowParams as bE, ReplayRepetitions as ba, ReplayResult as bb, ReplayResultRow as bc, ReplayRow as be, ReplayRowOutcome as bf, ReplayRunRow as bg, ReplayVerdict as bh, RunEvalSuiteOptions as bj, RunReplayOptions as bk, SelfDiagnoseOptions as bl, SelfDiagnosticsExecuteContext as bm, SelfDiagnosticsExecuteResult as bn, SelfDiagnosticsSignalDefinition as bo, SelfDiagnosticsSignalDefinitions as bp, SelfDiagnosticsTool as bq, SelfDiagnosticsToolInputSchema as br, SelfDiagnosticsToolOptions as bs, SignalEvent as bt, SpanParams as bu, SubagentDispatch as bv, SubagentDispatchOptions as bw, SubagentFinishOptions as bx, ToolParams as by, ToolSpan as bz, AppGitSnapshot as c, SubagentResumeOptions as d, SubagentRun as e, Tracer as f, FlushResult as g, AiTrackEvent as h, AppGitOptions as i, Attachment as j, AttachmentType as k, BeginInteractionOptions as l, BooleanThreshold as m, CreateEvalSuiteRunOptions as o, CreateReplayOptions as p, Dataset as t, DatasetColumn as u, DatasetReadClient as x, DatasetRow as y, DefaultAgentInput as z };
|
|
@@ -14405,27 +14405,6 @@ declare class EvalPublishError extends Error {
|
|
|
14405
14405
|
type PublishEvalSuiteOptions = {
|
|
14406
14406
|
readonly queryUrl?: string;
|
|
14407
14407
|
};
|
|
14408
|
-
/** Resolves a scoped before/after link using the backend's existing comparison. */
|
|
14409
|
-
declare function compareEvalRuns(client: ReplayClient, options: {
|
|
14410
|
-
readonly beforeRunId: string;
|
|
14411
|
-
readonly afterRunId: string;
|
|
14412
|
-
readonly evaluator?: string;
|
|
14413
|
-
readonly queryUrl?: string;
|
|
14414
|
-
}): Promise<{
|
|
14415
|
-
beforeRunId: string;
|
|
14416
|
-
afterRunId: string;
|
|
14417
|
-
evaluator: string;
|
|
14418
|
-
sameEvaluatorVersion: boolean;
|
|
14419
|
-
url: string;
|
|
14420
|
-
first: {
|
|
14421
|
-
id: string;
|
|
14422
|
-
programVersion: number;
|
|
14423
|
-
};
|
|
14424
|
-
second: {
|
|
14425
|
-
id: string;
|
|
14426
|
-
programVersion: number;
|
|
14427
|
-
};
|
|
14428
|
-
}>;
|
|
14429
14408
|
/** Reads an existing hosted evaluator and pins its version for execution. */
|
|
14430
14409
|
declare function readEvaluator(client: ReplayClient, slug: string, options?: {
|
|
14431
14410
|
readonly queryUrl?: string;
|
|
@@ -15223,5 +15202,5 @@ declare const EVAL_CORRELATION_ID_ATTRIBUTE: "raindrop.eval_correlation_id";
|
|
|
15223
15202
|
declare const currentEvalScope: () => EvalScope | undefined;
|
|
15224
15203
|
declare const withEvalScope: <Result>(scope: EvalScope, callback: () => Result) => Result;
|
|
15225
15204
|
|
|
15226
|
-
export { EvalPublishError as $, DEFAULT_EVAL_POLL_INTERVAL_MS as D, EVAL_CORRELATION_ID_ATTRIBUTE as G, EvalContextSchema as N, Raindrop as R, EvalParameterError as W, ReplayEvaluatorSummarySchema as a$, EvalSuiteManifestSchema as a8, ReferenceOutputSchema as aQ, ReferenceOutputSourceSchema as aR, ReplayCountsSchema as aU, ReplayEvaluatorCountsSchema as aX, ReplayEvaluatorStatsSchema as aZ, LocalBooleanVerdictSchema as ah, LocalNumberVerdictSchema as am, LocalPreferenceVerdictSchema as ao, LocalScoreVerdictSchema as aq, LocalVerdictSchema as as, MAX_EVAL_STATUS_RETRIES as at, MAX_INGEST_SIZE_BYTES as au, NumericThresholdSchema as ax,
|
|
15205
|
+
export { EvalPublishError as $, DEFAULT_EVAL_POLL_INTERVAL_MS as D, EVAL_CORRELATION_ID_ATTRIBUTE as G, EvalContextSchema as N, Raindrop as R, EvalParameterError as W, ReplayEvaluatorSummarySchema as a$, EvalSuiteManifestSchema as a8, ReferenceOutputSchema as aQ, ReferenceOutputSourceSchema as aR, ReplayCountsSchema as aU, ReplayEvaluatorCountsSchema as aX, ReplayEvaluatorStatsSchema as aZ, LocalBooleanVerdictSchema as ah, LocalNumberVerdictSchema as am, LocalPreferenceVerdictSchema as ao, LocalScoreVerdictSchema as aq, LocalVerdictSchema as as, MAX_EVAL_STATUS_RETRIES as at, MAX_INGEST_SIZE_BYTES as au, NumericThresholdSchema as ax, readEvaluator as b$, ReplayMessageContentPartSchema as b4, ReplayMessageSchema as b5, ReplayMessageToolCallSchema as b7, TraceSchema as bC, claimReplay as bF, createEvalHandler as bG, createEvalSuiteRun as bH, createReplay as bI, currentEvalScope as bJ, defaultAgentInput as bK, defineAgent as bL, defineEvalSuite as bM, defineEvaluatorProgram as bN, defineLocalEvaluator as bO, evaluateEvalRun as bP, evaluatePortableEvaluator as bQ, evaluateReplay as bR, formatTrace as bS, importPortableEvaluator as bT, isEvalSuiteDefinition as bU, isPublishedEvalSuite as bV, parseDatasetId as bW, projectWorkshopTrace as bX, publishEvalSuite as bY, readDataset as bZ, readEvalRun as b_, ReplayResultRowSchema as bd, ReplayVerdictSchema as bi, readReplay as c0, replay as c1, resolveDisableBatching as c2, runEvalSuite as c3, runReplay as c4, traceOutput as c5, traceToolCalls as c6, traceTools as c7, verifyPortableEvalArtifact as c8, withEvalScope as c9, BooleanThresholdSchema as n, DEFAULT_EVAL_WAIT_MS as q, DEFAULT_QUERY_URL as r, DEFAULT_TRACE_WAIT_MS as s, DatasetColumnSchema as v, DatasetIdSchema as w };
|
|
15227
15206
|
export type { AiTrackUsage as A, BeginParams as B, CarrierHeaders as C, DefinedEvalAgent as E, FlushResultCompat as F, EvalAgentDefinition as H, InitializeOptions as I, EvalAgentExecution as J, EvalClient as K, EvalContext as L, MaskFunction as M, EvalDestination as O, PiiFieldMap as P, EvalEvaluator as Q, SpanProcessorOptions as S, TraceCarrier as T, EvalHandlerOptions as U, EvalLocalEvaluator as V, EvalParameterField as X, EvalParameterFields as Y, EvalParameters as Z, EvalProgram as _, RaindropSpanProcessor as a, EvalRepetitionSummary as a0, EvalRowResult as a1, EvalRowTracePair as a2, EvalRunReading as a3, EvalScope as a4, EvalSuiteDefinition as a5, EvalSuiteDefinitionInput as a6, EvalSuiteManifest as a7, EvalSuiteResult as a9, PortableEvalLimits as aA, PortableEvalOutcome as aB, PortableEvalResult as aC, PortableEvaluator as aD, PortableJudgeRequest as aE, PortableJudgeVerdict as aF, PreparedAgentInvocation as aG, PublishEvalSuiteOptions as aH, RaindropConnection as aI, RaindropFeatureFlagValue as aJ, RaindropFeatureFlags as aK, RaindropProperties as aL, RaindropPropertyLeaf as aM, RaindropPropertyValue as aN, ReadDatasetOptions as aO, ReferenceOutput as aP, ReplayClient as aS, ReplayCounts as aT, ReplayEvaluator as aV, ReplayEvaluatorCounts as aW, ReplayEvaluatorStats as aY, ReplayEvaluatorSummary as a_, EvalSuiteRunSession as aa, EvalVerdictAssessment as ab, EvaluateReplayOptions as ac, FinishInteractionOptions as ad, HostedEvaluatorPin as ae, IdentifyEvent as af, LocalBooleanVerdict as ag, LocalDebuggerLiveEventInput as ai, LocalEvaluator as aj, LocalEvaluatorContext as ak, LocalNumberVerdict as al, LocalPreferenceVerdict as an, LocalScoreVerdict as ap, LocalVerdict as ar, MaskContext as av, NumericThreshold as aw, PartialAiTrackEvent as ay, PortableEvalArtifact as az, Interaction as b, ReplayHandle as b0, LocalEvaluatorContext$1 as b1, ReplayMessage as b2, ReplayMessageContentPart as b3, ReplayMessageToolCall as b6, ReplayOptions as b8, ReplayReading as b9, Trace as bA, TraceContext as bB, TrackToolParams as bD, WorkflowParams as bE, ReplayRepetitions as ba, ReplayResult as bb, ReplayResultRow as bc, ReplayRow as be, ReplayRowOutcome as bf, ReplayRunRow as bg, ReplayVerdict as bh, RunEvalSuiteOptions as bj, RunReplayOptions as bk, SelfDiagnoseOptions as bl, SelfDiagnosticsExecuteContext as bm, SelfDiagnosticsExecuteResult as bn, SelfDiagnosticsSignalDefinition as bo, SelfDiagnosticsSignalDefinitions as bp, SelfDiagnosticsTool as bq, SelfDiagnosticsToolInputSchema as br, SelfDiagnosticsToolOptions as bs, SignalEvent as bt, SpanParams as bu, SubagentDispatch as bv, SubagentDispatchOptions as bw, SubagentFinishOptions as bx, ToolParams as by, ToolSpan as bz, AppGitSnapshot as c, SubagentResumeOptions as d, SubagentRun as e, Tracer as f, FlushResult as g, AiTrackEvent as h, AppGitOptions as i, Attachment as j, AttachmentType as k, BeginInteractionOptions as l, BooleanThreshold as m, CreateEvalSuiteRunOptions as o, CreateReplayOptions as p, Dataset as t, DatasetColumn as u, DatasetReadClient as x, DatasetRow as y, DefaultAgentInput as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@opentelemetry/instrumentation';
|
|
2
|
-
export { h as AiTrackEvent, A as AiTrackUsage, i as AppGitOptions, c as AppGitSnapshot, j as Attachment, k as AttachmentType, l as BeginInteractionOptions, m as BooleanThreshold, n as BooleanThresholdSchema, o as CreateEvalSuiteRunOptions, p as CreateReplayOptions, D as DEFAULT_EVAL_POLL_INTERVAL_MS, q as DEFAULT_EVAL_WAIT_MS, r as DEFAULT_QUERY_URL, s as DEFAULT_TRACE_WAIT_MS, t as Dataset, u as DatasetColumn, v as DatasetColumnSchema, w as DatasetIdSchema, x as DatasetReadClient, y as DatasetRow, z as DefaultAgentInput, E as DefinedEvalAgent, G as EVAL_CORRELATION_ID_ATTRIBUTE, H as EvalAgentDefinition, J as EvalAgentExecution, K as EvalClient, L as EvalContext, N as EvalContextSchema, O as EvalDestination, Q as EvalEvaluator, U as EvalHandlerOptions, V as EvalLocalEvaluator, W as EvalParameterError, X as EvalParameterField, Y as EvalParameterFields, Z as EvalParameters, _ as EvalProgram, $ as EvalPublishError, a0 as EvalRepetitionSummary, a1 as EvalRowResult, a2 as EvalRowTracePair, a3 as EvalRunReading, a4 as EvalScope, a5 as EvalSuiteDefinition, a6 as EvalSuiteDefinitionInput, a7 as EvalSuiteManifest, a8 as EvalSuiteManifestSchema, a9 as EvalSuiteResult, aa as EvalSuiteRunSession, ab as EvalVerdictAssessment, ac as EvaluateReplayOptions, ad as FinishInteractionOptions, ae as HostedEvaluatorPin, af as IdentifyEvent, b as Interaction, ag as LocalBooleanVerdict, ah as LocalBooleanVerdictSchema, ai as LocalDebuggerLiveEventInput, aj as LocalEvaluator, ak as LocalEvaluatorContext, al as LocalNumberVerdict, am as LocalNumberVerdictSchema, an as LocalPreferenceVerdict, ao as LocalPreferenceVerdictSchema, ap as LocalScoreVerdict, aq as LocalScoreVerdictSchema, ar as LocalVerdict, as as LocalVerdictSchema, at as MAX_EVAL_STATUS_RETRIES, au as MAX_INGEST_SIZE_BYTES, av as MaskContext, M as MaskFunction, aw as NumericThreshold, ax as NumericThresholdSchema, ay as PartialAiTrackEvent, az as PortableEvalArtifact, aA as PortableEvalLimits, aB as PortableEvalOutcome, aC as PortableEvalResult, aD as PortableEvaluator, aE as PortableJudgeRequest, aF as PortableJudgeVerdict, aG as PreparedAgentInvocation, aH as PublishEvalSuiteOptions, R as Raindrop, aI as RaindropConnection, aJ as RaindropFeatureFlagValue, aK as RaindropFeatureFlags, aL as RaindropProperties, aM as RaindropPropertyLeaf, aN as RaindropPropertyValue, a as RaindropSpanProcessor, aO as ReadDatasetOptions, aP as ReferenceOutput, aQ as ReferenceOutputSchema, aR as ReferenceOutputSourceSchema, aS as ReplayClient, aT as ReplayCounts, aU as ReplayCountsSchema, aV as ReplayEvaluator, aW as ReplayEvaluatorCounts, aX as ReplayEvaluatorCountsSchema, aY as ReplayEvaluatorStats, aZ as ReplayEvaluatorStatsSchema, a_ as ReplayEvaluatorSummary, a$ as ReplayEvaluatorSummarySchema, b0 as ReplayHandle, b1 as ReplayLocalEvaluatorContext, b2 as ReplayMessage, b3 as ReplayMessageContentPart, b4 as ReplayMessageContentPartSchema, b5 as ReplayMessageSchema, b6 as ReplayMessageToolCall, b7 as ReplayMessageToolCallSchema, b8 as ReplayOptions, b9 as ReplayReading, ba as ReplayRepetitions, bb as ReplayResult, bc as ReplayResultRow, bd as ReplayResultRowSchema, be as ReplayRow, bf as ReplayRowOutcome, bg as ReplayRunRow, bh as ReplayVerdict, bi as ReplayVerdictSchema, bj as RunEvalSuiteOptions, bk as RunReplayOptions, bl as SelfDiagnoseOptions, bm as SelfDiagnosticsExecuteContext, bn as SelfDiagnosticsExecuteResult, bo as SelfDiagnosticsSignalDefinition, bp as SelfDiagnosticsSignalDefinitions, bq as SelfDiagnosticsTool, br as SelfDiagnosticsToolInputSchema, bs as SelfDiagnosticsToolOptions, bt as SignalEvent, bu as SpanParams, bv as SubagentDispatch, bw as SubagentDispatchOptions, bx as SubagentFinishOptions, d as SubagentResumeOptions, e as SubagentRun, by as ToolParams, bz as ToolSpan, bA as Trace, bB as TraceContext, bC as TraceSchema, f as Tracer, bD as TrackToolParams, bE as WorkflowParams, bF as claimReplay, bG as
|
|
2
|
+
export { h as AiTrackEvent, A as AiTrackUsage, i as AppGitOptions, c as AppGitSnapshot, j as Attachment, k as AttachmentType, l as BeginInteractionOptions, m as BooleanThreshold, n as BooleanThresholdSchema, o as CreateEvalSuiteRunOptions, p as CreateReplayOptions, D as DEFAULT_EVAL_POLL_INTERVAL_MS, q as DEFAULT_EVAL_WAIT_MS, r as DEFAULT_QUERY_URL, s as DEFAULT_TRACE_WAIT_MS, t as Dataset, u as DatasetColumn, v as DatasetColumnSchema, w as DatasetIdSchema, x as DatasetReadClient, y as DatasetRow, z as DefaultAgentInput, E as DefinedEvalAgent, G as EVAL_CORRELATION_ID_ATTRIBUTE, H as EvalAgentDefinition, J as EvalAgentExecution, K as EvalClient, L as EvalContext, N as EvalContextSchema, O as EvalDestination, Q as EvalEvaluator, U as EvalHandlerOptions, V as EvalLocalEvaluator, W as EvalParameterError, X as EvalParameterField, Y as EvalParameterFields, Z as EvalParameters, _ as EvalProgram, $ as EvalPublishError, a0 as EvalRepetitionSummary, a1 as EvalRowResult, a2 as EvalRowTracePair, a3 as EvalRunReading, a4 as EvalScope, a5 as EvalSuiteDefinition, a6 as EvalSuiteDefinitionInput, a7 as EvalSuiteManifest, a8 as EvalSuiteManifestSchema, a9 as EvalSuiteResult, aa as EvalSuiteRunSession, ab as EvalVerdictAssessment, ac as EvaluateReplayOptions, ad as FinishInteractionOptions, ae as HostedEvaluatorPin, af as IdentifyEvent, b as Interaction, ag as LocalBooleanVerdict, ah as LocalBooleanVerdictSchema, ai as LocalDebuggerLiveEventInput, aj as LocalEvaluator, ak as LocalEvaluatorContext, al as LocalNumberVerdict, am as LocalNumberVerdictSchema, an as LocalPreferenceVerdict, ao as LocalPreferenceVerdictSchema, ap as LocalScoreVerdict, aq as LocalScoreVerdictSchema, ar as LocalVerdict, as as LocalVerdictSchema, at as MAX_EVAL_STATUS_RETRIES, au as MAX_INGEST_SIZE_BYTES, av as MaskContext, M as MaskFunction, aw as NumericThreshold, ax as NumericThresholdSchema, ay as PartialAiTrackEvent, az as PortableEvalArtifact, aA as PortableEvalLimits, aB as PortableEvalOutcome, aC as PortableEvalResult, aD as PortableEvaluator, aE as PortableJudgeRequest, aF as PortableJudgeVerdict, aG as PreparedAgentInvocation, aH as PublishEvalSuiteOptions, R as Raindrop, aI as RaindropConnection, aJ as RaindropFeatureFlagValue, aK as RaindropFeatureFlags, aL as RaindropProperties, aM as RaindropPropertyLeaf, aN as RaindropPropertyValue, a as RaindropSpanProcessor, aO as ReadDatasetOptions, aP as ReferenceOutput, aQ as ReferenceOutputSchema, aR as ReferenceOutputSourceSchema, aS as ReplayClient, aT as ReplayCounts, aU as ReplayCountsSchema, aV as ReplayEvaluator, aW as ReplayEvaluatorCounts, aX as ReplayEvaluatorCountsSchema, aY as ReplayEvaluatorStats, aZ as ReplayEvaluatorStatsSchema, a_ as ReplayEvaluatorSummary, a$ as ReplayEvaluatorSummarySchema, b0 as ReplayHandle, b1 as ReplayLocalEvaluatorContext, b2 as ReplayMessage, b3 as ReplayMessageContentPart, b4 as ReplayMessageContentPartSchema, b5 as ReplayMessageSchema, b6 as ReplayMessageToolCall, b7 as ReplayMessageToolCallSchema, b8 as ReplayOptions, b9 as ReplayReading, ba as ReplayRepetitions, bb as ReplayResult, bc as ReplayResultRow, bd as ReplayResultRowSchema, be as ReplayRow, bf as ReplayRowOutcome, bg as ReplayRunRow, bh as ReplayVerdict, bi as ReplayVerdictSchema, bj as RunEvalSuiteOptions, bk as RunReplayOptions, bl as SelfDiagnoseOptions, bm as SelfDiagnosticsExecuteContext, bn as SelfDiagnosticsExecuteResult, bo as SelfDiagnosticsSignalDefinition, bp as SelfDiagnosticsSignalDefinitions, bq as SelfDiagnosticsTool, br as SelfDiagnosticsToolInputSchema, bs as SelfDiagnosticsToolOptions, bt as SignalEvent, bu as SpanParams, bv as SubagentDispatch, bw as SubagentDispatchOptions, bx as SubagentFinishOptions, d as SubagentResumeOptions, e as SubagentRun, by as ToolParams, bz as ToolSpan, bA as Trace, bB as TraceContext, bC as TraceSchema, f as Tracer, bD as TrackToolParams, bE as WorkflowParams, bF as claimReplay, bG as createEvalHandler, bH as createEvalSuiteRun, bI as createReplay, bJ as currentEvalScope, R as default, bK as defaultAgentInput, bL as defineAgent, bM as defineEvalSuite, bN as defineEvaluatorProgram, bO as defineLocalEvaluator, bP as evaluateEvalRun, bQ as evaluatePortableEvaluator, bR as evaluateReplay, bS as formatTrace, bT as importPortableEvaluator, bU as isEvalSuiteDefinition, bV as isPublishedEvalSuite, bW as parseDatasetId, bX as projectWorkshopTrace, bY as publishEvalSuite, bZ as readDataset, b_ as readEvalRun, b$ as readEvaluator, c0 as readReplay, c1 as replay, c2 as resolveDisableBatching, c3 as runEvalSuite, c4 as runReplay, c5 as traceOutput, c6 as traceToolCalls, c7 as traceTools, c8 as verifyPortableEvalArtifact, c9 as withEvalScope } from './index-B3Rns98r.mjs';
|
|
3
3
|
import '@opentelemetry/api';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '@opentelemetry/sdk-trace-base';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@opentelemetry/instrumentation';
|
|
2
|
-
export { h as AiTrackEvent, A as AiTrackUsage, i as AppGitOptions, c as AppGitSnapshot, j as Attachment, k as AttachmentType, l as BeginInteractionOptions, m as BooleanThreshold, n as BooleanThresholdSchema, o as CreateEvalSuiteRunOptions, p as CreateReplayOptions, D as DEFAULT_EVAL_POLL_INTERVAL_MS, q as DEFAULT_EVAL_WAIT_MS, r as DEFAULT_QUERY_URL, s as DEFAULT_TRACE_WAIT_MS, t as Dataset, u as DatasetColumn, v as DatasetColumnSchema, w as DatasetIdSchema, x as DatasetReadClient, y as DatasetRow, z as DefaultAgentInput, E as DefinedEvalAgent, G as EVAL_CORRELATION_ID_ATTRIBUTE, H as EvalAgentDefinition, J as EvalAgentExecution, K as EvalClient, L as EvalContext, N as EvalContextSchema, O as EvalDestination, Q as EvalEvaluator, U as EvalHandlerOptions, V as EvalLocalEvaluator, W as EvalParameterError, X as EvalParameterField, Y as EvalParameterFields, Z as EvalParameters, _ as EvalProgram, $ as EvalPublishError, a0 as EvalRepetitionSummary, a1 as EvalRowResult, a2 as EvalRowTracePair, a3 as EvalRunReading, a4 as EvalScope, a5 as EvalSuiteDefinition, a6 as EvalSuiteDefinitionInput, a7 as EvalSuiteManifest, a8 as EvalSuiteManifestSchema, a9 as EvalSuiteResult, aa as EvalSuiteRunSession, ab as EvalVerdictAssessment, ac as EvaluateReplayOptions, ad as FinishInteractionOptions, ae as HostedEvaluatorPin, af as IdentifyEvent, b as Interaction, ag as LocalBooleanVerdict, ah as LocalBooleanVerdictSchema, ai as LocalDebuggerLiveEventInput, aj as LocalEvaluator, ak as LocalEvaluatorContext, al as LocalNumberVerdict, am as LocalNumberVerdictSchema, an as LocalPreferenceVerdict, ao as LocalPreferenceVerdictSchema, ap as LocalScoreVerdict, aq as LocalScoreVerdictSchema, ar as LocalVerdict, as as LocalVerdictSchema, at as MAX_EVAL_STATUS_RETRIES, au as MAX_INGEST_SIZE_BYTES, av as MaskContext, M as MaskFunction, aw as NumericThreshold, ax as NumericThresholdSchema, ay as PartialAiTrackEvent, az as PortableEvalArtifact, aA as PortableEvalLimits, aB as PortableEvalOutcome, aC as PortableEvalResult, aD as PortableEvaluator, aE as PortableJudgeRequest, aF as PortableJudgeVerdict, aG as PreparedAgentInvocation, aH as PublishEvalSuiteOptions, R as Raindrop, aI as RaindropConnection, aJ as RaindropFeatureFlagValue, aK as RaindropFeatureFlags, aL as RaindropProperties, aM as RaindropPropertyLeaf, aN as RaindropPropertyValue, a as RaindropSpanProcessor, aO as ReadDatasetOptions, aP as ReferenceOutput, aQ as ReferenceOutputSchema, aR as ReferenceOutputSourceSchema, aS as ReplayClient, aT as ReplayCounts, aU as ReplayCountsSchema, aV as ReplayEvaluator, aW as ReplayEvaluatorCounts, aX as ReplayEvaluatorCountsSchema, aY as ReplayEvaluatorStats, aZ as ReplayEvaluatorStatsSchema, a_ as ReplayEvaluatorSummary, a$ as ReplayEvaluatorSummarySchema, b0 as ReplayHandle, b1 as ReplayLocalEvaluatorContext, b2 as ReplayMessage, b3 as ReplayMessageContentPart, b4 as ReplayMessageContentPartSchema, b5 as ReplayMessageSchema, b6 as ReplayMessageToolCall, b7 as ReplayMessageToolCallSchema, b8 as ReplayOptions, b9 as ReplayReading, ba as ReplayRepetitions, bb as ReplayResult, bc as ReplayResultRow, bd as ReplayResultRowSchema, be as ReplayRow, bf as ReplayRowOutcome, bg as ReplayRunRow, bh as ReplayVerdict, bi as ReplayVerdictSchema, bj as RunEvalSuiteOptions, bk as RunReplayOptions, bl as SelfDiagnoseOptions, bm as SelfDiagnosticsExecuteContext, bn as SelfDiagnosticsExecuteResult, bo as SelfDiagnosticsSignalDefinition, bp as SelfDiagnosticsSignalDefinitions, bq as SelfDiagnosticsTool, br as SelfDiagnosticsToolInputSchema, bs as SelfDiagnosticsToolOptions, bt as SignalEvent, bu as SpanParams, bv as SubagentDispatch, bw as SubagentDispatchOptions, bx as SubagentFinishOptions, d as SubagentResumeOptions, e as SubagentRun, by as ToolParams, bz as ToolSpan, bA as Trace, bB as TraceContext, bC as TraceSchema, f as Tracer, bD as TrackToolParams, bE as WorkflowParams, bF as claimReplay, bG as
|
|
2
|
+
export { h as AiTrackEvent, A as AiTrackUsage, i as AppGitOptions, c as AppGitSnapshot, j as Attachment, k as AttachmentType, l as BeginInteractionOptions, m as BooleanThreshold, n as BooleanThresholdSchema, o as CreateEvalSuiteRunOptions, p as CreateReplayOptions, D as DEFAULT_EVAL_POLL_INTERVAL_MS, q as DEFAULT_EVAL_WAIT_MS, r as DEFAULT_QUERY_URL, s as DEFAULT_TRACE_WAIT_MS, t as Dataset, u as DatasetColumn, v as DatasetColumnSchema, w as DatasetIdSchema, x as DatasetReadClient, y as DatasetRow, z as DefaultAgentInput, E as DefinedEvalAgent, G as EVAL_CORRELATION_ID_ATTRIBUTE, H as EvalAgentDefinition, J as EvalAgentExecution, K as EvalClient, L as EvalContext, N as EvalContextSchema, O as EvalDestination, Q as EvalEvaluator, U as EvalHandlerOptions, V as EvalLocalEvaluator, W as EvalParameterError, X as EvalParameterField, Y as EvalParameterFields, Z as EvalParameters, _ as EvalProgram, $ as EvalPublishError, a0 as EvalRepetitionSummary, a1 as EvalRowResult, a2 as EvalRowTracePair, a3 as EvalRunReading, a4 as EvalScope, a5 as EvalSuiteDefinition, a6 as EvalSuiteDefinitionInput, a7 as EvalSuiteManifest, a8 as EvalSuiteManifestSchema, a9 as EvalSuiteResult, aa as EvalSuiteRunSession, ab as EvalVerdictAssessment, ac as EvaluateReplayOptions, ad as FinishInteractionOptions, ae as HostedEvaluatorPin, af as IdentifyEvent, b as Interaction, ag as LocalBooleanVerdict, ah as LocalBooleanVerdictSchema, ai as LocalDebuggerLiveEventInput, aj as LocalEvaluator, ak as LocalEvaluatorContext, al as LocalNumberVerdict, am as LocalNumberVerdictSchema, an as LocalPreferenceVerdict, ao as LocalPreferenceVerdictSchema, ap as LocalScoreVerdict, aq as LocalScoreVerdictSchema, ar as LocalVerdict, as as LocalVerdictSchema, at as MAX_EVAL_STATUS_RETRIES, au as MAX_INGEST_SIZE_BYTES, av as MaskContext, M as MaskFunction, aw as NumericThreshold, ax as NumericThresholdSchema, ay as PartialAiTrackEvent, az as PortableEvalArtifact, aA as PortableEvalLimits, aB as PortableEvalOutcome, aC as PortableEvalResult, aD as PortableEvaluator, aE as PortableJudgeRequest, aF as PortableJudgeVerdict, aG as PreparedAgentInvocation, aH as PublishEvalSuiteOptions, R as Raindrop, aI as RaindropConnection, aJ as RaindropFeatureFlagValue, aK as RaindropFeatureFlags, aL as RaindropProperties, aM as RaindropPropertyLeaf, aN as RaindropPropertyValue, a as RaindropSpanProcessor, aO as ReadDatasetOptions, aP as ReferenceOutput, aQ as ReferenceOutputSchema, aR as ReferenceOutputSourceSchema, aS as ReplayClient, aT as ReplayCounts, aU as ReplayCountsSchema, aV as ReplayEvaluator, aW as ReplayEvaluatorCounts, aX as ReplayEvaluatorCountsSchema, aY as ReplayEvaluatorStats, aZ as ReplayEvaluatorStatsSchema, a_ as ReplayEvaluatorSummary, a$ as ReplayEvaluatorSummarySchema, b0 as ReplayHandle, b1 as ReplayLocalEvaluatorContext, b2 as ReplayMessage, b3 as ReplayMessageContentPart, b4 as ReplayMessageContentPartSchema, b5 as ReplayMessageSchema, b6 as ReplayMessageToolCall, b7 as ReplayMessageToolCallSchema, b8 as ReplayOptions, b9 as ReplayReading, ba as ReplayRepetitions, bb as ReplayResult, bc as ReplayResultRow, bd as ReplayResultRowSchema, be as ReplayRow, bf as ReplayRowOutcome, bg as ReplayRunRow, bh as ReplayVerdict, bi as ReplayVerdictSchema, bj as RunEvalSuiteOptions, bk as RunReplayOptions, bl as SelfDiagnoseOptions, bm as SelfDiagnosticsExecuteContext, bn as SelfDiagnosticsExecuteResult, bo as SelfDiagnosticsSignalDefinition, bp as SelfDiagnosticsSignalDefinitions, bq as SelfDiagnosticsTool, br as SelfDiagnosticsToolInputSchema, bs as SelfDiagnosticsToolOptions, bt as SignalEvent, bu as SpanParams, bv as SubagentDispatch, bw as SubagentDispatchOptions, bx as SubagentFinishOptions, d as SubagentResumeOptions, e as SubagentRun, by as ToolParams, bz as ToolSpan, bA as Trace, bB as TraceContext, bC as TraceSchema, f as Tracer, bD as TrackToolParams, bE as WorkflowParams, bF as claimReplay, bG as createEvalHandler, bH as createEvalSuiteRun, bI as createReplay, bJ as currentEvalScope, R as default, bK as defaultAgentInput, bL as defineAgent, bM as defineEvalSuite, bN as defineEvaluatorProgram, bO as defineLocalEvaluator, bP as evaluateEvalRun, bQ as evaluatePortableEvaluator, bR as evaluateReplay, bS as formatTrace, bT as importPortableEvaluator, bU as isEvalSuiteDefinition, bV as isPublishedEvalSuite, bW as parseDatasetId, bX as projectWorkshopTrace, bY as publishEvalSuite, bZ as readDataset, b_ as readEvalRun, b$ as readEvaluator, c0 as readReplay, c1 as replay, c2 as resolveDisableBatching, c3 as runEvalSuite, c4 as runReplay, c5 as traceOutput, c6 as traceToolCalls, c7 as traceTools, c8 as verifyPortableEvalArtifact, c9 as withEvalScope } from './index-B3Rns98r.js';
|
|
3
3
|
import '@opentelemetry/api';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '@opentelemetry/sdk-trace-base';
|
package/dist/index.js
CHANGED
|
@@ -6476,7 +6476,6 @@ __export(index_exports, {
|
|
|
6476
6476
|
ReplayVerdictSchema: () => ReplayVerdictSchema,
|
|
6477
6477
|
TraceSchema: () => TraceSchema,
|
|
6478
6478
|
claimReplay: () => claimReplay,
|
|
6479
|
-
compareEvalRuns: () => compareEvalRuns,
|
|
6480
6479
|
createEvalHandler: () => createEvalHandler,
|
|
6481
6480
|
createEvalSuiteRun: () => createEvalSuiteRun,
|
|
6482
6481
|
createReplay: () => createReplay,
|
|
@@ -26438,7 +26437,7 @@ var SignalEventSchema = external_exports.object({
|
|
|
26438
26437
|
// package.json
|
|
26439
26438
|
var package_default = {
|
|
26440
26439
|
name: "raindrop-ai",
|
|
26441
|
-
version: "
|
|
26440
|
+
version: "3.0.0",
|
|
26442
26441
|
main: "dist/index.js",
|
|
26443
26442
|
module: "dist/index.mjs",
|
|
26444
26443
|
types: "dist/index.d.ts",
|
|
@@ -26505,7 +26504,7 @@ var package_default = {
|
|
|
26505
26504
|
tsup: "^9.0.0",
|
|
26506
26505
|
tsx: "^4.22.0",
|
|
26507
26506
|
typescript: "^5.3.3",
|
|
26508
|
-
vite: "^7.3.
|
|
26507
|
+
vite: "^7.3.8",
|
|
26509
26508
|
vitest: "^4.1.12",
|
|
26510
26509
|
"zod-4-copy": "npm:zod@4.1.8"
|
|
26511
26510
|
},
|
|
@@ -32913,59 +32912,6 @@ var import_v49 = require("zod/v4");
|
|
|
32913
32912
|
init_endpoint();
|
|
32914
32913
|
init_dataset();
|
|
32915
32914
|
init_definition();
|
|
32916
|
-
|
|
32917
|
-
// src/evals/runs.ts
|
|
32918
|
-
async function readEvalRun(client, runId, options = {}) {
|
|
32919
|
-
const detail = await readReplayDetails(client, runId, options);
|
|
32920
|
-
if (detail.eval_runs.length >= 200) {
|
|
32921
|
-
throw new Error("Run evaluation history exceeds the read limit");
|
|
32922
|
-
}
|
|
32923
|
-
const evaluators = await Promise.all(
|
|
32924
|
-
detail.eval_runs.map(async (evaluation) => {
|
|
32925
|
-
var _a5;
|
|
32926
|
-
const result = await readReplayEvaluatorRun(
|
|
32927
|
-
client,
|
|
32928
|
-
(_a5 = options.queryUrl) != null ? _a5 : DEFAULT_QUERY_URL2,
|
|
32929
|
-
evaluation.id
|
|
32930
|
-
);
|
|
32931
|
-
if (result.id !== evaluation.id) throw new Error("Raindrop returned a different evaluation");
|
|
32932
|
-
return {
|
|
32933
|
-
...result,
|
|
32934
|
-
evaluator: result.evalSlug,
|
|
32935
|
-
evaluatorId: evaluation.eval_id,
|
|
32936
|
-
programVersion: evaluation.program_version,
|
|
32937
|
-
executedBy: evaluation.executed_by
|
|
32938
|
-
};
|
|
32939
|
-
})
|
|
32940
|
-
);
|
|
32941
|
-
return {
|
|
32942
|
-
runId: detail.replay.id,
|
|
32943
|
-
datasetId: detail.replay.dataset_id,
|
|
32944
|
-
datasetVersionId: detail.replay.dataset_version_id,
|
|
32945
|
-
status: detail.replay.status,
|
|
32946
|
-
counts: detail.replay.counts,
|
|
32947
|
-
tracesExpireAt: detail.replay.traces_expire_at,
|
|
32948
|
-
tracesExpired: detail.replay.traces_expired,
|
|
32949
|
-
rows: detail.rows.map((row) => {
|
|
32950
|
-
var _a5;
|
|
32951
|
-
return {
|
|
32952
|
-
rowId: row.row_id,
|
|
32953
|
-
datasetRowId: (_a5 = row.dataset_row_id) != null ? _a5 : row.row_id,
|
|
32954
|
-
repetition: row.repetition,
|
|
32955
|
-
attempt: row.attempt,
|
|
32956
|
-
status: row.status,
|
|
32957
|
-
traceId: row.trace_id,
|
|
32958
|
-
error: row.error
|
|
32959
|
-
};
|
|
32960
|
-
}),
|
|
32961
|
-
evaluators
|
|
32962
|
-
};
|
|
32963
|
-
}
|
|
32964
|
-
async function evaluateEvalRun(client, runId, options) {
|
|
32965
|
-
return { runId, evaluators: await evaluateReplay(client, runId, options) };
|
|
32966
|
-
}
|
|
32967
|
-
|
|
32968
|
-
// src/evals/publish.ts
|
|
32969
32915
|
var EvaluatorIdentitySchema = import_v49.z.object({
|
|
32970
32916
|
id: import_v49.z.string().uuid(),
|
|
32971
32917
|
slug: import_v49.z.string(),
|
|
@@ -32987,51 +32933,6 @@ var EvalPublishError = class extends Error {
|
|
|
32987
32933
|
this.name = "EvalPublishError";
|
|
32988
32934
|
}
|
|
32989
32935
|
};
|
|
32990
|
-
var ComparisonRunSchema = import_v49.z.object({
|
|
32991
|
-
id: import_v49.z.string().uuid(),
|
|
32992
|
-
programVersion: import_v49.z.number().int().positive()
|
|
32993
|
-
});
|
|
32994
|
-
var ComparisonLinkSchema = import_v49.z.object({
|
|
32995
|
-
url: import_v49.z.string().url(),
|
|
32996
|
-
first: ComparisonRunSchema,
|
|
32997
|
-
second: ComparisonRunSchema
|
|
32998
|
-
});
|
|
32999
|
-
async function compareEvalRuns(client, options) {
|
|
33000
|
-
const [first, second] = await Promise.all([
|
|
33001
|
-
readEvalRun(client, options.beforeRunId, options),
|
|
33002
|
-
readEvalRun(client, options.afterRunId, options)
|
|
33003
|
-
]);
|
|
33004
|
-
const candidates = first.evaluators.filter(
|
|
33005
|
-
(entry) => (!options.evaluator || entry.evaluator === options.evaluator) && second.evaluators.some((other) => other.evaluatorId === entry.evaluatorId)
|
|
33006
|
-
);
|
|
33007
|
-
const selected = candidates[0];
|
|
33008
|
-
if (!selected || candidates.length !== 1) {
|
|
33009
|
-
throw new Error(
|
|
33010
|
-
"Comparison requires one shared evaluator; specify evaluator when comparing a suite"
|
|
33011
|
-
);
|
|
33012
|
-
}
|
|
33013
|
-
const matches = second.evaluators.filter((entry) => entry.evaluatorId === selected.evaluatorId);
|
|
33014
|
-
const counterpart = matches[0];
|
|
33015
|
-
if (!counterpart || matches.length !== 1) {
|
|
33016
|
-
throw new Error("Comparison is ambiguous because this evaluator graded the run more than once");
|
|
33017
|
-
}
|
|
33018
|
-
if (selected.status === "running" || counterpart.status === "running") {
|
|
33019
|
-
throw new Error("Wait for both evaluations to finish before comparing");
|
|
33020
|
-
}
|
|
33021
|
-
const before = selected.id;
|
|
33022
|
-
const after = counterpart.id;
|
|
33023
|
-
const { data } = import_v49.z.object({ data: ComparisonLinkSchema }).parse(await evalRequest(client, `/v1/eval-runs/${before}/compare/${after}`, options));
|
|
33024
|
-
if (data.first.id !== before || data.second.id !== after) {
|
|
33025
|
-
throw new Error("Raindrop returned a different comparison pair");
|
|
33026
|
-
}
|
|
33027
|
-
return {
|
|
33028
|
-
...data,
|
|
33029
|
-
beforeRunId: first.runId,
|
|
33030
|
-
afterRunId: second.runId,
|
|
33031
|
-
evaluator: selected.evaluator,
|
|
33032
|
-
sameEvaluatorVersion: data.first.programVersion === data.second.programVersion
|
|
33033
|
-
};
|
|
33034
|
-
}
|
|
33035
32936
|
async function readEvaluator(client, slug, options = {}) {
|
|
33036
32937
|
const { data } = import_v49.z.object({ data: EvaluatorSourceSchema }).parse(await evalRequest(client, `/v1/evals/${encodeURIComponent(slug)}`, options));
|
|
33037
32938
|
if (data.slug !== slug) throw new Error("Raindrop returned a different evaluator slug");
|
|
@@ -33129,6 +33030,57 @@ var traceTools = Object.freeze({
|
|
|
33129
33030
|
getToolCalls: traceToolCalls
|
|
33130
33031
|
});
|
|
33131
33032
|
|
|
33033
|
+
// src/evals/runs.ts
|
|
33034
|
+
async function readEvalRun(client, runId, options = {}) {
|
|
33035
|
+
const detail = await readReplayDetails(client, runId, options);
|
|
33036
|
+
if (detail.eval_runs.length >= 200) {
|
|
33037
|
+
throw new Error("Run evaluation history exceeds the read limit");
|
|
33038
|
+
}
|
|
33039
|
+
const evaluators = await Promise.all(
|
|
33040
|
+
detail.eval_runs.map(async (evaluation) => {
|
|
33041
|
+
var _a5;
|
|
33042
|
+
const result = await readReplayEvaluatorRun(
|
|
33043
|
+
client,
|
|
33044
|
+
(_a5 = options.queryUrl) != null ? _a5 : DEFAULT_QUERY_URL2,
|
|
33045
|
+
evaluation.id
|
|
33046
|
+
);
|
|
33047
|
+
if (result.id !== evaluation.id) throw new Error("Raindrop returned a different evaluation");
|
|
33048
|
+
return {
|
|
33049
|
+
...result,
|
|
33050
|
+
evaluator: result.evalSlug,
|
|
33051
|
+
evaluatorId: evaluation.eval_id,
|
|
33052
|
+
programVersion: evaluation.program_version,
|
|
33053
|
+
executedBy: evaluation.executed_by
|
|
33054
|
+
};
|
|
33055
|
+
})
|
|
33056
|
+
);
|
|
33057
|
+
return {
|
|
33058
|
+
runId: detail.replay.id,
|
|
33059
|
+
datasetId: detail.replay.dataset_id,
|
|
33060
|
+
datasetVersionId: detail.replay.dataset_version_id,
|
|
33061
|
+
status: detail.replay.status,
|
|
33062
|
+
counts: detail.replay.counts,
|
|
33063
|
+
tracesExpireAt: detail.replay.traces_expire_at,
|
|
33064
|
+
tracesExpired: detail.replay.traces_expired,
|
|
33065
|
+
rows: detail.rows.map((row) => {
|
|
33066
|
+
var _a5;
|
|
33067
|
+
return {
|
|
33068
|
+
rowId: row.row_id,
|
|
33069
|
+
datasetRowId: (_a5 = row.dataset_row_id) != null ? _a5 : row.row_id,
|
|
33070
|
+
repetition: row.repetition,
|
|
33071
|
+
attempt: row.attempt,
|
|
33072
|
+
status: row.status,
|
|
33073
|
+
traceId: row.trace_id,
|
|
33074
|
+
error: row.error
|
|
33075
|
+
};
|
|
33076
|
+
}),
|
|
33077
|
+
evaluators
|
|
33078
|
+
};
|
|
33079
|
+
}
|
|
33080
|
+
async function evaluateEvalRun(client, runId, options) {
|
|
33081
|
+
return { runId, evaluators: await evaluateReplay(client, runId, options) };
|
|
33082
|
+
}
|
|
33083
|
+
|
|
33132
33084
|
// src/evals/index.ts
|
|
33133
33085
|
init_trace();
|
|
33134
33086
|
init_portable();
|
|
@@ -34916,7 +34868,6 @@ var withEvalScope2 = withEvalScope;
|
|
|
34916
34868
|
ReplayVerdictSchema,
|
|
34917
34869
|
TraceSchema,
|
|
34918
34870
|
claimReplay,
|
|
34919
|
-
compareEvalRuns,
|
|
34920
34871
|
createEvalHandler,
|
|
34921
34872
|
createEvalSuiteRun,
|
|
34922
34873
|
createReplay,
|
package/dist/index.mjs
CHANGED
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
ReplayResultRowSchema,
|
|
22
22
|
ReplayVerdictSchema,
|
|
23
23
|
claimReplay,
|
|
24
|
-
compareEvalRuns,
|
|
25
24
|
createEvalHandler,
|
|
26
25
|
createEvalSuiteRun,
|
|
27
26
|
createReplay,
|
|
@@ -41,8 +40,8 @@ import {
|
|
|
41
40
|
runReplay,
|
|
42
41
|
traceTools,
|
|
43
42
|
withEvalScope
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-XAV5H3AL.mjs";
|
|
44
|
+
import "./chunk-24GTHPYP.mjs";
|
|
46
45
|
import {
|
|
47
46
|
BooleanThresholdSchema,
|
|
48
47
|
DatasetColumnSchema,
|
|
@@ -107,7 +106,6 @@ export {
|
|
|
107
106
|
ReplayVerdictSchema,
|
|
108
107
|
TraceSchema,
|
|
109
108
|
claimReplay,
|
|
110
|
-
compareEvalRuns,
|
|
111
109
|
createEvalHandler,
|
|
112
110
|
createEvalSuiteRun,
|
|
113
111
|
createReplay,
|
package/dist/tracing/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Instrumentation } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { I as InitializeOptions, P as PiiFieldMap, S as SpanProcessorOptions, B as BeginParams, C as CarrierHeaders, T as TraceCarrier, F as FlushResultCompat, g as FlushResult } from '../index-
|
|
2
|
+
import { I as InitializeOptions, P as PiiFieldMap, S as SpanProcessorOptions, B as BeginParams, C as CarrierHeaders, T as TraceCarrier, F as FlushResultCompat, g as FlushResult } from '../index-B3Rns98r.mjs';
|
|
3
3
|
import { Raindrop, MaskFunction, RaindropSpanProcessor, Interaction, AiTrackUsage, AppGitSnapshot, SubagentResumeOptions, SubagentRun, Tracer } from '../index.mjs';
|
|
4
4
|
import '@opentelemetry/api';
|
|
5
5
|
import 'zod/v4';
|
package/dist/tracing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Instrumentation } from '@opentelemetry/instrumentation';
|
|
2
|
-
import { I as InitializeOptions, P as PiiFieldMap, S as SpanProcessorOptions, B as BeginParams, C as CarrierHeaders, T as TraceCarrier, F as FlushResultCompat, g as FlushResult } from '../index-
|
|
2
|
+
import { I as InitializeOptions, P as PiiFieldMap, S as SpanProcessorOptions, B as BeginParams, C as CarrierHeaders, T as TraceCarrier, F as FlushResultCompat, g as FlushResult } from '../index-B3Rns98r.js';
|
|
3
3
|
import { Raindrop, MaskFunction, RaindropSpanProcessor, Interaction, AiTrackUsage, AppGitSnapshot, SubagentResumeOptions, SubagentRun, Tracer } from '../index.js';
|
|
4
4
|
import '@opentelemetry/api';
|
|
5
5
|
import 'zod/v4';
|
package/dist/tracing/index.js
CHANGED
|
@@ -3152,7 +3152,7 @@ function formatEndpoint2(endpoint) {
|
|
|
3152
3152
|
// package.json
|
|
3153
3153
|
var package_default = {
|
|
3154
3154
|
name: "raindrop-ai",
|
|
3155
|
-
version: "
|
|
3155
|
+
version: "3.0.0",
|
|
3156
3156
|
main: "dist/index.js",
|
|
3157
3157
|
module: "dist/index.mjs",
|
|
3158
3158
|
types: "dist/index.d.ts",
|
|
@@ -3219,7 +3219,7 @@ var package_default = {
|
|
|
3219
3219
|
tsup: "^9.0.0",
|
|
3220
3220
|
tsx: "^4.22.0",
|
|
3221
3221
|
typescript: "^5.3.3",
|
|
3222
|
-
vite: "^7.3.
|
|
3222
|
+
vite: "^7.3.8",
|
|
3223
3223
|
vitest: "^4.1.12",
|
|
3224
3224
|
"zod-4-copy": "npm:zod@4.1.8"
|
|
3225
3225
|
},
|
package/dist/tracing/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raindrop-ai",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-otelv2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -46,35 +46,35 @@
|
|
|
46
46
|
"tsup": "^9.0.0",
|
|
47
47
|
"tsx": "^4.22.0",
|
|
48
48
|
"typescript": "^5.3.3",
|
|
49
|
-
"vite": "^7.3.
|
|
49
|
+
"vite": "^7.3.8",
|
|
50
50
|
"vitest": "^4.1.12",
|
|
51
51
|
"zod-4-copy": "npm:zod@4.1.8",
|
|
52
52
|
"@raindrop-ai/core": "0.3.4",
|
|
53
|
-
"@raindrop-ai/
|
|
54
|
-
"@raindrop-ai/
|
|
53
|
+
"@raindrop-ai/schemas": "0.1.0",
|
|
54
|
+
"@raindrop-ai/redact-pii": "0.1.3"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@jitl/quickjs-singlefile-cjs-release-sync": "0.32.0",
|
|
58
58
|
"@opentelemetry/api": "^1.9.0",
|
|
59
|
-
"@opentelemetry/core": "^
|
|
60
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
61
|
-
"@opentelemetry/exporter-trace-otlp-proto": "^0.
|
|
62
|
-
"@opentelemetry/instrumentation": "^0.
|
|
63
|
-
"@opentelemetry/resources": "^
|
|
64
|
-
"@opentelemetry/sdk-trace-base": "^
|
|
65
|
-
"@opentelemetry/sdk-trace-node": "^
|
|
66
|
-
"@traceloop/ai-semantic-conventions": "0.
|
|
67
|
-
"@traceloop/instrumentation-anthropic": "0.
|
|
68
|
-
"@traceloop/instrumentation-bedrock": "0.
|
|
69
|
-
"@traceloop/instrumentation-chromadb": "0.
|
|
70
|
-
"@traceloop/instrumentation-cohere": "0.
|
|
71
|
-
"@traceloop/instrumentation-langchain": "0.
|
|
72
|
-
"@traceloop/instrumentation-llamaindex": "0.
|
|
73
|
-
"@traceloop/instrumentation-openai": "0.
|
|
74
|
-
"@traceloop/instrumentation-pinecone": "0.
|
|
75
|
-
"@traceloop/instrumentation-qdrant": "0.
|
|
76
|
-
"@traceloop/instrumentation-together": "0.
|
|
77
|
-
"@traceloop/instrumentation-vertexai": "0.
|
|
59
|
+
"@opentelemetry/core": "^2.0.0",
|
|
60
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.203.0",
|
|
61
|
+
"@opentelemetry/exporter-trace-otlp-proto": "^0.203.0",
|
|
62
|
+
"@opentelemetry/instrumentation": "^0.203.0",
|
|
63
|
+
"@opentelemetry/resources": "^2.0.0",
|
|
64
|
+
"@opentelemetry/sdk-trace-base": "^2.0.0",
|
|
65
|
+
"@opentelemetry/sdk-trace-node": "^2.0.0",
|
|
66
|
+
"@traceloop/ai-semantic-conventions": "0.22.2",
|
|
67
|
+
"@traceloop/instrumentation-anthropic": "0.22.2",
|
|
68
|
+
"@traceloop/instrumentation-bedrock": "0.22.2",
|
|
69
|
+
"@traceloop/instrumentation-chromadb": "0.22.2",
|
|
70
|
+
"@traceloop/instrumentation-cohere": "0.22.2",
|
|
71
|
+
"@traceloop/instrumentation-langchain": "0.22.2",
|
|
72
|
+
"@traceloop/instrumentation-llamaindex": "0.22.2",
|
|
73
|
+
"@traceloop/instrumentation-openai": "0.22.2",
|
|
74
|
+
"@traceloop/instrumentation-pinecone": "0.22.2",
|
|
75
|
+
"@traceloop/instrumentation-qdrant": "0.22.2",
|
|
76
|
+
"@traceloop/instrumentation-together": "0.22.2",
|
|
77
|
+
"@traceloop/instrumentation-vertexai": "0.22.2",
|
|
78
78
|
"quickjs-emscripten-core": "0.32.0",
|
|
79
79
|
"weakref": "^0.2.1",
|
|
80
80
|
"zod": "^3.25.76 || ^4.0.0"
|