agent-inspect 2.1.0 → 2.2.0

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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - efb3fef: Release v2.2.0 with local test reporter artifacts and CI summaries.
8
+
9
+ Adds the public optional `@agent-inspect/vitest` and `@agent-inspect/jest` reporter packages, the shared experimental `agent-inspect/reporters` helpers, and the `agent-inspect ci-summary` workflow for deterministic local reporter manifests and CI artifacts.
10
+
11
+ ## Unreleased
12
+
13
+ ### Draft v2.2.0 Notes
14
+
15
+ - Prepared the v2.2 reporter and CI workflow release notes for local Vitest/Jest reporter artifacts, the shared `agent-inspect/reporters` manifest helpers, and `agent-inspect ci-summary`.
16
+ - Reporter artifacts remain local-only and metadata-bounded. `ci-summary` reads reporter manifest JSON only, validates relative artifact paths, and does not read trace contents, upload artifacts, call GitHub APIs, or mutate repository state.
17
+ - `@agent-inspect/vitest` and `@agent-inspect/jest` remain private/unpublished until maintainer first-publication setup is explicitly cleared before release prep.
18
+
3
19
  ## 2.1.0
4
20
 
5
21
  ### Minor Changes
package/README.md CHANGED
@@ -22,7 +22,7 @@ agent-inspect gives those runs **structure**: an **execution tree** you can read
22
22
 
23
23
  ## Install
24
24
 
25
- Current npm release line: **2.0.x** for the existing public packages. v2.0.0 is the stable trace-contract release: small root API, schema 1.0 persisted writer path, v0.1/v0.2/v1.0 read compatibility, and explicit non-destructive migration workflow.
25
+ Current npm release line: **2.1.x** for the existing public packages. v2.1.0 adds deterministic local eval and reusable redaction utilities on top of the stable v2 trace contract: small root API, schema 1.0 persisted writer path, v0.1/v0.2/v1.0 read compatibility, and explicit non-destructive migration workflow.
26
26
 
27
27
  ```bash
28
28
  npm install agent-inspect
@@ -240,6 +240,7 @@ AGENT_INSPECT=1 node eval-runner.mjs
240
240
  - **Redact local files** with `agent-inspect redact` or `@agent-inspect/redact` before creating shareable copies.
241
241
  - **Migrate explicitly** with `agent-inspect migrate <trace.jsonl> --to 1.0 --dry-run` or `--output <file>`; originals are never overwritten by default.
242
242
  - **Export share-safe copies** — `export --redaction-profile share` (or `strict`) writes local Markdown/HTML/OpenInference/OTLP JSON only.
243
+ - **Create local CI artifacts** with `agent-inspect artifacts`, and summarize local test-reporter manifests with `agent-inspect ci-summary`.
243
244
  - **Parse structured logs** you already emit (JSON first-class; log4js best-effort).
244
245
  - **Optional LangChain adapter** — metadata-only by default; optional `persist: true` and `stream: true` streaming metadata (no full token capture by default).
245
246
  - **Optional AI SDK adapter** — experimental `@agent-inspect/ai-sdk` telemetry integration for AI SDK v6; metadata-only by default with `recordInputs: false` and `recordOutputs: false`.
@@ -308,6 +309,7 @@ More detail: [docs/LOGS.md](docs/LOGS.md) · [docs/LOG-TO-TREE-QUICKSTART.md](do
308
309
  | `report` | Markdown/HTML inspection report (what + timeline + tree) |
309
310
  | `check` / `scan` / `verify-safe` | Deterministic local trace checks and best-effort safety verification |
310
311
  | `artifacts` | Safe local CI artifact bundles and optional step-summary file output |
312
+ | `ci-summary` | Summarize local Vitest/Jest reporter artifact manifests for CI |
311
313
 
312
314
  ![Timeline with slow-step focus for one run](https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/demos/timeline.gif)
313
315
 
@@ -338,6 +340,8 @@ AgentInspect is the **local-first trace workbench** for TypeScript AI agents:
338
340
 
339
341
  Pass `enabled: false` to `inspectRun` for a no-trace passthrough. Use `maybeInspectRun` with `AGENT_INSPECT=1` to toggle tracing in eval or CI — see [docs/API.md](docs/API.md).
340
342
 
343
+ **Shipped in 2.1.0:** deterministic local eval and redaction utilities. Linked release aligns `agent-inspect`, `@agent-inspect/ai-sdk`, `@agent-inspect/langchain`, `@agent-inspect/tui`, `@agent-inspect/openai-agents`, `@agent-inspect/redact`, and `@agent-inspect/eval` at **2.1.0**.
344
+
341
345
  **Shipped in 2.0.0:** stable root API contract, schema 1.0 persisted writer path, v0.1/v0.2/v1.0 read compatibility, and explicit trace migration workflow. Linked release aligns `agent-inspect`, `@agent-inspect/ai-sdk`, `@agent-inspect/langchain`, `@agent-inspect/tui`, and `@agent-inspect/openai-agents` at **2.0.0**.
342
346
 
343
347
  **Shipped in 1.9.0:** private harness workspace foundation, explain dry-run/local analysis, promoted adapter adoption paths, and the v2 root API slimming plan.
@@ -350,7 +354,7 @@ Pass `enabled: false` to `inspectRun` for a no-trace passthrough. Use `maybeInsp
350
354
 
