agenthud 0.9.1 → 0.9.3

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
@@ -23,36 +23,52 @@ Run this in a separate terminal while using Claude Code. Press `?` inside the TU
23
23
  AgentHUD reads Claude Code's session files from `~/.claude/projects/` and displays them in a split view:
24
24
 
25
25
  ```
26
- ┌─ Sessions ──────────────────────────────────────────────┐
27
- │ > agenthud ~/WestbrookAI/agenthud
28
- │ #864f [hot] Fix the auth bug in login flow
29
- │ ├─ » code-reviewer
30
- │ (#398c [warm])
31
- │ myproject ~/work/myproject
32
- │ #def4 [hot] Add OAuth support
33
- │ ... 12 cold projects
34
- └─────────────────────────────────────────────────────────┘
35
- ┌─ Activity · agenthud ───────────────────────────────────┐
36
- │ [10:23] ○ Read src/ui/App.tsx
37
- │ [10:23] ~ Edit src/ui/App.tsx
38
- │ [10:23] $ Bash npm test
39
- │ [10:23] < Response Tests passed successfully
40
- │ [10:25] ◆ abc1234 feat: fix auth callback
41
- └─────────────────────────────────────────────────────────┘
26
+ ┌─ Projects ───────────────────────────────────────────────┐
27
+ │ > agenthud ~/WestbrookAI/agenthud 13m
28
+ │ #864f [hot] Fix the auth bug in login flow
29
+ │ ├─ » code-reviewer
30
+ │ (#398c [warm])
31
+ │ myproject ~/work/myproject 2d
32
+ │ #def4 [hot] Add OAuth support
33
+ │ ... 12 cold projects
34
+ └──────────────────────────────────────────────────────────┘
35
+ ┌─ Activity · agenthud ────────────────────────────────────┐
36
+ │ [10:23] ○ Read src/ui/App.tsx
37
+ │ [10:23] ~ Edit src/ui/App.tsx
38
+ │ [10:23] $ Bash npm test
39
+ │ [10:23] < Response Tests passed successfully
40
+ │ [10:25] ◆ abc1234 feat: fix auth callback
41
+ │ › │
42
+ └──────────────────────────────────────────────────────────┘
42
43
  ```
43
44
 
44
- **Session tree (top pane)**
45
+ **Project tree (top pane)**
45
46
  - Sessions grouped under their project (project name + path at the top).
