agent-inspect 6.17.2 → 6.17.3

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.17.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 737bb03: Docs updates (README mark/loop, case-study template, Evidence retention guidance, support reproduction), TraceFacts/Evidence/OTLP/CLI regression tests, and exclude the RUN boundary from `run.slowestNode`.
8
+
3
9
  ## 6.17.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,11 +1,8 @@
1
1
  <p align="center">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/agent-inspect-logo-dark.svg?sanitize=true">
4
- <img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/agent-inspect-logo.svg?sanitize=true" width="240" alt="AgentInspect">
5
- </picture>
2
+ <img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/agent-inspect-logo-mark.svg?sanitize=true" width="56" height="56" alt="AgentInspect">
6
3
  </p>
7
-
8
- <p align="center"><strong>Local-first evidence for TypeScript AI agents</strong></p>
4
+ <p align="center"><strong>agent-inspect</strong></p>
5
+ <p align="center">Local-first evidence for TypeScript AI agents</p>
9
6
 
10
7
  <h1 align="center">
11
8
  See what your agent did.<br>
@@ -47,7 +44,7 @@ npm install agent-inspect
47
44
  Agent code rarely fails as one function call. It plans, retrieves, calls tools, invokes a model, retries, and produces side effects. Flat logs show fragments. AgentInspect keeps the run as local JSONL and gives you one evidence loop from the same trace.
48
45
 
49
46
  <p align="center">
50
- <img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/showcase/diagrams/value-loop.svg" alt="Capture or import one local trace, then debug the run, prevent trajectory regressions, and prepare share-checked evidence" width="900">
47
+ <img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/readme-product-loop.svg?sanitize=true" alt="Capture one local trace, then debug, prevent, and share from the same evidence loop" width="900">
51
48
  </p>
52
49
 
53
50
  ## One trace. Three jobs.
