@agent-inspect/viewer 6.31.2 → 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.mjs
CHANGED
|
@@ -38,6 +38,28 @@ function extractCorrelationMetadata(record) {
|
|
|
38
38
|
return found ? out : void 0;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
// packages/core/src/safety/sensitive-key.ts
|
|
42
|
+
function normalizeSensitiveKey(value) {
|
|
43
|
+
return value.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
44
|
+
}
|
|
45
|
+
new Set(
|
|
46
|
+
[
|
|
47
|
+
"tokens",
|
|
48
|
+
"max_tokens",
|
|
49
|
+
"min_tokens",
|
|
50
|
+
"ls_max_tokens",
|
|
51
|
+
"token_count",
|
|
52
|
+
"token_limit",
|
|
53
|
+
"token_budget",
|
|
54
|
+
"input_tokens",
|
|
55
|
+
"output_tokens",
|
|
56
|
+
"total_tokens",
|
|
57
|
+
"cached_tokens",
|
|
58
|
+
"prompt_tokens",
|
|
59
|
+
"completion_tokens"
|
|
60
|
+
].map(normalizeSensitiveKey)
|
|
61
|
+
);
|
|
62
|
+
|
|
41
63
|
// packages/core/src/types.ts
|
|
42
64
|
var STEP_TYPES = [
|
|
43
65
|
"run",
|
|
@@ -522,6 +544,8 @@ function persistedInspectEventsToTraceEvents(events, options) {
|
|
|
522
544
|
});
|
|
523
545
|
return out;
|
|
524
546
|
}
|
|
547
|
+
|
|
548
|
+
// packages/core/src/utils.ts
|
|
525
549
|
var DEFAULT_TRACE_DIR_NAME = ".agent-inspect";
|
|
526
550
|
var RUNS_DIR_NAME = "runs";
|
|
527
551
|
var FALLBACK_TRACE_DIR = path15.join(
|
|
@@ -1646,28 +1670,6 @@ function formatProgrammaticDiagnostic(code, detail) {
|
|
|
1646
1670
|
return `${code}: ${summary} Remediation: ${spec.remediation}`;
|
|
1647
1671
|
}
|
|
1648
1672
|
|
|
1649
|
-
// packages/core/src/safety/sensitive-key.ts
|
|
1650
|
-
function normalizeSensitiveKey(value) {
|
|
1651
|
-
return value.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
1652
|
-
}
|
|
1653
|
-
new Set(
|
|
1654
|
-
[
|
|
1655
|
-
"tokens",
|
|
1656
|
-
"max_tokens",
|
|
1657
|
-
"min_tokens",
|
|
1658
|
-
"ls_max_tokens",
|
|
1659
|
-
"token_count",
|
|
1660
|
-
"token_limit",
|
|
1661
|
-
"token_budget",
|
|
1662
|
-
"input_tokens",
|
|
1663
|
-
"output_tokens",
|
|
1664
|
-
"total_tokens",
|
|
1665
|
-
"cached_tokens",
|
|
1666
|
-
"prompt_tokens",
|
|
1667
|
-
"completion_tokens"
|
|
1668
|
-
].map(normalizeSensitiveKey)
|
|
1669
|
-
);
|
|
1670
|
-
|
|
1671
1673
|
// packages/core/src/checks/logical-events.ts
|
|
1672
1674
|
function isRecord5(value) {
|
|
1673
1675
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|