agent-inspect 6.17.3 → 6.17.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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/docs/ADAPTER-CONFORMANCE.md +24 -0
- package/docs/CI-ARTIFACTS.md +2 -1
- package/docs/OPENAI-AGENTS-LOCAL.md +14 -0
- package/docs/SAFE-TRACE-SHARING.md +1 -0
- package/docs/SELF-HOSTING.md +2 -0
- package/docs/STANDARDS.md +15 -0
- package/docs/SUPPORT-LEVELS.md +23 -0
- package/package.json +4 -3
- package/packages/cli/dist/{chunk-5GGYDIZD.mjs → chunk-YX6RFLV5.mjs} +9 -4
- package/packages/cli/dist/chunk-YX6RFLV5.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +26 -9
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +22 -10
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-IDMCWKRH.mjs → src-X6SLMBNH.mjs} +3 -3
- package/packages/cli/dist/{src-IDMCWKRH.mjs.map → src-X6SLMBNH.mjs.map} +1 -1
- package/packages/core/dist/advanced.cjs +1 -1
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.mjs +1 -1
- package/packages/core/dist/checks.cjs +7 -2
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.mjs +1 -1
- package/packages/core/dist/{chunk-UFP54T7F.mjs → chunk-HN377P23.mjs} +9 -4
- package/packages/core/dist/chunk-HN377P23.mjs.map +1 -0
- package/packages/cli/dist/chunk-5GGYDIZD.mjs.map +0 -1
- package/packages/core/dist/chunk-UFP54T7F.mjs.map +0 -1
|
@@ -6419,8 +6419,11 @@ var init_programmatic = __esm({
|
|
|
6419
6419
|
});
|
|
6420
6420
|
|
|
6421
6421
|
// packages/core/src/safety/sensitive-key.ts
|
|
6422
|
+
function keyHasExplicitSeparator(value) {
|
|
6423
|
+
return /[_\-.]/.test(value);
|
|
6424
|
+
}
|
|
6422
6425
|
function normalizeSensitiveKey(value) {
|
|
6423
|
-
return value.toLowerCase().replace(/[^a-z0-
|
|
6426
|
+
return value.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
6424
6427
|
}
|
|
6425
6428
|
function isTokenCredentialKey(normalized) {
|
|
6426
6429
|
if (NON_CREDENTIAL_TOKEN_CONFIG_KEYS.has(normalized)) return false;
|
|
@@ -6433,6 +6436,7 @@ function isCredentialSensitiveKey(key, sensitiveKeys = DEFAULT_CREDENTIAL_SENSIT
|
|
|
6433
6436
|
const normalized = normalizeSensitiveKey(key);
|
|
6434
6437
|
if (!normalized) return false;
|
|
6435
6438
|
if (NON_CREDENTIAL_TOKEN_CONFIG_KEYS.has(normalized)) return false;
|
|
6439
|
+
const allowPrefixCompound = keyHasExplicitSeparator(key);
|
|
6436
6440
|
for (const sensitive of sensitiveKeys) {
|
|
6437
6441
|
const s = normalizeSensitiveKey(sensitive);
|
|
6438
6442
|
if (!s) continue;
|
|
@@ -6441,7 +6445,8 @@ function isCredentialSensitiveKey(key, sensitiveKeys = DEFAULT_CREDENTIAL_SENSIT
|
|
|
6441
6445
|
continue;
|
|
6442
6446
|
}
|
|
6443
6447
|
if (normalized === s) return true;
|
|
6444
|
-
if (normalized.endsWith(`_${s}`)
|
|
6448
|
+
if (normalized.endsWith(`_${s}`)) return true;
|
|
6449
|
+
if (allowPrefixCompound && normalized.startsWith(`${s}_`)) return true;
|
|
6445
6450
|
}
|
|
6446
6451
|
return false;
|
|
6447
6452
|
}
|
|
@@ -12506,7 +12511,7 @@ var init_src = __esm({
|
|
|
12506
12511
|
});
|
|
12507
12512
|
|
|
12508
12513
|
// package.json
|
|
12509
|
-
var version = "6.17.
|
|
12514
|
+
var version = "6.17.4";
|
|
12510
12515
|
|
|
12511
12516
|
// packages/cli/src/list.ts
|
|
12512
12517
|
init_advanced();
|
|
@@ -16399,8 +16404,11 @@ async function reportCommand(runId, options = {}) {
|
|
|
16399
16404
|
init_advanced();
|
|
16400
16405
|
|
|
16401
16406
|
// packages/redact/src/sensitive-key.ts
|
|
16407
|
+
function keyHasExplicitSeparator2(value) {
|
|
16408
|
+
return /[_\-.]/.test(value);
|
|
16409
|
+
}
|
|
16402
16410
|
function normalizeSensitiveKey2(value) {
|
|
16403
|
-
return value.toLowerCase().replace(/[^a-z0-
|
|
16411
|
+
return value.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
16404
16412
|
}
|
|
16405
16413
|
var NON_CREDENTIAL_TOKEN_CONFIG_KEYS2 = new Set(
|
|
16406
16414
|
[
|
|
@@ -16430,6 +16438,7 @@ function isCredentialSensitiveKey2(key, sensitiveKeys) {
|
|
|
16430
16438
|
const normalized = normalizeSensitiveKey2(key);
|
|
16431
16439
|
if (!normalized) return false;
|
|
16432
16440
|
if (NON_CREDENTIAL_TOKEN_CONFIG_KEYS2.has(normalized)) return false;
|
|
16441
|
+
const allowPrefixCompound = keyHasExplicitSeparator2(key);
|
|
16433
16442
|
for (const sensitive of sensitiveKeys) {
|
|
16434
16443
|
const s = normalizeSensitiveKey2(sensitive);
|
|
16435
16444
|
if (!s) continue;
|
|
@@ -16438,7 +16447,8 @@ function isCredentialSensitiveKey2(key, sensitiveKeys) {
|
|
|
16438
16447
|
continue;
|
|
16439
16448
|
}
|
|
16440
16449
|
if (normalized === s) return true;
|
|
16441
|
-
if (normalized.endsWith(`_${s}`)
|
|
16450
|
+
if (normalized.endsWith(`_${s}`)) return true;
|
|
16451
|
+
if (allowPrefixCompound && normalized.startsWith(`${s}_`)) return true;
|
|
16442
16452
|
}
|
|
16443
16453
|
return false;
|
|
16444
16454
|
}
|
|
@@ -24378,9 +24388,15 @@ function normalizeMetrics2(raw) {
|
|
|
24378
24388
|
const parsed = parseCohortMetricList(raw);
|
|
24379
24389
|
if (parsed.length === 0) return void 0;
|
|
24380
24390
|
const allowed = new Set(COHORT_METRIC_IDS);
|
|
24381
|
-
|
|
24382
|
-
|
|
24383
|
-
|
|
24391
|
+
const invalid = parsed.filter((metric) => !allowed.has(metric));
|
|
24392
|
+
if (invalid.length > 0) {
|
|
24393
|
+
const valueLabel = invalid.length === 1 ? "value" : "values";
|
|
24394
|
+
const invalidList = invalid.map((metric) => `"${metric}"`).join(", ");
|
|
24395
|
+
throw new Error(
|
|
24396
|
+
`Unsupported cohort --metric ${valueLabel}: ${invalidList}. Valid metrics: ${COHORT_METRIC_IDS.join(", ")}.`
|
|
24397
|
+
);
|
|
24398
|
+
}
|
|
24399
|
+
return parsed;
|
|
24384
24400
|
}
|
|
24385
24401
|
async function writeArtifacts(result, outputDir) {
|
|
24386
24402
|
await promises.mkdir(outputDir, { recursive: true });
|
|
@@ -24401,6 +24417,7 @@ async function writeArtifacts(result, outputDir) {
|
|
|
24401
24417
|
}
|
|
24402
24418
|
async function cohortCommand(options = {}) {
|
|
24403
24419
|
try {
|
|
24420
|
+
const metrics = normalizeMetrics2(options.metric);
|
|
24404
24421
|
const traceDir = resolveTraceDir({ dir: options.dir });
|
|
24405
24422
|
const { runs } = await loadSessionRuns(traceDir);
|
|
24406
24423
|
const result = await analyzeCohort(runs, {
|
|
@@ -24409,7 +24426,7 @@ async function cohortCommand(options = {}) {
|
|
|
24409
24426
|
candidate: options.candidate,
|
|
24410
24427
|
cohortKey: options.cohortKey,
|
|
24411
24428
|
groupBy: options.groupBy,
|
|
24412
|
-
metrics
|
|
24429
|
+
metrics
|
|
24413
24430
|
});
|
|
24414
24431
|
const format = options.format ?? (options.json ? "json" : "markdown");
|
|
24415
24432
|
let artifacts;
|