noctrace 0.7.5 → 0.8.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.
- package/.claude-plugin/plugin.json +7 -7
- package/README.md +67 -38
- package/dist/client/assets/index-B37clQwh.js +30 -0
- package/dist/client/assets/index-DwPuae45.css +2 -0
- package/dist/client/index.html +2 -2
- package/dist/server/server/routes/api.js +79 -4
- package/dist/server/server/watcher.js +2 -1
- package/dist/server/server/ws.js +1 -1
- package/dist/server/shared/otlp-export.js +116 -0
- package/dist/server/shared/parser.js +132 -16
- package/dist/server/shared/session-metadata.js +161 -0
- package/hooks/hooks.json +33 -0
- package/package.json +15 -6
- package/dist/client/assets/index-9-y1oErw.js +0 -30
- package/dist/client/assets/index-DyjeNSzP.css +0 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noctrace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"description": "Chrome DevTools Network-tab-style waterfall visualizer for Claude Code agent workflows",
|
|
5
|
-
"author":
|
|
6
|
-
|
|
7
|
-
"url": "https://nyktora.com"
|
|
8
|
-
},
|
|
5
|
+
"author": "Nyktora Group LLC",
|
|
6
|
+
"license": "MIT",
|
|
9
7
|
"homepage": "https://nyktora.github.io/noctrace/",
|
|
10
8
|
"repository": "https://github.com/nyktora/noctrace",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
9
|
+
"keywords": ["devtools", "waterfall", "observability", "timeline", "context-health", "claude-code", "agent-monitoring", "ai-observability"],
|
|
10
|
+
"category": "observability",
|
|
11
|
+
"minClaudeCodeVersion": "1.0.0",
|
|
12
|
+
"capabilities": ["hooks", "mcp"]
|
|
13
13
|
}
|
package/README.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Open-source observability for <a href="https://docs.anthropic.com/en/docs/claude-code">Claude Code</a> agent workflows.
|
|
7
|
+
Chrome DevTools Network-tab-style waterfall visualizer that monitors tool calls, tracks token usage, and detects context rot — all locally, with zero config.
|
|
8
|
+
<br /><br />
|
|
9
|
+
Noctrace reads Claude Code JSONL session logs from <code>~/.claude/projects/</code> and renders them as an interactive waterfall timeline.
|
|
10
|
+
See every tool call, sub-agent spawn, token cost, and context window fill level at a glance.
|
|
11
|
+
Built for developers using Anthropic's Claude Code who want to understand what their AI agents are actually doing.
|
|
9
12
|
</p>
|
|
10
13
|
|
|
11
14
|
<p align="center">
|
|
@@ -20,18 +23,28 @@
|
|
|
20
23
|
<img src="docs/screenshots/noctrace-demo.gif" alt="Noctrace demo — waterfall timeline, agent groups, detail panel" width="100%" />
|
|
21
24
|
</p>
|
|
22
25
|
|
|
23
|
-
## Why
|
|
26
|
+
## Why Noctrace?
|
|
24
27
|
|
|
25
28
|
Claude Code's terminal output is opaque. Tool calls show summaries like "Read 3 files" and "Edited 2 files" — no paths, no timing, no concurrency visibility. When sub-agents spawn sub-agents, you're flying blind.
|
|
26
29
|
|
|
27
30
|
Noctrace reads Claude Code's session logs from `~/.claude/projects/` and renders them as an interactive waterfall timeline — the same visual paradigm that makes Chrome DevTools' Network tab instantly readable.
|
|
28
31
|
|
|
32
|
+
- **Waterfall timeline** — See tool calls laid out on a time axis, just like Chrome DevTools Network tab
|
|
33
|
+
- **Sub-agent visibility** — Expandable agent rows show nested tool calls from Explore, Plan, and custom agents
|
|
34
|
+
- **Context health scoring** — A-F grade based on context fill, compaction frequency, re-reads, and error acceleration
|
|
35
|
+
- **Token cost tracking** — Per-row USD estimates using Claude's per-model pricing (Opus, Sonnet, Haiku)
|
|
36
|
+
- **Efficiency and security tips** — Automatic detection of wasteful patterns and security anti-patterns
|
|
37
|
+
- **Zero config** — Just run `npx noctrace` and it reads your local Claude Code session logs
|
|
38
|
+
|
|
29
39
|
## Install
|
|
30
40
|
|
|
31
41
|
```bash
|
|
32
|
-
# Run directly (no install needed)
|
|
33
42
|
npx noctrace
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
That's it. No config required. Noctrace starts a local server, opens your browser, and begins reading Claude Code session logs from `~/.claude/projects/` immediately.
|
|
34
46
|
|
|
47
|
+
```bash
|
|
35
48
|
# Or install globally
|
|
36
49
|
npm install -g noctrace
|
|
37
50
|
noctrace
|
|
@@ -43,47 +56,45 @@ noctrace
|
|
|
43
56
|
claude plugin install nyktora/noctrace
|
|
44
57
|
```
|
|
45
58
|
|
|
46
|
-
Requires Node.js 20+.
|
|
59
|
+
Requires Node.js 20+. Optional `--install-hooks` flag enables real-time hook events from Claude Code.
|
|
47
60
|
|
|
48
61
|
## Features
|
|
49
62
|
|
|
50
|
-
- **Waterfall
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
54
|
-
- **
|
|
55
|
-
- **
|
|
56
|
-
- **
|
|
57
|
-
- **
|
|
58
|
-
- **
|
|
59
|
-
- **
|
|
60
|
-
- **
|
|
61
|
-
- **
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
64
|
-
- **
|
|
65
|
-
- **
|
|
66
|
-
- **
|
|
67
|
-
- **
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
- **
|
|
71
|
-
- **
|
|
72
|
-
- **
|
|
73
|
-
- **
|
|
74
|
-
- **
|
|
75
|
-
- **
|
|
76
|
-
- **
|
|
77
|
-
- **Agent Teams panel** — detects running Agent Teams at `~/.claude/teams/`, shows members and task counts in a flyout (`GET /api/teams`)
|
|
78
|
-
- **Context Startup flyout** — shows which instruction files (CLAUDE.md and others) loaded at session start with estimated token counts, parsed from JSONL system records
|
|
63
|
+
- **Waterfall Timeline Visualization** — horizontal bars on a shared time axis showing tool call concurrency and duration, just like Chrome DevTools Network tab
|
|
64
|
+
- **Sub-Agent Waterfall Visualization** — collapsible agent row groups with real execution time bars; parses sub-agent JSONL files to show what happened inside each agent
|
|
65
|
+
- **Real-Time Session Monitoring** — file watcher pushes new events via WebSocket as your Claude Code session runs
|
|
66
|
+
- **Token Drift Detection** — tracks how per-turn token cost drifts from baseline, warns when sessions burn excessive quota
|
|
67
|
+
- **Context Health Scoring** — A-F letter grade from 5 signals with actionable recommendations for when to run `/compact`
|
|
68
|
+
- **Compact Stats Toolbar** — shows agent count, health grade, drift factor, total tokens, and session duration at a glance
|
|
69
|
+
- **Advanced Filtering** — structured filter syntax: `type:bash`, `>5s`, `<100ms`, `tokens:>1k`, `error`, `running`, `success` — combinable with plain text search
|
|
70
|
+
- **Per-Tool Latency Stats** — Session Stats flyout shows P50/P95/Max latency per tool type; calls exceeding a configurable threshold (default 5s) are flagged with a clock icon
|
|
71
|
+
- **Loop Detection** — flags 3+ consecutive identical tool calls (same tool + same input) as a warning tip on the row
|
|
72
|
+
- **Session Comparison** — split-screen view comparing two Claude Code sessions side-by-side: health grades, summary metrics, tool mix bars, and context fill trajectory sparklines
|
|
73
|
+
- **Virtual Scrolling** — handles sessions with thousands of tool calls without performance degradation
|
|
74
|
+
- **Zoom and Pan** — mouse wheel zoom (1-50x), click-drag pan on the timeline
|
|
75
|
+
- **Detail Panel** — click any row for full tool input/output, resizable two-column layout
|
|
76
|
+
- **Re-Read Detection** — flags duplicate file reads that waste context window space
|
|
77
|
+
- **Efficiency Tips** — 8 waste patterns detected (re-reads, fan-out, correction loops, repeated commands, token spikes, high fill, no delegation, post-compaction re-reads) with amber lightbulb indicators
|
|
78
|
+
- **Security Tips** — 13 patterns detect secrets, dangerous commands, exfiltration attempts, prompt injection, and more, with a red shield indicator
|
|
79
|
+
- **Markdown Rendering** — detail panel renders markdown in tool output with zero dependencies, XSS-safe
|
|
80
|
+
- **Session Export** — share sessions as standalone offline HTML files, no server required
|
|
81
|
+
- **Claude Code Hook Integration** — optional real-time event streaming from Claude Code via `--install-hooks`
|
|
82
|
+
- **Context Drift Rate** — detects accelerating token growth before context rot degrades output quality
|
|
83
|
+
- **MCP Session Registry** — sessions self-register and unregister automatically; dashboard shows only active sessions with a live count indicator
|
|
84
|
+
- **Per-Tool Token Cost Estimation** — estimated USD cost on every waterfall row and session total in the toolbar; uses Claude's public pricing with per-model detection (Sonnet, Opus, Haiku)
|
|
85
|
+
- **Agent Type Labels** — sub-agent rows show the named agent type (e.g., "Explore", "core:deep-researcher") as a blue badge chip
|
|
86
|
+
- **Tool Failure Rows** — tool crashes, timeouts, and kills render as distinct red-tinted rows with a lightning bolt icon, separate from normal error results
|
|
87
|
+
- **API Error Markers** — rate limit, billing, and auth failures appear as full-width red alert banners on the timeline
|
|
88
|
+
- **Agent Teams Panel** — detects running Agent Teams at `~/.claude/teams/`, shows members and task counts in a flyout
|
|
89
|
+
- **Context Startup Flyout** — shows which instruction files (CLAUDE.md and others) loaded at session start with estimated token counts, parsed from JSONL system records
|
|
79
90
|
|
|
80
91
|

|
|
81
92
|
|
|
82
|
-
### Token Drift
|
|
93
|
+
### Token Drift Detection
|
|
83
94
|
|
|
84
95
|
The stats pill shows a **drift factor** (e.g. `2.8x`) measuring how much each turn costs compared to the session's baseline. A 10x drift means every turn burns 10x more quota than it did at the start. Session picker shows drift per-session so you can spot wasteful sessions at a glance.
|
|
85
96
|
|
|
86
|
-
### Context Health
|
|
97
|
+
### Context Health Scoring
|
|
87
98
|
|
|
88
99
|

|
|
89
100
|
|
|
@@ -97,7 +108,7 @@ Noctrace computes a real-time health score from your session data and warns you
|
|
|
97
108
|
| Error Rate | 10% | Accelerating errors in second half of session |
|
|
98
109
|
| Tool Efficiency | 10% | Declining productive output |
|
|
99
110
|
|
|
100
|
-
### Detail Panel
|
|
111
|
+
### Tool Call Detail Panel
|
|
101
112
|
|
|
102
113
|

|
|
103
114
|
|
|
@@ -157,10 +168,28 @@ npm run dev # starts server + Vite dev server
|
|
|
157
168
|
- **Tests**: Vitest 4
|
|
158
169
|
- **Language**: TypeScript 5.9 (strict mode)
|
|
159
170
|
|
|
171
|
+
## Compatibility
|
|
172
|
+
|
|
173
|
+
Noctrace works with all Claude Code versions that write JSONL session logs to `~/.claude/projects/`. This includes:
|
|
174
|
+
|
|
175
|
+
- **Claude Code CLI** (`claude` command)
|
|
176
|
+
- **Claude Code in VS Code** (via the extension)
|
|
177
|
+
- **Claude Code in JetBrains** (via the extension)
|
|
178
|
+
- **Claude Code Desktop App** (Mac/Windows)
|
|
179
|
+
|
|
180
|
+
No API keys or cloud accounts required. Noctrace is 100% local — your session data never leaves your machine.
|
|
181
|
+
|
|
160
182
|
## License
|
|
161
183
|
|
|
162
184
|
[MIT](LICENSE)
|
|
163
185
|
|
|
186
|
+
## Links
|
|
187
|
+
|
|
188
|
+
- [Website](https://nyktora.github.io/noctrace/) — Landing page and documentation
|
|
189
|
+
- [npm](https://www.npmjs.com/package/noctrace) — Package registry
|
|
190
|
+
- [GitHub](https://github.com/nyktora/noctrace) — Source code and issues
|
|
191
|
+
- [Changelog](CHANGELOG.md) — Version history
|
|
192
|
+
|
|
164
193
|
---
|
|
165
194
|
|
|
166
195
|
<p align="center">
|