agent-inspect 6.24.0 → 6.25.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +14 -6
  2. package/README.md +1 -1
  3. package/docs/KNOWN-ISSUES.md +5 -0
  4. package/docs/LIMITATIONS.md +2 -0
  5. package/docs/PERFORMANCE.md +2 -0
  6. package/docs/SESSIONS-AND-OUTCOMES.md +5 -0
  7. package/docs/SUPPORT-LEVELS.md +1 -1
  8. package/docs/TRACE-CONTRACTS.md +4 -1
  9. package/package.json +1 -1
  10. package/packages/cli/dist/{chunk-NHVN5AYW.mjs → chunk-HPR2OJPU.mjs} +2 -2
  11. package/packages/cli/dist/{chunk-NHVN5AYW.mjs.map → chunk-HPR2OJPU.mjs.map} +1 -1
  12. package/packages/cli/dist/index.cjs +1 -1
  13. package/packages/cli/dist/index.cjs.map +1 -1
  14. package/packages/cli/dist/index.mjs +4 -4
  15. package/packages/cli/dist/index.mjs.map +1 -1
  16. package/packages/cli/dist/{src-SXWEZTIS.mjs → src-J43ECFHC.mjs} +3 -3
  17. package/packages/cli/dist/{src-SXWEZTIS.mjs.map → src-J43ECFHC.mjs.map} +1 -1
  18. package/packages/core/dist/advanced.cjs +13 -10
  19. package/packages/core/dist/advanced.cjs.map +1 -1
  20. package/packages/core/dist/advanced.d.cts +9 -3
  21. package/packages/core/dist/advanced.d.ts +9 -3
  22. package/packages/core/dist/advanced.mjs +14 -13
  23. package/packages/core/dist/advanced.mjs.map +1 -1
  24. package/packages/core/dist/checks.cjs +176 -51
  25. package/packages/core/dist/checks.cjs.map +1 -1
  26. package/packages/core/dist/checks.d.cts +10 -5
  27. package/packages/core/dist/checks.d.ts +10 -5
  28. package/packages/core/dist/checks.mjs +1 -1
  29. package/packages/core/dist/{chunk-VMDCDWBE.mjs → chunk-LHSXRIYU.mjs} +178 -53
  30. package/packages/core/dist/chunk-LHSXRIYU.mjs.map +1 -0
  31. package/packages/core/dist/chunk-VMDCDWBE.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.25.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ca0ce77: Fix retry fail-open on error→success (identity-based retry classification, chronological fallback/recovery rules) and preflight the omitted-payload 1 MiB bound before copying oversized inputs.
8
+
9
+ ## Unreleased
10
+
11
+ ## 6.25.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 7750198: Stability baseline: freeze support/docs posture through 6.25.x, refresh packed-matrix honesty, and add property-style tool-argument safety checks.
16
+
3
17
  ## 6.24.0
4
18
 
5
19
  ### Minor Changes
@@ -129,12 +143,6 @@
129
143
 
130
144
  - 9aa0a80: Repository health and public-truth patch: permanent roadmap/active-plan structure, aggressive cleanup of archives/trains/proposals, ADRs, package-docs manifest, and repo:health CI gate. Docs/validators only — no schema or runtime product change.
131
145
 
132
- ## Unreleased
133
-
134
- ### Patch
135
-
136
- - Repository health and public-truth cleanup toward 6.16.1 (in progress).
137
-
138
146
  ## 6.16.0
139
147
 
140
148
  ### Minor Changes
package/README.md CHANGED
@@ -212,7 +212,7 @@ The root package is enough for custom capture, the CLI, checks, and Evidence wor
212
212
 
213
213
  ## Status and documentation
214
214
 
215
- **Current published baseline:** **6.24.0** · persisted schema `1.0` · Node.js `>=20` · MIT.
215
+ **Current published baseline:** **6.25.1** · persisted schema `1.0` · Node.js `>=20` · MIT.
216
216
 
217
217
  Legacy v0.1 and v0.2 traces remain readable. Check the npm badge and [changelog](CHANGELOG.md) for the current published version.
218
218
 
@@ -2,6 +2,11 @@
2
2
 
3
3
  AgentInspect is **local-first** and **CLI-first**. These behaviors are intentional constraints or best-effort areas—not silent guarantees.
4
4
 
5
+ ## Contracts and safety
6
+
7
+ - **Retry / side-effect rules (6.23+; chronology fixed in 6.25.1):** `requireIdempotencyEvidenceForRetry` applies to genuine retries including `error → success`, not only retries after a prior `ok`. Ambiguous attempt identity fails closed under that rule. Write timeouts remain **unknown completion** — safe write retry is not claimed.
8
+ - **Omitted-payload digests:** inputs larger than 1 MiB are rejected after a length preflight; oversized rejection must not be treated as a free full-buffer copy path.
9
+
5
10
  ## Logs
6
11
 
7
12
  - **log4js-style parsing** is **best-effort**: embedded JSON must be recoverable from the line; unusual layouts may lose fields or warn.
@@ -8,6 +8,8 @@ This document states what AgentInspect **does not** provide today. It complement
8
8
  - **No production APM replacement**: no sampling agents, no fleet-wide aggregation, no uptime SLAs.
9
9
  - **No vendor upload pipeline**: no built-in Langfuse/Braintrust/New Relic/Datadog direct exporters as live sinks.
10
10
  - **No automatic universal instrumentation** of every framework: integration is explicit (manual traces, log ingest, optional adapters).
11
+ - **No retry execution engine:** TraceContract `retry` rules evaluate attempt identity and evidence only. AgentInspect does not retry tools, remediates nothing, and does not treat a client `idempotencyKey` as proof of exactly-once writes.
12
+ - **Omitted-payload digests** (`createOmittedPayloadCommitment`) are bounded (1 MiB preflight). Digests prove omitted bytes existed; they are not redaction or authorization.
11
13
 
