agent-inspect 6.9.0 → 6.10.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/docs/BUNDLES.md +31 -9
  4. package/docs/CI-ARTIFACTS.md +10 -1
  5. package/docs/CLI.md +11 -2
  6. package/package.json +1 -1
  7. package/packages/cli/dist/{chunk-WQ5XMFH2.mjs → chunk-36IJ76LH.mjs} +1756 -149
  8. package/packages/cli/dist/chunk-36IJ76LH.mjs.map +1 -0
  9. package/packages/cli/dist/index.cjs +10370 -8774
  10. package/packages/cli/dist/index.cjs.map +1 -1
  11. package/packages/cli/dist/index.mjs +584 -712
  12. package/packages/cli/dist/index.mjs.map +1 -1
  13. package/packages/cli/dist/{src-C4EUHTER.mjs → src-YFN3Q3GP.mjs} +3 -3
  14. package/packages/cli/dist/{src-C4EUHTER.mjs.map → src-YFN3Q3GP.mjs.map} +1 -1
  15. package/packages/core/dist/advanced.cjs +1703 -12
  16. package/packages/core/dist/advanced.cjs.map +1 -1
  17. package/packages/core/dist/advanced.d.cts +334 -3
  18. package/packages/core/dist/advanced.d.ts +334 -3
  19. package/packages/core/dist/advanced.mjs +1163 -10
  20. package/packages/core/dist/advanced.mjs.map +1 -1
  21. package/packages/core/dist/chunk-F7STQ5JF.mjs +479 -0
  22. package/packages/core/dist/chunk-F7STQ5JF.mjs.map +1 -0
  23. package/packages/core/dist/diff.mjs +3 -477
  24. package/packages/core/dist/diff.mjs.map +1 -1
  25. package/packages/core/dist/reporters.cjs +25 -0
  26. package/packages/core/dist/reporters.cjs.map +1 -1
  27. package/packages/core/dist/reporters.d.cts +16 -2
  28. package/packages/core/dist/reporters.d.ts +16 -2
  29. package/packages/core/dist/reporters.mjs +24 -1
  30. package/packages/core/dist/reporters.mjs.map +1 -1
  31. package/packages/cli/dist/chunk-WQ5XMFH2.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3d21e87: Portable Evidence v2: versioned evidence.json manifest (independent of trace schema), self-contained evidence.html with tree/timeline/causal/contract/diff/safety views, directory/html/zip bundle formats, bundle verify, CI artifacts/reporter evidence kind, XSS/a11y corpus, and packed E2E. No schema break; no new root/core dependencies; no default network upload; redaction defaults not weakened.
8
+
3
9
  ## 6.9.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -131,7 +131,7 @@ Details: [Safe sharing](https://github.com/rajudandigam/agent-inspect/blob/main/
131
131
 
132
132
  ## Project status
133
133
 
134
- **Current release:** **6.9.0** (eighteen linked npm packages). Technical launch candidate; external pilot evidence pending. Persisted schema **1.0**. Node.js **≥ 20**. **v7 not scheduled.**
134
+ **Current release:** **6.10.0** (eighteen linked npm packages). Technical launch candidate; external pilot evidence pending. Persisted schema **1.0**. Node.js **≥ 20**. **v7 not scheduled.**
135
135
 
