agentv 5.2.0-next.1 → 5.3.0-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 (33) hide show
  1. package/dist/{artifact-writer-SN6UNL5G.js → artifact-writer-JFNIPMKW.js} +4 -4
  2. package/dist/{chunk-3S6A2RKR.js → chunk-6ZZCDZPD.js} +1357 -304
  3. package/dist/chunk-6ZZCDZPD.js.map +1 -0
  4. package/dist/{chunk-46K2OET3.js → chunk-BHKQHG26.js} +2 -2
  5. package/dist/{chunk-T4AD3H3Y.js → chunk-FVR4RQFK.js} +74 -16
  6. package/dist/chunk-FVR4RQFK.js.map +1 -0
  7. package/dist/{chunk-3X357HS4.js → chunk-T32NL3E6.js} +62 -6
  8. package/dist/chunk-T32NL3E6.js.map +1 -0
  9. package/dist/{chunk-ALVZQUZP.js → chunk-V52ATPTT.js} +2 -2
  10. package/dist/cli.js +5 -5
  11. package/dist/{dist-DEPJOMCA.js → dist-6Z7U473R.js} +11 -3
  12. package/dist/index.js +5 -5
  13. package/dist/{interactive-36ZNMQB2.js → interactive-RUY3OCBI.js} +5 -5
  14. package/dist/skills/agentv-bench/SKILL.md +1 -1
  15. package/dist/skills/agentv-bench/agents/analyzer.md +1 -1
  16. package/dist/skills/agentv-bench/agents/comparator.md +3 -3
  17. package/dist/skills/agentv-bench/agents/grader.md +4 -2
  18. package/dist/skills/agentv-bench/references/description-optimization.md +5 -6
  19. package/dist/skills/agentv-bench/references/environment-adaptation.md +2 -2
  20. package/dist/skills/agentv-bench/references/eval-yaml-spec.md +20 -9
  21. package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +100 -2
  22. package/dist/skills/agentv-eval-writer/SKILL.md +27 -16
  23. package/dist/{ts-eval-loader-OMG2JBHP-OP5RR7A3.js → ts-eval-loader-DQDYRULE-V3377FOL.js} +2 -2
  24. package/package.json +1 -1
  25. package/dist/chunk-3S6A2RKR.js.map +0 -1
  26. package/dist/chunk-3X357HS4.js.map +0 -1
  27. package/dist/chunk-T4AD3H3Y.js.map +0 -1
  28. /package/dist/{artifact-writer-SN6UNL5G.js.map → artifact-writer-JFNIPMKW.js.map} +0 -0
  29. /package/dist/{chunk-46K2OET3.js.map → chunk-BHKQHG26.js.map} +0 -0
  30. /package/dist/{chunk-ALVZQUZP.js.map → chunk-V52ATPTT.js.map} +0 -0
  31. /package/dist/{dist-DEPJOMCA.js.map → dist-6Z7U473R.js.map} +0 -0
  32. /package/dist/{interactive-36ZNMQB2.js.map → interactive-RUY3OCBI.js.map} +0 -0
  33. /package/dist/{ts-eval-loader-OMG2JBHP-OP5RR7A3.js.map → ts-eval-loader-DQDYRULE-V3377FOL.js.map} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  toSnakeCaseDeep,
7
7
  writeArtifactsFromResults,
8
8
  writePerTestArtifacts
9
- } from "./chunk-3S6A2RKR.js";
9
+ } from "./chunk-6ZZCDZPD.js";
10
10
 
11
11
  // src/commands/eval/artifact-writer.ts
12
12
  import path2 from "node:path";
@@ -1020,4 +1020,4 @@ export {
1020
1020
  writePerTestArtifacts2 as writePerTestArtifacts,
1021
1021
  writeArtifactsFromResults2 as writeArtifactsFromResults
1022
1022
  };