46
- - Session rows show short ID + first user prompt (the session's "topic").
47
+ - Session rows show short ID + first user prompt (the session's "topic"). Long titles truncate with a `…` suffix.
48
+ - Right edge of each row shows how long ago it was last touched: `42m`, `17h`, `3d`, `2w`, `1mo`, `1y`. Project rows use the most recent session's mtime.
47
49
  - Non-interactive sessions (from `claude -p`, SDK, `agenthud summary`) appear in parens and dimmed.
48
50
  - Sub-agents nest one level deeper under their parent session.
49
51
  - Cold projects collapse under `... N cold projects` at the bottom (press Enter on the line to expand).
50
52
  - Press `h` to hide a project, session, or sub-agent (saved to `~/.agenthud/state.yaml`).
51
53
 
52
54
  **Activity viewer (bottom pane)**
53
- - Real-time feed for the selected session: file reads, edits, bash, responses, thinking, git commits.
55
+ - Real-time feed for the selected session: file reads, edits, bash, responses, thinking, git commits. Newest at the bottom, like `tail -f`.
56
+ - A `›` slides left → right along the bottom row while the viewer is in LIVE mode — visible proof the feed is alive. Hidden when paused (scrolled into history) or when the session has no activity yet.
54
57
  - Press `f` to cycle through filter presets (configurable).
55
- - Press `↵` on any row to open a scrollable detail view; on a commit row this shows `git show --stat`.
58
+ - Press `↵` on any row to open a scrollable detail view; on a commit row this shows `git show --stat --patch`.
59
+
60
+ ## Session status
61
+
62
+ Each session row carries a colored badge derived from when its JSONL file was last touched:
63
+
64
+ | Badge | Color | Meaning |
65
+ |-------|-------|---------|
66
+ | `[hot]` | green | Updated in the last 30 minutes — actively running |
67
+ | `[warm]` | yellow | Updated in the last hour |
68
+ | `[cool]` | cyan | Updated earlier today |
69
+ | `[cold]` | gray | Last updated yesterday or earlier — collapsed under `... N cold projects` at the bottom |
70
+
71
+ Sub-agents use the same scheme. Projects inherit the hottest status of their sessions; a project is treated as "cold" only when all its sessions are cold.
56
72
 
57
73
  ## Activity types
58
74
 
@@ -73,7 +89,7 @@ AgentHUD reads Claude Code's session files from `~/.claude/projects/` and displa
73
89
 
74
90
  Full reference is also available inside the app — press `?`.
75
91
 
76
- ### Session tree focus
92
+ ### Project tree focus
77
93
 
78
94
  | Key | Action |
79
95
  |-----|--------|
@@ -97,12 +113,12 @@ Full reference is also available inside the app — press `?`.
97
113
  | `PgUp` / `Ctrl+B` | Page up |
98
114
  | `PgDn` / `Ctrl+F` | Page down |
99
115
  | `Ctrl+U` / `Ctrl+D` | Half page up / down |
100
- | `g` | Jump to live (newest) |
101
- | `G` | Jump to oldest |
116
+ | `g` | Jump to top (oldest) |
117
+ | `G` | Jump to live (newest, bottom) |
102
118
  | `↵` | Open detail view |
103
119
  | `f` | Cycle filter preset |
104
- | `s` | Save log to `~/.agenthud/logs/` |
105
- | `Tab` | Switch focus to session tree |
120
+ | `r` | Refresh now |
121
+ | `Tab` | Switch focus to project tree |
106
122
  | `?` | Help |
107
123
  | `q` | Quit |
108
124
 
@@ -113,6 +129,17 @@ Full reference is also available inside the app — press `?`.
113
129
  | `↑` / `k` / `↓` / `j` | Scroll |
114
130
  | `↵` / `Esc` / `q` | Close |
115
131
 
132
+ Detail view colors the content based on activity type:
133
+
134
+ - **Git commit detail** (`git show --stat --patch`): added lines green (`+`), removed lines red (`-`), hunk headers cyan (`@@ ... @@`), `commit/Author/Date/diff` metadata dimmed.
135
+ - **Response / thinking / prompt**: text inside triple-backtick code fences renders in cyan so the boundary between prose and code is obvious. No language-specific syntax highlighting — just code-vs-prose separation.
136
+
137
+ ## Behavior
138
+
139
+ - **Alternate screen buffer.** Watch mode uses the alt-screen (like `vim`, `htop`, `btop`), so quitting (`q`) restores the pre-launch shell completely. No TUI residue, no "is it still running?" confusion.
140
+ - **Minimum terminal size.** 80 cols × 20 rows. Smaller terminals show a one-line hint and redraw automatically when you resize.
141
+ - **Help overlay scrolls.** Press `?` for an in-app reference. The overlay scrolls (`j/k`, `PgUp/PgDn`, `Ctrl+B/F`, `Space`, `g/G`) so the full content is reachable on shorter terminals.
142
+
116
143
  ## Report
117
144
 
118
145
  Print activity for a date in Markdown or JSON — suitable for piping to scripts or LLMs:
@@ -143,7 +170,7 @@ Output:
143
170
 
144
171
  | Flag | Default | Description |
145
172
  |------|---------|-------------|
146
- | `--date` | today | `YYYY-MM-DD` or `today` (local date) |
173
+ | `--date` | today | `YYYY-MM-DD`, `today`, `yesterday`, or `-Nd` (N days ago, local date) |
147
174
  | `--include` | `response,bash,edit,thinking` | Comma-separated types or `all` |
148
175
  | `--format` | `markdown` | `markdown` or `json` |
149
176
  | `--detail-limit` | `120` | Max chars per detail field; `0` = unlimited |
@@ -153,18 +180,31 @@ Output:
153
180
 
154
181
  ## Summary
155
182
 
156
- Generate an LLM-based summary of a day's activity using the `claude` CLI:
183
+ Generate an LLM-based summary of one day or a date range using the `claude` CLI:
157
184
 
158
185
  ```bash
186
+ # Single day
159
187
  agenthud summary # today (always regenerated)
188
+ agenthud summary --date yesterday # natural-language date
160
189
  agenthud summary --date 2026-05-14 # past date (cached on second run)
161
190
  agenthud summary --date 2026-05-14 --force # ignore cache
162
191
  agenthud summary --prompt "Only commits" # override prompt
192
+
193
+ # Date range — daily summaries are re-summarized into a meta-summary
194
+ agenthud summary --last 7d # last 7 days, ending today
195
+ agenthud summary --from 2026-05-10 --to 2026-05-16 # explicit range
196
+ agenthud summary --last 7d -y # skip per-day confirmations
163
197
  ```
164
198
 
165
- Results are saved to `~/.agenthud/summaries/YYYY-MM-DD.md`. Past dates are cached and returned instantly on re-run. Today is always regenerated (activity still growing).
199
+ **Daily summaries** are saved to `~/.agenthud/summaries/YYYY-MM-DD.md`. Past dates are cached and returned instantly; today is always regenerated (activity still growing).
200
+
201
+ **Range summaries** generate any missing daily summaries first, then feed those into a second `claude` call that produces a cross-day synthesis (themes, multi-day workstreams, recurring patterns). Output is cached to `~/.agenthud/summaries/range-FROM_TO.md`. Cached dailies cost nothing to reuse, so weekly summaries are cheap after the first run.
166
202
 
167
- **Prompt customization:** The summary uses `~/.agenthud/summary-prompt.md`, auto-created from a built-in template on first run. Edit it freely or override per-call with `--prompt`.
203
+ Each missing daily prompts for confirmation just before generation, so you see concrete context (session/activity/commit counts and report size) before deciding. Pass `-y` / `--yes` to skip all prompts. Press Enter to accept the default (`[Y/n]`).
204
+
205
+ **Prompt customization:** The daily template lives at `~/.agenthud/summary-prompt.md` and the range template at `~/.agenthud/summary-range-prompt.md`. Both are auto-created from built-in templates on first run. Edit them freely.
206
+
207
+ **`--date` formats:** `YYYY-MM-DD`, `today`, `yesterday`, or `-Nd` (N days ago).
168
208
 
169
209
  **Requires:** [`@anthropic-ai/claude-code`](https://www.npmjs.com/package/@anthropic-ai/claude-code) installed and authenticated.
170
210
 
@@ -176,14 +216,12 @@ Results are saved to `~/.agenthud/summaries/YYYY-MM-DD.md`. Past dates are cache
176
216
  # How often to poll for activity updates (Linux fallback when fs.watch isn't used)
177
217
  refreshInterval: 2s
178
218
 
179
- # Where 's' key saves activity logs
180
- logDir: ~/.agenthud/logs
181
-
182
219
  # Activity filter presets (cycle with 'f' key in viewer)
183
- # Each list is one preset; [] means "all". First preset is the default.
220
+ # Each list is one preset. Use "all" (or "*") to show everything.
221
+ # Types: response, user, bash, edit, thinking, read, glob, commit
184
222
  filterPresets:
185
- - []
186
- - ["response"]
223
+ - ["all"]
224
+ - ["response", "user"]
187
225
  - ["commit"]
188
226
  ```
189
227
 
@@ -195,9 +233,10 @@ App-managed state (hidden items) lives separately in `~/.agenthud/state.yaml` so
195
233
  |------|---------|
196
234
  | `~/.agenthud/config.yaml` | User settings (edit freely) |
197
235
  | `~/.agenthud/state.yaml` | Hidden projects/sessions/sub-agents (app-managed) |
198
- | `~/.agenthud/summary-prompt.md` | LLM prompt template for `summary` |
199
- | `~/.agenthud/summaries/` | Cached daily summaries |
200
- | `~/.agenthud/logs/` | Saved activity logs (`s` key) |
236
+ | `~/.agenthud/summary-prompt.md` | LLM prompt template for daily `summary` |
237
+ | `~/.agenthud/summary-range-prompt.md` | LLM prompt template for range `summary --last/--from/--to` |
238
+ | `~/.agenthud/summaries/YYYY-MM-DD.md` | Cached daily summaries |
239
+ | `~/.agenthud/summaries/range-FROM_TO.md` | Cached range summaries |
201
240
 
202
241
  ## Environment Variables
203
242
 
package/dist/index.js CHANGED
@@ -15,4 +15,4 @@ Error: Node.js ${MIN_NODE_VERSION}+ is required (current: ${process.version})
15
15
  process.exit(1);
16
16
  }
17
17
  if (!process.env.NODE_ENV) process.env.NODE_ENV = "production";
18
- import("./main-NHQJ23YJ.js");
18
+ import("./main-S27FZ2BJ.js");