@fede0089/skill-eval 3.2.0 → 3.3.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/README.md +37 -6
- package/dist/commands/functional.js +5 -8
- package/dist/commands/trigger.js +4 -7
- package/dist/core/anomalies.js +63 -0
- package/dist/core/eval-runner.js +28 -12
- package/dist/core/statistics.js +11 -8
- package/dist/core/trial-utils.js +45 -1
- package/dist/index.js +1 -1
- package/dist/reporters/html-reporter.js +970 -324
- package/dist/reporters/index.js +0 -1
- package/dist/utils/ndjson.js +19 -0
- package/package.json +1 -1
- package/dist/reporters/json-reporter.js +0 -10
package/dist/reporters/index.js
CHANGED
package/dist/utils/ndjson.js
CHANGED
|
@@ -62,6 +62,25 @@ export function parseStreamResult(output) {
|
|
|
62
62
|
(typeof resultEvent.response === 'string' ? resultEvent.response : '');
|
|
63
63
|
return { response: text };
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Counts tool invocations and reads the terminal status from a stream-json blob.
|
|
67
|
+
* Both are needed to tell a legitimate short answer apart from an agent that
|
|
68
|
+
* stopped early or degenerated: a trial with tool calls and a 'success' status
|
|
69
|
+
* that still produced two characters of text is a very different failure from
|
|
70
|
+
* one that never started.
|
|
71
|
+
* Returns toolCalls: 0 and an undefined status when the blob carries no events.
|
|
72
|
+
*/
|
|
73
|
+
export function parseStreamStats(output) {
|
|
74
|
+
let toolCalls = 0;
|
|
75
|
+
let status;
|
|
76
|
+
for (const event of parseNdjsonEvents(output)) {
|
|
77
|
+
if (event.type === 'tool_use')
|
|
78
|
+
toolCalls += 1;
|
|
79
|
+
else if (event.type === 'result')
|
|
80
|
+
status = event.status;
|
|
81
|
+
}
|
|
82
|
+
return { toolCalls, status };
|
|
83
|
+
}
|
|
65
84
|
/**
|
|
66
85
|
* Extracts token consumption stats from a Gemini CLI stream-json stdout blob.
|
|
67
86
|
* Looks for a result event with a stats.total_tokens field.
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { Logger } from '../utils/logger.js';
|
|
4
|
-
export class JsonReporter {
|
|
5
|
-
generate(report, runDir) {
|
|
6
|
-
const jsonPath = path.join(runDir, 'summary.json');
|
|
7
|
-
fs.writeFileSync(jsonPath, JSON.stringify(report, null, 2), 'utf-8');
|
|
8
|
-
Logger.write(`\n Report: file://${jsonPath}\n`);
|
|
9
|
-
}
|
|
10
|
-
}
|