136
136
  [Roadmap](ROADMAP.md) · [Pilot kit](https://github.com/rajudandigam/agent-inspect/blob/main/docs/PRE-V7-PILOT-KIT.md) · [Changelog](CHANGELOG.md)
137
137
 
package/docs/BUNDLES.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  AgentInspect **bundles** are local, offline folders you can attach to PRs, incident threads, or internal reviews. They combine redacted trace copies, HTML reports, safety check results, and a human summary — without mutating source traces or calling the network.
4
4
 
5
+ Evidence v2 (6.10+) adds `evidence.html` + `evidence.json` (hashed integrity) on top of the existing layout. See [EVIDENCE-FORMAT.md](./EVIDENCE-FORMAT.md).
6
+
5
7
  ## Quick start
6
8
 
7
9
  ```bash
@@ -12,8 +14,16 @@ npx agent-inspect bundle <runId> --dir ./.agent-inspect
12
14
  npx agent-inspect bundle --session <sessionId> --dir ./.agent-inspect
13
15
  npx agent-inspect bundle --since 24h --profile strict --dir ./.agent-inspect
14
16
 
15
- # Explicit output folder (.zip suffix is stripped folder-first MVP)
17
+ # Explicit output folder (directory mode strips a bare .zip suffix)
16
18
  npx agent-inspect bundle <runId> --out ./my-bundle --json
19
+
20
+ # Formats
21
+ npx agent-inspect bundle <runId> --format directory --out ./my-bundle
22
+ npx agent-inspect bundle <runId> --format html --out ./evidence-html
23
+ npx agent-inspect bundle <runId> --format zip --out ./my-bundle.zip
24
+
25
+ # Integrity check (Evidence v2 directory)
26
+ npx agent-inspect bundle verify ./my-bundle
17
27
  ```
18
28
 
19
29
  When a workspace exists, default output goes under `.agent-inspect/bundles/`.
@@ -21,15 +31,17 @@ When a workspace exists, default output goes under `.agent-inspect/bundles/`.
21
31
  ## Bundle layout
22
32
 
23
33
  ```text
34
+ evidence.html # offline Evidence v2 report (primary review surface)
35
+ evidence.json # Evidence v2 manifest + SHA-256 file hashes
24
36
  trace.html # offline HTML (index for multi-run)
25
37
  trace.jsonl # redacted JSONL copy
26
38
  summary.md # human overview
27
- metadata.json # manifest (version, profile, safe status)
39
+ metadata.json # legacy manifest (version, profile, safe status)
28
40
  check-results.json # verify-safe results per run
29
41
  redaction-report.json # detector summary (no secret values)
30
42
  eval-results.json # placeholder unless eval artifacts are added later
31
43
  performance-summary.json # placeholder unless perf artifacts are added later
32
- assets/runs/<runId>.* # per-run HTML + JSONL mirrors
44
+ assets/runs/<safeRunId>.* # per-run HTML + JSONL mirrors (safe filenames)
33
45
  ```
34
46
 
35
47
  ## Safety defaults
@@ -37,8 +49,8 @@ assets/runs/<runId>.* # per-run HTML + JSONL mirrors
37
49
  | Setting | Default |
38
50
  | ------- | ------- |
39
51
  | Redaction profile | `share` |
40
- | verify-safe | Runs automatically before write |
41
- | UNSAFE traces | Command fails unless `--allow-unsafe` |
52
+ | verify-safe | Runs automatically on the **redacted artifact** before write |
53
+ | UNSAFE / UNKNOWN artifact | Command fails unless `--allow-unsafe` |
42
54
  | Source traces | Read-only; never modified |
43
55
 
44
56
  Profiles:
@@ -52,16 +64,26 @@ Profiles:
52
64
  | Need | Command |
53
65
  | ---- | ------- |
54
66
  | One redacted file | `redact` |
55
- | Safety scan only | `verify-safe` |
56
- | CI artifact set | `artifacts` |
67
+ | Safety scan only | `verify-safe` / `scan` |
68
+ | CI artifact set (+ evidence on failure) | `artifacts` |
57
69
  | PR-ready evidence folder | **`bundle`** |
70
+ | Integrity check | **`bundle verify`** |
58
71
 
59
72
  ## Review before sharing
60
73
 
61
- Bundles are **derived copies**, not compliance certification. Always review `summary.md`, `check-results.json`, and `trace.html` before attaching to tickets or PRs.
74
+ Bundles are **derived copies**, not compliance certification. Always review `evidence.html` / `summary.md`, `check-results.json`, and run `bundle verify` before attaching to tickets or PRs.
62
75
 
63
76
  See also [SAFE-TRACE-SHARING.md](./SAFE-TRACE-SHARING.md) and [CLI.md §6.24](./CLI.md#624-bundle).
64
77
 
78
+ ## Review workflow
79
+
80
+ ```text
81
+ capture → check → redact → verify-safe → bundle → bundle verify → attach to PR/incident
82
+ ```
83
+
84
+ Broken vs fixed demo fixtures: [`fixtures/evidence/demo/`](../fixtures/evidence/demo/).
85
+
65
86
  ## RFC
66
87
 
67
- Design details: [proposals/SHAREABLE-BUNDLES-V4.3.md](./proposals/SHAREABLE-BUNDLES-V4.3.md).
88
+ - Shareable bundles (v4.3): [proposals/SHAREABLE-BUNDLES-V4.3.md](./proposals/SHAREABLE-BUNDLES-V4.3.md)
89
+ - Portable Evidence v2: [EVIDENCE-FORMAT.md](./EVIDENCE-FORMAT.md)
@@ -28,13 +28,22 @@ AgentInspect helps you **write and export traces locally** in CI. Uploading arti
28
28
 
29
29
  Prefer **`--redaction-profile share`** for internal PR/issue attachments; use **`strict`** for wider sharing.
30
30
 
31
- For a deterministic CI bundle with structural JSON, safe Markdown/HTML summaries, safety check output, optional baseline diff output, and optional GitHub step-summary output:
31
+ For a deterministic CI bundle with structural JSON, safe Markdown/HTML summaries, safety check output, optional baseline diff output, optional Evidence v2 package on failure, and optional GitHub step-summary output:
32
32
 
33
33
  ```bash
34
34
  npx agent-inspect artifacts <run-id> --dir ./.agent-inspect \
35
35
  --output-dir ./artifacts --github-summary "$GITHUB_STEP_SUMMARY"
36
36
  ```
37
37
 
38
+ On check failure (default), this also writes Evidence v2 files matching `bundle`:
39
+
40
+ - `evidence.html`
41
+ - `evidence.json`
42
+ - `check-results.json`
43
+ - `trace.jsonl` (redacted)
44
+
45
+ Success stays quiet for evidence unless you pass `--always-evidence`. Disable with `--no-evidence`.
46
+
38
47
  This command writes local files only. It does not call GitHub APIs or upload artifacts.
39
48
 
40
49
  For Vitest/Jest reporter artifacts, summarize shared `schemaVersion: "0.1"` reporter manifests without reading trace contents:
package/docs/CLI.md CHANGED
@@ -873,7 +873,7 @@ If `@agent-inspect/index-sqlite` is not installed, these subcommands print a sho
873
873
 
874
874
  ### 6.24 `bundle`
875
875
 
876
- Create a **share-safe offline trace bundle** as a local folder (v4.3+). Bundles are derived copies: original traces are read-only and never mutated. Automatic safety assessment runs on the **redacted artifact** before write; the command fails when the artifact is `UNSAFE`/`UNKNOWN` unless `--allow-unsafe`. Source-only findings that redaction removes do not refuse the bundle. See [BUNDLES.md](BUNDLES.md) and [SAFETY-POLICY.md](SAFETY-POLICY.md).
876
+ Create a **share-safe offline trace bundle** (v4.3+ / Evidence v2). Bundles are derived copies: original traces are read-only and never mutated. Automatic safety assessment runs on the **redacted artifact** before write; the command fails when the artifact is `UNSAFE`/`UNKNOWN` unless `--allow-unsafe`. Source-only findings that redaction removes do not refuse the bundle. See [BUNDLES.md](BUNDLES.md), [EVIDENCE-FORMAT.md](EVIDENCE-FORMAT.md), and [SAFETY-POLICY.md](SAFETY-POLICY.md).
877
877
 
878
878
  ```bash
879
879
  agent-inspect bundle <run-id> [options]
@@ -887,10 +887,19 @@ Options:
887
887
  - `--session <session-id>` — bundle all runs in a session
888
888
  - `--since <duration>` — bundle runs with activity since a window (e.g. `24h`, `7d`)
889
889
  - `--profile <profile>` — `local`, `share` (default), or `strict` redaction for exported copies (`--redaction-profile` is the canonical alias)
890
- - `--out <path>` — output directory; `.zip` suffix is stripped (folder-first; `--output` is the canonical alias)
890
+ - `--format <format>` — `directory` (default), `html` (evidence.html + evidence.json sidecar), or `zip` (local archive)
891
+ - `--out <path>` — output directory, `.html` path, or `.zip` path; directory mode still strips a bare `.zip` suffix to a folder (`--output` is the canonical alias)
891
892
  - `--allow-unsafe` — write bundle even when verify-safe reports UNSAFE
892
893
  - `--json` — print deterministic JSON manifest
893
894
 
895
+ Verify an Evidence v2 directory:
896
+
897
+ ```bash
898
+ agent-inspect bundle verify <path> [--unexpected fail|warn|ignore] [--json]
899
+ ```
900
+
901
+ Checks manifest schema, listed-file presence, SHA-256 hashes, unexpected files (default fail), assessment, and generator provenance. Unpack ZIP archives before verify.
902
+
894
903
  Output includes `trace.html`, `trace.jsonl`, `summary.md`, `metadata.json`, `check-results.json`, `redaction-report.json`, and `assets/runs/` mirrors for multi-run bundles.
895
904
 
896
905
  Examples:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-inspect",
3
- "version": "6.9.0",
3
+ "version": "6.10.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Debug, regression-test, and safely share TypeScript AI-agent behavior locally — no account, no default upload, metadata-only by default",