351
355
  **Shipped in 1.5.0:** non-breaking subpath exports; `what` and `report` CLI; dual-format read path (v0.1 + v0.2 JSONL); [what-report-inspect recipe](examples/recipes/what-report-inspect/). Linked release aligns all three npm packages at **1.5.0**.
352
356
 
353
- **Roadmap beyond current release work:** v2.1 starts the eval/redact utility triangle, followed by reporters/CI, adapter hardening, sessions/MCP telemetry, guardrails, optional viewer/IDE surfaces, and conditional v3 extensibility. See [ROADMAP.md](ROADMAP.md).
357
+ **Roadmap beyond current release work:** v2.2 prepares test reporters and CI workflows, followed by adapter hardening, sessions/MCP telemetry, guardrails, optional viewer/IDE surfaces, and conditional v3 extensibility. See [ROADMAP.md](ROADMAP.md).
354
358
 
355
359
  **Shipped in 1.4.0:** CI artifact recipe ([docs/CI-ARTIFACTS.md](docs/CI-ARTIFACTS.md)); `timeline`, `stats`, and `search` CLI; core helpers `buildRunTimeline`, `buildTraceStats`, `searchTraces`. Linked release aligns all three npm packages at **1.4.0**.
356
360
 
@@ -405,6 +409,12 @@ npx agent-inspect view <run-id> --tui
405
409
 
406
410
  The TUI is available as a separate optional package; its programmatic API is experimental, while the CLI integration (`view --tui`) is the intended usage. Details: [docs/ADAPTERS.md](docs/ADAPTERS.md).
407
411
 
412
+ ### Test reporter artifacts (`@agent-inspect/vitest`, `@agent-inspect/jest`)
413
+
414
+ Optional Vitest/Jest reporter packages are implemented in the workspace for local failure artifacts, but remain private/unpublished until the maintainer clears first-publication setup for a v2.2 release. They write shared `schemaVersion: "0.1"` reporter manifests with safe relative artifact paths and bounded structural metadata. Use `agent-inspect ci-summary` to summarize those local manifests in CI without reading trace contents or calling GitHub APIs.
415
+
416
+ Reporter artifact behavior and API details are documented in [docs/API.md](docs/API.md) and [docs/CI-ARTIFACTS.md](docs/CI-ARTIFACTS.md).
417
+
408
418
  ## Examples and recipes
409
419
 
410
420
  | Example | Shows |
@@ -431,7 +441,7 @@ The TUI is available as a separate optional package; its programmatic API is exp
431
441
  | [examples/recipes/eval-local-checks](examples/recipes/eval-local-checks) | v2.1 deterministic local eval checks |
432
442
  | [examples/recipes/redact-share-safe-file](examples/recipes/redact-share-safe-file) | v2.1 share-safe local redaction copy |
433
443
  | [examples/recipes/eval-ci-artifacts](examples/recipes/eval-ci-artifacts) | v2.1 eval before safe CI artifacts |
434
- | [examples/recipes/test-reporter-artifacts](examples/recipes/test-reporter-artifacts) | v1.8 Vitest/Jest reporter artifact patterns |
444
+ | [examples/recipes/test-reporter-artifacts](examples/recipes/test-reporter-artifacts) | Vitest/Jest reporter artifact patterns |
435
445
  | [examples/recipes/what-report-inspect](examples/recipes/what-report-inspect/) | `what` + `report` inspection |
436
446
  | [examples/recipes/runtime-and-ingestion](examples/recipes/runtime-and-ingestion/) | v1.6 runtime writers + universal ingestion |
