@uinaf/skillcheck 0.3.0 → 0.3.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 (2) hide show
  1. package/dist/cli.js +2 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -72,8 +72,9 @@ function classifyResult(raw) {
72
72
  const res = root?.results?.results?.[0];
73
73
  if (res === void 0) return { error: "promptfoo output carried no result" };
74
74
  const message = typeof res.error === "string" ? res.error.trim() : "";
75
- if (message !== "") return { error: message };
76
75
  const stats = root?.results?.stats;
76
+ const gradedByStats = stats !== void 0 && (stats.errors ?? 0) === 0 && ((stats.failures ?? 0) > 0 || (stats.successes ?? 0) > 0);
77
+ if (message !== "" && !gradedByStats) return { error: message };
77
78
  if (stats !== void 0 && (stats.errors ?? 0) > 0 && (stats.successes ?? 0) === 0 && (stats.failures ?? 0) === 0) return { error: "promptfoo reported an errored test with nothing graded" };
78
79
  if (typeof res.score !== "number" || typeof res.success !== "boolean") return { error: "promptfoo result carried no usable score" };
79
80
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uinaf/skillcheck",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Lint and eval harness for agent skills",
5
5
  "homepage": "https://github.com/uinaf/skillcheck#readme",
6
6
  "bugs": {