agent-inspect 6.31.35 → 6.31.36
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/docs/API.md +2 -2
- package/docs/CLI.md +1 -0
- package/docs/KNOWN-ISSUES.md +1 -0
- package/docs/LIMITATIONS.md +1 -0
- package/docs/SCHEMA.md +10 -1
- package/package.json +1 -1
- package/packages/cli/dist/{chunk-RLFYFWIZ.mjs → chunk-Z3WXP44D.mjs} +20 -2
- package/packages/cli/dist/chunk-Z3WXP44D.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +19 -1
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +4 -4
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-S23RCPL2.mjs → src-LCUTRLRQ.mjs} +3 -3
- package/packages/cli/dist/{src-S23RCPL2.mjs.map → src-LCUTRLRQ.mjs.map} +1 -1
- package/packages/core/dist/advanced.cjs +18 -0
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.mjs +2 -2
- package/packages/core/dist/checks.cjs +18 -0
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.mjs +1 -1
- package/packages/core/dist/{chunk-3OMB34E6.mjs → chunk-KQX3Z4DH.mjs} +20 -2
- package/packages/core/dist/chunk-KQX3Z4DH.mjs.map +1 -0
- package/packages/cli/dist/chunk-RLFYFWIZ.mjs.map +0 -1
- package/packages/core/dist/chunk-3OMB34E6.mjs.map +0 -1
|
@@ -6865,6 +6865,9 @@ function createToolFailureRule(options) {
|
|
|
6865
6865
|
}
|
|
6866
6866
|
};
|
|
6867
6867
|
}
|
|
6868
|
+
function recordsTokenUsage(event) {
|
|
6869
|
+
return Object.values(event.tokenUsage ?? {}).some((count) => typeof count === "number");
|
|
6870
|
+
}
|
|
6868
6871
|
function createLlmUsageRule(options) {
|
|
6869
6872
|
return {
|
|
6870
6873
|
id: "llm.usage",
|
|
@@ -6922,6 +6925,21 @@ function createLlmUsageRule(options) {
|
|
|
6922
6925
|
["total", options.maxTotalTokens],
|
|
6923
6926
|
["cached", options.maxCachedTokens]
|
|
6924
6927
|
];
|
|
6928
|
+
const hasTokenLimit = tokenLimits.some(([, limit]) => limit !== void 0);
|
|
6929
|
+
const callsWithoutUsage = llms.filter(
|
|
6930
|
+
(event) => event.status !== "error" && !recordsTokenUsage(event)
|
|
6931
|
+
);
|
|
6932
|
+
if (hasTokenLimit && callsWithoutUsage.length > 0) {
|
|
6933
|
+
findings.push(
|
|
6934
|
+
failFinding(
|
|
6935
|
+
"llm.usage",
|
|
6936
|
+
`No token usage was read for ${callsWithoutUsage.length} of ${llms.length} LLM call(s), so the token limit cannot be verified.`,
|
|
6937
|
+
callsWithoutUsage.map((event) => eventEvidence(event, "tokenUsage")),
|
|
6938
|
+
"token usage on every completed LLM call",
|
|
6939
|
+
{ callsWithoutUsage: callsWithoutUsage.length, calls: llms.length }
|
|
6940
|
+
)
|
|
6941
|
+
);
|
|
6942
|
+
}
|
|
6925
6943
|
for (const [key, limit] of tokenLimits) {
|
|
6926
6944
|
if (limit !== void 0 && tokenTotals[key] > limit) {
|
|
6927
6945
|
findings.push(
|
|
@@ -17518,7 +17536,7 @@ var init_src = __esm({
|
|
|
17518
17536
|
});
|
|
17519
17537
|
|
|
17520
17538
|
// package.json
|
|
17521
|
-
var version = "6.31.
|
|
17539
|
+
var version = "6.31.36";
|
|
17522
17540
|
|
|
17523
17541
|
// packages/cli/src/list.ts
|
|
17524
17542
|
init_advanced();
|