veryfront 0.1.871 → 0.1.873
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/esm/cli/commands/eval/command-help.d.ts +3 -0
- package/esm/cli/commands/eval/command-help.d.ts.map +1 -0
- package/esm/cli/commands/eval/command-help.js +42 -0
- package/esm/cli/commands/eval/command.d.ts +21 -0
- package/esm/cli/commands/eval/command.d.ts.map +1 -0
- package/esm/cli/commands/eval/command.js +289 -0
- package/esm/cli/commands/eval/handler.d.ts +26 -0
- package/esm/cli/commands/eval/handler.d.ts.map +1 -0
- package/esm/cli/commands/eval/handler.js +28 -0
- package/esm/cli/help/command-definitions.d.ts.map +1 -1
- package/esm/cli/help/command-definitions.js +2 -0
- package/esm/cli/router.d.ts.map +1 -1
- package/esm/cli/router.js +2 -0
- package/esm/deno.d.ts +5 -2
- package/esm/deno.js +7 -4
- package/esm/src/agent/runtime/client-profile.d.ts.map +1 -1
- package/esm/src/agent/runtime/client-profile.js +10 -1
- package/esm/src/chat/ag-ui.d.ts.map +1 -1
- package/esm/src/chat/protocol.d.ts.map +1 -1
- package/esm/src/chat/protocol.js +0 -1
- package/esm/src/config/schemas/config.schema.d.ts +12 -0
- package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
- package/esm/src/config/schemas/config.schema.js +12 -0
- package/esm/src/discovery/discovery-engine.d.ts.map +1 -1
- package/esm/src/discovery/discovery-engine.js +6 -1
- package/esm/src/discovery/handlers/eval-handler.d.ts +7 -0
- package/esm/src/discovery/handlers/eval-handler.d.ts.map +1 -0
- package/esm/src/discovery/handlers/eval-handler.js +16 -0
- package/esm/src/discovery/handlers/index.d.ts +1 -0
- package/esm/src/discovery/handlers/index.d.ts.map +1 -1
- package/esm/src/discovery/handlers/index.js +1 -0
- package/esm/src/discovery/import-rewriter.d.ts +1 -1
- package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
- package/esm/src/discovery/import-rewriter.js +1 -0
- package/esm/src/discovery/project-discovery-config.d.ts +2 -0
- package/esm/src/discovery/project-discovery-config.d.ts.map +1 -1
- package/esm/src/discovery/project-discovery-config.js +2 -0
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +2 -0
- package/esm/src/discovery/types.d.ts +3 -0
- package/esm/src/discovery/types.d.ts.map +1 -1
- package/esm/src/eval/datasets.d.ts +8 -0
- package/esm/src/eval/datasets.d.ts.map +1 -0
- package/esm/src/eval/datasets.js +66 -0
- package/esm/src/eval/discovery.d.ts +43 -0
- package/esm/src/eval/discovery.d.ts.map +1 -0
- package/esm/src/eval/discovery.js +123 -0
- package/esm/src/eval/expect.d.ts +16 -0
- package/esm/src/eval/expect.d.ts.map +1 -0
- package/esm/src/eval/expect.js +62 -0
- package/esm/src/eval/factory.d.ts +6 -0
- package/esm/src/eval/factory.d.ts.map +1 -0
- package/esm/src/eval/factory.js +50 -0
- package/esm/src/eval/index.d.ts +33 -0
- package/esm/src/eval/index.d.ts.map +1 -0
- package/esm/src/eval/index.js +29 -0
- package/esm/src/eval/metrics.d.ts +55 -0
- package/esm/src/eval/metrics.d.ts.map +1 -0
- package/esm/src/eval/metrics.js +223 -0
- package/esm/src/eval/report.d.ts +12 -0
- package/esm/src/eval/report.d.ts.map +1 -0
- package/esm/src/eval/report.js +64 -0
- package/esm/src/eval/runner.d.ts +4 -0
- package/esm/src/eval/runner.d.ts.map +1 -0
- package/esm/src/eval/runner.js +101 -0
- package/esm/src/eval/studio.d.ts +177 -0
- package/esm/src/eval/studio.d.ts.map +1 -0
- package/esm/src/eval/studio.js +176 -0
- package/esm/src/eval/types.d.ts +221 -0
- package/esm/src/eval/types.d.ts.map +1 -0
- package/esm/src/eval/types.js +6 -0
- package/esm/src/eval/validation.d.ts +4 -0
- package/esm/src/eval/validation.d.ts.map +1 -0
- package/esm/src/eval/validation.js +41 -0
- package/esm/src/runs/index.d.ts +1 -1
- package/esm/src/runs/index.js +1 -1
- package/esm/src/runs/schemas.d.ts +9 -9
- package/esm/src/runs/schemas.d.ts.map +1 -1
- package/esm/src/runs/schemas.js +1 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +12 -4
- package/esm/src/agent/testing/agent-tester.d.ts +0 -53
- package/esm/src/agent/testing/agent-tester.d.ts.map +0 -1
- package/esm/src/agent/testing/agent-tester.js +0 -132
- package/esm/src/agent/testing/durable-run-canaries/cli-runner.d.ts +0 -21
- package/esm/src/agent/testing/durable-run-canaries/cli-runner.d.ts.map +0 -1
- package/esm/src/agent/testing/durable-run-canaries/cli-runner.js +0 -66
- package/esm/src/agent/testing/durable-run-canaries/environment.d.ts +0 -14
- package/esm/src/agent/testing/durable-run-canaries/environment.d.ts.map +0 -1
- package/esm/src/agent/testing/durable-run-canaries/environment.js +0 -15
- package/esm/src/agent/testing/durable-run-canaries/index.d.ts +0 -5
- package/esm/src/agent/testing/durable-run-canaries/index.d.ts.map +0 -1
- package/esm/src/agent/testing/durable-run-canaries/index.js +0 -4
- package/esm/src/agent/testing/durable-run-canaries/runner.d.ts +0 -118
- package/esm/src/agent/testing/durable-run-canaries/runner.d.ts.map +0 -1
- package/esm/src/agent/testing/durable-run-canaries/runner.js +0 -391
- package/esm/src/agent/testing/durable-run-canaries/validation.d.ts +0 -12
- package/esm/src/agent/testing/durable-run-canaries/validation.d.ts.map +0 -1
- package/esm/src/agent/testing/durable-run-canaries/validation.js +0 -71
- package/esm/src/agent/testing/index.d.ts +0 -10
- package/esm/src/agent/testing/index.d.ts.map +0 -1
- package/esm/src/agent/testing/index.js +0 -9
- package/esm/src/agent/testing/live-evals/api-client.d.ts +0 -102
- package/esm/src/agent/testing/live-evals/api-client.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/api-client.js +0 -313
- package/esm/src/agent/testing/live-evals/cli-runner.d.ts +0 -40
- package/esm/src/agent/testing/live-evals/cli-runner.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/cli-runner.js +0 -144
- package/esm/src/agent/testing/live-evals/environment.d.ts +0 -15
- package/esm/src/agent/testing/live-evals/environment.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/environment.js +0 -20
- package/esm/src/agent/testing/live-evals/formatting.d.ts +0 -15
- package/esm/src/agent/testing/live-evals/formatting.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/formatting.js +0 -75
- package/esm/src/agent/testing/live-evals/index.d.ts +0 -12
- package/esm/src/agent/testing/live-evals/index.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/index.js +0 -11
- package/esm/src/agent/testing/live-evals/metadata.d.ts +0 -34
- package/esm/src/agent/testing/live-evals/metadata.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/metadata.js +0 -116
- package/esm/src/agent/testing/live-evals/performance.d.ts +0 -19
- package/esm/src/agent/testing/live-evals/performance.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/performance.js +0 -22
- package/esm/src/agent/testing/live-evals/preflight.d.ts +0 -12
- package/esm/src/agent/testing/live-evals/preflight.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/preflight.js +0 -27
- package/esm/src/agent/testing/live-evals/report.d.ts +0 -55
- package/esm/src/agent/testing/live-evals/report.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/report.js +0 -79
- package/esm/src/agent/testing/live-evals/request.d.ts +0 -31
- package/esm/src/agent/testing/live-evals/request.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/request.js +0 -48
- package/esm/src/agent/testing/live-evals/result.d.ts +0 -56
- package/esm/src/agent/testing/live-evals/result.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/result.js +0 -36
- package/esm/src/agent/testing/live-evals/runner.d.ts +0 -135
- package/esm/src/agent/testing/live-evals/runner.d.ts.map +0 -1
- package/esm/src/agent/testing/live-evals/runner.js +0 -396
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { runLiveEvalCli, } from "./cli-runner.js";
|
|
2
|
-
export { DEFAULT_LIVE_EVAL_ENDPOINT, resolveLiveEvalEnvironment, } from "./environment.js";
|
|
3
|
-
export { cancelLiveEvalInputRequest, createLiveEvalApiClient, createLiveEvalConversation, createLiveEvalProjectUploadFixture, createLiveEvalRelease, deleteLiveEvalConversation, deleteLiveEvalProjectFile, getLiveEvalProjectFile, listOpenLiveEvalInputRequests, submitLiveEvalInputResponse, waitForOpenLiveEvalInputRequest, } from "./api-client.js";
|
|
4
|
-
export { buildFailureSuffix, buildProgressLine, containsOrderedSubsequence, createPlainTextPdf, } from "./formatting.js";
|
|
5
|
-
export { evaluateRuntimeConfidenceEnv, printRuntimeConfidencePreflight, } from "./preflight.js";
|
|
6
|
-
export { buildRuntimePerformanceSummary, } from "./performance.js";
|
|
7
|
-
export { buildLiveEvalCaseMetadata, DEFAULT_LIVE_EVAL_AREA_TAG_RULES, DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES, withLiveEvalMetadata, } from "./metadata.js";
|
|
8
|
-
export { buildLiveEvalRequestBody, } from "./request.js";
|
|
9
|
-
export { buildLiveEvalCaseTagSummary, buildLiveEvalRuntimeSummary, buildLiveEvalStatusSummary, hasEveryLiveEvalTag, resolveLiveEvalRequestedCaseIds, selectLiveEvalCases, } from "./report.js";
|
|
10
|
-
export { createFailedEvalResult, createPassedEvalResult, createSkippedEvalResult, } from "./result.js";
|
|
11
|
-
export { containsSkillLoad, countStepStartedEvents, createLiveEvalCaseSupport, hasFinished, liveEvalRunnerInternals, } from "./runner.js";
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { LiveEvalCaseMetadata } from "./report.js";
|
|
2
|
-
import type { LiveEvalCase } from "./runner.js";
|
|
3
|
-
/** Public API contract for live eval case surface. */
|
|
4
|
-
export type LiveEvalCaseSurface = "read-only" | "write" | "experimental";
|
|
5
|
-
/** Public API contract for live eval case tag rule. */
|
|
6
|
-
export interface LiveEvalCaseTagRule {
|
|
7
|
-
tag: string;
|
|
8
|
-
equals?: string | readonly string[];
|
|
9
|
-
startsWith?: string | readonly string[];
|
|
10
|
-
includes?: string | readonly string[];
|
|
11
|
-
}
|
|
12
|
-
/** Options accepted by live eval case metadata. */
|
|
13
|
-
export interface LiveEvalCaseMetadataOptions {
|
|
14
|
-
releaseGateCaseIds?: readonly string[] | ReadonlySet<string>;
|
|
15
|
-
optionalJudgeCasePrefixes?: readonly string[];
|
|
16
|
-
areaTagRules?: readonly LiveEvalCaseTagRule[];
|
|
17
|
-
}
|
|
18
|
-
/** Input payload for build live eval case metadata. */
|
|
19
|
-
export interface BuildLiveEvalCaseMetadataInput extends LiveEvalCaseMetadataOptions {
|
|
20
|
-
caseId: string;
|
|
21
|
-
surface: LiveEvalCaseSurface;
|
|
22
|
-
requireProject: boolean;
|
|
23
|
-
}
|
|
24
|
-
/** Default value for live eval optional judge case prefixes. */
|
|
25
|
-
export declare const DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES: readonly string[];
|
|
26
|
-
/** Default value for live eval area tag rules. */
|
|
27
|
-
export declare const DEFAULT_LIVE_EVAL_AREA_TAG_RULES: readonly LiveEvalCaseTagRule[];
|
|
28
|
-
/** Builds live eval case metadata. */
|
|
29
|
-
export declare function buildLiveEvalCaseMetadata(input: BuildLiveEvalCaseMetadataInput): LiveEvalCaseMetadata;
|
|
30
|
-
/** Applies live eval metadata. */
|
|
31
|
-
export declare function withLiveEvalMetadata<TCase extends LiveEvalCase>(cases: readonly TCase[], surface: LiveEvalCaseSurface, options?: LiveEvalCaseMetadataOptions): Array<TCase & {
|
|
32
|
-
metadata: LiveEvalCaseMetadata;
|
|
33
|
-
}>;
|
|
34
|
-
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/testing/live-evals/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KA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CAUnD"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/** Default value for live eval optional judge case prefixes. */
|
|
2
|
-
export const DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES = [
|
|
3
|
-
"knowledge-",
|
|
4
|
-
"grounded-",
|
|
5
|
-
"judged-",
|
|
6
|
-
];
|
|
7
|
-
/** Default value for live eval area tag rules. */
|
|
8
|
-
export const DEFAULT_LIVE_EVAL_AREA_TAG_RULES = [
|
|
9
|
-
{ startsWith: "starter-", tag: "area:starter-routing" },
|
|
10
|
-
{ startsWith: "starter-task-", tag: "area:starter-artifact-flow" },
|
|
11
|
-
{ startsWith: "starter-", tag: "behavior:conversation-first" },
|
|
12
|
-
{ startsWith: "workflow-", tag: "area:workflow" },
|
|
13
|
-
{ startsWith: "platform-", tag: "area:platform" },
|
|
14
|
-
{ startsWith: "security-", tag: "area:security" },
|
|
15
|
-
{ startsWith: ["knowledge-", "grounded-", "judged-"], tag: "area:knowledge" },
|
|
16
|
-
{ startsWith: "tool-truthfulness", tag: "area:tool-truthfulness" },
|
|
17
|
-
{ startsWith: "degraded-", tag: "area:resilience" },
|
|
18
|
-
{ equals: "error-recovery-missing-file", tag: "area:resilience" },
|
|
19
|
-
{ includes: "deploy", tag: "area:deployment" },
|
|
20
|
-
{ includes: "sandbox", tag: "area:sandbox" },
|
|
21
|
-
{ includes: "debug", tag: "area:debugging" },
|
|
22
|
-
{ includes: "operate", tag: "area:operations" },
|
|
23
|
-
{ includes: "research", tag: "area:research" },
|
|
24
|
-
{ includes: "knowledge", tag: "area:knowledge-lifecycle" },
|
|
25
|
-
{ includes: "agent", tag: "area:agent-authoring" },
|
|
26
|
-
{ includes: "form-input", tag: "area:interactive-input" },
|
|
27
|
-
{ includes: ["invoke-agent", "delegation"], tag: "area:delegation" },
|
|
28
|
-
{ includes: ["create-page", "create-api-route", "create-skill"], tag: "area:file-generation" },
|
|
29
|
-
];
|
|
30
|
-
function toStringArray(value) {
|
|
31
|
-
if (!value) {
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
return typeof value === "string" ? [value] : value;
|
|
35
|
-
}
|
|
36
|
-
function caseIdCollectionHas(collection, caseId) {
|
|
37
|
-
if (!collection) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
if ("has" in collection) {
|
|
41
|
-
return collection.has(caseId);
|
|
42
|
-
}
|
|
43
|
-
return collection.includes(caseId);
|
|
44
|
-
}
|
|
45
|
-
function matchesTagRule(caseId, rule) {
|
|
46
|
-
for (const value of toStringArray(rule.equals)) {
|
|
47
|
-
if (caseId === value) {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
for (const value of toStringArray(rule.startsWith)) {
|
|
52
|
-
if (caseId.startsWith(value)) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
for (const value of toStringArray(rule.includes)) {
|
|
57
|
-
if (caseId.includes(value)) {
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
function isOptionalJudgeCase(caseId, prefixes) {
|
|
64
|
-
return prefixes.some((prefix) => caseId.startsWith(prefix));
|
|
65
|
-
}
|
|
66
|
-
function buildAreaTags(caseId, rules) {
|
|
67
|
-
const tags = new Set();
|
|
68
|
-
for (const rule of rules) {
|
|
69
|
-
if (matchesTagRule(caseId, rule)) {
|
|
70
|
-
tags.add(rule.tag);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return [...tags];
|
|
74
|
-
}
|
|
75
|
-
/** Builds live eval case metadata. */
|
|
76
|
-
export function buildLiveEvalCaseMetadata(input) {
|
|
77
|
-
const optionalJudgeCasePrefixes = input.optionalJudgeCasePrefixes ??
|
|
78
|
-
DEFAULT_LIVE_EVAL_OPTIONAL_JUDGE_CASE_PREFIXES;
|
|
79
|
-
const areaTagRules = input.areaTagRules ?? DEFAULT_LIVE_EVAL_AREA_TAG_RULES;
|
|
80
|
-
const gradingTag = isOptionalJudgeCase(input.caseId, optionalJudgeCasePrefixes)
|
|
81
|
-
? "grading:deterministic-plus-optional-llm"
|
|
82
|
-
: "grading:deterministic-only";
|
|
83
|
-
const tags = new Set([
|
|
84
|
-
`surface:${input.surface}`,
|
|
85
|
-
input.requireProject ? "project:required" : "project:optional",
|
|
86
|
-
input.surface === "experimental" ? "stability:experimental" : "stability:stable",
|
|
87
|
-
gradingTag,
|
|
88
|
-
]);
|
|
89
|
-
if (input.surface !== "experimental") {
|
|
90
|
-
tags.add("gate:nightly");
|
|
91
|
-
}
|
|
92
|
-
if (gradingTag === "grading:deterministic-only" && input.surface !== "experimental") {
|
|
93
|
-
tags.add("gate:ci");
|
|
94
|
-
}
|
|
95
|
-
if (caseIdCollectionHas(input.releaseGateCaseIds, input.caseId)) {
|
|
96
|
-
tags.add("gate:release");
|
|
97
|
-
}
|
|
98
|
-
for (const tag of buildAreaTags(input.caseId, areaTagRules)) {
|
|
99
|
-
tags.add(tag);
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
tags: [...tags].sort(),
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
/** Applies live eval metadata. */
|
|
106
|
-
export function withLiveEvalMetadata(cases, surface, options = {}) {
|
|
107
|
-
return cases.map((testCase) => ({
|
|
108
|
-
...testCase,
|
|
109
|
-
metadata: buildLiveEvalCaseMetadata({
|
|
110
|
-
...options,
|
|
111
|
-
caseId: testCase.id,
|
|
112
|
-
surface,
|
|
113
|
-
requireProject: testCase.requireProject === true,
|
|
114
|
-
}),
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** Public API contract for live eval runtime. */
|
|
2
|
-
export type LiveEvalRuntime = "framework";
|
|
3
|
-
/** Public API contract for live eval result for performance. */
|
|
4
|
-
export interface LiveEvalResultForPerformance {
|
|
5
|
-
runtime: LiveEvalRuntime;
|
|
6
|
-
durationMs: number;
|
|
7
|
-
}
|
|
8
|
-
/** Public API contract for runtime performance summary. */
|
|
9
|
-
export interface RuntimePerformanceSummary {
|
|
10
|
-
count: number;
|
|
11
|
-
avgDurationMs: number;
|
|
12
|
-
p50DurationMs: number;
|
|
13
|
-
p95DurationMs: number;
|
|
14
|
-
minDurationMs: number;
|
|
15
|
-
maxDurationMs: number;
|
|
16
|
-
}
|
|
17
|
-
/** Builds runtime performance summary. */
|
|
18
|
-
export declare function buildRuntimePerformanceSummary(results: LiveEvalResultForPerformance[]): Record<LiveEvalRuntime, RuntimePerformanceSummary>;
|
|
19
|
-
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/testing/live-evals/performance.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC;AAE1C,gEAAgE;AAChE,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,2DAA2D;AAC3D,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAkBD,0CAA0C;AAC1C,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,4BAA4B,EAAE,GACtC,MAAM,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAiBpD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
function calculateDurationPercentile(sortedDurations, percentile) {
|
|
2
|
-
if (sortedDurations.length === 0) {
|
|
3
|
-
return 0;
|
|
4
|
-
}
|
|
5
|
-
const index = Math.min(sortedDurations.length - 1, Math.max(0, Math.ceil((percentile / 100) * sortedDurations.length) - 1));
|
|
6
|
-
return sortedDurations[index] ?? 0;
|
|
7
|
-
}
|
|
8
|
-
/** Builds runtime performance summary. */
|
|
9
|
-
export function buildRuntimePerformanceSummary(results) {
|
|
10
|
-
const durations = results.map((result) => result.durationMs).sort((left, right) => left - right);
|
|
11
|
-
const totalDuration = durations.reduce((sum, value) => sum + value, 0);
|
|
12
|
-
return {
|
|
13
|
-
framework: {
|
|
14
|
-
count: durations.length,
|
|
15
|
-
avgDurationMs: durations.length > 0 ? Math.round(totalDuration / durations.length) : 0,
|
|
16
|
-
p50DurationMs: calculateDurationPercentile(durations, 50),
|
|
17
|
-
p95DurationMs: calculateDurationPercentile(durations, 95),
|
|
18
|
-
minDurationMs: durations[0] ?? 0,
|
|
19
|
-
maxDurationMs: durations.at(-1) ?? 0,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type AgentServiceConfigInput } from "../../service/config.js";
|
|
2
|
-
/** Result returned from runtime confidence preflight. */
|
|
3
|
-
export interface RuntimeConfidencePreflightResult {
|
|
4
|
-
ok: boolean;
|
|
5
|
-
resolvedApiUrl: string;
|
|
6
|
-
messages: string[];
|
|
7
|
-
}
|
|
8
|
-
/** Evaluate runtime confidence env helper. */
|
|
9
|
-
export declare function evaluateRuntimeConfidenceEnv(env?: AgentServiceConfigInput, resolvedApiUrl?: string): RuntimeConfidencePreflightResult;
|
|
10
|
-
/** Print runtime confidence preflight helper. */
|
|
11
|
-
export declare function printRuntimeConfidencePreflight(result: RuntimeConfidencePreflightResult, output?: Pick<Console, "error" | "log">): void;
|
|
12
|
-
//# sourceMappingURL=preflight.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/testing/live-evals/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAA2B,MAAM,yBAAyB,CAAC;AAEhG,yDAAyD;AACzD,MAAM,WAAW,gCAAgC;IAC/C,EAAE,EAAE,OAAO,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,8CAA8C;AAC9C,wBAAgB,4BAA4B,CAC1C,GAAG,GAAE,uBAA4B,EACjC,cAAc,GAAE,MAAuD,GACtE,gCAAgC,CAoBlC;AAED,iDAAiD;AACjD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,gCAAgC,EACxC,MAAM,GAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,KAAK,CAAW,GAC/C,IAAI,CAKN"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { parseAgentServiceConfig } from "../../service/config.js";
|
|
2
|
-
/** Evaluate runtime confidence env helper. */
|
|
3
|
-
export function evaluateRuntimeConfidenceEnv(env = {}, resolvedApiUrl = parseAgentServiceConfig(env).VERYFRONT_API_URL) {
|
|
4
|
-
const messages = [`Resolved VERYFRONT_API_URL: ${resolvedApiUrl}`];
|
|
5
|
-
let hasBlockers = false;
|
|
6
|
-
if (typeof env.VERYFRONT_TOKEN !== "string" || env.VERYFRONT_TOKEN.length === 0) {
|
|
7
|
-
hasBlockers = true;
|
|
8
|
-
messages.push("BLOCKER: VERYFRONT_TOKEN is missing");
|
|
9
|
-
}
|
|
10
|
-
if (typeof env.AG_UI_EVAL_PROJECT_ID !== "string" || env.AG_UI_EVAL_PROJECT_ID.length === 0) {
|
|
11
|
-
hasBlockers = true;
|
|
12
|
-
messages.push("BLOCKER: AG_UI_EVAL_PROJECT_ID is missing");
|
|
13
|
-
}
|
|
14
|
-
if (!hasBlockers) {
|
|
15
|
-
messages.push("Runtime-confidence preflight: PASS");
|
|
16
|
-
return { ok: true, resolvedApiUrl, messages };
|
|
17
|
-
}
|
|
18
|
-
messages.push("Runtime-confidence preflight: FAIL");
|
|
19
|
-
return { ok: false, resolvedApiUrl, messages };
|
|
20
|
-
}
|
|
21
|
-
/** Print runtime confidence preflight helper. */
|
|
22
|
-
export function printRuntimeConfidencePreflight(result, output = console) {
|
|
23
|
-
for (const message of result.messages) {
|
|
24
|
-
const writer = result.ok ? output.log : output.error;
|
|
25
|
-
writer(message);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { LiveEvalRuntime } from "./performance.js";
|
|
2
|
-
/** Public API contract for live eval case metadata. */
|
|
3
|
-
export interface LiveEvalCaseMetadata {
|
|
4
|
-
tags: readonly string[];
|
|
5
|
-
}
|
|
6
|
-
/** Public API contract for live eval result for report. */
|
|
7
|
-
export interface LiveEvalResultForReport {
|
|
8
|
-
runtime: LiveEvalRuntime;
|
|
9
|
-
status: "pass" | "fail" | "skip";
|
|
10
|
-
}
|
|
11
|
-
/** Input payload for live eval case selection. */
|
|
12
|
-
export interface LiveEvalCaseSelectionInput<TCase extends {
|
|
13
|
-
id: string;
|
|
14
|
-
}> {
|
|
15
|
-
allCases: TCase[];
|
|
16
|
-
readOnlyCases: TCase[];
|
|
17
|
-
writeCases: TCase[];
|
|
18
|
-
experimentalWriteCases: TCase[];
|
|
19
|
-
requestedCaseIds: Set<string>;
|
|
20
|
-
requestedCaseTags?: Set<string>;
|
|
21
|
-
runWriteEvals: boolean;
|
|
22
|
-
runExperimentalWriteEvals: boolean;
|
|
23
|
-
}
|
|
24
|
-
/** Check whether every live eval tag is present. */
|
|
25
|
-
export declare function hasEveryLiveEvalTag(tags: readonly string[], requestedTags: Set<string>): boolean;
|
|
26
|
-
/** Builds live eval case tag summary. */
|
|
27
|
-
export declare function buildLiveEvalCaseTagSummary(cases: readonly {
|
|
28
|
-
metadata?: LiveEvalCaseMetadata;
|
|
29
|
-
}[]): Record<string, number>;
|
|
30
|
-
/** Select live eval cases helper. */
|
|
31
|
-
export declare function selectLiveEvalCases<TCase extends {
|
|
32
|
-
id: string;
|
|
33
|
-
metadata?: LiveEvalCaseMetadata;
|
|
34
|
-
}>(input: LiveEvalCaseSelectionInput<TCase>): TCase[];
|
|
35
|
-
/** Resolves live eval requested case IDs. */
|
|
36
|
-
export declare function resolveLiveEvalRequestedCaseIds(input: {
|
|
37
|
-
caseSets: Record<string, readonly string[]>;
|
|
38
|
-
requestedCaseIds: Set<string>;
|
|
39
|
-
requestedCaseSetId?: string | null;
|
|
40
|
-
}): Set<string>;
|
|
41
|
-
interface LiveEvalRuntimeCounts {
|
|
42
|
-
passed: number;
|
|
43
|
-
failed: number;
|
|
44
|
-
skipped: number;
|
|
45
|
-
}
|
|
46
|
-
/** Builds live eval runtime summary. */
|
|
47
|
-
export declare function buildLiveEvalRuntimeSummary(runtimes: readonly LiveEvalRuntime[], results: LiveEvalResultForReport[]): Record<LiveEvalRuntime, LiveEvalRuntimeCounts>;
|
|
48
|
-
/** Builds live eval status summary. */
|
|
49
|
-
export declare function buildLiveEvalStatusSummary(results: LiveEvalResultForReport[]): {
|
|
50
|
-
passed: number;
|
|
51
|
-
failed: number;
|
|
52
|
-
skipped: number;
|
|
53
|
-
};
|
|
54
|
-
export {};
|
|
55
|
-
//# sourceMappingURL=report.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/testing/live-evals/report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,uDAAuD;AACvD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CACzB;AAED,2DAA2D;AAC3D,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,eAAe,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAClC;AAED,kDAAkD;AAClD,MAAM,WAAW,0BAA0B,CAAC,KAAK,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IACtE,QAAQ,EAAE,KAAK,EAA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AE,SAAS,eAAe,EAAE,EACpC,OAAO,EAAE,uBAAuB,EAAE,GACjC,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAShD;AAED,uCAAuC;AACvC,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,uBAAuB,EAAE,GACjC;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAMA"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/** Check whether every live eval tag is present. */
|
|
2
|
-
export function hasEveryLiveEvalTag(tags, requestedTags) {
|
|
3
|
-
for (const requestedTag of requestedTags) {
|
|
4
|
-
if (!tags.includes(requestedTag)) {
|
|
5
|
-
return false;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
/** Builds live eval case tag summary. */
|
|
11
|
-
export function buildLiveEvalCaseTagSummary(cases) {
|
|
12
|
-
const counts = new Map();
|
|
13
|
-
for (const testCase of cases) {
|
|
14
|
-
const caseTags = testCase.metadata?.tags ?? [];
|
|
15
|
-
for (const tag of caseTags) {
|
|
16
|
-
counts.set(tag, (counts.get(tag) ?? 0) + 1);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return Object.fromEntries([...counts.entries()].sort(([left], [right]) => left.localeCompare(right)));
|
|
20
|
-
}
|
|
21
|
-
/** Select live eval cases helper. */
|
|
22
|
-
export function selectLiveEvalCases(input) {
|
|
23
|
-
const configuredCases = input.runWriteEvals
|
|
24
|
-
? [
|
|
25
|
-
...input.readOnlyCases,
|
|
26
|
-
...input.writeCases,
|
|
27
|
-
...(input.runExperimentalWriteEvals ? input.experimentalWriteCases : []),
|
|
28
|
-
]
|
|
29
|
-
: input.readOnlyCases;
|
|
30
|
-
const selectedCases = input.requestedCaseIds.size > 0
|
|
31
|
-
? input.allCases.filter((testCase) => input.requestedCaseIds.has(testCase.id))
|
|
32
|
-
: configuredCases;
|
|
33
|
-
const requestedCaseTags = input.requestedCaseTags ?? new Set();
|
|
34
|
-
return requestedCaseTags.size > 0
|
|
35
|
-
? selectedCases.filter((testCase) => hasEveryLiveEvalTag(testCase.metadata?.tags ?? [], requestedCaseTags))
|
|
36
|
-
: selectedCases;
|
|
37
|
-
}
|
|
38
|
-
/** Resolves live eval requested case IDs. */
|
|
39
|
-
export function resolveLiveEvalRequestedCaseIds(input) {
|
|
40
|
-
const resolved = new Set(input.requestedCaseIds);
|
|
41
|
-
const requestedCaseSetId = input.requestedCaseSetId?.trim();
|
|
42
|
-
if (!requestedCaseSetId) {
|
|
43
|
-
return resolved;
|
|
44
|
-
}
|
|
45
|
-
const caseIds = input.caseSets[requestedCaseSetId];
|
|
46
|
-
if (!caseIds) {
|
|
47
|
-
throw new Error(`Unknown AG_UI_EVAL_CASE_SET "${requestedCaseSetId}". Known sets: ${Object.keys(input.caseSets).join(", ")}`);
|
|
48
|
-
}
|
|
49
|
-
for (const caseId of caseIds) {
|
|
50
|
-
resolved.add(caseId);
|
|
51
|
-
}
|
|
52
|
-
return resolved;
|
|
53
|
-
}
|
|
54
|
-
function buildRuntimeCounts(results, runtime) {
|
|
55
|
-
return {
|
|
56
|
-
passed: results.filter((result) => result.runtime === runtime && result.status === "pass").length,
|
|
57
|
-
failed: results.filter((result) => result.runtime === runtime && result.status === "fail").length,
|
|
58
|
-
skipped: results.filter((result) => result.runtime === runtime && result.status === "skip").length,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
/** Builds live eval runtime summary. */
|
|
62
|
-
export function buildLiveEvalRuntimeSummary(runtimes, results) {
|
|
63
|
-
const empty = { passed: 0, failed: 0, skipped: 0 };
|
|
64
|
-
const summary = {
|
|
65
|
-
framework: empty,
|
|
66
|
-
};
|
|
67
|
-
for (const runtime of runtimes) {
|
|
68
|
-
summary[runtime] = buildRuntimeCounts(results, runtime);
|
|
69
|
-
}
|
|
70
|
-
return summary;
|
|
71
|
-
}
|
|
72
|
-
/** Builds live eval status summary. */
|
|
73
|
-
export function buildLiveEvalStatusSummary(results) {
|
|
74
|
-
return {
|
|
75
|
-
passed: results.filter((result) => result.status === "pass").length,
|
|
76
|
-
failed: results.filter((result) => result.status === "fail").length,
|
|
77
|
-
skipped: results.filter((result) => result.status === "skip").length,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export interface LiveEvalRequestBody {
|
|
2
|
-
threadId: string;
|
|
3
|
-
runId: string;
|
|
4
|
-
state: Record<string, string>;
|
|
5
|
-
tools: unknown[];
|
|
6
|
-
context: unknown[];
|
|
7
|
-
forwardedProps?: {
|
|
8
|
-
veryfront: Record<string, unknown>;
|
|
9
|
-
};
|
|
10
|
-
messages: Array<{
|
|
11
|
-
id: string;
|
|
12
|
-
role: "user";
|
|
13
|
-
content: string;
|
|
14
|
-
}>;
|
|
15
|
-
}
|
|
16
|
-
/** Input payload for build live eval request body. */
|
|
17
|
-
export interface BuildLiveEvalRequestBodyInput {
|
|
18
|
-
testCaseId: string;
|
|
19
|
-
prompt: string;
|
|
20
|
-
metadata?: Record<string, string>;
|
|
21
|
-
projectId: string | null;
|
|
22
|
-
branchId?: string;
|
|
23
|
-
model?: string;
|
|
24
|
-
conversationId?: string | null;
|
|
25
|
-
allowedTools?: string[];
|
|
26
|
-
forceRuntimeOverrides?: boolean;
|
|
27
|
-
maxSteps?: number;
|
|
28
|
-
}
|
|
29
|
-
/** Builds live eval request body. */
|
|
30
|
-
export declare function buildLiveEvalRequestBody(input: BuildLiveEvalRequestBodyInput): LiveEvalRequestBody;
|
|
31
|
-
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/testing/live-evals/request.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,cAAc,CAAC,EAAE;QACf,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC;IACF,QAAQ,EAAE,KAAK,CAAC;QACd,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ;AAED,sDAAsD;AACtD,MAAM,WAAW,6BAA6B;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qCAAqC;AACrC,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,6BAA6B,GACnC,mBAAmB,CA6CrB"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/** Public API contract for live eval request body. */
|
|
2
|
-
import * as dntShim from "../../../../_dnt.shims.js";
|
|
3
|
-
/** Builds live eval request body. */
|
|
4
|
-
export function buildLiveEvalRequestBody(input) {
|
|
5
|
-
const veryfront = {};
|
|
6
|
-
if (input.projectId) {
|
|
7
|
-
veryfront.projectId = input.projectId;
|
|
8
|
-
}
|
|
9
|
-
if (input.conversationId) {
|
|
10
|
-
veryfront.conversationId = input.conversationId;
|
|
11
|
-
}
|
|
12
|
-
if (input.branchId) {
|
|
13
|
-
veryfront.branchId = input.branchId;
|
|
14
|
-
}
|
|
15
|
-
if (input.model) {
|
|
16
|
-
veryfront.model = input.model;
|
|
17
|
-
}
|
|
18
|
-
if (input.allowedTools || input.forceRuntimeOverrides) {
|
|
19
|
-
veryfront.runtimeOverrides = {
|
|
20
|
-
allowedTools: input.allowedTools ?? [],
|
|
21
|
-
...(input.maxSteps ? { maxSteps: input.maxSteps } : {}),
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
threadId: dntShim.crypto.randomUUID(),
|
|
26
|
-
runId: `eval-run-${dntShim.crypto.randomUUID()}`,
|
|
27
|
-
state: {
|
|
28
|
-
evalCase: input.testCaseId,
|
|
29
|
-
...(input.metadata ?? {}),
|
|
30
|
-
},
|
|
31
|
-
tools: [],
|
|
32
|
-
context: [],
|
|
33
|
-
...(Object.keys(veryfront).length > 0
|
|
34
|
-
? {
|
|
35
|
-
forwardedProps: {
|
|
36
|
-
veryfront,
|
|
37
|
-
},
|
|
38
|
-
}
|
|
39
|
-
: {}),
|
|
40
|
-
messages: [
|
|
41
|
-
{
|
|
42
|
-
id: dntShim.crypto.randomUUID(),
|
|
43
|
-
role: "user",
|
|
44
|
-
content: input.prompt,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
};
|
|
48
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { LiveEvalRuntime } from "./performance.js";
|
|
2
|
-
/** Record shape for live eval result. */
|
|
3
|
-
export interface LiveEvalResultRecord {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
runtime: LiveEvalRuntime;
|
|
7
|
-
status: "pass" | "fail" | "skip";
|
|
8
|
-
details: string;
|
|
9
|
-
durationMs: number;
|
|
10
|
-
conversationId?: string;
|
|
11
|
-
runId?: string;
|
|
12
|
-
artifactPaths?: string[];
|
|
13
|
-
traceSignature?: string;
|
|
14
|
-
toolStarts?: string[];
|
|
15
|
-
toolArgsPreview?: string;
|
|
16
|
-
textPreview?: string;
|
|
17
|
-
}
|
|
18
|
-
/** Result returned from create skipped eval. */
|
|
19
|
-
export declare function createSkippedEvalResult(input: {
|
|
20
|
-
id: string;
|
|
21
|
-
label: string;
|
|
22
|
-
runtime: LiveEvalRuntime;
|
|
23
|
-
details: string;
|
|
24
|
-
startedAt: number;
|
|
25
|
-
}): LiveEvalResultRecord;
|
|
26
|
-
/** Result returned from create failed eval. */
|
|
27
|
-
export declare function createFailedEvalResult(input: {
|
|
28
|
-
id: string;
|
|
29
|
-
label: string;
|
|
30
|
-
runtime: LiveEvalRuntime;
|
|
31
|
-
details: string;
|
|
32
|
-
startedAt: number;
|
|
33
|
-
conversationId?: string;
|
|
34
|
-
runId?: string;
|
|
35
|
-
artifactPaths?: string[];
|
|
36
|
-
traceSignature?: string;
|
|
37
|
-
toolStarts?: string[];
|
|
38
|
-
toolArgsPreview?: string;
|
|
39
|
-
textPreview?: string;
|
|
40
|
-
}): LiveEvalResultRecord;
|
|
41
|
-
/** Result returned from create passed eval. */
|
|
42
|
-
export declare function createPassedEvalResult(input: {
|
|
43
|
-
id: string;
|
|
44
|
-
label: string;
|
|
45
|
-
runtime: LiveEvalRuntime;
|
|
46
|
-
details: string;
|
|
47
|
-
startedAt: number;
|
|
48
|
-
conversationId?: string;
|
|
49
|
-
runId?: string;
|
|
50
|
-
artifactPaths?: string[];
|
|
51
|
-
traceSignature?: string;
|
|
52
|
-
toolStarts?: string[];
|
|
53
|
-
toolArgsPreview?: string;
|
|
54
|
-
textPreview?: string;
|
|
55
|
-
}): LiveEvalResultRecord;
|
|
56
|
-
//# sourceMappingURL=result.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../../../src/src/agent/testing/live-evals/result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEx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EvB;AAED,+CAA+C;AAC/C,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,oBAAoB,CAEvB"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
function createEvalResult(status, input) {
|
|
2
|
-
return {
|
|
3
|
-
id: input.id,
|
|
4
|
-
label: input.label,
|
|
5
|
-
runtime: input.runtime,
|
|
6
|
-
status,
|
|
7
|
-
details: input.details,
|
|
8
|
-
durationMs: Date.now() - input.startedAt,
|
|
9
|
-
...(input.conversationId ? { conversationId: input.conversationId } : {}),
|
|
10
|
-
...(input.runId ? { runId: input.runId } : {}),
|
|
11
|
-
...(input.artifactPaths?.length ? { artifactPaths: input.artifactPaths } : {}),
|
|
12
|
-
...(input.traceSignature ? { traceSignature: input.traceSignature } : {}),
|
|
13
|
-
...(input.toolStarts ? { toolStarts: input.toolStarts } : {}),
|
|
14
|
-
...(input.toolArgsPreview ? { toolArgsPreview: input.toolArgsPreview } : {}),
|
|
15
|
-
...(input.textPreview ? { textPreview: input.textPreview } : {}),
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
/** Result returned from create skipped eval. */
|
|
19
|
-
export function createSkippedEvalResult(input) {
|
|
20
|
-
return {
|
|
21
|
-
id: input.id,
|
|
22
|
-
label: input.label,
|
|
23
|
-
runtime: input.runtime,
|
|
24
|
-
status: "skip",
|
|
25
|
-
details: input.details,
|
|
26
|
-
durationMs: Date.now() - input.startedAt,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
/** Result returned from create failed eval. */
|
|
30
|
-
export function createFailedEvalResult(input) {
|
|
31
|
-
return createEvalResult("fail", input);
|
|
32
|
-
}
|
|
33
|
-
/** Result returned from create passed eval. */
|
|
34
|
-
export function createPassedEvalResult(input) {
|
|
35
|
-
return createEvalResult("pass", input);
|
|
36
|
-
}
|