agentv 3.12.0 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  HtmlWriter,
4
- LEGACY_RESULTS_FILENAME,
5
4
  RESULT_INDEX_FILENAME,
6
5
  detectFileType,
7
6
  findRepoRoot,
@@ -22,7 +21,7 @@ import {
22
21
  validateFileReferences,
23
22
  validateTargetsFile,
24
23
  writeArtifactsFromResults
25
- } from "./chunk-VLOFRXH4.js";
24
+ } from "./chunk-6H4IAXQH.js";
26
25
  import {
27
26
  createBuiltinRegistry,
28
27
  executeScript,
@@ -39,7 +38,7 @@ import {
39
38
  toSnakeCaseDeep as toSnakeCaseDeep2,
40
39
  transpileEvalYamlFile,
41
40
  trimBaselineResult
42
- } from "./chunk-UYBLUYHN.js";
41
+ } from "./chunk-7OHZAFND.js";
43
42
  import {
44
43
  __commonJS,
45
44
  __esm,
@@ -4126,11 +4125,6 @@ var evalRunCommand = command({
4126
4125
  long: "otel-file",
4127
4126
  description: "Write OTLP JSON trace to file (importable by OTel backends)"
4128
4127
  }),
4129
- traceFile: option({
4130
- type: optional(string),
4131
- long: "trace-file",
4132
- description: "Write human-readable trace JSONL to file"
4133
- }),
4134
4128
  exportOtel: flag({
4135
4129
  long: "export-otel",
4136
4130
  description: "Export evaluation traces via OTLP/HTTP to configured endpoint"
@@ -4185,7 +4179,7 @@ var evalRunCommand = command({
4185
4179
  },
4186
4180
  handler: async (args) => {
4187
4181
  if (args.evalPaths.length === 0 && process.stdin.isTTY) {
4188
- const { launchInteractiveWizard } = await import("./interactive-5X62YEEX.js");
4182
+ const { launchInteractiveWizard } = await import("./interactive-RV664PCR.js");
4189
4183
  await launchInteractiveWizard();
4190
4184
  return;
4191
4185
  }
@@ -4211,7 +4205,6 @@ var evalRunCommand = command({
4211
4205
  workspacePath: args.workspacePath,
4212
4206
  trace: false,
4213
4207
  otelFile: args.otelFile,
4214
- traceFile: args.traceFile,
4215
4208
  exportOtel: args.exportOtel,
4216
4209
  otelBackend: args.otelBackend,
4217
4210
  otelCaptureContent: args.otelCaptureContent,
@@ -4866,12 +4859,6 @@ function loadResultFile(filePath) {
4866
4859
  return loadJsonlRecords(resolvedFilePath);
4867
4860
  }
4868
4861
  function resolveTraceResultPath(filePath) {
4869
- if (path6.basename(filePath) === LEGACY_RESULTS_FILENAME) {
4870
- return filePath;
4871
- }
4872
- if (!filePath.endsWith(".jsonl") && !filePath.endsWith(".json")) {
4873
- return resolveWorkspaceOrFilePath(filePath);
4874
- }
4875
4862
  return resolveWorkspaceOrFilePath(filePath);
4876
4863
  }
4877
4864
  function loadJsonlRecords(filePath) {
@@ -4945,7 +4932,9 @@ function loadOtlpTraceFile(filePath) {
4945
4932
  }
4946
4933
  }
4947
4934
  const roots = spans.filter((span) => !span.parentSpanId || !spanMap.has(span.parentSpanId));
4948
- return roots.map((root, index) => {
4935
+ const supportedRoots = roots.filter(isAgentvEvalRoot);
4936
+ const candidateRoots = supportedRoots.length > 0 ? supportedRoots : roots;
4937
+ return candidateRoots.map((root, index) => {
4949
4938
  const descendants = collectChildSpans(root.spanId, childMap);
4950
4939
  const rootAttrs = parseOtlpAttributes(root.attributes);
4951
4940
  const parsedDescendants = descendants.map((span) => ({
@@ -5044,6 +5033,10 @@ function loadOtlpTraceFile(filePath) {
5044
5033
  };
5045
5034
  });
5046
5035
  }
5036
+ function isAgentvEvalRoot(span) {
5037
+ const attrs = parseOtlpAttributes(span.attributes);
5038
+ return span.name === "agentv.eval" || numberAttr(attrs.agentv_score) !== void 0 || typeof stringAttr(attrs.agentv_test_id) === "string";
5039
+ }
5047
5040
  function collectChildSpans(spanId, childMap) {
5048
5041
  if (!spanId) return [];
5049
5042
  const direct = childMap.get(spanId) ?? [];
@@ -5317,8 +5310,7 @@ var resultsExportCommand = command({
5317
5310
  const { results } = await loadResults(source, cwd);
5318
5311
  const outputDir = out ? path7.isAbsolute(out) ? out : path7.resolve(cwd, out) : deriveOutputDir(cwd, sourceFile);
5319
5312
  await writeArtifactsFromResults(results, outputDir, {
5320
- evalFile: sourceFile,
5321
- writeLegacyResults: false
5313
+ evalFile: sourceFile
5322
5314
  });
5323
5315
  console.log(`Exported ${results.length} test(s) to ${outputDir}`);
5324
5316
  for (const result of results) {
@@ -6640,7 +6632,7 @@ var traceScoreCommand = command({
6640
6632
  );
6641
6633
  if (!hasTrace) {
6642
6634
  console.error(
6643
- `${c2.red}Error:${c2.reset} Source lacks trace metrics. Export a trace file with ${c2.bold}--trace-file${c2.reset} or ${c2.bold}--otel-file${c2.reset}.`
6635
+ `${c2.red}Error:${c2.reset} Source lacks trace metrics. Use an OTLP trace export via ${c2.bold}--otel-file${c2.reset} or a run manifest with summary metrics in ${c2.bold}index.jsonl${c2.reset}.`
6644
6636
  );
6645
6637
  process.exit(1);
6646
6638
  }
@@ -7761,4 +7753,4 @@ export {
7761
7753
  preprocessArgv,
7762
7754
  runCli
7763
7755
  };
7764
- //# sourceMappingURL=chunk-2ELQ6F3C.js.map
7756
+ //# sourceMappingURL=chunk-DJU4C6NS.js.map