12
14
  ## Correlation metadata (v1.3.0)
13
15
 
@@ -12,6 +12,8 @@ pnpm perf:baseline
12
12
 
13
13
  The script prints deterministic timings for parse, normalize, tree build, diff, export, and checks on synthetic data. Warnings appear when a step exceeds internal soft thresholds.
14
14
 
15
+ These thresholds are **engineering soft budgets** for regression awareness, not product SLAs or marketing claims. See [STABILITY-BASELINE.md](./STABILITY-BASELINE.md).
16
+
15
17
  ## Performance fixtures
16
18
 
17
19
  [`fixtures/performance/`](../fixtures/performance/README.md) ships three deterministic size tiers with the same event shape as the baseline's synthetic traces, for exercising CLI paths against stable on-disk inputs:
@@ -6,14 +6,19 @@ Workflow sessions group related runs (retries, handoffs, multi-agent activity) u
6
6
 
7
7
  Useful CLI entry points: `sessions`, `search`, activity views (see [CLI.md](./CLI.md)).
8
8
 
9
+ Attempt identity for contracts (6.22+): `operationId`, `attemptId`, `attemptNumber`, `retryOf`, `fallbackOf`, `idempotencyKey`. Retry safety evaluation prefers this identity over “saw a prior ok” (see [TRACE-CONTRACTS.md](./TRACE-CONTRACTS.md), corrected in 6.25.1).
10
+
9
11
  ## Observed outcomes
10
12
 
11
13
  Outcomes record what the agent produced or decided at a high level for later review and gates. They remain local JSONL-derived evidence.
12
14
 
15
+ **Dual-axis reminder:** tool/run **execution status** (`ok` / `error`) is independent of behavioral **outcome** (`passed` / `failed` / `unknown`). A graceful tool rejection can be `status: "error"` while the expected behavioral outcome is `passed`. Expanding this for MCP behavioral sessions is the focus of **6.26.0** (#362).
16
+
13
17
  ## Limitations
14
18
 
15
19
  - Session indexing is not a full workflow contract engine
16
20
  - Handoff / approval TraceContract rules are not fully wired — see [TRACE-CONTRACTS.md](./TRACE-CONTRACTS.md)
17
21
  - Studio session pages may still be thinner than APIs — Studio is Beta
22
+ - AgentInspect does not execute retries or mutate source sessions
18
23
 
19
24
  Related: [WORKSPACE.md](./WORKSPACE.md) · [USE-CASES.md](./USE-CASES.md)
@@ -1,6 +1,6 @@
1
1
  # Support levels
2
2
 
3
- Canonical maturity labels for AgentInspect public packages and major surfaces (6.17.x fixed release line).
3
+ Canonical maturity labels for AgentInspect public packages and major surfaces (fixed release line through **6.25.x** stability baseline).
4
4
 
5
5
  ## Definitions
6
6
 
@@ -169,7 +169,7 @@ defineTraceContract({
169
169
 
170
170
  Bounded evidence shapes: string event id, `{ eventId }`, or `{ eventIds }` (max 16). Method must be in the `ObservedOutcomeMethod` vocabulary. Omitting `requireProvenance` leaves prior observation behavior unchanged.
171
171
 
172
- ### `tools.arguments` / `tools.orderRules` / `controls` / `retry` (shipped — experimental, 6.23)
172
+ ### `tools.arguments` / `tools.orderRules` / `controls` / `retry` (shipped — experimental, 6.23; retry chronology corrected in 6.25.1)
173
173
 
174
174
  See [ADR-0010](./decisions/ADR-0010-structured-control-contracts.md).
175
175
 
@@ -202,10 +202,13 @@ defineTraceContract({
202
202
  nonIdempotentTools: ["charge"],
203
203
  requireIdempotencyEvidenceForRetry: true,
204
204
  requireRecoveredFailureVisible: true,
205
+ fallbackOnlyAfterFailure: true,
205
206
  },
206
207
  });
207
208
  ```
208
209
 
210
+ **Retry classification (6.25.1):** a genuine retry is detected from explicit identity preference — `attemptNumber > 1`, valid `retryOf` (target exists and precedes), distinct later `attemptId` under the same `operationId`, or a later finished attempt in an explicitly grouped operation — **not** only from a prior `ok`. `error → success` without `idempotencyKey` / `noSideEffect` evidence fails when `requireIdempotencyEvidenceForRetry` is set. `fallbackOnlyAfterFailure` and `requireRecoveredFailureVisible` require chronological earlier failure in the related chain. A client `idempotencyKey` is evidence of intent, not proof of exactly-once mutation. AgentInspect evaluates traces; it does not execute retries.
211
+
209
212
  Missing structured argument evidence fails closed (`AI_CHECK_TOOL_ARGUMENT_EVIDENCE_UNAVAILABLE`). Findings never include full actual inputs.
210
213
 
211
214
  ### Capture capability matrix (tool-argument evidence)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-inspect",
3
- "version": "6.24.0",
3
+ "version": "6.25.1",
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",
@@ -11823,5 +11823,5 @@ function renderGateReport(result, options = {}) {
11823
11823
  }
11824
11824
 
11825
11825
  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 };
11826
- //# sourceMappingURL=chunk-NHVN5AYW.mjs.map
11827
- //# sourceMappingURL=chunk-NHVN5AYW.mjs.map
11826
+ //# sourceMappingURL=chunk-HPR2OJPU.mjs.map
11827
+ //# sourceMappingURL=chunk-HPR2OJPU.mjs.map