lumira 0.6.2 → 0.7.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/LICENSE +21 -0
- package/README.md +158 -82
- package/dist/parsers/transcript.d.ts +7 -0
- package/dist/parsers/transcript.js +116 -10
- package/dist/parsers/transcript.js.map +1 -1
- package/dist/render/line1.js +3 -4
- package/dist/render/line1.js.map +1 -1
- package/dist/render/minimal.js +3 -4
- package/dist/render/minimal.js.map +1 -1
- package/dist/render/powerline-line1.js +2 -4
- package/dist/render/powerline-line1.js.map +1 -1
- package/dist/render/shared.d.ts +1 -2
- package/dist/render/shared.js +0 -7
- package/dist/render/shared.js.map +1 -1
- package/dist/themes/catppuccin.d.ts +3 -0
- package/dist/themes/catppuccin.js +26 -0
- package/dist/themes/catppuccin.js.map +1 -0
- package/dist/themes/dracula.d.ts +3 -0
- package/dist/themes/dracula.js +26 -0
- package/dist/themes/dracula.js.map +1 -0
- package/dist/themes/gruvbox.d.ts +3 -0
- package/dist/themes/gruvbox.js +26 -0
- package/dist/themes/gruvbox.js.map +1 -0
- package/dist/themes/index.d.ts +17 -0
- package/dist/themes/index.js +64 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/monokai.d.ts +3 -0
- package/dist/themes/monokai.js +26 -0
- package/dist/themes/monokai.js.map +1 -0
- package/dist/themes/nord.d.ts +3 -0
- package/dist/themes/nord.js +26 -0
- package/dist/themes/nord.js.map +1 -0
- package/dist/themes/solarized.d.ts +3 -0
- package/dist/themes/solarized.js +26 -0
- package/dist/themes/solarized.js.map +1 -0
- package/dist/themes/tokyo-night.d.ts +3 -0
- package/dist/themes/tokyo-night.js +26 -0
- package/dist/themes/tokyo-night.js.map +1 -0
- package/dist/themes/types.d.ts +46 -0
- package/dist/themes/types.js +2 -0
- package/dist/themes/types.js.map +1 -0
- package/dist/themes/util.d.ts +19 -0
- package/dist/themes/util.js +93 -0
- package/dist/themes/util.js.map +1 -0
- package/dist/themes.d.ts +1 -52
- package/dist/themes.js +5 -263
- package/dist/themes.js.map +1 -1
- package/dist/utils/path.d.ts +16 -0
- package/dist/utils/path.js +33 -0
- package/dist/utils/path.js.map +1 -0
- package/package.json +6 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Carlos Cativo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,41 +2,99 @@
|
|
|
2
2
|
|
|
3
3
|
Real-time statusline plugin for [Claude Code](https://code.claude.com) and Qwen Code.
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
[](https://asciinema.org/a/apvjkloigO9hrdVA)
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx lumira install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Interactive wizard — preset, theme, icons — previewed live before write.
|
|
16
|
+
|
|
17
|
+
[](https://www.npmjs.com/package/lumira)
|
|
18
|
+
[](https://www.npmjs.com/package/lumira)
|
|
19
|
+
[](LICENSE)
|
|
20
|
+

|
|
5
21
|

|
|
22
|
+

|
|
23
|
+
[](https://github.com/cativo23/lumira/actions/workflows/ci.yml)
|
|
6
24
|

|
|
7
25
|

|
|
8
|
-
|
|
9
|
-
|
|
26
|
+
|
|
27
|
+
> 🚀 Powering hundreds of Claude Code sessions per week — [share yours](https://github.com/cativo23/lumira/discussions) in Discussions.
|
|
28
|
+
|
|
29
|
+
## Table of contents
|
|
30
|
+
|
|
31
|
+
- [Why lumira?](#why-lumira)
|
|
32
|
+
- [Requirements](#requirements)
|
|
33
|
+
- [Features](#features)
|
|
34
|
+
- [Install](#install)
|
|
35
|
+
- [Display modes](#display)
|
|
36
|
+
- [Themes](#themes)
|
|
37
|
+
- [Powerline](#powerline)
|
|
38
|
+
- [Configuration](#configuration)
|
|
39
|
+
- [Architecture](#architecture)
|
|
40
|
+
- [Development](#development)
|
|
41
|
+
- [Contributing](#contributing)
|
|
42
|
+
- [License](#license)
|
|
43
|
+
|
|
44
|
+
## Why lumira?
|
|
45
|
+
|
|
46
|
+
Claude Code's default statusline shows the model name and current directory. That's it. Lumira surfaces what actually changes during a session and what you'd want to react to:
|
|
47
|
+
|
|
48
|
+
- **Context-window pressure** — color-coded bar from green to blinking red, with a `/compact?` hint at high fill so you act before hitting the wall.
|
|
49
|
+
- **Burn rate** — `$/h` next to total cost, so a runaway agent shows up immediately.
|
|
50
|
+
- **Rate-limit countdown** — 5h/7d usage with reset countdown, so you stop guessing how much budget you have left.
|
|
51
|
+
- **Active tools, agents, and todo progress** — parsed from the live transcript, updated every render.
|
|
52
|
+
- **Cross-platform** — same config drives Claude Code and Qwen Code; Qwen sessions auto-collapse to single-line.
|
|
53
|
+
|
|
54
|
+
Inspired by [claude-hud](https://github.com/jarrodwatts/claude-hud); takes a different stance on opt-in powerline rendering, theme contrast guarantees, and hyperlinked metadata.
|
|
55
|
+
|
|
56
|
+
## Requirements
|
|
57
|
+
|
|
58
|
+
- **Node ≥18**
|
|
59
|
+
- **Nerd Font** (recommended) — for the `` `` `` `` ``◐`` icons throughout the statusline. Falls back to plain glyphs via `icons: emoji` or `icons: none`.
|
|
60
|
+
- **Truecolor terminal** (for themes / powerline) — auto-detected via `COLORTERM=truecolor`. 256-color terminals get a nearest-index projection; named-ANSI terminals fall back to default colors silently.
|
|
10
61
|
|
|
11
62
|
## Features
|
|
12
63
|
|
|
13
|
-
- **
|
|
14
|
-
- **Powerline mode**
|
|
15
|
-
- **OSC 8 hyperlinks** — clickable directory
|
|
16
|
-
- **7
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
64
|
+
- **Context bar with thresholds** — green → yellow → orange → blinking red, plus an actionable `/compact?` hint when fill is high.
|
|
65
|
+
- **Powerline mode** + 7 separator presets (`arrow`, `flame`, `slant`, `round`, `diamond`, `compatible`, `plain`) across 3 lines.
|
|
66
|
+
- **OSC 8 hyperlinks** — clickable directory and version tag on iTerm2, WezTerm, Kitty, VS Code, Alacritty.
|
|
67
|
+
- **7 hand-curated themes** — `dracula`, `nord`, `tokyo-night`, `catppuccin`, `monokai`, `gruvbox`, `solarized`. WCAG AA contrast guaranteed in CI.
|
|
68
|
+
- **Token + cost metrics** — input/output counts, speed (tok/s), $ total + burn rate ($/h).
|
|
69
|
+
- **Auto-fits at <70 cols** — switches from 3-line custom mode to single-line minimal automatically.
|
|
70
|
+
- **Zero runtime dependencies** — Node 18+ only.
|
|
71
|
+
- **Dual-platform** — Claude Code and Qwen Code share the same config.
|
|
72
|
+
|
|
73
|
+
<details>
|
|
74
|
+
<summary>Everything else lumira shows</summary>
|
|
75
|
+
|
|
76
|
+
- **Git status** — branch + staged/modified/untracked counts, 5s TTL cache. Branch turns red on dirty repos in powerline mode.
|
|
77
|
+
- **Rate limits** — 5h/7d usage with color warnings and reset countdown.
|
|
78
|
+
- **Active agents** — running subagent count and types from the transcript.
|
|
79
|
+
- **GSD integration** — current task and update notifications (opt-in).
|
|
80
|
+
- **Config health widget** — surfaces silent fallbacks (theme/powerline degrading in named-ANSI, missing GSD STATE.md). Opt-in.
|
|
81
|
+
- **Memory usage** — process RSS percentage.
|
|
82
|
+
- **MCP server detection** — count of attached MCP servers per session.
|
|
83
|
+
- **Vim-mode hint, thinking effort, worktree, output style, session name** — all togglable per-field via `display.*`.
|
|
84
|
+
- **3-tier color system** — named ANSI / 256-color / truecolor, auto-detected.
|
|
85
|
+
- **Config-driven** — every feature toggleable via JSON config + CLI flags.
|
|
86
|
+
|
|
87
|
+
</details>
|
|
30
88
|
|
|
31
89
|
## Install
|
|
32
90
|
|
|
33
|
-
|
|
91
|
+
The wizard at the top is the fastest path. For the long form:
|
|
34
92
|
|
|
35
93
|
```bash
|
|
36
94
|
npx lumira install
|
|
37
95
|
```
|
|
38
96
|
|
|
39
|
-
The installer walks you through three choices — **preset** (`full` / `balanced` / `minimal`), **theme**, and **icons** — showing a live preview
|
|
97
|
+
The installer walks you through three choices — **preset** (`full` / `balanced` / `minimal`), **theme**, and **icons** — showing a live preview at each step. Press `Esc` to abort without writing anything. In non-interactive shells (piped stdin, CI), the installer skips the wizard and writes sensible defaults (`preset: balanced`, `icons: nerd`). If Qwen Code is detected (`~/.qwen/` exists), the `/lumira` skill is installed for both CLIs.
|
|
40
98
|
|
|
41
99
|
Or install globally:
|
|
42
100
|
|
|
@@ -73,7 +131,7 @@ If installed from source:
|
|
|
73
131
|
{
|
|
74
132
|
"statusLine": {
|
|
75
133
|
"type": "command",
|
|
76
|
-
"command": "node /path/to/
|
|
134
|
+
"command": "node /path/to/lumira/dist/index.js",
|
|
77
135
|
"padding": 0
|
|
78
136
|
}
|
|
79
137
|
}
|
|
@@ -83,27 +141,78 @@ If installed from source:
|
|
|
83
141
|
|
|
84
142
|
### Custom Mode (default, >=70 columns)
|
|
85
143
|
|
|
86
|
-
|
|
87
|
-
Opus 4.6 (1M context) │ main ⇡1 !2 │ my-project +150 -30 │ default │ v2.1.92
|
|
88
|
-
[████████░░░░░░░░░░░░] 21% │ 131k↑ 25k↓ │ $1.31 $2.24/h │ 35m06s │ 142 tok/s │ 72%(5h)
|
|
89
|
-
✓ Read ×3 | ✓ Edit ×2 | ✓ Bash ×5 │ ████████░░ 8/10 | ◐ 1 | ○ 1
|
|
90
|
-
```
|
|
144
|
+

|
|
91
145
|
|
|
92
146
|
### Minimal Mode (<70 columns or `--minimal`)
|
|
93
147
|
|
|
94
|
-
|
|
95
|
-
my-project | main | Opus 4.6 | ████░░░░░░░░░░░░░░░░ 21% | 131k↑ 25k↓ | $1.31
|
|
96
|
-
```
|
|
148
|
+

|
|
97
149
|
|
|
98
150
|
### Powerline Mode (opt-in via `style: "powerline"`)
|
|
99
151
|
|
|
152
|
+

|
|
153
|
+
|
|
154
|
+
Each segment renders with a distinct background color drawn from the active theme; segments are separated by a Nerd Font glyph (default ``). On dirty git repos the branch segment turns red. Falls back to classic mode silently in named-ANSI terminals (powerline needs RGB backgrounds). See [Powerline](#powerline) below for the 7 separator styles.
|
|
155
|
+
|
|
156
|
+
## Themes
|
|
157
|
+
|
|
158
|
+
Seven hand-curated themes, every one tested for WCAG AA contrast against white foreground in CI. Themes apply to both classic and powerline modes:
|
|
159
|
+
|
|
160
|
+
`dracula` · `nord` · `tokyo-night` · `catppuccin` · `monokai` · `gruvbox` · `solarized`
|
|
161
|
+
|
|
162
|
+
**Classic mode** — pipe-separated layout, theme colors applied to text:
|
|
163
|
+
|
|
164
|
+

|
|
165
|
+
|
|
166
|
+
**Powerline mode** — colored segment backgrounds with arrow separators:
|
|
167
|
+
|
|
168
|
+

|
|
169
|
+
|
|
170
|
+
Themes apply in truecolor and 256-color terminals; named-ANSI terminals fall back to default colors (8 base hues can't represent arbitrary palettes).
|
|
171
|
+
|
|
172
|
+
### Browse from the CLI
|
|
173
|
+
|
|
174
|
+
Try a theme without touching your config:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
lumira themes # list all themes
|
|
178
|
+
lumira themes preview tokyo-night # render a sample
|
|
179
|
+
lumira themes preview nord --powerline # same in powerline (default arrow separator)
|
|
180
|
+
lumira themes preview gruvbox --style=flame # powerline with flame separator
|
|
181
|
+
lumira themes preview --all # render every theme in sequence
|
|
182
|
+
lumira themes preview --all --powerline # the powerline grid (great for screenshots)
|
|
100
183
|
```
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
184
|
+
|
|
185
|
+
### Want your favorite theme?
|
|
186
|
+
|
|
187
|
+
Adding a theme is a single new file plus a one-line registration. Every PR runs the **WCAG AA contrast guard** — if any powerline cell drops below 4.5:1 against the foreground, CI rejects it. See [CONTRIBUTING.md → Adding a theme](CONTRIBUTING.md#adding-a-theme) for the walkthrough.
|
|
188
|
+
|
|
189
|
+
## Powerline
|
|
190
|
+
|
|
191
|
+
`style: "powerline"` (or `--powerline`) renders the statusline with colored segment backgrounds and glyph separators inspired by powerline-go / oh-my-posh. Available separator presets via `powerline.style` (or `--powerline-style=<name>`):
|
|
192
|
+
|
|
193
|
+
| Style | Look |
|
|
194
|
+
|---|---|
|
|
195
|
+
| `arrow` | classic right-pointing triangle separator (default) |
|
|
196
|
+
| `flame` | wavy flame-shaped separator |
|
|
197
|
+
| `slant` | forward-slanting separator |
|
|
198
|
+
| `round` | rounded caps at line ends + thin internal separators |
|
|
199
|
+
| `diamond` | each segment isolated as its own pill with rounded caps |
|
|
200
|
+
| `compatible` | unicode `▶` separator (no Nerd Font required) |
|
|
201
|
+
| `plain` | no separator glyphs — just colored blocks |
|
|
202
|
+
| `auto` | picks `arrow` if Nerd Font icons are configured, else `compatible` |
|
|
203
|
+
|
|
204
|
+
### Hyperlinks (OSC 8)
|
|
205
|
+
|
|
206
|
+
The directory on line 1 becomes a clickable `file://` link, and the version tag links to its npm release page on terminals that support [OSC 8](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) (iTerm2, WezTerm, Kitty, Alacritty, VS Code terminal, tmux ≥3.4 with passthrough). Other terminals show plain text. Auto-disabled in `Apple_Terminal` (which leaks markers) and `TERM=dumb`.
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
NO_HYPERLINKS=1 claude # disable
|
|
210
|
+
FORCE_HYPERLINK=1 claude # force-enable (overrides denylist)
|
|
104
211
|
```
|
|
105
212
|
|
|
106
|
-
|
|
213
|
+
### Qwen Code
|
|
214
|
+
|
|
215
|
+
Lumira auto-detects the platform. In Qwen Code sessions, the renderer automatically switches to single-line output regardless of your configured layout — Qwen only displays the first statusline row, so lumira fits everything (model, branch, context bar, cost, cached tokens, thoughts) into one line. **No configuration needed:** the same `config.json` serves both Claude Code and Qwen Code.
|
|
107
216
|
|
|
108
217
|
## Configuration
|
|
109
218
|
|
|
@@ -165,53 +274,6 @@ lumira --icons=nerd|emoji|none # Override icon set
|
|
|
165
274
|
lumira --preset=full|balanced|minimal
|
|
166
275
|
```
|
|
167
276
|
|
|
168
|
-
## Powerline
|
|
169
|
-
|
|
170
|
-
`style: "powerline"` (or `--powerline`) renders the statusline with colored segment backgrounds and glyph separators inspired by powerline-go / oh-my-posh. Available separator presets via `powerline.style` (or `--powerline-style=<name>`):
|
|
171
|
-
|
|
172
|
-
| Style | Look |
|
|
173
|
-
|---|---|
|
|
174
|
-
| `arrow` | classic right-pointing triangle separator (default) |
|
|
175
|
-
| `flame` | wavy flame-shaped separator |
|
|
176
|
-
| `slant` | forward-slanting separator |
|
|
177
|
-
| `round` | rounded caps at line ends + thin internal separators |
|
|
178
|
-
| `diamond` | each segment isolated as its own pill with rounded caps |
|
|
179
|
-
| `compatible` | unicode `▶` separator (no Nerd Font required) |
|
|
180
|
-
| `plain` | no separator glyphs — just colored blocks |
|
|
181
|
-
| `auto` | picks `arrow` if Nerd Font icons are configured, else `compatible` |
|
|
182
|
-
|
|
183
|
-
### Themes
|
|
184
|
-
|
|
185
|
-
Pick one of the 7 built-in themes via `theme: "<name>"` in config or during `lumira install`:
|
|
186
|
-
|
|
187
|
-
`dracula` · `nord` · `tokyo-night` · `catppuccin` · `monokai` · `gruvbox` · `solarized`
|
|
188
|
-
|
|
189
|
-
Each theme ships with a hand-curated **powerline palette** (per-segment background colors) that meets WCAG AA contrast for white foreground. Themes apply in truecolor and 256-color terminals; named-ANSI terminals fall back to default colors (8 base hues can't represent arbitrary palettes).
|
|
190
|
-
|
|
191
|
-
You can browse and preview themes from the CLI without touching your config:
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
lumira themes # list all themes with one-line descriptions
|
|
195
|
-
lumira themes preview dracula # render a sample with the dracula theme
|
|
196
|
-
lumira themes preview nord --powerline # same in powerline style (default arrow separator)
|
|
197
|
-
lumira themes preview gruvbox --style=flame # powerline with the flame separator
|
|
198
|
-
lumira themes preview --all # render every theme in sequence
|
|
199
|
-
lumira themes preview --all --powerline # the powerline grid (great for screenshots)
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Hyperlinks (OSC 8)
|
|
203
|
-
|
|
204
|
-
The directory on line 1 becomes a clickable `file://` link, and the version tag links to its npm release page on terminals that support [OSC 8](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) (iTerm2, WezTerm, Kitty, Alacritty, VS Code terminal, tmux ≥3.4 with passthrough). Other terminals show plain text. Auto-disabled in `Apple_Terminal` (which leaks markers) and `TERM=dumb`.
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
NO_HYPERLINKS=1 claude # disable
|
|
208
|
-
FORCE_HYPERLINK=1 claude # force-enable (overrides denylist)
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Qwen Code
|
|
212
|
-
|
|
213
|
-
Lumira auto-detects the platform. In Qwen Code sessions, the renderer automatically switches to single-line output regardless of your configured layout — Qwen only displays the first statusline row, so lumira fits everything (model, branch, context bar, cost, cached tokens, thoughts) into one line. **No configuration needed:** the same `config.json` serves both Claude Code and Qwen Code.
|
|
214
|
-
|
|
215
277
|
## Architecture
|
|
216
278
|
|
|
217
279
|
```text
|
|
@@ -246,10 +308,24 @@ Set `LUMIRA_DEBUG=1` to trace parser decisions on stderr — cache hits, GSD sta
|
|
|
246
308
|
LUMIRA_DEBUG=1 claude # or export LUMIRA_DEBUG=1
|
|
247
309
|
```
|
|
248
310
|
|
|
311
|
+
## Contributing
|
|
312
|
+
|
|
313
|
+
PRs welcome — particularly for new themes (one of the most common contribution paths). See [CONTRIBUTING.md](CONTRIBUTING.md) for the branching model, theme submission walkthrough, and the contrast-guard CI step that runs on every theme PR.
|
|
314
|
+
|
|
315
|
+
### What's next
|
|
316
|
+
|
|
317
|
+
- **v0.7.0** — additional themes from the community, expanded `lumira themes` subcommand surface.
|
|
318
|
+
- **v1.0** — locked CLI flags surface, snapshot tests for layout regression, soak window before tagging stable. Tracked in [issue #36](https://github.com/cativo23/lumira/issues/36).
|
|
319
|
+
- **Backlog** — incremental transcript parsing for very large sessions ([PR #46](https://github.com/cativo23/lumira/pull/46), deferred until parser hardening lands).
|
|
320
|
+
|
|
321
|
+
For security issues, see [SECURITY.md](SECURITY.md).
|
|
322
|
+
|
|
249
323
|
## Credits
|
|
250
324
|
|
|
251
325
|
Inspired by [claude-hud](https://github.com/jarrodwatts/claude-hud). Migrated from [claude-setup](https://github.com/cativo23/claude-setup) statusline.
|
|
252
326
|
|
|
327
|
+
Theme palettes drawn from upstream specs: [Dracula](https://draculatheme.com), [Nord](https://www.nordtheme.com), [Tokyo Night](https://github.com/folke/tokyonight.nvim), [Catppuccin](https://catppuccin.com), [Monokai](https://monokai.pro), [Gruvbox](https://github.com/morhetz/gruvbox), [Solarized](https://ethanschoonover.com/solarized).
|
|
328
|
+
|
|
253
329
|
## License
|
|
254
330
|
|
|
255
|
-
MIT
|
|
331
|
+
MIT © [Carlos Cativo](https://github.com/cativo23) — see [LICENSE](LICENSE) for the full text.
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { TranscriptData, TodoStatus } from '../types.js';
|
|
2
|
+
export declare const TRANSCRIPT_CACHE_CAP = 10;
|
|
3
|
+
export declare function _transcriptCacheSize(): number;
|
|
4
|
+
export declare function _transcriptCacheKeys(): string[];
|
|
5
|
+
export declare function _clearTranscriptCache(): void;
|
|
6
|
+
export declare const MAX_LINES = 50000;
|
|
7
|
+
export declare function _truncationWarned(): boolean;
|
|
8
|
+
export declare function _resetTruncationWarned(): void;
|
|
2
9
|
export declare function normalizeTodoStatus(status: string | undefined): TodoStatus;
|
|
3
10
|
export declare function extractToolTarget(toolName: string, input: Record<string, unknown> | undefined): string | undefined;
|
|
4
11
|
export declare function parseTranscript(transcriptPath: string): Promise<TranscriptData>;
|
|
@@ -1,14 +1,79 @@
|
|
|
1
|
-
import { createReadStream, existsSync } from 'node:fs';
|
|
1
|
+
import { createReadStream, existsSync, realpathSync } from 'node:fs';
|
|
2
2
|
import { createInterface } from 'node:readline';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
4
|
import { homedir, tmpdir } from 'node:os';
|
|
5
5
|
import { EMPTY_TRANSCRIPT } from '../types.js';
|
|
6
6
|
import { isMtimeFresh, getMtimeState } from '../utils/cache.js';
|
|
7
7
|
import { sanitizeTermString } from '../normalize.js';
|
|
8
|
+
import { isUnderAllowedRoot } from '../utils/path.js';
|
|
8
9
|
import { debug } from '../utils/debug.js';
|
|
9
10
|
const log = debug('transcript');
|
|
11
|
+
// Full re-parse on cache miss is intentional. Incremental byte-offset parsing
|
|
12
|
+
// was evaluated and rejected (see #43): real transcripts are low-thousands of
|
|
13
|
+
// lines, parse cost stays under the statusline budget, and stateful
|
|
14
|
+
// accumulation breaks under concurrent ticks, file replacement (TOCTOU), and
|
|
15
|
+
// TaskUpdate's numeric-taskId index semantics. Each call uses local maps
|
|
16
|
+
// (toolMap, agentMap, todos below) — that locality is what keeps the parser
|
|
17
|
+
// concurrent-tick safe. Don't refactor it into shared mutable state.
|
|
18
|
+
//
|
|
19
|
+
// LRU bound: long-running shells switch transcript paths across sessions, so
|
|
20
|
+
// the cache would otherwise grow one entry per session forever (#69). Map
|
|
21
|
+
// iteration order is insertion order, which gives us a free LRU: re-insert
|
|
22
|
+
// on hit to refresh recency, drop the first key when size > cap.
|
|
23
|
+
export const TRANSCRIPT_CACHE_CAP = 10;
|
|
10
24
|
const transcriptCache = new Map();
|
|
11
|
-
|
|
25
|
+
// Shallow clone of TranscriptData so callers can't mutate the cached arrays.
|
|
26
|
+
// IMPORTANT: this is *shallow*. Caller can still mutate per-entry fields
|
|
27
|
+
// (e.g. `result.tools[0].status = 'evil'`) and corrupt the cache. All current
|
|
28
|
+
// renderers (src/render/line1.ts, line3.ts, powerline-line1.ts,
|
|
29
|
+
// powerline-line3.ts) treat entries as read-only — verified by review. If a
|
|
30
|
+
// future consumer mutates per-entry fields, switch to Object.freeze on each
|
|
31
|
+
// entry or to a structuredClone.
|
|
32
|
+
function cloneShallow(result) {
|
|
33
|
+
return {
|
|
34
|
+
...result,
|
|
35
|
+
tools: result.tools.slice(),
|
|
36
|
+
agents: result.agents.slice(),
|
|
37
|
+
todos: result.todos.slice(),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function touchCache(key, value) {
|
|
41
|
+
if (transcriptCache.has(key))
|
|
42
|
+
transcriptCache.delete(key);
|
|
43
|
+
transcriptCache.set(key, value);
|
|
44
|
+
// Size briefly hits CAP+1 between set() above and delete() below, but
|
|
45
|
+
// touchCache is synchronous — no await boundary exists here, so no other
|
|
46
|
+
// code can observe that window. Each call leaves the map at or below cap.
|
|
47
|
+
if (transcriptCache.size > TRANSCRIPT_CACHE_CAP) {
|
|
48
|
+
const oldest = transcriptCache.keys().next().value;
|
|
49
|
+
if (oldest !== undefined)
|
|
50
|
+
transcriptCache.delete(oldest);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Test-only inspectors. Underscore prefix signals "internal" — do not call
|
|
54
|
+
// from production code paths.
|
|
55
|
+
export function _transcriptCacheSize() {
|
|
56
|
+
return transcriptCache.size;
|
|
57
|
+
}
|
|
58
|
+
export function _transcriptCacheKeys() {
|
|
59
|
+
return Array.from(transcriptCache.keys());
|
|
60
|
+
}
|
|
61
|
+
export function _clearTranscriptCache() {
|
|
62
|
+
transcriptCache.clear();
|
|
63
|
+
}
|
|
64
|
+
export const MAX_LINES = 50_000;
|
|
65
|
+
// Warn-once flag for the MAX_LINES truncation path (#70). Long-running sessions
|
|
66
|
+
// that produce >50k JSONL lines silently lose data after the cap; flagging once
|
|
67
|
+
// per process surfaces the condition in `LUMIRA_DEBUG=1` logs and lets tests
|
|
68
|
+
// observe it. We set the flag regardless of `log.enabled` so the diagnostic is
|
|
69
|
+
// available even when debug logging is off.
|
|
70
|
+
let truncationWarned = false;
|
|
71
|
+
export function _truncationWarned() {
|
|
72
|
+
return truncationWarned;
|
|
73
|
+
}
|
|
74
|
+
export function _resetTruncationWarned() {
|
|
75
|
+
truncationWarned = false;
|
|
76
|
+
}
|
|
12
77
|
export function normalizeTodoStatus(status) {
|
|
13
78
|
if (!status)
|
|
14
79
|
return 'pending';
|
|
@@ -40,23 +105,59 @@ export function extractToolTarget(toolName, input) {
|
|
|
40
105
|
})();
|
|
41
106
|
return typeof raw === 'string' ? sanitizeTermString(raw) : raw;
|
|
42
107
|
}
|
|
108
|
+
// Allowed roots, snapshotted once at module load. We include both the
|
|
109
|
+
// as-returned form and the realpath form of homedir()/tmpdir() so platforms
|
|
110
|
+
// like macOS work transparently — `os.tmpdir()` returns `/var/folders/...`
|
|
111
|
+
// while the kernel realpath is `/private/var/folders/...`. Either form on
|
|
112
|
+
// the candidate side will match.
|
|
113
|
+
//
|
|
114
|
+
// We deliberately do NOT realpath the candidate path inside parseTranscript:
|
|
115
|
+
// (a) it would 5–10× the syscalls on the cache hit path, and
|
|
116
|
+
// (b) it would break legitimate user setups like `~/.claude → /data/claude`,
|
|
117
|
+
// where the canonical target sits outside `homedir()`.
|
|
118
|
+
// Symlink-traversal hardening (defense against attacker-placed symlinks
|
|
119
|
+
// under an allowed root pointing at /etc/passwd) is tracked separately;
|
|
120
|
+
// the threat is narrow because `transcript_path` arrives from Claude Code
|
|
121
|
+
// itself, not arbitrary external input.
|
|
122
|
+
function realpathSafe(p) {
|
|
123
|
+
try {
|
|
124
|
+
return realpathSync(p);
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return resolve(p);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const ALLOWED_ROOTS = [
|
|
131
|
+
...new Set([
|
|
132
|
+
resolve(homedir()),
|
|
133
|
+
resolve(tmpdir()),
|
|
134
|
+
realpathSafe(homedir()),
|
|
135
|
+
realpathSafe(tmpdir()),
|
|
136
|
+
]),
|
|
137
|
+
];
|
|
43
138
|
export async function parseTranscript(transcriptPath) {
|
|
44
139
|
const result = { ...EMPTY_TRANSCRIPT, tools: [], agents: [], todos: [] };
|
|
45
140
|
if (!transcriptPath || !existsSync(transcriptPath)) {
|
|
46
141
|
if (log.enabled)
|
|
47
142
|
log('skip — transcript path missing or nonexistent:', transcriptPath || '(empty)');
|
|
143
|
+
// File may have been deleted/rotated between calls — drop any stale entry
|
|
144
|
+
// so the LRU slot doesn't pin an inaccessible path.
|
|
145
|
+
if (transcriptPath)
|
|
146
|
+
transcriptCache.delete(resolve(transcriptPath));
|
|
48
147
|
return result;
|
|
49
148
|
}
|
|
50
149
|
const resolved = resolve(transcriptPath);
|
|
51
|
-
if (!resolved
|
|
150
|
+
if (!isUnderAllowedRoot(resolved, ALLOWED_ROOTS)) {
|
|
52
151
|
log('skip — path outside allowed roots:', resolved);
|
|
152
|
+
transcriptCache.delete(resolved);
|
|
53
153
|
return result;
|
|
54
154
|
}
|
|
55
|
-
const currentMtime = getMtimeState(
|
|
155
|
+
const currentMtime = getMtimeState(resolved);
|
|
56
156
|
const cached = transcriptCache.get(resolved);
|
|
57
|
-
if (currentMtime && cached && isMtimeFresh(
|
|
157
|
+
if (currentMtime && cached && isMtimeFresh(resolved, cached.mtime)) {
|
|
58
158
|
log('cache hit:', resolved);
|
|
59
|
-
|
|
159
|
+
touchCache(resolved, cached);
|
|
160
|
+
return cloneShallow(cached.result);
|
|
60
161
|
}
|
|
61
162
|
const parseStart = log.enabled ? Date.now() : 0;
|
|
62
163
|
const toolMap = new Map();
|
|
@@ -66,14 +167,19 @@ export async function parseTranscript(transcriptPath) {
|
|
|
66
167
|
let thinkingEffort = '';
|
|
67
168
|
let fileStream = null;
|
|
68
169
|
try {
|
|
69
|
-
fileStream = createReadStream(
|
|
170
|
+
fileStream = createReadStream(resolved);
|
|
70
171
|
const rl = createInterface({ input: fileStream, crlfDelay: Infinity });
|
|
71
172
|
let lineCount = 0;
|
|
72
173
|
for await (const line of rl) {
|
|
73
174
|
if (!line.trim())
|
|
74
175
|
continue;
|
|
75
|
-
if (++lineCount > MAX_LINES)
|
|
176
|
+
if (++lineCount > MAX_LINES) {
|
|
177
|
+
if (!truncationWarned) {
|
|
178
|
+
truncationWarned = true;
|
|
179
|
+
log(`warn — transcript exceeded MAX_LINES (${MAX_LINES}), output may be stale`);
|
|
180
|
+
}
|
|
76
181
|
break;
|
|
182
|
+
}
|
|
77
183
|
try {
|
|
78
184
|
const entry = JSON.parse(line);
|
|
79
185
|
if (!result.sessionStart && entry.timestamp)
|
|
@@ -160,7 +266,7 @@ export async function parseTranscript(transcriptPath) {
|
|
|
160
266
|
result.todos = todos;
|
|
161
267
|
result.thinkingEffort = thinkingEffort;
|
|
162
268
|
if (currentMtime) {
|
|
163
|
-
|
|
269
|
+
touchCache(resolved, { result, mtime: currentMtime });
|
|
164
270
|
}
|
|
165
271
|
if (log.enabled) {
|
|
166
272
|
log('parsed', resolved, {
|
|
@@ -171,6 +277,6 @@ export async function parseTranscript(transcriptPath) {
|
|
|
171
277
|
durationMs: Date.now() - parseStart,
|
|
172
278
|
});
|
|
173
279
|
}
|
|
174
|
-
return result;
|
|
280
|
+
return cloneShallow(result);
|
|
175
281
|
}
|
|
176
282
|
//# sourceMappingURL=transcript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript.js","sourceRoot":"","sources":["../../src/parsers/transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAmB,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;AAEhC,MAAM,eAAe,GAAG,IAAI,GAAG,EAAyD,CAAC;AAEzF,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB,MAAM,UAAU,mBAAmB,CAAC,MAA0B;IAC5D,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IACvC,IAAI,CAAC,KAAK,WAAW,IAAI,CAAC,KAAK,MAAM;QAAE,OAAO,WAAW,CAAC;IAC1D,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,KAAK,aAAa,IAAI,CA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,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC;YAAS,CAAC;QAAC,UAAU,EAAE,OAAO,EAAE,CAAC;IAAC,CAAC;IAEpE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IACzD,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,IAAI,YAAY,EAAE,CAAC;QACjB,UAAU,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;IACxD,CAAC;IACD,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;QAChB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE;YACtB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;YAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;YAC5B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;YAC1B,cAAc,EAAE,MAAM,CAAC,cAAc,IAAI,IAAI;YAC7C,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU;SACpC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist/render/line1.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { basename } from 'node:path';
|
|
2
2
|
import { pathToFileURL } from 'node:url';
|
|
3
3
|
import { fitSegments, truncField } from './text.js';
|
|
4
|
-
import {
|
|
4
|
+
import { formatGitChanges, SEP } from './shared.js';
|
|
5
5
|
import { hyperlink } from './hyperlink.js';
|
|
6
6
|
function getActiveTodo(transcript) {
|
|
7
7
|
const inProgress = transcript.todos.filter(t => t.status === 'in_progress');
|
|
@@ -13,9 +13,8 @@ export function renderLine1(ctx, c) {
|
|
|
13
13
|
const right = [];
|
|
14
14
|
// Model
|
|
15
15
|
if (display.model) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
left.push(c.cyan(`${icons.model} ${modelName}`));
|
|
16
|
+
if (input.model)
|
|
17
|
+
left.push(c.cyan(`${icons.model} ${input.model}`));
|
|
19
18
|
}
|
|
20
19
|
// Branch + git changes (prefer Qwen's native git.branch, fallback to external git)
|
|
21
20
|
const branchName = input.gitBranch || git.branch;
|
package/dist/render/line1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line1.js","sourceRoot":"","sources":["../../src/render/line1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"line1.js","sourceRoot":"","sources":["../../src/render/line1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI3C,SAAS,aAAa,CAAC,UAA0B;IAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,aAAa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AAC;QACrC,KAAK,CAAC,IAAI,CAAC,SAAS,CAClB,6DAA6D,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAChG,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAC3B,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACvD,OAAO,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC"}
|
package/dist/render/minimal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { basename } from 'node:path';
|
|
2
2
|
import { truncField } from './text.js';
|
|
3
|
-
import {
|
|
3
|
+
import { buildContextBar, formatGitChanges, formatQwenMetrics, SEP_MINIMAL } from './shared.js';
|
|
4
4
|
import { formatTokens, formatDuration, formatCost } from '../utils/format.js';
|
|
5
5
|
import { renderLine3 } from './line3.js';
|
|
6
6
|
export function renderMinimal(ctx, c) {
|
|
@@ -27,9 +27,8 @@ export function renderMinimal(ctx, c) {
|
|
|
27
27
|
}
|
|
28
28
|
// Model
|
|
29
29
|
if (display.model) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
parts.push(c.cyan(truncField(modelName, 20)));
|
|
30
|
+
if (input.model)
|
|
31
|
+
parts.push(c.cyan(truncField(input.model, 20)));
|
|
33
32
|
}
|
|
34
33
|
// Context bar
|
|
35
34
|
if (display.contextBar) {
|