@agentv/core 3.0.0-next.1 → 3.2.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.
package/dist/index.js CHANGED
@@ -2467,9 +2467,10 @@ function expandInputFilesShorthand(inputFiles, inputText) {
2467
2467
  ];
2468
2468
  return [{ role: "user", content: contentBlocks }];
2469
2469
  }
2470
- function resolveInputMessages(raw) {
2471
- if (raw.input_files !== void 0) {
2472
- return expandInputFilesShorthand(raw.input_files, raw.input);
2470
+ function resolveInputMessages(raw, suiteInputFiles) {
2471
+ const effectiveInputFiles = raw.input_files ?? suiteInputFiles;
2472
+ if (effectiveInputFiles !== void 0) {
2473
+ return expandInputFilesShorthand(effectiveInputFiles, raw.input);
2473
2474
  }
2474
2475
  return expandInputShorthand(raw.input);
2475
2476
  }
@@ -3055,6 +3056,7 @@ async function loadTestsFromYaml(evalFilePath, repoRoot, options) {
3055
3056
  }
3056
3057
  const suiteWorkspace = await resolveWorkspaceConfig(suite.workspace, evalFileDir);
3057
3058
  const suiteInputMessages = expandInputShorthand(suite.input);
3059
+ const suiteInputFiles = suite.input_files;
3058
3060
  const rawGlobalExecution = isJsonObject(suite.execution) ? suite.execution : void 0;
3059
3061
  const _globalTarget = asString6(rawGlobalExecution?.target) ?? asString6(suite.target);
3060
3062
  const suiteAssertions = suite.assertions ?? suite.assert;
@@ -3083,7 +3085,10 @@ async function loadTestsFromYaml(evalFilePath, repoRoot, options) {
3083
3085
  );
3084
3086
  }
3085
3087
  }
3086
- const testInputMessages = resolveInputMessages(evalcase);
3088
+ const caseExecution = isJsonObject(evalcase.execution) ? evalcase.execution : void 0;
3089
+ const skipDefaults = caseExecution?.skip_defaults === true;
3090
+ const effectiveSuiteInputFiles = suiteInputFiles && !skipDefaults ? suiteInputFiles : void 0;
3091
+ const testInputMessages = resolveInputMessages(evalcase, effectiveSuiteInputFiles);
3087
3092
  const expectedMessages = resolveExpectedMessages(evalcase) ?? [];
3088
3093
  const hasEvaluationSpec = !!outcome || expectedMessages.length > 0 || evalcase.assertions !== void 0 || evalcase.assert !== void 0;
3089
3094
  if (!id || !hasEvaluationSpec || !testInputMessages || testInputMessages.length === 0) {
@@ -3092,8 +3097,6 @@ async function loadTestsFromYaml(evalFilePath, repoRoot, options) {
3092
3097
  );
3093
3098
  continue;
3094
3099
  }
3095
- const caseExecution = isJsonObject(evalcase.execution) ? evalcase.execution : void 0;
3096
- const skipDefaults = caseExecution?.skip_defaults === true;
3097
3100
  const effectiveSuiteInputMessages = suiteInputMessages && !skipDefaults ? suiteInputMessages : void 0;
3098
3101
  const inputMessages = effectiveSuiteInputMessages ? [...effectiveSuiteInputMessages, ...testInputMessages] : testInputMessages;
3099
3102
  const hasExpectedMessages = expectedMessages.length > 0;