agentv 5.2.0-next.1 → 5.3.1-next.1
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 +22 -20
- package/dist/{artifact-writer-SN6UNL5G.js → artifact-writer-7NBCOAYC.js} +4 -4
- package/dist/{chunk-3X357HS4.js → chunk-ASIGJIOJ.js} +107 -31
- package/dist/chunk-ASIGJIOJ.js.map +1 -0
- package/dist/{chunk-3S6A2RKR.js → chunk-ELCJ23K4.js} +18879 -17538
- package/dist/chunk-ELCJ23K4.js.map +1 -0
- package/dist/{chunk-T4AD3H3Y.js → chunk-LKGARI3W.js} +399 -32
- package/dist/chunk-LKGARI3W.js.map +1 -0
- package/dist/{chunk-ALVZQUZP.js → chunk-LXBI3SPX.js} +142 -14
- package/dist/chunk-LXBI3SPX.js.map +1 -0
- package/dist/{chunk-46K2OET3.js → chunk-RKE7SSET.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/dashboard/assets/{index-DNgf3qJ2.js → index-CbEMiJSb.js} +1 -1
- package/dist/dashboard/assets/{index-r_jSJmlw.js → index-DTA6-l7q.js} +3 -3
- package/dist/dashboard/index.html +1 -1
- package/dist/{dist-DEPJOMCA.js → dist-NMXMI5SK.js} +25 -5
- package/dist/index.js +5 -5
- package/dist/{interactive-36ZNMQB2.js → interactive-BN527UV3.js} +5 -5
- package/dist/skills/agentv-bench/SKILL.md +15 -14
- package/dist/skills/agentv-bench/agents/analyzer.md +2 -2
- package/dist/skills/agentv-bench/agents/comparator.md +3 -3
- package/dist/skills/agentv-bench/agents/executor.md +1 -1
- package/dist/skills/agentv-bench/agents/grader.md +4 -2
- package/dist/skills/agentv-bench/references/autoresearch.md +9 -9
- package/dist/skills/agentv-bench/references/description-optimization.md +5 -6
- package/dist/skills/agentv-bench/references/environment-adaptation.md +6 -6
- package/dist/skills/agentv-bench/references/eval-yaml-spec.md +50 -56
- package/dist/skills/agentv-bench/references/schemas.md +44 -60
- package/dist/skills/agentv-bench/references/subagent-pipeline.md +20 -18
- package/dist/skills/agentv-eval-migrations/SKILL.md +13 -0
- package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +138 -22
- package/dist/skills/agentv-eval-writer/SKILL.md +103 -63
- package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +10 -5
- package/dist/skills/agentv-eval-writer/references/eval.schema.json +749 -2158
- package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +1 -1
- package/dist/{ts-eval-loader-OMG2JBHP-OP5RR7A3.js → ts-eval-loader-2RFVZHCT-7CZ3DCDD.js} +8 -4
- package/package.json +1 -1
- package/dist/chunk-3S6A2RKR.js.map +0 -1
- package/dist/chunk-3X357HS4.js.map +0 -1
- package/dist/chunk-ALVZQUZP.js.map +0 -1
- package/dist/chunk-T4AD3H3Y.js.map +0 -1
- /package/dist/{artifact-writer-SN6UNL5G.js.map → artifact-writer-7NBCOAYC.js.map} +0 -0
- /package/dist/{chunk-46K2OET3.js.map → chunk-RKE7SSET.js.map} +0 -0
- /package/dist/{dist-DEPJOMCA.js.map → dist-NMXMI5SK.js.map} +0 -0
- /package/dist/{interactive-36ZNMQB2.js.map → interactive-BN527UV3.js.map} +0 -0
- /package/dist/{ts-eval-loader-OMG2JBHP-OP5RR7A3.js.map → ts-eval-loader-2RFVZHCT-7CZ3DCDD.js.map} +0 -0
package/README.md
CHANGED
|
@@ -40,18 +40,18 @@ targets:
|
|
|
40
40
|
runtime: host
|
|
41
41
|
config:
|
|
42
42
|
api_format: chat
|
|
43
|
-
base_url:
|
|
44
|
-
api_key:
|
|
45
|
-
model:
|
|
43
|
+
base_url: "{{ env.LOCAL_OPENAI_PROXY_BASE_URL }}"
|
|
44
|
+
api_key: "{{ env.LOCAL_OPENAI_PROXY_API_KEY }}"
|
|
45
|
+
model: "{{ env.LOCAL_OPENAI_PROXY_MODEL }}"
|
|
46
46
|
|
|
47
47
|
graders:
|
|
48
48
|
- id: local-openai-grader
|
|
49
49
|
provider: openai
|
|
50
50
|
config:
|
|
51
51
|
api_format: chat
|
|
52
|
-
base_url:
|
|
53
|
-
api_key:
|
|
54
|
-
model:
|
|
52
|
+
base_url: "{{ env.LOCAL_OPENAI_PROXY_BASE_URL }}"
|
|
53
|
+
api_key: "{{ env.LOCAL_OPENAI_PROXY_API_KEY }}"
|
|
54
|
+
model: "{{ env.LOCAL_OPENAI_PROXY_MODEL }}"
|
|
55
55
|
|
|
56
56
|
defaults:
|
|
57
57
|
target: local-openai
|
|
@@ -110,11 +110,11 @@ tests:
|
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
Plain assertion strings are short-form rubric criteria: AgentV groups them into
|
|
113
|
-
`llm-rubric` and writes
|
|
114
|
-
Dashboard. Use explicit `type: llm-rubric` when you need weights, required
|
|
115
|
-
`score_ranges`,
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
`llm-rubric` and writes grader detail to `grading.json.component_results` for
|
|
114
|
+
the Dashboard. Use explicit `type: llm-rubric` when you need weights, required
|
|
115
|
+
flags, `score_ranges`, a custom grader prompt, a grader target, or output
|
|
116
|
+
transforms; use string `value` for free-form rubric checks. Executable graders
|
|
117
|
+
use `type: script`.
|
|
118
118
|
|
|
119
119
|
The target can be an eval-local object when this eval needs target settings of its own:
|
|
120
120
|
|
|
@@ -128,8 +128,8 @@ target:
|
|
|
128
128
|
runtime: host
|
|
129
129
|
config:
|
|
130
130
|
api_format: chat
|
|
131
|
-
base_url:
|
|
132
|
-
api_key:
|
|
131
|
+
base_url: "{{ env.LOCAL_OPENAI_PROXY_BASE_URL }}"
|
|
132
|
+
api_key: "{{ env.LOCAL_OPENAI_PROXY_API_KEY }}"
|
|
133
133
|
model: gpt-5.4-mini
|
|
134
134
|
evaluate_options:
|
|
135
135
|
repeat:
|
|
@@ -193,14 +193,14 @@ Run bundle layout:
|
|
|
193
193
|
├── 2026-06-30T08-30-00-000Z/ # <run_id> — one committed run bundle
|
|
194
194
|
│ ├── summary.json # run rollup: metadata, pass rate, counts, cost
|
|
195
195
|
│ ├── fizzbuzz--a1b2c3d4/ # <result_dir> for one test/target row
|
|
196
|
-
│ │ ├── summary.json # optional per-case rollup across
|
|
196
|
+
│ │ ├── summary.json # optional per-case rollup across samples
|
|
197
197
|
│ │ ├── test/ # generated test bundle: frozen inputs for reproducibility
|
|
198
198
|
│ │ │ ├── EVAL.yaml # resolved eval spec
|
|
199
199
|
│ │ │ ├── targets.yaml # resolved target config
|
|
200
200
|
│ │ │ └── graders/ # grader files used
|
|
201
201
|
│ │ └── sample-1/ # one materialized sample
|
|
202
|
-
│ │ ├── result.json # compact
|
|
203
|
-
│ │ ├── grading.json #
|
|
202
|
+
│ │ ├── result.json # compact sample manifest
|
|
203
|
+
│ │ ├── grading.json # pass, score, reason, component_results
|
|
204
204
|
│ │ ├── metrics.json # tool calls, transcript stats, behavior metrics
|
|
205
205
|
│ │ ├── transcript.json # normalized agent transcript
|
|
206
206
|
│ │ ├── transcript-raw.jsonl # raw agent output (debugging)
|
|
@@ -240,12 +240,12 @@ const { results, summary } = await evaluate({
|
|
|
240
240
|
console.log(`${summary.passed}/${summary.total} passed`);
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
-
Use `
|
|
243
|
+
Use `*.eval.ts` when you want AgentV to run a TypeScript eval config:
|
|
244
244
|
|
|
245
245
|
```typescript
|
|
246
|
-
import {
|
|
246
|
+
import type { EvalConfig } from '@agentv/sdk';
|
|
247
247
|
|
|
248
|
-
|
|
248
|
+
const config: EvalConfig = {
|
|
249
249
|
description: 'Code generation quality',
|
|
250
250
|
tags: { experiment: 'with-skills' },
|
|
251
251
|
target: {
|
|
@@ -285,7 +285,9 @@ export default defineEval({
|
|
|
285
285
|
],
|
|
286
286
|
},
|
|
287
287
|
],
|
|
288
|
-
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
export default config;
|
|
289
291
|
```
|
|
290
292
|
|
|
291
293
|
## Documentation
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
buildResultIndexArtifact,
|
|
5
5
|
writeArtifactsFromResults,
|
|
6
6
|
writePerTestArtifacts
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-RKE7SSET.js";
|
|
8
|
+
import "./chunk-LXBI3SPX.js";
|
|
9
9
|
import {
|
|
10
10
|
RESULT_INDEX_FILENAME,
|
|
11
11
|
RUN_CONFIG_FILENAME,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
readRunConfigArtifact,
|
|
24
24
|
writeArtifacts,
|
|
25
25
|
writeInitialRunSummaryArtifact
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ELCJ23K4.js";
|
|
27
27
|
import "./chunk-7BGERE6L.js";
|
|
28
28
|
import "./chunk-PEUTJS7B.js";
|
|
29
29
|
import "./chunk-M7BUKBAF.js";
|
|
@@ -50,4 +50,4 @@ export {
|
|
|
50
50
|
writeInitialRunSummaryArtifact,
|
|
51
51
|
writePerTestArtifacts
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=artifact-writer-
|
|
53
|
+
//# sourceMappingURL=artifact-writer-7NBCOAYC.js.map
|
|
@@ -60,16 +60,18 @@ import {
|
|
|
60
60
|
validateEvalFile,
|
|
61
61
|
validateFileReferences,
|
|
62
62
|
validateTargetsFile,
|
|
63
|
+
validateTypeScriptEvalConfigFile,
|
|
63
64
|
validateWorkspacePaths
|
|
64
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-LKGARI3W.js";
|
|
65
66
|
import {
|
|
66
67
|
materializeEvalBundle,
|
|
67
68
|
writeArtifactsFromResults as writeArtifactsFromResults2
|
|
68
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-RKE7SSET.js";
|
|
69
70
|
import {
|
|
70
71
|
discoverClaudeSessions,
|
|
71
72
|
discoverCodexSessions,
|
|
72
73
|
getOutputFilenames,
|
|
74
|
+
loadEnvPathFiles,
|
|
73
75
|
normalizeTraceArtifactToTraceSessionResponse,
|
|
74
76
|
parseClaudeSession,
|
|
75
77
|
parseCodexSession,
|
|
@@ -77,15 +79,18 @@ import {
|
|
|
77
79
|
prepareEvalWorkspace,
|
|
78
80
|
readGitResultArtifact,
|
|
79
81
|
runBeforeSessionHook,
|
|
82
|
+
runEnvFromEntries,
|
|
80
83
|
syncProjects,
|
|
81
84
|
transpileEvalYamlFile,
|
|
82
85
|
trimBaselineResult
|
|
83
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-LXBI3SPX.js";
|
|
84
87
|
import {
|
|
85
88
|
AGENTV_RESULTS_ARTIFACTS_REF,
|
|
86
89
|
DEFAULT_CATEGORY,
|
|
87
90
|
DEFAULT_THRESHOLD,
|
|
88
91
|
EXECUTION_TRACE_SCHEMA_VERSION,
|
|
92
|
+
LEGACY_METRICS_SCHEMA_VERSION,
|
|
93
|
+
METRICS_SCHEMA_VERSION,
|
|
89
94
|
RESULT_INDEX_FILENAME,
|
|
90
95
|
addProject,
|
|
91
96
|
aggregateRunDir,
|
|
@@ -104,12 +109,14 @@ import {
|
|
|
104
109
|
getLocalConfigPath,
|
|
105
110
|
getProject,
|
|
106
111
|
gradePreparedEvalCase,
|
|
112
|
+
isTypeScriptEvalConfigFileName,
|
|
107
113
|
listTargetNames,
|
|
108
114
|
loadConfig,
|
|
109
115
|
loadProjectRegistry,
|
|
110
116
|
loadTestSuite,
|
|
111
117
|
mergeConfigObjects,
|
|
112
118
|
normalizeCategoryPath,
|
|
119
|
+
normalizeMetricsArtifactWire,
|
|
113
120
|
normalizeResultRow,
|
|
114
121
|
omitExternalTraceMetadataKeys,
|
|
115
122
|
parseYamlValue,
|
|
@@ -139,7 +146,7 @@ import {
|
|
|
139
146
|
traceEnvelopeToTranscriptMessages,
|
|
140
147
|
traceFromTranscriptJsonLines,
|
|
141
148
|
writeArtifactsFromResults
|
|
142
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-ELCJ23K4.js";
|
|
143
150
|
import {
|
|
144
151
|
__commonJS,
|
|
145
152
|
__require,
|
|
@@ -12836,8 +12843,10 @@ function formatSummary(results, grading) {
|
|
|
12836
12843
|
let passRate;
|
|
12837
12844
|
if (grading) {
|
|
12838
12845
|
const metadata = grading.metadata ?? {};
|
|
12839
|
-
|
|
12840
|
-
|
|
12846
|
+
const passedSamples = typeof metadata.passed_samples === "number" ? metadata.passed_samples : typeof metadata.pass_count === "number" ? metadata.pass_count : void 0;
|
|
12847
|
+
const totalSamples = typeof metadata.total_samples === "number" ? metadata.total_samples : typeof metadata.sample_count === "number" ? metadata.sample_count : void 0;
|
|
12848
|
+
passed = passedSamples ?? (grading.pass ? total : 0);
|
|
12849
|
+
failed = totalSamples !== void 0 && passedSamples !== void 0 ? totalSamples - passed : total - passed;
|
|
12841
12850
|
passRate = typeof metadata.pass_rate === "number" ? metadata.pass_rate : total > 0 ? Math.round(passed / total * 1e3) / 1e3 : 0;
|
|
12842
12851
|
} else {
|
|
12843
12852
|
passed = results.filter((r) => r.score >= 1).length;
|
|
@@ -12947,6 +12956,44 @@ function validateNoLegacyGradingFields(value, pathLabel) {
|
|
|
12947
12956
|
}
|
|
12948
12957
|
return errors;
|
|
12949
12958
|
}
|
|
12959
|
+
function validateMetricsArtifact(value) {
|
|
12960
|
+
if (!isRecord2(value)) {
|
|
12961
|
+
return [{ severity: "error", message: "metrics.json must be an object" }];
|
|
12962
|
+
}
|
|
12963
|
+
const diagnostics = [];
|
|
12964
|
+
const schemaVersion = value.schema_version;
|
|
12965
|
+
const isCurrentSchema = schemaVersion === METRICS_SCHEMA_VERSION;
|
|
12966
|
+
const isLegacySchema = schemaVersion === LEGACY_METRICS_SCHEMA_VERSION;
|
|
12967
|
+
if (isCurrentSchema && Object.hasOwn(value, "trace")) {
|
|
12968
|
+
diagnostics.push({
|
|
12969
|
+
severity: "error",
|
|
12970
|
+
message: "metrics.json must not include trace in agentv.metrics.v2"
|
|
12971
|
+
});
|
|
12972
|
+
} else if (isLegacySchema && Object.hasOwn(value, "trace")) {
|
|
12973
|
+
diagnostics.push({
|
|
12974
|
+
severity: "warning",
|
|
12975
|
+
message: "metrics.json uses legacy trace identity; readers ignore it"
|
|
12976
|
+
});
|
|
12977
|
+
}
|
|
12978
|
+
if (isCurrentSchema && Object.hasOwn(value, "metrics")) {
|
|
12979
|
+
diagnostics.push({
|
|
12980
|
+
severity: "error",
|
|
12981
|
+
message: "metrics.json must not include nested metrics in agentv.metrics.v2"
|
|
12982
|
+
});
|
|
12983
|
+
} else if (isLegacySchema && Object.hasOwn(value, "metrics")) {
|
|
12984
|
+
diagnostics.push({
|
|
12985
|
+
severity: "warning",
|
|
12986
|
+
message: "metrics.json uses legacy nested metrics; readers flatten it"
|
|
12987
|
+
});
|
|
12988
|
+
}
|
|
12989
|
+
if (!normalizeMetricsArtifactWire(value)) {
|
|
12990
|
+
diagnostics.push({
|
|
12991
|
+
severity: "error",
|
|
12992
|
+
message: "metrics.json does not match a supported metrics artifact shape"
|
|
12993
|
+
});
|
|
12994
|
+
}
|
|
12995
|
+
return diagnostics;
|
|
12996
|
+
}
|
|
12950
12997
|
function checkDirectoryNaming(runDir) {
|
|
12951
12998
|
const dirName = path24.basename(runDir);
|
|
12952
12999
|
const pathSegments = path24.normalize(runDir).split(path24.sep).filter(Boolean);
|
|
@@ -13108,24 +13155,24 @@ function checkArtifactFiles(runDir, entries2) {
|
|
|
13108
13155
|
});
|
|
13109
13156
|
}
|
|
13110
13157
|
}
|
|
13111
|
-
for (const
|
|
13112
|
-
const
|
|
13113
|
-
if (!entry.result_dir || !
|
|
13158
|
+
for (const sample of entry.samples ?? entry.attempts ?? entry.trials ?? []) {
|
|
13159
|
+
const samplePath = sample.sample_path ?? sample.attempt_path ?? sample.run_path;
|
|
13160
|
+
if (!entry.result_dir || !samplePath) {
|
|
13114
13161
|
continue;
|
|
13115
13162
|
}
|
|
13116
|
-
const runDirPath = path24.join(runDir, entry.result_dir,
|
|
13163
|
+
const runDirPath = path24.join(runDir, entry.result_dir, samplePath);
|
|
13117
13164
|
const resultPath = path24.join(runDirPath, "result.json");
|
|
13118
13165
|
const gradingPath = path24.join(runDirPath, "grading.json");
|
|
13119
13166
|
if (!existsSync14(resultPath)) {
|
|
13120
13167
|
diagnostics.push({
|
|
13121
13168
|
severity: "error",
|
|
13122
|
-
message: `${testId}: result.json not found at '${path24.posix.join(entry.result_dir,
|
|
13169
|
+
message: `${testId}: result.json not found at '${path24.posix.join(entry.result_dir, samplePath, "result.json")}'`
|
|
13123
13170
|
});
|
|
13124
13171
|
}
|
|
13125
13172
|
if (!existsSync14(gradingPath)) {
|
|
13126
13173
|
diagnostics.push({
|
|
13127
13174
|
severity: "error",
|
|
13128
|
-
message: `${testId}: grading.json not found at '${path24.posix.join(entry.result_dir,
|
|
13175
|
+
message: `${testId}: grading.json not found at '${path24.posix.join(entry.result_dir, samplePath, "grading.json")}'`
|
|
13129
13176
|
});
|
|
13130
13177
|
}
|
|
13131
13178
|
}
|
|
@@ -13163,6 +13210,21 @@ function checkArtifactFiles(runDir, entries2) {
|
|
|
13163
13210
|
severity: "warning",
|
|
13164
13211
|
message: `${testId}: metrics.json not found at '${entry.metrics_path}'`
|
|
13165
13212
|
});
|
|
13213
|
+
} else {
|
|
13214
|
+
try {
|
|
13215
|
+
const metrics = JSON.parse(readFileSync12(metricsPath, "utf8"));
|
|
13216
|
+
for (const diagnostic of validateMetricsArtifact(metrics)) {
|
|
13217
|
+
diagnostics.push({
|
|
13218
|
+
severity: diagnostic.severity,
|
|
13219
|
+
message: `${testId}: ${diagnostic.message}`
|
|
13220
|
+
});
|
|
13221
|
+
}
|
|
13222
|
+
} catch {
|
|
13223
|
+
diagnostics.push({
|
|
13224
|
+
severity: "error",
|
|
13225
|
+
message: `${testId}: metrics.json is not valid JSON`
|
|
13226
|
+
});
|
|
13227
|
+
}
|
|
13166
13228
|
}
|
|
13167
13229
|
}
|
|
13168
13230
|
}
|
|
@@ -14320,7 +14382,7 @@ function displayPathFromArtifactKey(key, runPath) {
|
|
|
14320
14382
|
function addTrialRunCatalogEntries(entries2, seen, record) {
|
|
14321
14383
|
const resultDir = record.result_dir ? normalizeArtifactRelativePath(record.result_dir) : void 0;
|
|
14322
14384
|
if (!resultDir) return;
|
|
14323
|
-
for (const trial of record.attempts ?? record.trials ?? []) {
|
|
14385
|
+
for (const trial of record.samples ?? record.attempts ?? record.trials ?? []) {
|
|
14324
14386
|
const rawPath = typeof trial.sample_path === "string" ? trial.sample_path : typeof trial.attempt_path === "string" ? trial.attempt_path : trial.run_path;
|
|
14325
14387
|
const runPath = rawPath ? normalizeArtifactRelativePath(rawPath) : void 0;
|
|
14326
14388
|
if (!runPath) continue;
|
|
@@ -14536,10 +14598,10 @@ function caseTrialArtifactPath(resultDir, runPath, filePath) {
|
|
|
14536
14598
|
return path27.posix.join(resultDir, runPath, filePath);
|
|
14537
14599
|
}
|
|
14538
14600
|
function buildRepeatTrialReadModels(baseDir, record) {
|
|
14539
|
-
const
|
|
14540
|
-
if (!
|
|
14601
|
+
const samples = record.samples ?? record.attempts ?? record.trials;
|
|
14602
|
+
if (!samples || samples.length === 0) return void 0;
|
|
14541
14603
|
const resultDir = record.result_dir ? normalizeArtifactRelativePath(record.result_dir) : void 0;
|
|
14542
|
-
return
|
|
14604
|
+
return samples.map((trial) => {
|
|
14543
14605
|
const rawPath = typeof trial.sample_path === "string" ? trial.sample_path : typeof trial.attempt_path === "string" ? trial.attempt_path : trial.run_path;
|
|
14544
14606
|
const runPath = rawPath ? normalizeArtifactRelativePath(rawPath) : void 0;
|
|
14545
14607
|
const metricsPath = caseTrialArtifactPath(resultDir, runPath, "metrics.json");
|
|
@@ -14550,7 +14612,7 @@ function buildRepeatTrialReadModels(baseDir, record) {
|
|
|
14550
14612
|
const answerPath = caseTrialArtifactPath(resultDir, runPath, "outputs/answer.md");
|
|
14551
14613
|
const resultPath = caseTrialArtifactPath(resultDir, runPath, "result.json");
|
|
14552
14614
|
const runResult = readArtifactJsonObject(baseDir, resultPath);
|
|
14553
|
-
const metrics = readArtifactJsonObject(baseDir, metricsPath);
|
|
14615
|
+
const metrics = normalizeMetricsArtifactWire(readArtifactJsonObject(baseDir, metricsPath));
|
|
14554
14616
|
const timing = readArtifactJsonObject(baseDir, timingPath);
|
|
14555
14617
|
const toolCalls = objectField(metrics, "tool_calls");
|
|
14556
14618
|
const tokenUsage = objectField(metrics, "tokens") ?? objectField(timing, "token_usage");
|
|
@@ -14596,7 +14658,7 @@ function attachRunDetailReadModelFields(results, records, baseDir) {
|
|
|
14596
14658
|
return results.map((result, index) => {
|
|
14597
14659
|
const record = records[index];
|
|
14598
14660
|
if (!record) return result;
|
|
14599
|
-
const
|
|
14661
|
+
const samples = buildRepeatTrialReadModels(baseDir, record);
|
|
14600
14662
|
return {
|
|
14601
14663
|
...result,
|
|
14602
14664
|
...record.aggregation && { aggregation: record.aggregation },
|
|
@@ -14611,7 +14673,7 @@ function attachRunDetailReadModelFields(results, records, baseDir) {
|
|
|
14611
14673
|
...record.transcript_raw_path && { transcript_raw_path: record.transcript_raw_path },
|
|
14612
14674
|
...record.output_path && { output_path: record.output_path },
|
|
14613
14675
|
...record.answer_path && { answer_path: record.answer_path },
|
|
14614
|
-
...
|
|
14676
|
+
...samples && { samples }
|
|
14615
14677
|
};
|
|
14616
14678
|
});
|
|
14617
14679
|
}
|
|
@@ -17544,6 +17606,9 @@ async function validateFiles(paths) {
|
|
|
17544
17606
|
}
|
|
17545
17607
|
async function validateSingleFile(filePath) {
|
|
17546
17608
|
const absolutePath = path31.resolve(filePath);
|
|
17609
|
+
if (isTypeScriptEvalConfigFileName(absolutePath)) {
|
|
17610
|
+
return validateTypeScriptEvalConfigFile(absolutePath);
|
|
17611
|
+
}
|
|
17547
17612
|
const fileType = await detectFileType(absolutePath);
|
|
17548
17613
|
let result;
|
|
17549
17614
|
if (fileType === "eval") {
|
|
@@ -17592,12 +17657,14 @@ async function expandPaths(paths) {
|
|
|
17592
17657
|
await access2(absolutePath, constants2.F_OK);
|
|
17593
17658
|
const stats = await stat2(absolutePath);
|
|
17594
17659
|
if (stats.isFile()) {
|
|
17595
|
-
if (isYamlFile(absolutePath)
|
|
17660
|
+
if (isYamlFile(absolutePath) || isTypeScriptEvalConfigFileName(absolutePath)) {
|
|
17661
|
+
expanded.add(absolutePath);
|
|
17662
|
+
}
|
|
17596
17663
|
continue;
|
|
17597
17664
|
}
|
|
17598
17665
|
if (stats.isDirectory()) {
|
|
17599
|
-
const
|
|
17600
|
-
for (const f of
|
|
17666
|
+
const evalFiles = await findEvalFiles(absolutePath);
|
|
17667
|
+
for (const f of evalFiles) expanded.add(f);
|
|
17601
17668
|
continue;
|
|
17602
17669
|
}
|
|
17603
17670
|
} catch {
|
|
@@ -17611,17 +17678,19 @@ async function expandPaths(paths) {
|
|
|
17611
17678
|
dot: false,
|
|
17612
17679
|
followSymbolicLinks: true
|
|
17613
17680
|
});
|
|
17614
|
-
const
|
|
17615
|
-
if (
|
|
17616
|
-
console.warn(
|
|
17681
|
+
const evalMatches = matches.filter((f) => isYamlFile(f) || isTypeScriptEvalConfigFileName(f));
|
|
17682
|
+
if (evalMatches.length === 0) {
|
|
17683
|
+
console.warn(
|
|
17684
|
+
`Warning: No eval YAML or TypeScript config files matched pattern: ${inputPath}`
|
|
17685
|
+
);
|
|
17617
17686
|
}
|
|
17618
|
-
for (const f of
|
|
17687
|
+
for (const f of evalMatches) expanded.add(path31.normalize(f));
|
|
17619
17688
|
}
|
|
17620
17689
|
const sorted = Array.from(expanded);
|
|
17621
17690
|
sorted.sort();
|
|
17622
17691
|
return sorted;
|
|
17623
17692
|
}
|
|
17624
|
-
async function
|
|
17693
|
+
async function findEvalFiles(dirPath) {
|
|
17625
17694
|
const results = [];
|
|
17626
17695
|
try {
|
|
17627
17696
|
const entries2 = await readdir4(dirPath, { withFileTypes: true });
|
|
@@ -17631,9 +17700,9 @@ async function findYamlFiles(dirPath) {
|
|
|
17631
17700
|
if (entry.name === "node_modules" || entry.name.startsWith(".")) {
|
|
17632
17701
|
continue;
|
|
17633
17702
|
}
|
|
17634
|
-
const subFiles = await
|
|
17703
|
+
const subFiles = await findEvalFiles(fullPath);
|
|
17635
17704
|
results.push(...subFiles);
|
|
17636
|
-
} else if (entry.isFile() && isEvalYamlFile(entry.name)) {
|
|
17705
|
+
} else if (entry.isFile() && (isEvalYamlFile(entry.name) || isTypeScriptEvalConfigFileName(entry.name))) {
|
|
17637
17706
|
results.push(fullPath);
|
|
17638
17707
|
}
|
|
17639
17708
|
}
|
|
@@ -17678,7 +17747,7 @@ async function runValidateCommand(paths, maxWarnings) {
|
|
|
17678
17747
|
}
|
|
17679
17748
|
var validateCommand = command({
|
|
17680
17749
|
name: "validate",
|
|
17681
|
-
description: "Validate AgentV eval and targets
|
|
17750
|
+
description: "Validate AgentV eval, TypeScript config, and targets files",
|
|
17682
17751
|
args: {
|
|
17683
17752
|
paths: restPositionals({
|
|
17684
17753
|
type: string,
|
|
@@ -17898,6 +17967,13 @@ ${updateNotice}
|
|
|
17898
17967
|
const cwd = process.cwd();
|
|
17899
17968
|
const repoRoot = await findRepoRoot(cwd);
|
|
17900
17969
|
const sessionConfig = await loadConfig(path32.join(cwd, "_"), repoRoot);
|
|
17970
|
+
const configDir = sessionConfig?.configDir ?? repoRoot;
|
|
17971
|
+
if (sessionConfig?.env_path) {
|
|
17972
|
+
await loadEnvPathFiles(sessionConfig.env_path, configDir);
|
|
17973
|
+
}
|
|
17974
|
+
if (sessionConfig?.env_from) {
|
|
17975
|
+
await runEnvFromEntries(sessionConfig.env_from, { cwd: configDir });
|
|
17976
|
+
}
|
|
17901
17977
|
const beforeSessionCommand = sessionConfig?.hooks?.before_session;
|
|
17902
17978
|
if (beforeSessionCommand) {
|
|
17903
17979
|
runBeforeSessionHook(beforeSessionCommand);
|
|
@@ -17914,4 +17990,4 @@ export {
|
|
|
17914
17990
|
preprocessArgv,
|
|
17915
17991
|
runCli
|
|
17916
17992
|
};
|
|
17917
|
-
//# sourceMappingURL=chunk-
|
|
17993
|
+
//# sourceMappingURL=chunk-ASIGJIOJ.js.map
|