inspecto 1.0.8 → 1.0.9

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 (2) hide show
  1. package/README.md +14 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/inspecto)](https://www.npmjs.com/package/inspecto)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![Node.js >= 18](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
5
+ [![Node.js >= 22](https://img.shields.io/badge/node-%3E%3D22-brightgreen)](https://nodejs.org)
6
6
 
7
7
  **Claude Code session quality analyzer — grade sessions, detect regressions, catch cache bugs.**
8
8
 
@@ -40,7 +40,7 @@ Or run without installing:
40
40
  npx inspecto
41
41
  ```
42
42
 
43
- Requires Node.js >= 18. Works on macOS, Linux, and Windows.
43
+ Requires Node.js >= 22 (uses the built-in `node:sqlite` module). Works on macOS, Linux, and Windows.
44
44
 
45
45
  ---
46
46
 
@@ -92,6 +92,14 @@ On March 31, 2026, the leaked Claude Code source revealed two cache bugs that si
92
92
  npx inspecto compare --projects my-app,api-gateway,shared-lib
93
93
  ```
94
94
 
95
+ ### Manage the grade cache
96
+
97
+ `inspecto trend` and `inspecto compare` cache computed grade results in `~/.claude/inspecto-cache.db` so re-runs over the same sessions are near-instant. The cache is keyed by file path + mtime, so it invalidates automatically when Claude Code writes new data to a session.
98
+
99
+ ```bash
100
+ npx inspecto cache clear # delete the cache file (~/.claude/inspecto-cache.db)
101
+ ```
102
+
95
103
  ### Global options
96
104
 
97
105
  | Flag | Description |
@@ -180,7 +188,8 @@ src/
180
188
  ├── anomaly/ # Baseline computation + regression detection + cache anomaly
181
189
  ├── reporter/ # Terminal (chalk + cli-table3) and JSON output modes
182
190
  ├── commands/ # audit, trend, cache-check, compare
183
- └── utils/ # Levenshtein, paths, duration parsing, formatting
191
+ ├── cache/ # SQLite grade-result cache (node:sqlite, ~/.claude/inspecto-cache.db)
192
+ └── utils/ # Levenshtein, paths, duration parsing, formatting, concurrency helper
184
193
  ```
185
194
 
186
195
  Key technical details:
@@ -188,6 +197,8 @@ Key technical details:
188
197
  - **Chunk deduplication**: Assistant responses come as multiple JSONL records sharing `message.id`; content blocks are merged and only the final chunk's `output_tokens` is used
189
198
  - **No external APIs**: All analysis is local. No network calls. Works offline
190
199
  - **Real token cost**: `input_tokens` is always a streaming placeholder — actual input = `cache_read_input_tokens + cache_creation_input_tokens`
200
+ - **Concurrency**: `trend` and `compare` parse up to 16 session files in parallel (semaphore-limited) so large histories don't block
201
+ - **Grade cache**: computed `GradeResult` objects are persisted in `~/.claude/inspecto-cache.db` (SQLite via `node:sqlite`). Cache key = `sha256(path:mtime)`. Re-runs over unchanged sessions skip parsing entirely — typically 2–3× faster
191
202
 
192
203
  ---
193
204
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inspecto",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "inspecto — Claude Code session quality analyzer. Grade sessions, detect regressions, catch cache bugs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "author": "Rahul Bhardwaj",
30
30
  "license": "MIT",
31
31
  "engines": {
32
- "node": ">=18"
32
+ "node": ">=22"
33
33
  },
34
34
  "files": [
35
35
  "dist"