@swestash/agent-lens 0.17.3 → 0.17.5

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/README.md CHANGED
@@ -1,88 +1,60 @@
1
1
  # Agent Lens
2
2
 
3
- > Passively collect, search, and audit your Claude Code CLI session traces — **100% local**.
3
+ Collect, search, and audit your Claude Code session traces. 100% local.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@swestash/agent-lens)](https://www.npmjs.com/package/@swestash/agent-lens)
6
6
  ![Node](https://img.shields.io/badge/node-%E2%89%A524-brightgreen)
7
7
  ![Platform: Linux · macOS · Windows](https://img.shields.io/badge/platform-Linux%20%C2%B7%20macOS%20%C2%B7%20Windows-lightgrey)
8
8
  ![License: MIT](https://img.shields.io/badge/license-MIT-blue)
9
9
 
10
- Claude Code records rich per-session telemetry under `~/.claude/`, but prunes it on a rolling
11
- **30-day window**. Agent Lens continuously copies that data out before it's lost, normalizes it into
12
- a queryable SQLite store, and gives you three things over it — a searchable transcript browser,
13
- usage/cost dashboards, and a deterministic, no-AI **audit of what the agent actually did on your
14
- machine** — **without a single byte leaving your machine**.
10
+ Claude Code prunes its session records after a rolling 30-day window. Agent Lens copies them into a
11
+ local archive first, and gives you a transcript browser, usage and cost dashboards, and a
12
+ deterministic, no-AI audit of what the agent did on your machine. Nothing leaves your machine.
15
13
 
16
14
  ## Install
17
15
 
16
+ Requires Node.js 24 or later.
17
+
18
18
  ```bash
19
- npm install -g @swestash/agent-lens # or run ad-hoc: npx @swestash/agent-lens <command>
19
+ npm install -g @swestash/agent-lens # or run once: npx @swestash/agent-lens <command>
20
20
  ```
21
21
 
22
- The installed command is **`agent-lens`** (the package is published under the `@swestash` scope).
23
- Requires **Node.js ≥ 24**.
24
-
25
- There are **no compiled dependencies** — SQLite comes from Node's built-in `node:sqlite`. Nothing is
26
- built at install time, so there is no compiler toolchain to set up, no platform-specific prebuilt
27
- binary to match, and no install script for npm to prompt about.
22
+ There are no compiled dependencies: SQLite comes from Node's built-in `node:sqlite`, so nothing is
23
+ built or downloaded at install time.
28
24
 
29
25
  ## Quick start
30
26
 
31
- Agent Lens runs a three-stage local pipeline — `collect → ingest → serve`:
32
-
33
27
  ```bash
34
- # Configure which accounts to collect (defaults to one: ~/.claude).
35
- # → agent-lens.config.json next to your data dir, or set AGENT_LENS_CONFIG
36
-
37
- agent-lens collect --then-ingest # Stages 1–2: mirror transcripts to the archive, build the DB
38
- agent-lens serve # Stage 3: browse → http://127.0.0.1:4477
39
-
40
- # Make it permanent — install as OS services (survives reboot):
41
- agent-lens service install # periodic collect+ingest AND the always-on UI
42
- # ...or keep it fresh in the foreground instead:
43
- agent-lens watch # a resident process that collects+ingests on file change
28
+ agent-lens collect --then-ingest # copy your transcripts and build the database
29
+ agent-lens serve # open http://127.0.0.1:4477
30
+ agent-lens service install # optional: keep collecting and serving across reboots
44
31
  ```
45
32
 
46
- No configuration is required to start: with no config file, Agent Lens collects the single default
47
- source `~/.claude`.
48
-
49
- ### Where your data lives
50
-
51
- Installed from npm, the archive and SQLite store go to a per-user data directory:
52
-
53
- | Platform | Data directory |
54
- | --- | --- |
55
- | Linux | `$XDG_DATA_HOME/agent-lens`, else `~/.local/share/agent-lens` |
56
- | macOS | `~/Library/Application Support/agent-lens` |
57
- | Windows | `%LOCALAPPDATA%\agent-lens` |
58
-
59
- Set `AGENT_LENS_DATA` to put it elsewhere — that is the only way to relocate the archive, which the
60
- SQLite store and triage sidecar follow. `agent-lens config` prints the resolved paths and where each
61
- value came from.
33
+ With no config file, Agent Lens collects `~/.claude`.
62
34
 
63
- ### Commands
35
+ ## Commands
64
36
 
65
37
  | Command | What it does |
66
38
  | --- | --- |
67
- | `agent-lens collect [--then-ingest]` | Mirror each configured account's transcripts into the local archive (never deletes, never copies secrets). |
68
- | `agent-lens ingest` | Normalize the archive into the SQLite store. |
69
- | `agent-lens serve` | Serve the web UI + read-only API at `http://127.0.0.1:4477`. |
70
- | `agent-lens watch` | Foreground resident: collect + ingest on file change. |
71
- | `agent-lens metrics` | Re-run classification, security detection, error typing, and file-change indexing over an already-ingested store. |
72
- | `agent-lens export <sessionId>` | Write a session to a shareable Markdown file — redacted by default (`--level secrets\|structure`, `--no-redact` to opt out). |
73
- | `agent-lens service <install\|uninstall\|status> [collector\|server\|all]` | Install/manage OS services (systemd / launchd / Windows Task Scheduler). |
74
- | `agent-lens config` | Print the effective configuration — sources, paths, server binding — and where each value came from. |
39
+ | `agent-lens collect [--then-ingest]` | Copy each account's transcripts into the archive. Never deletes, never copies credentials. |
40
+ | `agent-lens ingest [--full]` | Build or update the SQLite store from the archive. |
41
+ | `agent-lens serve` | Serve the web UI and API on `127.0.0.1:4477`. |
42
+ | `agent-lens watch` | Collect and ingest whenever a transcript changes. |
43
+ | `agent-lens metrics` | Rerun classification, security detection, error typing, and file indexing on the store. |
44
+ | `agent-lens export <sessionId>` | Write a session to Markdown, redacted by default. |
45
+ | `agent-lens service <install\|uninstall\|status> [collector\|server\|all]` | Manage the OS services (systemd, launchd, Task Scheduler). |
46
+ | `agent-lens config` | Print the effective configuration and where each value came from. |
75
47
 
76
- ## Privacy
48
+ ## Where your data lives
77
49
 
78
- Everything stays on your machine — no telemetry, no network calls, no accounts. The collector copies
79
- transcript files only and skips anything that looks like a credential. See the
80
- [privacy posture](https://github.com/SWEStash/agent-lens#privacy) for details.
50
+ In a per-user data directory (on Linux, `~/.local/share/agent-lens`). `agent-lens config` prints the
51
+ resolved paths, and `AGENT_LENS_DATA` moves them. All platforms are listed in the
52
+ [usage guide](https://github.com/SWEStash/agent-lens/blob/main/docs/USAGE.md#paths).
81
53
 
82
54
  ## Documentation
83
55
 
84
- Full docs, configuration reference, screenshots, architecture decisions, and the read-only demo live
85
- in the repository: **https://github.com/SWEStash/agent-lens**
56
+ Configuration, screenshots, the [privacy posture](https://github.com/SWEStash/agent-lens#privacy),
57
+ and a live demo are in the repository: https://github.com/SWEStash/agent-lens
86
58
 
87
59
  ## License
88
60
 
@@ -1335,12 +1335,19 @@ var PRICE_TABLE = {
1335
1335
  "claude-opus-4-7": { input: 5, output: 25, cacheWrite: 6.25, cacheRead: 0.5 },
1336
1336
  "claude-opus-4-8": { input: 5, output: 25, cacheWrite: 6.25, cacheRead: 0.5 },
1337
1337
  "claude-opus-5": { input: 5, output: 25, cacheWrite: 6.25, cacheRead: 0.5 },
1338
+ "claude-opus-5-5": { input: 4, output: 20, cacheWrite: 5, cacheRead: 0.2 },
1338
1339
  "claude-fable-5": { input: 10, output: 50, cacheWrite: 12.5, cacheRead: 1 },
1340
+ "claude-fable-5-1": { input: 10, output: 50, cacheWrite: 12.5, cacheRead: 0.25 },
1339
1341
  "claude-sonnet-4": { input: 3, output: 15, cacheWrite: 3.75, cacheRead: 0.3 },
1340
- // Sonnet 5 list price. An introductory $2/$10 rate runs through 2026-08-31; we bill the list
1341
- // price so the estimate doesn't silently change under a date, matching the "list price" label.
1342
- "claude-sonnet-5": { input: 3, output: 15, cacheWrite: 3.75, cacheRead: 0.3 },
1342
+ // Sonnet 5 launched at an "introductory" $2/$10 that was later made its standard price; the
1343
+ // announced rise to $3/$15 was cancelled.
1344
+ "claude-sonnet-5": { input: 2, output: 10, cacheWrite: 2.5, cacheRead: 0.2 },
1345
+ "claude-sonnet-5-5": { input: 2, output: 10, cacheWrite: 2.5, cacheRead: 0.1 },
1343
1346
  "claude-haiku-4": { input: 1, output: 5, cacheWrite: 1.25, cacheRead: 0.1 },
1347
+ // Haiku 5.5 is tiered by prompt size: these are the rates up to 100K prompt tokens. Prompts over
1348
+ // 100K bill at 5× ($0.50/$2.50), which this cannot apply: cost is derived from per-model token
1349
+ // sums, after the per-request size is gone. Long-prompt Haiku 5.5 spend is therefore understated.
1350
+ "claude-haiku-5-5": { input: 0.1, output: 0.5, cacheWrite: 0.125, cacheRead: 0.01 },
1344
1351
  "claude-3-5-haiku": { input: 0.8, output: 4, cacheWrite: 1, cacheRead: 0.08 },
1345
1352
  "claude-3-5-sonnet": { input: 3, output: 15, cacheWrite: 3.75, cacheRead: 0.3 }
1346
1353
  };