@@ -28,6 +28,8 @@ Manual traces redact common sensitive keys **before disk** by default. Pass `red
28
28
 
29
29
  ## Before sharing
30
30
 
31
+ When a maintainer or support responder needs reproducible evidence, follow the [safe support reproduction workflow](./SUPPORT-REPRODUCTION.md) to create and review a minimized Evidence bundle. Do not attach a raw trace directory.
32
+
31
33
  - Use **`--redaction-profile share`** for PR/issue attachments; use **`strict`** when sharing outside your team.
32
34
  - **Review** the exported file — profiles do not detect all sensitive data.
33
35
  - Treat traces written with `redact: false` as sensitive. Review every event before sharing them outside your team.
@@ -21,7 +21,8 @@ Curated terminal recordings and diagrams for AgentInspect **6.17.x**. They show
21
21
  | [debug-tree.gif](assets/showcase/gif/debug-tree.gif) | Debug — `list` then inspect a local run |
22
22
  | [check-pass-fail.gif](assets/showcase/gif/check-pass-fail.gif) | Prevent — `check --preset trajectory` plus shorthands, pass then fail |
23
23
  | [evidence-bundle.gif](assets/showcase/gif/evidence-bundle.gif) | Share — `bundle --profile share` then `bundle verify` (relative `./evidence`) |
24
- | [value-loop.svg](assets/showcase/diagrams/value-loop.svg) | Capture once → debug, prevent, share |
24
+ | [readme-product-loop.svg](assets/readme-product-loop.svg) | README loop: one local trace → debug prevent share |
25
+ | [value-loop.svg](assets/showcase/diagrams/value-loop.svg) | Alternate stacked Debug / Prevent / Share diagram |
25
26
 
26
27
  The check tape is named for the `check` command, not `gate`.
27
28
 
@@ -0,0 +1,12 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="AgentInspect">
2
+ <defs>
3
+ <linearGradient id="ai-mark" x1="0%" y1="0%" x2="100%" y2="100%">
4
+ <stop offset="0%" stop-color="#4f46e5"/>
5
+ <stop offset="100%" stop-color="#6366f1"/>
6
+ </linearGradient>
7
+ </defs>
8
+ <rect width="48" height="48" rx="12" fill="url(#ai-mark)"/>
9
+ <path d="M16 16h16M16 24h12M16 32h16" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
10
+ <circle cx="36" cy="24" r="5" fill="none" stroke="#fff" stroke-width="2"/>
11
+ <path d="M39.5 27.5L44 32" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
12
+ </svg>
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="900" height="150" viewBox="0 0 900 150" role="img" aria-label="AgentInspect evidence loop: capture or import, understand causality, enforce expectations, verify and bundle, review locally or in customer-owned Studio">
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="900" height="150" viewBox="0 0 900 150" role="img" aria-label="Capture one local trace, then debug the run, prevent trajectory regressions, and share-checked evidence">
2
2
  <defs>
3
3
  <marker id="arr" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto">
4
4
  <path d="M0,0 L6,3 L0,6 Z" fill="#64748b"/>
@@ -6,30 +6,21 @@
6
6
  </defs>
7
7
  <rect width="900" height="150" fill="#ffffff"/>
8
8
  <g font-family="ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif">
9
- <rect x="10" y="24" width="150" height="78" rx="12" fill="#eef2ff" stroke="#6366f1" stroke-width="1.5"/>
10
- <text x="85" y="52" text-anchor="middle" font-size="13" font-weight="600" fill="#312e81">Capture / import</text>
11
- <text x="85" y="72" text-anchor="middle" font-size="10" fill="#475569">JSONL, adapters,</text>
12
- <text x="85" y="86" text-anchor="middle" font-size="10" fill="#475569">logs, standards</text>
13
- <path d="M168 63h22" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
14
- <rect x="198" y="24" width="150" height="78" rx="12" fill="#ecfdf5" stroke="#10b981" stroke-width="1.5"/>
15
- <text x="273" y="52" text-anchor="middle" font-size="13" font-weight="600" fill="#064e3b">Understand</text>
16
- <text x="273" y="72" text-anchor="middle" font-size="10" fill="#475569">tree, timeline,</text>
17
- <text x="273" y="86" text-anchor="middle" font-size="10" fill="#475569">report, diff</text>
18
- <path d="M356 63h22" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
19
- <rect x="386" y="24" width="150" height="78" rx="12" fill="#fff7ed" stroke="#f59e0b" stroke-width="1.5"/>
20
- <text x="461" y="52" text-anchor="middle" font-size="13" font-weight="600" fill="#78350f">Enforce</text>
21
- <text x="461" y="72" text-anchor="middle" font-size="10" fill="#475569">checks, contracts,</text>
22
- <text x="461" y="86" text-anchor="middle" font-size="10" fill="#475569">suites, CI gates</text>
23
- <path d="M544 63h22" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
24
- <rect x="574" y="24" width="150" height="78" rx="12" fill="#f8fafc" stroke="#64748b" stroke-width="1.5"/>
25
- <text x="649" y="52" text-anchor="middle" font-size="13" font-weight="600" fill="#0f172a">Verify / bundle</text>
26
- <text x="649" y="72" text-anchor="middle" font-size="10" fill="#475569">redact, verify-safe,</text>
27
- <text x="649" y="86" text-anchor="middle" font-size="10" fill="#475569">offline bundle</text>
28
- <path d="M732 63h22" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
29
- <rect x="762" y="24" width="128" height="78" rx="12" fill="#f5f3ff" stroke="#7c3aed" stroke-width="1.5"/>
30
- <text x="826" y="52" text-anchor="middle" font-size="13" font-weight="600" fill="#4c1d95">Review</text>
31
- <text x="826" y="72" text-anchor="middle" font-size="10" fill="#475569">local or Studio</text>
32
- <text x="826" y="86" text-anchor="middle" font-size="10" fill="#475569">Beta (yours)</text>
33
- <text x="450" y="132" text-anchor="middle" font-size="12" fill="#64748b">No account · no default upload · metadata-only by default · optional customer-owned Studio</text>
9
+ <rect x="16" y="28" width="188" height="78" rx="12" fill="#eef2ff" stroke="#6366f1" stroke-width="1.5"/>
10
+ <text x="110" y="58" text-anchor="middle" font-size="13" font-weight="600" fill="#312e81">One local trace</text>
11
+ <text x="110" y="78" text-anchor="middle" font-size="11" fill="#475569">JSONL you own</text>
12
+ <path d="M212 67h28" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
13
+ <rect x="248" y="28" width="188" height="78" rx="12" fill="#ecfdf5" stroke="#10b981" stroke-width="1.5"/>
14
+ <text x="342" y="58" text-anchor="middle" font-size="13" font-weight="600" fill="#064e3b">Debug</text>
15
+ <text x="342" y="78" text-anchor="middle" font-size="11" fill="#475569">view · report · explain</text>
16
+ <path d="M444 67h28" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
17
+ <rect x="480" y="28" width="188" height="78" rx="12" fill="#fff7ed" stroke="#f59e0b" stroke-width="1.5"/>
18
+ <text x="574" y="58" text-anchor="middle" font-size="13" font-weight="600" fill="#78350f">Prevent</text>
19
+ <text x="574" y="78" text-anchor="middle" font-size="11" fill="#475569">check · contract · CI</text>
20
+ <path d="M676 67h28" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
21
+ <rect x="712" y="28" width="172" height="78" rx="12" fill="#f5f3ff" stroke="#7c3aed" stroke-width="1.5"/>
22
+ <text x="798" y="58" text-anchor="middle" font-size="13" font-weight="600" fill="#4c1d95">Share</text>
23
+ <text x="798" y="78" text-anchor="middle" font-size="11" fill="#475569">redact · bundle · verify</text>
24
+ <text x="450" y="132" text-anchor="middle" font-size="12" fill="#64748b">Capture once. Debug, prevent, and share from the same local trace.</text>
34
25
  </g>
35
26
  </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-inspect",
3
- "version": "6.17.2",
3
+ "version": "6.17.3",
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",
@@ -181,6 +181,7 @@
181
181
  "docs/VSCODE.md",
182
182
  "docs/assets/agent-inspect-logo.svg",
183
183
  "docs/assets/agent-inspect-logo-dark.svg",
184
+ "docs/assets/agent-inspect-logo-mark.svg",
184
185
  "docs/assets/readme-product-loop.svg"
185
186
  ],
186
187
  "sideEffects": false,
@@ -2412,7 +2412,12 @@ function countErrorNodes(nodes) {
2412
2412
  return nodes.filter((entry) => entry.node.event.status === "error").length;
2413
2413
  }
2414
2414
  function slowestNode(nodes) {
2415
- return nodes.filter((entry) => entry.node.event.durationMs !== void 0).sort((a, b) => {
2415
+ return nodes.filter(
2416
+ (entry) => entry.node.event.durationMs !== void 0 && // The RUN boundary spans the whole run, so its duration always dominates
2417
+ // and shadows every real step. Rank actual work nodes only, matching the
2418
+ // stats slowest-step ranking, which never counts the run envelope.
2419
+ entry.node.event.kind !== "RUN"
2420
+ ).sort((a, b) => {
2416
2421
  const delta = (b.node.event.durationMs ?? 0) - (a.node.event.durationMs ?? 0);
2417
2422
  return delta !== 0 ? delta : a.index - b.index;
2418
2423
  })[0];
@@ -11336,5 +11341,5 @@ function renderGateReport(result, options = {}) {
11336
11341
  }
11337
11342
 
11338
11343
  export { COHORT_METRIC_IDS, 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, diffRuns, diffTraceEvents, enrichSessionRunRecord, escapeHtml, escapeMarkdown, extractMetadata, extractOutcomesFromTraceEvents, filterMetasBySessionScope, filterTraces, flattenTree, formatDuration2 as formatDuration, formatStepLabel, formatTimestamp, gateHasThresholds, getIndent, getTraceFilePath, inferEvidenceFileRole, isAgentInspectTrace, isPersistedInspectEvent, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, manualTraceEventsToComparableRun, nanoid, normalizeBundleOutputPath, openTrace, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseTraceJsonl, persistedInspectEventsToTraceEvents, 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, summarizeObservedOutcomes, summarizeSemanticParity, traceEventToPersistedInspectEvent, truncateName, truncateStringForProfile, validateEvent, validateSuiteConfig, verifyEvidenceDirectory, zeroKinds };
11339
- //# sourceMappingURL=chunk-FXGWXSFV.mjs.map
11340
- //# sourceMappingURL=chunk-FXGWXSFV.mjs.map
11344
+ //# sourceMappingURL=chunk-5GGYDIZD.mjs.map
11345
+ //# sourceMappingURL=chunk-5GGYDIZD.mjs.map