437
447
 
package/docs/API.md CHANGED
@@ -222,9 +222,32 @@ No network writer, OpenTelemetry exporter, provider wrapper, or global monkey-pa
222
222
 
223
223
  Recipe: [examples/recipes/ai-sdk-local-telemetry](../examples/recipes/ai-sdk-local-telemetry/).
224
224
 
225
+ ## 11.1 Experimental `agent-inspect/reporters` APIs
226
+
227
+ `agent-inspect/reporters` contains shared, dependency-free helpers for local test reporter artifacts. The subpath does not import Vitest, Jest, GitHub SDKs, provider SDKs, or upload clients.
228
+
229
+ Import from `agent-inspect/reporters`:
230
+
231
+ ```ts
232
+ import {
233
+ TRACE_ARTIFACT_MANIFEST_SCHEMA_VERSION,
234
+ createReporterArtifactPath,
235
+ createTraceArtifactManifest,
236
+ validateReporterArtifactPath,
237
+ type TraceArtifactManifest,
238
+ } from "agent-inspect/reporters";
239
+ ```
240
+
241
+ - **`TRACE_ARTIFACT_MANIFEST_SCHEMA_VERSION`**: currently `"0.1"` for local reporter manifests.
242
+ - **`createTraceArtifactManifest(options)`**: clones, sorts, and deduplicates reporter results/artifacts into deterministic manifest JSON.
243
+ - **`createReporterArtifactPath(options)`**: creates a safe relative artifact path under a caller-provided output directory.
244
+ - **`validateReporterArtifactPath(options)`**: rejects empty, absolute, traversal, Windows-absolute, and symlink-escape style paths before reporters or `ci-summary` trust artifact links.
245
+
246
+ The manifest records framework, generation time, bounded test results, artifact descriptors, redaction profile, and diagnostics. It is an artifact index only; it should not contain raw trace contents, prompts, model outputs, request/response bodies, headers, API keys, secrets, or full tool payloads.
247
+
225
248
  ## 12. Experimental `@agent-inspect/vitest` APIs
226
249
 
227
- `@agent-inspect/vitest` is an optional experimental workspace package for local Vitest failure artifacts. It remains private/unpublished. It does not add a Vitest dependency to root/core, does not upload artifacts, and does not infer trace relationships by timestamp.
250
+ `@agent-inspect/vitest` is an optional experimental workspace package for local Vitest failure artifacts. It remains private/unpublished pending maintainer first-publication setup. It does not add a Vitest dependency to root/core, does not upload artifacts, and does not infer trace relationships by timestamp.
228
251
 
229
252
  Import from `@agent-inspect/vitest`:
230
253
 
@@ -237,6 +260,7 @@ import { createAgentInspectVitestReporter } from "@agent-inspect/vitest";
237
260
  - **`githubSummary`**: optional GitHub step-summary file path. The reporter appends bounded structural counts only and does not use the GitHub API.
238
261
  - **`retainSuccessful`**: `false`/undefined keeps no passing-test artifacts; `true` keeps up to `maxSuccessfulTraces`; a number keeps up to that many passing-test artifacts.
239
262
  - **`maxSuccessfulTraces`**: upper bound for passing-test artifacts, capped by the reporter.
263
+ - **`redactionProfile`**: manifest artifact profile, `local` (default), `share`, or `strict`.
240
264
  - **`resolveTrace(test)`**: optional explicit association resolver when task metadata is not convenient.
241
265
  - **`onDiagnostic(diagnostic)`**: observes non-fatal reporter/artifact failures.
242
266
  - **`getDiagnostics()`** and **`getArtifacts()`** expose reporter state for tests and custom harnesses.
@@ -252,11 +276,11 @@ ctx.task.meta.agentInspect = {
252
276
  };