1023
- //# sourceMappingURL=chunk-46K2OET3.js.map
1023
+ //# sourceMappingURL=chunk-BHKQHG26.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  writeArtifactsFromResults
4
- } from "./chunk-46K2OET3.js";
4
+ } from "./chunk-BHKQHG26.js";
5
5
  import {
6
6
  RunBudgetTracker,
7
7
  buildWipBranchName,
@@ -18,7 +18,7 @@ import {
18
18
  resolveResultsRepoRunsDir,
19
19
  setupWipWorktree,
20
20
  syncResultsRepoForProject
21
- } from "./chunk-ALVZQUZP.js";
21
+ } from "./chunk-V52ATPTT.js";
22
22
  import {
23
23
  AGENTV_LOCAL_CONFIG_FILE_NAME,
24
24
  AGENTV_LOCAL_CONFIG_YML_FILE_NAME,
@@ -59,6 +59,7 @@ import {
59
59
  loadTestSuite,
60
60
  loadTestSuiteFromYamlObject,
61
61
  normalizeComposableConfigGraph,
62
+ normalizeMetricsArtifactWire,
62
63
  normalizeResultRow,
63
64
  normalizeTargetDefinition,
64
65
  parseJsonlResults,
@@ -83,7 +84,7 @@ import {
83
84
  traceEnvelopeToTraceSummary,
84
85
  traceEnvelopeToTranscriptMessages,
85
86
  writeInitialRunSummaryArtifact
86
- } from "./chunk-3S6A2RKR.js";
87
+ } from "./chunk-6ZZCDZPD.js";
87
88
 
88
89
  // src/commands/eval/shared.ts
89
90
  import { constants } from "node:fs";
@@ -346,7 +347,7 @@ async function findRepoRoot(start) {
346
347
  // package.json
347
348
  var package_default = {
348
349
  name: "agentv",
349
- version: "5.2.0-next.1",
350
+ version: "5.3.0-next.1",
350
351
  description: "CLI entry point for AgentV",
351
352
  type: "module",
352
353
  repository: {
@@ -1053,7 +1054,9 @@ function hydrateTrace(baseDir, record, options) {
1053
1054
  }
1054
1055
  function hydrateManifestRecord(baseDir, record, options) {
1055
1056
  const grading = readOptionalJson(baseDir, record.grading_path);
1056
- const metrics = readOptionalJson(baseDir, record.metrics_path);
1057
+ const metrics = normalizeMetricsArtifactWire(
1058
+ readOptionalJson(baseDir, record.metrics_path)
1059
+ );
1057
1060
  const timing = metrics ?? readOptionalJson(baseDir, record.timing_path);
1058
1061
  const testId = record.test_id ?? "unknown";
1059
1062
  const gradingAssertions = grading ? collectComponentAssertions(grading.component_results) : void 0;
@@ -2853,18 +2856,63 @@ var UNSUPPORTED_PROMPTFOO_ASSERTION_TYPES = /* @__PURE__ */ new Set([
2853
2856
  "human",
2854
2857
  "max-score",
2855
2858
  "tool-call-f1",
2856
- "skill-used",
2857
- "trajectory:goal-success",
2858
- "trajectory:tool-args-match",
2859
- "trajectory:step-count",
2860
- "trajectory:tool-sequence",
2861
- "trajectory:tool-used",
2862
2859
  "trace-error-spans",
2863
2860
  "trace-span-count",
2864
2861
  "trace-span-duration",
2865
2862
  "search-rubric",
2866
2863
  "word-count"
2867
2864
  ]);
2865
+ function formatJsonValue(value) {
2866
+ if (typeof value === "string") return value;
2867
+ try {
2868
+ return JSON.stringify(value);
2869
+ } catch {
2870
+ return String(value);
2871
+ }
2872
+ }
2873
+ function hasToolTrajectoryLatencyCheck(value) {
2874
+ const expected = value.expected;
2875
+ return Array.isArray(expected) && expected.some(
2876
+ (item) => isObject(item) && (item.max_duration_ms !== void 0 || item.maxDurationMs !== void 0)
2877
+ );
2878
+ }
2879
+ function staleSkillTriggerMessage(value) {
2880
+ const skill = typeof value.skill === "string" && value.skill.trim() ? value.skill.trim() : "";
2881
+ const shouldTrigger = value.should_trigger !== false;
2882
+ if (!skill) {
2883
+ return "Authored assertion type 'skill-trigger' has been removed. Use 'skill-used' with value: <skill> for expected skill use, or 'not-skill-used' with value: <skill> when the skill must not be used.";
2884
+ }
2885
+ const replacementType = shouldTrigger ? "skill-used" : "not-skill-used";
2886
+ return `Authored assertion type 'skill-trigger' has been removed. Replace skill: ${skill} with type: ${replacementType}, value: ${skill}.`;
2887
+ }
2888
+ function staleToolTrajectoryMessage(value) {
2889
+ const mode = typeof value.mode === "string" ? value.mode : void 0;
2890
+ if (hasToolTrajectoryLatencyCheck(value)) {
2891
+ return "Authored assertion type 'tool-trajectory' has been removed. Per-tool latency checks such as max_duration_ms have no Promptfoo trajectory:* equivalent in AgentV yet; use a custom script assertion or track this as unsupported future scope.";
2892
+ }
2893
+ if (mode === "any_order" && isObject(value.minimums)) {
2894
+ const [toolName, min] = Object.entries(value.minimums)[0] ?? [];
2895
+ const example = typeof toolName === "string" ? ` For example: type: trajectory:tool-used, value: { name: ${toolName}, min: ${formatJsonValue(min)} }.` : "";
2896
+ return `Authored assertion type 'tool-trajectory' has been removed. Replace mode: any_order minimums with one Promptfoo trajectory:tool-used assertion per tool.${example}`;
2897
+ }
2898
+ if ((mode === "in_order" || mode === "exact") && Array.isArray(value.expected)) {
2899
+ const steps = value.expected.filter(isObject).map((item) => item.tool).filter((tool) => typeof tool === "string");
2900
+ const hasArgs = value.expected.some(
2901
+ (item) => isObject(item) && item.args !== void 0 && item.args !== "any"
2902
+ );
2903
+ const sequenceHint = steps.length > 0 ? ` Use type: trajectory:tool-sequence, value: { mode: ${mode}, steps: ${formatJsonValue(steps)} }.` : " Use type: trajectory:tool-sequence with value: { mode, steps }.";
2904
+ const argsHint = hasArgs ? " Move expected args checks to trajectory:tool-args-match with Promptfoo mode: partial or exact." : "";
2905
+ return `Authored assertion type 'tool-trajectory' has been removed.${sequenceHint}${argsHint}`;
2906
+ }
2907
+ return "Authored assertion type 'tool-trajectory' has been removed. Use Promptfoo trajectory:* assertions: trajectory:tool-used for tool presence/counts, trajectory:tool-sequence for in_order/exact steps, and trajectory:tool-args-match for argument checks. AgentV-specific latency checks are unsupported future scope.";
2908
+ }
2909
+ function staleAuthoredAssertionMessage(value) {
2910
+ if (typeof value.type !== "string") return void 0;
2911
+ const type = value.type.replace(/_/g, "-");
2912
+ if (type === "skill-trigger") return staleSkillTriggerMessage(value);
2913
+ if (type === "tool-trajectory") return staleToolTrajectoryMessage(value);
2914
+ return void 0;
2915
+ }
2868
2916
  var VALID_TEST_FILE_EXTENSIONS = /* @__PURE__ */ new Set([
2869
2917
  ".csv",
2870
2918
  ".cjs",
@@ -4611,6 +4659,16 @@ function validateAssertArray(assertField, location, filePath, errors, customAsse
4611
4659
  continue;
4612
4660
  }
4613
4661
  const typeValue = rawTypeValue.replace(/_/g, "-");
4662
+ const staleMessage = staleAuthoredAssertionMessage(item);
4663
+ if (staleMessage) {
4664
+ errors.push({
4665
+ severity: "error",
4666
+ filePath,
4667
+ location: `${itemLocation}.type`,
4668
+ message: staleMessage
4669
+ });
4670
+ continue;
4671
+ }
4614
4672
  const replacement = REMOVED_ASSERTION_TYPE_REPLACEMENTS.get(typeValue);
4615
4673
  if (replacement) {
4616
4674
  errors.push({
@@ -4631,7 +4689,7 @@ function validateAssertArray(assertField, location, filePath, errors, customAsse
4631
4689
  });
4632
4690
  continue;
4633
4691
  }
4634
- if (!isGraderKind(typeValue) && !PROMPTFOO_ASSERTION_TYPES.has(typeValue) && !customAssertionTypes.has(typeValue)) {
4692
+ if (!isGraderKind(typeValue) && !isGraderKind(baseTypeValue) && !PROMPTFOO_ASSERTION_TYPES.has(typeValue) && !customAssertionTypes.has(typeValue)) {
4635
4693
  errors.push({
4636
4694
  severity: "warning",
4637
4695
  filePath,
@@ -7527,7 +7585,7 @@ async function runEvalCommand(input) {
7527
7585
  const resolvedExperiment = resolveExperimentForRun(options.experiment);
7528
7586
  const evalPathInputs = input.testFiles.length > 0 ? [...input.testFiles] : [];
7529
7587
  if (evalPathInputs.length === 0 && process.stdin.isTTY) {
7530
- const { launchInteractiveWizard } = await import("./interactive-36ZNMQB2.js");
7588
+ const { launchInteractiveWizard } = await import("./interactive-RUY3OCBI.js");
7531
7589
  await launchInteractiveWizard();
7532
7590
  return void 0;
7533
7591
  }
@@ -7867,7 +7925,7 @@ async function runEvalCommand(input) {
7867
7925
  });
7868
7926
  let transcriptProviderFactory;
7869
7927
  if (options.transcript) {
7870
- const { TranscriptProvider } = await import("./dist-DEPJOMCA.js");
7928
+ const { TranscriptProvider } = await import("./dist-6Z7U473R.js");
7871
7929
  const transcriptProvider = await TranscriptProvider.fromFile(options.transcript);
7872
7930
  const totalTests = [...fileMetadata.values()].reduce(
7873
7931
  (sum, meta) => sum + meta.testCases.length,
@@ -8133,7 +8191,7 @@ ${formatRequiredVersionFailureNote(requiredVersionCheck)}`);
8133
8191
  const sourceTests = activeSourceTests;
8134
8192
  const taskBundleTargets = buildTaskBundleTargetSelections(activeTestFiles, fileMetadata);
8135
8193
  if (isResumeAppend) {
8136
- const { writePerTestArtifacts } = await import("./artifact-writer-SN6UNL5G.js");
8194
+ const { writePerTestArtifacts } = await import("./artifact-writer-JFNIPMKW.js");
8137
8195
  await writePerTestArtifacts(allResults, runDir, {
8138
8196
  experiment: normalizeExperimentName(options.experiment),
8139
8197
  runId: path12.basename(runDir),
@@ -8351,4 +8409,4 @@ export {
8351
8409
  filterByCategory,
8352
8410
  runEvalCommand
8353
8411
  };
8354
- //# sourceMappingURL=chunk-T4AD3H3Y.js.map
8412
+ //# sourceMappingURL=chunk-FVR4RQFK.js.map