@agent-inspect/viewer 6.31.3 → 6.31.4
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 +24 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +24 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -45,6 +45,28 @@ function extractCorrelationMetadata(record) {
|
|
|
45
45
|
return found ? out : void 0;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// packages/core/src/safety/sensitive-key.ts
|
|
49
|
+
function normalizeSensitiveKey(value) {
|
|
50
|
+
return value.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
51
|
+
}
|
|
52
|
+
new Set(
|
|
53
|
+
[
|
|
54
|
+
"tokens",
|
|
55
|
+
"max_tokens",
|
|
56
|
+
"min_tokens",
|
|
57
|
+
"ls_max_tokens",
|
|
58
|
+
"token_count",
|
|
59
|
+
"token_limit",
|
|
60
|
+
"token_budget",
|
|
61
|
+
"input_tokens",
|
|
62
|
+
"output_tokens",
|
|
63
|
+
"total_tokens",
|
|
64
|
+
"cached_tokens",
|
|
65
|
+
"prompt_tokens",
|
|
66
|
+
"completion_tokens"
|
|
67
|
+
].map(normalizeSensitiveKey)
|
|
68
|
+
);
|
|
69
|
+
|
|
48
70
|
// packages/core/src/types.ts
|
|
49
71
|
var STEP_TYPES = [
|
|
50
72
|
"run",
|
|
@@ -529,6 +551,8 @@ function persistedInspectEventsToTraceEvents(events, options) {
|
|
|
529
551
|
});
|
|
530
552
|
return out;
|
|
531
553
|
}
|
|
554
|
+
|
|
555
|
+
// packages/core/src/utils.ts
|
|
532
556
|
var DEFAULT_TRACE_DIR_NAME = ".agent-inspect";
|
|
533
557
|
var RUNS_DIR_NAME = "runs";
|
|
534
558
|
var FALLBACK_TRACE_DIR = path15__default.default.join(
|
|
@@ -1653,28 +1677,6 @@ function formatProgrammaticDiagnostic(code, detail) {
|
|
|
1653
1677
|
return `${code}: ${summary} Remediation: ${spec.remediation}`;
|
|
1654
1678
|
}
|
|
1655
1679
|
|
|
1656
|
-
// packages/core/src/safety/sensitive-key.ts
|
|
1657
|
-
function normalizeSensitiveKey(value) {
|
|
1658
|
-
return value.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
1659
|
-
}
|
|
1660
|
-
new Set(
|
|
1661
|
-
[
|
|
1662
|
-
"tokens",
|
|
1663
|
-
"max_tokens",
|
|
1664
|
-
"min_tokens",
|
|
1665
|
-
"ls_max_tokens",
|
|
1666
|
-
"token_count",
|
|
1667
|
-
"token_limit",
|
|
1668
|
-
"token_budget",
|
|
1669
|
-
"input_tokens",
|
|
1670
|
-
"output_tokens",
|
|
1671
|
-
"total_tokens",
|
|
1672
|
-
"cached_tokens",
|
|
1673
|
-
"prompt_tokens",
|
|
1674
|
-
"completion_tokens"
|
|
1675
|
-
].map(normalizeSensitiveKey)
|
|
1676
|
-
);
|
|
1677
|
-
|
|
1678
1680
|
// packages/core/src/checks/logical-events.ts
|
|
1679
1681
|
function isRecord5(value) {
|
|
1680
1682
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|