253
277
  ```
254
278
 
255
- Artifacts are safe structural summaries. They include bounded test identity, status, trace run id, and trace filename, but they do not read or embed raw trace contents, prompts, generated outputs, request/response bodies, headers, API keys, secrets, or tool payloads. Reporter/artifact failures are diagnostics and do not replace original Vitest failures.
279
+ Artifacts are safe structural summaries. The reporter writes a shared `schemaVersion: "0.1"` manifest wrapper with package metadata, generated time, framework, test results, artifact descriptors, relative paths, and redaction profile. It includes bounded test identity, status, trace run id, and trace filename, but it does not read or embed raw trace contents, prompts, generated outputs, request/response bodies, headers, API keys, secrets, or tool payloads. Reporter/artifact failures are diagnostics and do not replace original Vitest failures.
256
280
 
257
281
  ## 13. Experimental `@agent-inspect/jest` APIs
258
282
 
259
- `@agent-inspect/jest` is an optional experimental workspace package for local Jest failure artifacts. It remains private/unpublished. It does not add a Jest dependency to root/core, does not upload artifacts, and does not infer trace relationships by timestamp.
283
+ `@agent-inspect/jest` is an optional experimental workspace package for local Jest failure artifacts. It remains private/unpublished pending maintainer first-publication setup. It does not add a Jest dependency to root/core, does not upload artifacts, and does not infer trace relationships by timestamp.
260
284
 
261
285
  Import from `@agent-inspect/jest`:
262
286
 
@@ -270,6 +294,7 @@ import { AgentInspectJestReporter, createAgentInspectJestReporter } from "@agent
270
294
  - **`githubSummary`**: optional GitHub step-summary file path. The reporter appends bounded structural counts only and does not use the GitHub API.
271
295
  - **`retainSuccessful`**: `false`/undefined keeps no passing-test artifacts; `true` keeps up to `maxSuccessfulTraces`; a number keeps up to that many passing-test artifacts.
272
296
  - **`maxSuccessfulTraces`**: upper bound for passing-test artifacts, capped by the reporter.
297
+ - **`redactionProfile`**: manifest artifact profile, `local` (default), `share`, or `strict`.
273
298
  - **`associations`**: explicit trace associations keyed by `file::fullName`, `basename::fullName`, or `fullName`.
274
299
  - **`resolveTrace(test)`**: optional explicit association resolver for normalized Jest assertion results.
275
300
  - **`onDiagnostic(diagnostic)`**: observes non-fatal reporter/artifact failures.
@@ -294,7 +319,7 @@ reporters: [
294
319
  ],
295
320
  ```
296
321
 
297
- Artifacts are safe structural summaries. They include bounded test identity, status, trace run id, and trace filename, but they do not read or embed raw trace contents, prompts, generated outputs, request/response bodies, headers, API keys, secrets, or tool payloads. Reporter/artifact failures are diagnostics and do not replace original Jest failures.
322
+ Artifacts are safe structural summaries. The reporter writes a shared `schemaVersion: "0.1"` manifest wrapper with package metadata, generated time, framework, test results, artifact descriptors, relative paths, and redaction profile. It includes bounded test identity, status, trace run id, and trace filename, but it does not read or embed raw trace contents, prompts, generated outputs, request/response bodies, headers, API keys, secrets, or tool payloads. Reporter/artifact failures are diagnostics and do not replace original Jest failures.
298
323
 
299
324
  ## 14. Experimental `@agent-inspect/openai-agents` APIs
300
325
 
package/docs/CLI.md CHANGED
@@ -33,6 +33,7 @@ Core commands:
33
33
  - `scan` — best-effort local safety scan for trace capture risks
34
34
  - `verify-safe` — best-effort local trace safety verification
35
35
  - `artifacts` — create safe local CI trace artifact bundles and optional step summaries
36
+ - `ci-summary` — summarize local reporter artifact manifests for CI
36
37
  - `diff` — compare two manual traces (local, read-only)
37
38
  - `timeline` — chronological view of one run (local JSONL)
38
39
  - `stats` — local aggregate stats over a trace directory
@@ -489,7 +490,33 @@ npx agent-inspect artifacts candidate.jsonl --baseline baseline.jsonl --output-d
489
490
 
490
491
  Recipe and sample workflow: [examples/recipes/deterministic-ci-checks](../examples/recipes/deterministic-ci-checks/README.md)
491
492
 
