@agent-inspect/mcp-server 6.29.4 → 6.29.6
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/{chunk-K47MV5AJ.mjs → chunk-O7IT6DMO.mjs} +27 -11
- package/dist/chunk-O7IT6DMO.mjs.map +1 -0
- package/dist/cli.cjs +25 -9
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +25 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-K47MV5AJ.mjs.map +0 -1
package/dist/cli.cjs
CHANGED
|
@@ -266,6 +266,17 @@ function isTraceEvent(value) {
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
+
// packages/core/src/types/inspect-event.ts
|
|
270
|
+
var ATTRIBUTION_CONFIDENCES = [
|
|
271
|
+
"unknown",
|
|
272
|
+
"heuristic",
|
|
273
|
+
"correlated",
|
|
274
|
+
"explicit"
|
|
275
|
+
];
|
|
276
|
+
function isAttributionConfidence(value) {
|
|
277
|
+
return typeof value === "string" && ATTRIBUTION_CONFIDENCES.includes(value);
|
|
278
|
+
}
|
|
279
|
+
|
|
269
280
|
// packages/core/src/types/persisted-inspect-event.ts
|
|
270
281
|
var INSPECT_KINDS = [
|
|
271
282
|
"RUN",
|
|
@@ -281,12 +292,6 @@ var INSPECT_KINDS = [
|
|
|
281
292
|
"LOG",
|
|
282
293
|
"OUTCOME"
|
|
283
294
|
];
|
|
284
|
-
var ATTRIBUTION_CONFIDENCES = [
|
|
285
|
-
"explicit",
|
|
286
|
-
"correlated",
|
|
287
|
-
"heuristic",
|
|
288
|
-
"unknown"
|
|
289
|
-
];
|
|
290
295
|
var PERSISTED_EVENT_SOURCE_TYPES = [
|
|
291
296
|
"manual",
|
|
292
297
|
"json-log",
|
|
@@ -322,9 +327,6 @@ function isOptionalNonNegativeNumber(value) {
|
|
|
322
327
|
function isInspectKind(value) {
|
|
323
328
|
return typeof value === "string" && INSPECT_KINDS.includes(value);
|
|
324
329
|
}
|
|
325
|
-
function isAttributionConfidence(value) {
|
|
326
|
-
return typeof value === "string" && ATTRIBUTION_CONFIDENCES.includes(value);
|
|
327
|
-
}
|
|
328
330
|
function isPersistedEventSourceType(value) {
|
|
329
331
|
return typeof value === "string" && PERSISTED_EVENT_SOURCE_TYPES.includes(value);
|
|
330
332
|
}
|
|
@@ -3647,6 +3649,18 @@ function limitFindings(findings, maxFindings) {
|
|
|
3647
3649
|
function hasRedactionMarker(value, markers) {
|
|
3648
3650
|
return markers.some((marker) => value.includes(marker)) || /^\[HASH:[A-Za-z0-9_-]+\]$/.test(value);
|
|
3649
3651
|
}
|
|
3652
|
+
function isFullyRedactedValue(value, markers = ["[REDACTED]", "[REDACTED:"]) {
|
|
3653
|
+
if (typeof value !== "string") return false;
|
|
3654
|
+
const trimmed = value.trim();
|
|
3655
|
+
if (trimmed.length === 0) return false;
|
|
3656
|
+
if (/^\[HASH:[A-Za-z0-9_-]+\]$/.test(trimmed)) return true;
|
|
3657
|
+
if (/^\[REDACTED:[^\]]*\]$/.test(trimmed)) return true;
|
|
3658
|
+
for (const marker of markers) {
|
|
3659
|
+
if (marker.endsWith(":")) continue;
|
|
3660
|
+
if (trimmed === marker) return true;
|
|
3661
|
+
}
|
|
3662
|
+
return false;
|
|
3663
|
+
}
|
|
3650
3664
|
function isSensitiveKey(key, sensitiveKeys) {
|
|
3651
3665
|
return isCredentialSensitiveKey(key, sensitiveKeys);
|
|
3652
3666
|
}
|
|
@@ -3744,6 +3758,7 @@ function createSafetyRedactionRule(options = {}) {
|
|
|
3744
3758
|
function createSafetyRawContentRule(options = {}) {
|
|
3745
3759
|
const forbiddenKeys = options.forbiddenKeys ?? DEFAULT_RAW_CONTENT_KEYS;
|
|
3746
3760
|
const safePathPrefixes = options.safePathPrefixes ?? DEFAULT_SAFE_RAW_CONTENT_PATH_PREFIXES;
|
|
3761
|
+
const markers = options.redactedMarkers ?? ["[REDACTED]", "[REDACTED:"];
|
|
3747
3762
|
return {
|
|
3748
3763
|
id: "safety.rawPrompt",
|
|
3749
3764
|
category: "safety",
|
|
@@ -3754,6 +3769,7 @@ function createSafetyRawContentRule(options = {}) {
|
|
|
3754
3769
|
for (const entry of eventValueEntries(event, { includeSummaries: options.includeSummaries })) {
|
|
3755
3770
|
const key = entry.key ?? lastPathSegment(entry.path);
|
|
3756
3771
|
if (!isRawContentPath(entry.path, key, forbiddenKeys, safePathPrefixes)) continue;
|
|
3772
|
+
if (isFullyRedactedValue(entry.value, markers)) continue;
|
|
3757
3773
|
findings.push(
|
|
3758
3774
|
failFinding(
|
|
3759
3775
|
"safety.rawPrompt",
|