@agentv/core 4.25.2-next.1 → 4.25.3-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.
package/dist/index.cjs CHANGED
@@ -5351,7 +5351,6 @@ var init_code_grader = __esm({
5351
5351
  const rawParsed = parseJsonSafe(stdout);
5352
5352
  const parsed = rawParsed != null && typeof rawParsed === "object" && !Array.isArray(rawParsed) ? rawParsed : void 0;
5353
5353
  const passed = exitCode === 0;
5354
- const score = parsed != null ? clampScore(typeof parsed.score === "number" ? parsed.score : 0) : passed ? 1 : 0;
5355
5354
  const assertions = parsed != null && Array.isArray(parsed?.assertions) ? parsed.assertions.filter(
5356
5355
  (a) => typeof a === "object" && a !== null && typeof a.text === "string"
5357
5356
  ).map((a) => ({
@@ -5359,6 +5358,9 @@ var init_code_grader = __esm({
5359
5358
  passed: Boolean(a.passed),
5360
5359
  ...typeof a.evidence === "string" ? { evidence: a.evidence } : {}
5361
5360
  })) : parsed == null ? [{ text: stdout.trim() || (passed ? "exit 0" : `exit ${exitCode}`), passed }] : [];
5361
+ const score = parsed != null ? clampScore(
5362
+ typeof parsed.score === "number" ? parsed.score : assertions.length > 0 ? assertions.filter((a) => a.passed).length / assertions.length : 0
5363
+ ) : passed ? 1 : 0;
5362
5364
  const details = parsed?.details && typeof parsed.details === "object" && !Array.isArray(parsed.details) ? parsed.details : void 0;
5363
5365
  const proxyUsage = getProxyUsage?.();
5364
5366
  const graderRawRequest = {