@agent-inspect/eval 6.31.41 → 6.31.43
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 +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url';
|
|
2
|
+
import { projectLogicalEvents } from 'agent-inspect/checks';
|
|
2
3
|
import { openTrace, TraceReadError, isTraceEvidenceDiscardWarning } from 'agent-inspect/readers';
|
|
3
4
|
import crypto, { createHash } from 'crypto';
|
|
4
5
|
|
|
@@ -1509,7 +1510,10 @@ function measuredTotalTokens(event) {
|
|
|
1509
1510
|
return void 0;
|
|
1510
1511
|
}
|
|
1511
1512
|
function llmEventsForTokenBudget(events) {
|
|
1512
|
-
|
|
1513
|
+
const { logicalEvents } = projectLogicalEvents(events);
|
|
1514
|
+
return logicalEvents.filter(
|
|
1515
|
+
(event) => event.kind === "LLM" && event.status !== "running"
|
|
1516
|
+
);
|
|
1513
1517
|
}
|
|
1514
1518
|
function createRule(id, category, evaluate) {
|
|
1515
1519
|
return { id, category, severity: "error", evaluate };
|