492
- ### 6.14 `diff`
493
+ ### 6.14 `ci-summary`
494
+
495
+ Summarize local Vitest/Jest reporter artifact manifests into deterministic Markdown or JSON. This command reads shared `schemaVersion: "0.1"` manifest JSON files only, including the reporter package wrapper emitted by the workspace reporters. It does not read trace contents, rerun tests, upload artifacts, call GitHub APIs, or mutate repository state. `--output` and `--github-summary` write local files.
496
+
497
+ ```bash
498
+ agent-inspect ci-summary <manifest...> [options]
499
+ ```
500
+
501
+ Options:
502
+
503
+ - `-o, --output <path>`: write the Markdown summary to a local file
504
+ - `--github-summary <path>`: append the Markdown summary to a local file, such as `$GITHUB_STEP_SUMMARY`
505
+ - `--json`: print deterministic JSON summary
506
+
507
+ Example:
508
+
509
+ ```bash
510
+ npx agent-inspect ci-summary .agent-inspect/jest-artifacts/tests/**/report.json \
511
+ --output ./artifacts/reporter-summary.md \
512
+ --github-summary "$GITHUB_STEP_SUMMARY"
513
+ ```
514
+
515
+ Reporter artifact paths in the summary are kept relative and validated conservatively. The summary includes bounded package/framework metadata, test identity, status counts, trace filenames, artifact paths, redaction profiles, and diagnostic counts only.
516
+
517
+ Recipe and sample workflow: [examples/recipes/github-actions-artifact](../examples/recipes/github-actions-artifact/README.md)
518
+
519
+ ### 6.15 `diff`
493
520
 
494
521
  Compare two manual trace runs. Diff is **local** and **read-only** (does not rerun agents).
495
522
 
@@ -553,7 +580,7 @@ Differences:
553
580
 
554
581
  More examples, including timing-only and structure-only diffs, are in `docs/DIFF.md`.
555
582
 
556
- ### 6.15 `timeline`
583
+ ### 6.16 `timeline`
557
584
 
558
585
  Chronological step list for one manual trace. Read-only; does not mutate JSONL files.
559
586
 
@@ -569,7 +596,7 @@ Options:
569
596
 
570
597
  ![Timeline with slow-step focus](../assets/demos/timeline.gif)
571
598
 
572
- ### 6.16 `stats`
599
+ ### 6.17 `stats`
573
600
 
574
601
  Local aggregate statistics over trace files in a directory. Read-only.
575
602
 
@@ -589,7 +616,7 @@ Options:
589
616
 
590
617
  Use `--correlation-id` or `--group-id` to filter runs by `run_started` metadata (see [API.md](./API.md)).
591
618
 
592
- ### 6.17 `search`
619
+ ### 6.18 `search`
593
620
 
594
621
  Deterministic search over local traces (substring / exact filters). No semantic search.
595
622
 
@@ -619,7 +646,7 @@ npx agent-inspect search --duration ">100ms" --json
619
646
 
620
647
  ![Search traces by status error](../assets/demos/search.gif)
621
648
 
622
- ### 6.18 `what`
649
+ ### 6.19 `what`
623
650
 
624
651
  Concise human-readable summary of one local trace run. Read-only; accepts v0.1 manual JSONL and v0.2 persisted-event JSONL through the shared dual-format normalization path. Vocabulary: [TRACE-VOCABULARY-V1.5.md](./proposals/TRACE-VOCABULARY-V1.5.md).
625
652
 
@@ -648,7 +675,7 @@ Outcome: Completed successfully.
648
675
  Slowest: plan (100ms, logic)
649
676
  ```
650
677
 
651
- ### 6.19 `report`
678
+ ### 6.20 `report`
652
679
 
653
680
  Generate a local inspection report combining **what happened**, **timeline**, and **execution tree** sections. The command reads local v0.1 manual JSONL and v0.2 persisted-event JSONL through the shared dual-format normalization path without mutating them. Distinct from `export` (which targets shareable tree snapshots and standards formats).
654
681
 
@@ -673,7 +700,7 @@ Example:
673
700
  npx agent-inspect report minimal-success --dir fixtures/traces --format html -o report.html
674
701
  ```
675
702
 
676
- ### 6.20 `explain`
703
+ ### 6.21 `explain`
677
704
 
678
705
  Explain a local trace using deterministic facts and local inference labels. This command reads through the same local reader pipeline as `open` / `check`; it does not call a model provider, upload traces, replay agents, or mutate input files.
679
706
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-inspect",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Local-first execution-tree debugger for TypeScript AI agents",
@@ -105,6 +105,16 @@
105
105
  "types": "./packages/core/dist/checks.d.cts",
106
106
  "default": "./packages/core/dist/checks.cjs"
107
107
  }
108
+ },
109
+ "./reporters": {
110
+ "import": {
111
+ "types": "./packages/core/dist/reporters.d.ts",
112
+ "default": "./packages/core/dist/reporters.mjs"
113
+ },
114
+ "require": {
115
+ "types": "./packages/core/dist/reporters.d.cts",
116
+ "default": "./packages/core/dist/reporters.cjs"
117
+ }
108
118
  }
109
119
  },
110
120
  "bin": {