@agentv/core 3.10.1 → 3.10.3

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.
@@ -322,25 +322,7 @@ async function validateEvalFile(filePath) {
322
322
  });
323
323
  }
324
324
  }
325
- let cases = parsed.tests;
326
- if (cases === void 0 && "eval_cases" in parsed) {
327
- cases = parsed.eval_cases;
328
- errors.push({
329
- severity: "warning",
330
- filePath: absolutePath,
331
- location: "eval_cases",
332
- message: "'eval_cases' is deprecated. Use 'tests' instead."
333
- });
334
- }
335
- if (cases === void 0 && "evalcases" in parsed) {
336
- cases = parsed.evalcases;
337
- errors.push({
338
- severity: "warning",
339
- filePath: absolutePath,
340
- location: "evalcases",
341
- message: "'evalcases' is deprecated. Use 'tests' instead."
342
- });
343
- }
325
+ const cases = parsed.tests;
344
326
  if (typeof cases === "string") {
345
327
  validateTestsStringPath(cases, absolutePath, errors);
346
328
  await validateWorkspaceConfig(parsed.workspace, absolutePath, errors, "workspace");
@@ -392,6 +374,19 @@ async function validateEvalFile(filePath) {
392
374
  for (let i = 0; i < cases.length; i++) {
393
375
  const evalCase = cases[i];
394
376
  const location = `tests[${i}]`;
377
+ if (typeof evalCase === "string") {
378
+ if (evalCase.startsWith("file://")) {
379
+ validateTestsStringPath(evalCase, absolutePath, errors);
380
+ } else {
381
+ errors.push({
382
+ severity: "error",
383
+ filePath: absolutePath,
384
+ location,
385
+ message: "Test case string must be a file reference (file://...)"
386
+ });
387
+ }
388
+ continue;
389
+ }
395
390
  if (!isObject(evalCase)) {
396
391
  errors.push({
397
392
  severity: "error",
@@ -605,7 +600,9 @@ function validateMessages(messages, location, filePath, errors) {
605
600
  });
606
601
  }
607
602
  const content = message.content;
608
- if (typeof content === "string") {
603
+ const hasToolCalls = "tool_calls" in message;
604
+ if (content === void 0 && hasToolCalls) {
605
+ } else if (typeof content === "string") {
609
606
  validateContentForRoleMarkers(content, `${msgLocation}.content`, filePath, errors);
610
607
  } else if (Array.isArray(content)) {
611
608
  for (let j = 0; j < content.length; j++) {
@@ -645,12 +642,13 @@ function validateMessages(messages, location, filePath, errors) {
645
642
  });
646
643
  }
647
644
  }
645
+ } else if (isObject(content)) {
648
646
  } else {
649
647
  errors.push({
650
648
  severity: "error",
651
649
  filePath,
652
650
  location: `${msgLocation}.content`,
653
- message: "Missing or invalid 'content' field (must be a string or array)"
651
+ message: "Missing or invalid 'content' field (must be a string, array, or object)"
654
652
  });
655
653
  }
656
654
  }