agentv 5.3.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.
Files changed (43) hide show
  1. package/README.md +22 -20
  2. package/dist/{artifact-writer-JFNIPMKW.js → artifact-writer-7NBCOAYC.js} +4 -4
  3. package/dist/{chunk-T32NL3E6.js → chunk-ASIGJIOJ.js} +50 -30
  4. package/dist/chunk-ASIGJIOJ.js.map +1 -0
  5. package/dist/{chunk-6ZZCDZPD.js → chunk-ELCJ23K4.js} +12766 -12478
  6. package/dist/chunk-ELCJ23K4.js.map +1 -0
  7. package/dist/{chunk-FVR4RQFK.js → chunk-LKGARI3W.js} +333 -24
  8. package/dist/chunk-LKGARI3W.js.map +1 -0
  9. package/dist/{chunk-V52ATPTT.js → chunk-LXBI3SPX.js} +142 -14
  10. package/dist/chunk-LXBI3SPX.js.map +1 -0
  11. package/dist/{chunk-BHKQHG26.js → chunk-RKE7SSET.js} +2 -2
  12. package/dist/cli.js +5 -5
  13. package/dist/dashboard/assets/{index-DNgf3qJ2.js → index-CbEMiJSb.js} +1 -1
  14. package/dist/dashboard/assets/{index-r_jSJmlw.js → index-DTA6-l7q.js} +3 -3
  15. package/dist/dashboard/index.html +1 -1
  16. package/dist/{dist-6Z7U473R.js → dist-NMXMI5SK.js} +17 -5
  17. package/dist/index.js +5 -5
  18. package/dist/{interactive-RUY3OCBI.js → interactive-BN527UV3.js} +5 -5
  19. package/dist/skills/agentv-bench/SKILL.md +14 -13
  20. package/dist/skills/agentv-bench/agents/analyzer.md +1 -1
  21. package/dist/skills/agentv-bench/agents/executor.md +1 -1
  22. package/dist/skills/agentv-bench/references/autoresearch.md +9 -9
  23. package/dist/skills/agentv-bench/references/environment-adaptation.md +4 -4
  24. package/dist/skills/agentv-bench/references/eval-yaml-spec.md +30 -47
  25. package/dist/skills/agentv-bench/references/schemas.md +44 -60
  26. package/dist/skills/agentv-bench/references/subagent-pipeline.md +20 -18
  27. package/dist/skills/agentv-eval-migrations/SKILL.md +13 -0
  28. package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +39 -21
  29. package/dist/skills/agentv-eval-writer/SKILL.md +75 -46
  30. package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +10 -5
  31. package/dist/skills/agentv-eval-writer/references/eval.schema.json +749 -2158
  32. package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +1 -1
  33. package/dist/{ts-eval-loader-DQDYRULE-V3377FOL.js → ts-eval-loader-2RFVZHCT-7CZ3DCDD.js} +8 -4
  34. package/package.json +1 -1
  35. package/dist/chunk-6ZZCDZPD.js.map +0 -1
  36. package/dist/chunk-FVR4RQFK.js.map +0 -1
  37. package/dist/chunk-T32NL3E6.js.map +0 -1
  38. package/dist/chunk-V52ATPTT.js.map +0 -1
  39. /package/dist/{artifact-writer-JFNIPMKW.js.map → artifact-writer-7NBCOAYC.js.map} +0 -0
  40. /package/dist/{chunk-BHKQHG26.js.map → chunk-RKE7SSET.js.map} +0 -0
  41. /package/dist/{dist-6Z7U473R.js.map → dist-NMXMI5SK.js.map} +0 -0
  42. /package/dist/{interactive-RUY3OCBI.js.map → interactive-BN527UV3.js.map} +0 -0
  43. /package/dist/{ts-eval-loader-DQDYRULE-V3377FOL.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: ${{ LOCAL_OPENAI_PROXY_BASE_URL }}
44
- api_key: ${{ LOCAL_OPENAI_PROXY_API_KEY }}
45
- model: ${{ LOCAL_OPENAI_PROXY_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: ${{ LOCAL_OPENAI_PROXY_BASE_URL }}
53
- api_key: ${{ LOCAL_OPENAI_PROXY_API_KEY }}
54
- model: ${{ LOCAL_OPENAI_PROXY_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 each criterion to `grading.json.assertion_results` for the
114
- Dashboard. Use explicit `type: llm-rubric` when you need weights, required flags, or
115
- `score_ranges`, or when you need a custom grader prompt, grader target, or
116
- output transforms; use string `value` for free-form rubric checks. Executable
117
- graders use `type: script`.
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: ${{ LOCAL_OPENAI_PROXY_BASE_URL }}
132
- api_key: ${{ LOCAL_OPENAI_PROXY_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 attempts
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 attempt manifest
203
- │ │ ├── grading.json # assertion_results and grader evidence
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 `defineEval()` when you want AgentV to run the TypeScript eval file:
243
+ Use `*.eval.ts` when you want AgentV to run a TypeScript eval config:
244
244
 
245
245
  ```typescript
246
- import { defineEval } from '@agentv/sdk';
246
+ import type { EvalConfig } from '@agentv/sdk';
247
247
 
248
- export default defineEval({
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-BHKQHG26.js";
8
- import "./chunk-V52ATPTT.js";
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-6ZZCDZPD.js";
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-JFNIPMKW.js.map
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-FVR4RQFK.js";
65
+ } from "./chunk-LKGARI3W.js";
65
66
  import {
66
67
  materializeEvalBundle,
67
68
  writeArtifactsFromResults as writeArtifactsFromResults2
68
- } from "./chunk-BHKQHG26.js";
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,10 +79,11 @@ import {
77
79
  prepareEvalWorkspace,
78
80
  readGitResultArtifact,
79
81
  runBeforeSessionHook,
82
+ runEnvFromEntries,
80
83
  syncProjects,
81
84
  transpileEvalYamlFile,
82
85
  trimBaselineResult
83
- } from "./chunk-V52ATPTT.js";
86
+ } from "./chunk-LXBI3SPX.js";
84
87
  import {
85
88
  AGENTV_RESULTS_ARTIFACTS_REF,
86
89
  DEFAULT_CATEGORY,
@@ -106,6 +109,7 @@ import {
106
109
  getLocalConfigPath,
107
110
  getProject,
108
111
  gradePreparedEvalCase,
112
+ isTypeScriptEvalConfigFileName,
109
113
  listTargetNames,
110
114
  loadConfig,
111
115
  loadProjectRegistry,
@@ -142,7 +146,7 @@ import {
142
146
  traceEnvelopeToTranscriptMessages,
143
147
  traceFromTranscriptJsonLines,
144
148
  writeArtifactsFromResults
145
- } from "./chunk-6ZZCDZPD.js";
149
+ } from "./chunk-ELCJ23K4.js";
146
150
  import {
147
151
  __commonJS,
148
152
  __require,
@@ -12839,8 +12843,10 @@ function formatSummary(results, grading) {
12839
12843
  let passRate;
12840
12844
  if (grading) {
12841
12845
  const metadata = grading.metadata ?? {};
12842
- passed = typeof metadata.pass_count === "number" ? metadata.pass_count : grading.pass ? total : 0;
12843
- failed = typeof metadata.sample_count === "number" && typeof metadata.pass_count === "number" ? metadata.sample_count - metadata.pass_count : total - passed;
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;
12844
12850
  passRate = typeof metadata.pass_rate === "number" ? metadata.pass_rate : total > 0 ? Math.round(passed / total * 1e3) / 1e3 : 0;
12845
12851
  } else {
12846
12852
  passed = results.filter((r) => r.score >= 1).length;
@@ -13149,24 +13155,24 @@ function checkArtifactFiles(runDir, entries2) {
13149
13155
  });
13150
13156
  }
13151
13157
  }
13152
- for (const attempt of entry.attempts ?? entry.trials ?? []) {
13153
- const attemptPath = attempt.attempt_path ?? attempt.run_path;
13154
- if (!entry.result_dir || !attemptPath) {
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) {
13155
13161
  continue;
13156
13162
  }
13157
- const runDirPath = path24.join(runDir, entry.result_dir, attemptPath);
13163
+ const runDirPath = path24.join(runDir, entry.result_dir, samplePath);
13158
13164
  const resultPath = path24.join(runDirPath, "result.json");
13159
13165
  const gradingPath = path24.join(runDirPath, "grading.json");
13160
13166
  if (!existsSync14(resultPath)) {
13161
13167
  diagnostics.push({
13162
13168
  severity: "error",
13163
- message: `${testId}: result.json not found at '${path24.posix.join(entry.result_dir, attemptPath, "result.json")}'`
13169
+ message: `${testId}: result.json not found at '${path24.posix.join(entry.result_dir, samplePath, "result.json")}'`
13164
13170
  });
13165
13171
  }
13166
13172
  if (!existsSync14(gradingPath)) {
13167
13173
  diagnostics.push({
13168
13174
  severity: "error",
13169
- message: `${testId}: grading.json not found at '${path24.posix.join(entry.result_dir, attemptPath, "grading.json")}'`
13175
+ message: `${testId}: grading.json not found at '${path24.posix.join(entry.result_dir, samplePath, "grading.json")}'`
13170
13176
  });
13171
13177
  }
13172
13178
  }
@@ -14376,7 +14382,7 @@ function displayPathFromArtifactKey(key, runPath) {
14376
14382
  function addTrialRunCatalogEntries(entries2, seen, record) {
14377
14383
  const resultDir = record.result_dir ? normalizeArtifactRelativePath(record.result_dir) : void 0;
14378
14384
  if (!resultDir) return;
14379
- for (const trial of record.attempts ?? record.trials ?? []) {
14385
+ for (const trial of record.samples ?? record.attempts ?? record.trials ?? []) {
14380
14386
  const rawPath = typeof trial.sample_path === "string" ? trial.sample_path : typeof trial.attempt_path === "string" ? trial.attempt_path : trial.run_path;
14381
14387
  const runPath = rawPath ? normalizeArtifactRelativePath(rawPath) : void 0;
14382
14388
  if (!runPath) continue;
@@ -14592,10 +14598,10 @@ function caseTrialArtifactPath(resultDir, runPath, filePath) {
14592
14598
  return path27.posix.join(resultDir, runPath, filePath);
14593
14599
  }
14594
14600
  function buildRepeatTrialReadModels(baseDir, record) {
14595
- const attempts = record.attempts ?? record.trials;
14596
- if (!attempts || attempts.length === 0) return void 0;
14601
+ const samples = record.samples ?? record.attempts ?? record.trials;
14602
+ if (!samples || samples.length === 0) return void 0;
14597
14603
  const resultDir = record.result_dir ? normalizeArtifactRelativePath(record.result_dir) : void 0;
14598
- return attempts.map((trial) => {
14604
+ return samples.map((trial) => {
14599
14605
  const rawPath = typeof trial.sample_path === "string" ? trial.sample_path : typeof trial.attempt_path === "string" ? trial.attempt_path : trial.run_path;
14600
14606
  const runPath = rawPath ? normalizeArtifactRelativePath(rawPath) : void 0;
14601
14607
  const metricsPath = caseTrialArtifactPath(resultDir, runPath, "metrics.json");
@@ -14652,7 +14658,7 @@ function attachRunDetailReadModelFields(results, records, baseDir) {
14652
14658
  return results.map((result, index) => {
14653
14659
  const record = records[index];
14654
14660
  if (!record) return result;
14655
- const attempts = buildRepeatTrialReadModels(baseDir, record);
14661
+ const samples = buildRepeatTrialReadModels(baseDir, record);
14656
14662
  return {
14657
14663
  ...result,
14658
14664
  ...record.aggregation && { aggregation: record.aggregation },
@@ -14667,7 +14673,7 @@ function attachRunDetailReadModelFields(results, records, baseDir) {
14667
14673
  ...record.transcript_raw_path && { transcript_raw_path: record.transcript_raw_path },
14668
14674
  ...record.output_path && { output_path: record.output_path },
14669
14675
  ...record.answer_path && { answer_path: record.answer_path },
14670
- ...attempts && { attempts }
14676
+ ...samples && { samples }
14671
14677
  };
14672
14678
  });
14673
14679
  }
@@ -17600,6 +17606,9 @@ async function validateFiles(paths) {
17600
17606
  }
17601
17607
  async function validateSingleFile(filePath) {
17602
17608
  const absolutePath = path31.resolve(filePath);
17609
+ if (isTypeScriptEvalConfigFileName(absolutePath)) {
17610
+ return validateTypeScriptEvalConfigFile(absolutePath);
17611
+ }
17603
17612
  const fileType = await detectFileType(absolutePath);
17604
17613
  let result;
17605
17614
  if (fileType === "eval") {
@@ -17648,12 +17657,14 @@ async function expandPaths(paths) {
17648
17657
  await access2(absolutePath, constants2.F_OK);
17649
17658
  const stats = await stat2(absolutePath);
17650
17659
  if (stats.isFile()) {
17651
- if (isYamlFile(absolutePath)) expanded.add(absolutePath);
17660
+ if (isYamlFile(absolutePath) || isTypeScriptEvalConfigFileName(absolutePath)) {
17661
+ expanded.add(absolutePath);
17662
+ }
17652
17663
  continue;
17653
17664
  }
17654
17665
  if (stats.isDirectory()) {
17655
- const yamlFiles = await findYamlFiles(absolutePath);
17656
- for (const f of yamlFiles) expanded.add(f);
17666
+ const evalFiles = await findEvalFiles(absolutePath);
17667
+ for (const f of evalFiles) expanded.add(f);
17657
17668
  continue;
17658
17669
  }
17659
17670
  } catch {
@@ -17667,17 +17678,19 @@ async function expandPaths(paths) {
17667
17678
  dot: false,
17668
17679
  followSymbolicLinks: true
17669
17680
  });
17670
- const yamlMatches = matches.filter((f) => isYamlFile(f));
17671
- if (yamlMatches.length === 0) {
17672
- console.warn(`Warning: No YAML files matched pattern: ${inputPath}`);
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
+ );
17673
17686
  }
17674
- for (const f of yamlMatches) expanded.add(path31.normalize(f));
17687
+ for (const f of evalMatches) expanded.add(path31.normalize(f));
17675
17688
  }
17676
17689
  const sorted = Array.from(expanded);
17677
17690
  sorted.sort();
17678
17691
  return sorted;
17679
17692
  }
17680
- async function findYamlFiles(dirPath) {
17693
+ async function findEvalFiles(dirPath) {
17681
17694
  const results = [];
17682
17695
  try {
17683
17696
  const entries2 = await readdir4(dirPath, { withFileTypes: true });
@@ -17687,9 +17700,9 @@ async function findYamlFiles(dirPath) {
17687
17700
  if (entry.name === "node_modules" || entry.name.startsWith(".")) {
17688
17701
  continue;
17689
17702
  }
17690
- const subFiles = await findYamlFiles(fullPath);
17703
+ const subFiles = await findEvalFiles(fullPath);
17691
17704
  results.push(...subFiles);
17692
- } else if (entry.isFile() && isEvalYamlFile(entry.name)) {
17705
+ } else if (entry.isFile() && (isEvalYamlFile(entry.name) || isTypeScriptEvalConfigFileName(entry.name))) {
17693
17706
  results.push(fullPath);
17694
17707
  }
17695
17708
  }
@@ -17734,7 +17747,7 @@ async function runValidateCommand(paths, maxWarnings) {
17734
17747
  }
17735
17748
  var validateCommand = command({
17736
17749
  name: "validate",
17737
- description: "Validate AgentV eval and targets YAML files",
17750
+ description: "Validate AgentV eval, TypeScript config, and targets files",
17738
17751
  args: {
17739
17752
  paths: restPositionals({
17740
17753
  type: string,
@@ -17954,6 +17967,13 @@ ${updateNotice}
17954
17967
  const cwd = process.cwd();
17955
17968
  const repoRoot = await findRepoRoot(cwd);
17956
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
+ }
17957
17977
  const beforeSessionCommand = sessionConfig?.hooks?.before_session;
17958
17978
  if (beforeSessionCommand) {
17959
17979
  runBeforeSessionHook(beforeSessionCommand);
@@ -17970,4 +17990,4 @@ export {
17970
17990
  preprocessArgv,
17971
17991
  runCli
17972
17992
  };
17973
- //# sourceMappingURL=chunk-T32NL3E6.js.map
17993
+ //# sourceMappingURL=chunk-ASIGJIOJ.js.map