agent-inspect 6.31.5 → 6.31.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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/docs/SAFE-TRACE-SHARING.md +1 -1
- package/package.json +1 -1
- package/packages/cli/dist/{chunk-LKEPABND.mjs → chunk-YXDNWHNJ.mjs} +5 -8
- package/packages/cli/dist/chunk-YXDNWHNJ.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +61 -12
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +61 -9
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-4WYF5RFI.mjs → src-H22KNWAZ.mjs} +3 -3
- package/packages/cli/dist/{src-4WYF5RFI.mjs.map → src-H22KNWAZ.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 +9 -9
- package/packages/core/dist/checks.cjs +2 -5
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.mjs +3 -3
- package/packages/core/dist/{chunk-2KJR6X4V.mjs → chunk-DK3OW6UI.mjs} +3 -3
- package/packages/core/dist/chunk-DK3OW6UI.mjs.map +1 -0
- package/packages/core/dist/{chunk-NY4ILMXK.mjs → chunk-EXGQLMVB.mjs} +3 -3
- package/packages/core/dist/{chunk-NY4ILMXK.mjs.map → chunk-EXGQLMVB.mjs.map} +1 -1
- package/packages/core/dist/{chunk-PKDBFBJ7.mjs → chunk-LXYPM2ZO.mjs} +5 -8
- package/packages/core/dist/{chunk-PKDBFBJ7.mjs.map → chunk-LXYPM2ZO.mjs.map} +1 -1
- package/packages/core/dist/{chunk-INE5IWLN.mjs → chunk-N5PZAI6Q.mjs} +3 -3
- package/packages/core/dist/{chunk-INE5IWLN.mjs.map → chunk-N5PZAI6Q.mjs.map} +1 -1
- package/packages/core/dist/{chunk-MTMTXTJL.mjs → chunk-VQUB3WRI.mjs} +4 -4
- package/packages/core/dist/{chunk-MTMTXTJL.mjs.map → chunk-VQUB3WRI.mjs.map} +1 -1
- package/packages/core/dist/exporters.cjs +29 -3
- package/packages/core/dist/exporters.cjs.map +1 -1
- package/packages/core/dist/exporters.mjs +31 -5
- package/packages/core/dist/exporters.mjs.map +1 -1
- package/packages/core/dist/index.cjs +1 -1
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.mjs +4 -4
- package/packages/core/dist/writers.cjs +1 -1
- package/packages/core/dist/writers.cjs.map +1 -1
- package/packages/core/dist/writers.mjs +1 -1
- package/packages/cli/dist/chunk-LKEPABND.mjs.map +0 -1
- package/packages/core/dist/chunk-2KJR6X4V.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.31.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 416869f: Close two false-SAFE share residuals: treat incomplete placeholders like `token=[REDACTED]/…` as secrets in free text, and strip or withhold connection-string userinfo when multihost authorities fail WHATWG URL parsing.
|
|
8
|
+
|
|
3
9
|
## 6.31.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -213,7 +213,7 @@ The root package is enough for custom capture, the CLI, checks, and Evidence wor
|
|
|
213
213
|
|
|
214
214
|
## Status and documentation
|
|
215
215
|
|
|
216
|
-
**Current published baseline:** **6.31.
|
|
216
|
+
**Current published baseline:** **6.31.6** · persisted schema `1.0` · Node.js `>=20` · MIT.
|
|
217
217
|
|
|
218
218
|
Legacy v0.1 and v0.2 traces remain readable. Check the npm badge and [changelog](CHANGELOG.md) for the current published version.
|
|
219
219
|
|
|
@@ -43,7 +43,7 @@ For reviewer-reproducible trajectory checks (6.28+), prefer Evidence that includ
|
|
|
43
43
|
- Inspect log-derived fields from `logs` / `tail` ingest configs, including custom `run-id`, `event`, `parent`, timestamp, and attribute mappings.
|
|
44
44
|
- Avoid posting raw prompts, completions, tool inputs, or tool outputs in public threads unless the content is approved for public disclosure.
|
|
45
45
|
- For cross-system correlation, retain a bounded identifier instead of copying the external record or payload. Follow [External reference metadata](./EXTERNAL-REFERENCES.md), and expect `share` / `strict` profiles to redact the named correlation fields.
|
|
46
|
-
- `share` and `strict` rewrite http(s) URLs rather than dropping them: userinfo and credential-looking query or fragment params are replaced, identifier-like path segments become `[id]`, and scheme, host and path stay, so a retry on the same page is still recognizable. The same profiles also strip userinfo from common connection URIs (`postgres` / `postgresql`, `mysql` / `mariadb`, `mongodb` / `mongodb+srv`, `redis` / `rediss`, `amqp` / `amqps`) while keeping scheme, host, port, and database/queue path: `postgres://user:secret@db.example.com:5432/app_db` becomes `postgres://db.example.com:5432/app_db`. Other schemes still need a manual check.
|
|
46
|
+
- `share` and `strict` rewrite http(s) URLs rather than dropping them: userinfo and credential-looking query or fragment params are replaced, identifier-like path segments become `[id]`, and scheme, host and path stay, so a retry on the same page is still recognizable. The same profiles also strip userinfo from common connection URIs (`postgres` / `postgresql`, `mysql` / `mariadb`, `mongodb` / `mongodb+srv`, `redis` / `rediss`, `amqp` / `amqps`) while keeping scheme, host, port, and database/queue path: `postgres://user:secret@db.example.com:5432/app_db` becomes `postgres://db.example.com:5432/app_db`. When a connection authority cannot be parsed as a standard URL (for example multihost MongoDB lists), userinfo is still stripped or the whole value is withheld so credentials never remain in a SAFE share. Incomplete placeholders such as `token=[REDACTED]/…` are treated as residual secrets in free text. Other schemes still need a manual check.
|
|
47
47
|
- Prefer Markdown export for issue or PR sharing when a summarized tree is enough.
|
|
48
48
|
|
|
49
49
|
## Remove or replace sensitive values
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-inspect",
|
|
3
|
-
"version": "6.31.
|
|
3
|
+
"version": "6.31.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Local evidence debugger and trajectory-test toolkit for TypeScript AI agents — execution trees, TraceContract checks, Evidence v2, and read-only MCP",
|
|
@@ -930,7 +930,7 @@ var Redactor = class {
|
|
|
930
930
|
};
|
|
931
931
|
|
|
932
932
|
// packages/core/src/safety/credential-value-patterns.ts
|
|
933
|
-
var KEY_VALUE_SECRET_PATTERN = /\b(?:api[_-]?key|internal[_-]?token|access[_-]?token|auth[_-]?token|password|secret|token)=(?!\[(?:REDACTED(?::[^\]]*)?|HASH:[0-9a-f]{8})\](?![^\s"'
|
|
933
|
+
var KEY_VALUE_SECRET_PATTERN = /\b(?:api[_-]?key|internal[_-]?token|access[_-]?token|auth[_-]?token|password|secret|token)=(?!\[(?:REDACTED(?::[^\]]*)?|HASH:[0-9a-f]{8})\](?![^\s"'\\&#?]))([^\s"'\\]{8,})/i;
|
|
934
934
|
var HIGH_CONFIDENCE_CREDENTIAL_PATTERNS = [
|
|
935
935
|
/^(?:basic|bearer|digest|apikey)\s+[a-z0-9._~+/=-]+$/i,
|
|
936
936
|
/\bbearer\s+[a-z0-9._~+/=-]{12,}\b/i,
|
|
@@ -7307,7 +7307,7 @@ var DEFAULT_SECRET_PATTERNS = [
|
|
|
7307
7307
|
// Keep in sync with packages/redact/src/key-value-secret.ts (KEY_VALUE_SECRET_PATTERN_SOURCE).
|
|
7308
7308
|
{
|
|
7309
7309
|
id: "key-value-secret",
|
|
7310
|
-
pattern: /\b(?:api[_-]?key|internal[_-]?token|access[_-]?token|auth[_-]?token|password|secret|token)=(?!\[(?:REDACTED(?::[^\]]*)?|HASH:[0-9a-f]{8})\](?![^\s"'
|
|
7310
|
+
pattern: /\b(?:api[_-]?key|internal[_-]?token|access[_-]?token|auth[_-]?token|password|secret|token)=(?!\[(?:REDACTED(?::[^\]]*)?|HASH:[0-9a-f]{8})\](?![^\s"'\\&#?]))([^\s"'\\]{8,})/i
|
|
7311
7311
|
}
|
|
7312
7312
|
];
|
|
7313
7313
|
function compareStrings(a, b) {
|
|
@@ -7732,9 +7732,6 @@ function limitFindings(findings, maxFindings) {
|
|
|
7732
7732
|
if (maxFindings === void 0 || findings.length <= maxFindings) return findings;
|
|
7733
7733
|
return findings.slice(0, Math.max(0, maxFindings));
|
|
7734
7734
|
}
|
|
7735
|
-
function hasRedactionMarker(value, markers) {
|
|
7736
|
-
return markers.some((marker) => value.includes(marker)) || /^\[HASH:[A-Za-z0-9_-]+\]$/.test(value);
|
|
7737
|
-
}
|
|
7738
7735
|
function isFullyRedactedValue(value, markers = ["[REDACTED]", "[REDACTED:"]) {
|
|
7739
7736
|
if (typeof value !== "string") return false;
|
|
7740
7737
|
const trimmed = value.trim();
|
|
@@ -8721,7 +8718,7 @@ function createSafetyRedactionRule(options = {}) {
|
|
|
8721
8718
|
for (const event of context.events) {
|
|
8722
8719
|
for (const entry of eventValueEntries(event, { includeSummaries: true, includeError: true })) {
|
|
8723
8720
|
if (!isSensitiveKey(entry.key ?? lastPathSegment(entry.path), sensitiveKeys)) continue;
|
|
8724
|
-
if (
|
|
8721
|
+
if (isFullyRedactedValue(entry.value, markers)) continue;
|
|
8725
8722
|
findings.push(
|
|
8726
8723
|
failFinding(
|
|
8727
8724
|
"safety.redaction",
|
|
@@ -14891,5 +14888,5 @@ function renderGateReport(result, options = {}) {
|
|
|
14891
14888
|
}
|
|
14892
14889
|
|
|
14893
14890
|
export { ATTRIBUTION_CONFIDENCES, COHORT_METRIC_IDS, DEFAULT_REDACT_KEYS, DEFAULT_SUITE_ARTIFACTS_DIR, EVIDENCE_FORMAT_VERSION, EVIDENCE_HTML_FILENAME, EVIDENCE_MANIFEST_FILENAME, Redactor, TraceDirectory, TraceReadError, TreeBuilder, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, applyProfileMetadataCaps, assertBundlePathContained, assertEvidenceRelativePath, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildEvidenceCausalFailureViewHtml, buildEvidenceCiPackage, buildEvidenceCircuitViewHtml, buildEvidenceContractsViewHtml, buildEvidenceDiffViewHtml, buildEvidenceHtmlShell, buildEvidenceManifest, buildEvidenceOutcomesViewHtml, buildEvidenceProvenanceViewHtml, buildEvidenceSafetyViewHtml, buildEvidenceTimelineViewHtml, buildEvidenceToolsLlmViewHtml, buildEvidenceTreeViewHtml, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, buildZipArchive, bundleFailsOnSafety, bundleRunAssetRelativePath, collectTraceSchemaVersions, compactAttributes, createBaselineRegressionRule, createLlmUsageRule, createMaxStepDurationRule, createObservedOutcomeRule, createRequireCompletedRule, createRunDepthRule, createRunDurationRule, createRunStatusRule, createSafetyOversizedAttributeRule, createSafetyRawContentRule, createSafetyRedactionRule, createSafetySecretPatternRule, createStallDetectionRule, createStructureCycleRule, createStructureOrphanRule, createStructureParallelWidthRule, createStructureRelationshipRule, createToolUsageRule, defaultBundleOutputPath, defaultSuiteConfigTemplate, defineTraceContract, diffRuns, diffTraceEvents, enrichSessionRunRecord, escapeHtml, escapeMarkdown, evaluateTraceContract, extractMetadata, extractOutcomesFromTraceEvents, filterMetasBySessionScope, filterTraces, flattenTree, formatDuration2 as formatDuration, formatStepLabel, formatTimestamp, gateHasThresholds, getIndent, getTraceFilePath, inferEvidenceFileRole, isAgentInspectTrace, isAttributionConfidence, isCredentialSensitiveKey, isPersistedInspectEvent, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, manualTraceEventsToComparableRun, nanoid, normalizeBundleOutputPath, openTrace, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseTraceJsonl, persistedInspectEventsToTraceEvents, projectLogicalEvents, renderActivitySummaryHuman, renderCohortReport, renderErrorLine, renderGateReport, renderObservedOutcomesHtml, renderObservedOutcomesMarkdown, renderRunDiff, renderRunWhat, renderStepLine, renderSuiteReport, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, runTraceChecks, safeString, sanitizeBundleRunId, searchTraces, serializeEvidenceManifest, sha256Hex, stableJson, stringContainsHighConfidenceCredential, summarizeObservedOutcomes, summarizeSemanticParity, traceEventToPersistedInspectEvent, truncateName, truncateStringForProfile, validateEvent, validateSuiteConfig, verifyEvidenceDirectory, zeroKinds };
|
|
14894
|
-
//# sourceMappingURL=chunk-
|
|
14895
|
-
//# sourceMappingURL=chunk-
|
|
14891
|
+
//# sourceMappingURL=chunk-YXDNWHNJ.mjs.map
|
|
14892
|
+
//# sourceMappingURL=chunk-YXDNWHNJ.mjs.map
|