Commit Graph

120 Commits

Author SHA1 Message Date
Jarrod Watts
7ce11b1ea9 fix: add marketplace.json and correct plugin installation flow
The previous installation command didn't work because Claude Code
plugins require a marketplace manifest. This adds the marketplace.json
and updates install instructions to the correct two-step flow:

1. /plugin marketplace add jarrodwatts/claude-hud
2. /plugin install claude-hud@claude-hud

Also commits dist/ for plugin distribution since users can't run
npm build when installing via marketplace.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 21:51:51 +11:00
Jarrod Watts
53da16580d chore: add node engine constraint >=18.0.0
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 21:30:14 +11:00
Jarrod Watts
4e48856b94 docs: clarify installation instructions for claude-hud plugin in README.md 2026-01-03 20:37:38 +11:00
Jarrod Watts
94133ecc3f update readme 2026-01-03 20:36:54 +11:00
Jarrod Watts
c377204183 update readme 2026-01-03 20:34:25 +11:00
Jarrod Watts
257b73447c docs: restructure CLAUDE.README.md with human/agent sections 2026-01-03 20:31:52 +11:00
Jarrod Watts
79898cf57b docs: comprehensive CLAUDE.README.md for LLM guidance 2026-01-03 20:27:46 +11:00
Jarrod Watts
2af067a2ec docs: add LLM-friendly CLAUDE.README.md and move install higher 2026-01-03 20:23:59 +11:00
Jarrod Watts
2592d7d21c docs: cache-bust license badge 2026-01-03 20:16:21 +11:00
Jarrod Watts
a55019d5ba docs: expand description with visibility and zero-config 2026-01-03 20:12:35 +11:00
Jarrod Watts
d0c35ad98a docs: update README structure with 5:2 hero image 2026-01-03 19:43:44 +11:00
Jarrod Watts
e37ccf4088 docs: modernize README with hero image and cleaner layout 2026-01-03 19:35:26 +11:00
Jarrod Watts
ccbcfa5f06 chore: update contact email across docs 2026-01-03 19:24:21 +11:00
Jarrod Watts
ff79ceba89 opensourcify 2026-01-03 19:07:42 +11:00
Jarrod Watts
fcaa8da6d6 test coverage 2026-01-03 18:52:12 +11:00
Jarrod Watts
36ba791cb1 fix: recursive rules discovery and .claude/CLAUDE.local.md support
- Rules now discovered recursively in subdirectories
- Added .claude/CLAUDE.local.md detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 18:16:31 +11:00
Jarrod Watts
e9b0e9f680 feat: comprehensive config detection across all scopes
- Add ~/.claude.json user-scope MCP support
- Add .mcp.json project MCP support
- Add .claude/settings.local.json support
- Add CLAUDE.local.md and .claude/CLAUDE.md detection
- Deduplicate MCPs that appear in multiple files

Locations now covered:
- User: ~/.claude/CLAUDE.md, ~/.claude/rules/, ~/.claude/settings.json, ~/.claude.json
- Project: CLAUDE.md, CLAUDE.local.md, .claude/CLAUDE.md, .claude/rules/, .mcp.json
- Project settings: .claude/settings.json, .claude/settings.local.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 18:10:26 +11:00
Jarrod Watts
fb44f68c0e style: remove emojis from config counters, keep timer only
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 17:39:23 +11:00
Jarrod Watts
c8f46cfa3f feat(v2): enhanced config display with separate counters
- Split config counting: CLAUDE.md, rules, MCPs, hooks
- Display distinct icons for each config type (📄 📜 🔌 🪝)
- Read hooks count from settings.json
- Remove ralph-loop local config file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 17:38:26 +11:00
Jarrod Watts
9672eea781 docs: update README and CLAUDE.md for v2 statusline
- Rewrite README for statusline architecture
- Update CLAUDE.md with new data flow and structure
- Remove obsolete v1 docs (TROUBLESHOOTING, CONTRIBUTING, etc.)
- Clean up .husky/pre-commit for new structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 14:29:58 +11:00
Jarrod Watts
26a3e984e4 feat(v2): statusline architecture - Phase 1 complete
Major rewrite from split-pane TUI to multi-line statusline:

- Remove hooks/, tui/, scripts/ directories
- Add new src/ structure with TypeScript
- Implement stdin JSON parser (native model/context data)
- Implement transcript JSONL parser (tools, agents, todos)
- Implement render system with 4 lines:
  - Session: model, context bar, rules, MCPs, duration
  - Tools: running + completed with counts
  - Agents: type, model, description, elapsed
  - Todos: current task with progress
- Add context warning thresholds (70%, 85%, 95%)
- Show context breakdown at high usage
- Update plugin.json with statusLine config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 14:28:25 +11:00
Jarrod Watts
c94b88e9d9 chore: v1 final state before statusline rewrite
Committing all outstanding v1 changes before the major architecture
rewrite to statusline-based approach.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 14:24:45 +11:00
Jarrod Watts
c108c232ad fix(context): detect new transcript content by size, not just mtime
The transcript staleness check only used mtime, causing missed updates
when filesystem timestamp granularity prevented mtime changes during
rapid writes (e.g., after auto-compaction).

Now checks both mtime AND file size - if either indicates new content,
we read. This fixes the HUD staying at high context % after compaction.

Also fixes:
- Flaky test due to mtime granularity (added delay + utimes)
- Test fixture path resolution (use __dirname)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 13:04:31 +11:00
Jarrod Watts
daa812eed6 feat(logging): enable production error logging to file
- Errors always logged to ~/.claude/hud/logs/hud.log
- Debug/warn still gated behind CLAUDE_HUD_DEBUG=1
- Add log rotation at 1MB
- Add close() method for clean shutdown
- Tests updated for new close method

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:51:46 +11:00
Jarrod Watts
8c05564049 fix(validation): improve schema validation error messages
- Separate validation checks for tool, input, and response fields
- Add specific error messages indicating expected types
- Add tests for explicit null values and malformed field errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:50:01 +11:00
Jarrod Watts
b436b88156 feat(observability): add parse error counter to HUD state
- Add parseErrorCount to HudState interface
- Add 'parseError' action to increment counter on parse failures
- Display parse error count in StatusBar when > 0
- Provides visibility into event parsing issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:46:32 +11:00
Jarrod Watts
ea8c55cdb8 fix(store): use Promise-based lock for refreshEnvironment
- Replace boolean flag with Promise-based lock pattern
- Prevents race condition when multiple callers invoke refresh
- Concurrent calls now properly await the same Promise

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:44:53 +11:00
Jarrod Watts
2e85c4f5c9 fix(scripts): prevent FIFO creation race condition
- Use atomic mkfifo with fallback check in capture-event.sh
- Only remove non-pipe files before mkfifo (preserve existing pipes)
- Set explicit permissions (600) on new FIFOs
- Improve pgrep pattern to avoid false matches in session-start.sh

Prevents silent data loss when multiple events fire simultaneously.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:44:03 +11:00
Jarrod Watts
fbd0a07c48 refactor: centralize magic numbers into constants.ts
- Create lib/constants.ts with all configurable values
- Update cost-tracker, unified-context-tracker, hud-reducer
- Update event-reader with reconnect constants
- Update hud-event with line preview constant
- Improves maintainability and makes tuning easier

Constants include: token estimation, display limits, intervals,
thresholds, and truncation lengths.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:43:04 +11:00
Jarrod Watts
6dd9226823 fix(cost): make pricing configurable with staleness warning
- Add PricingConfig interface with lastUpdated timestamp
- Add isPricingStale() helper (90 day threshold)
- Add setPricing() method to CostTracker for config overrides
- Add pricingStale flag to CostEstimate type
- Show warning icon in CostDisplay when pricing is stale
- Allow pricing override via ~/.claude/hud/config.json
- Add comprehensive tests for pricing logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:39:54 +11:00
Jarrod Watts
012997d6eb fix(types): add activeForm field to TodoItem interface
- Add optional activeForm field to TodoItem type
- Update TodoList component to display activeForm when in_progress
- Add tests for activeForm display behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:37:40 +11:00
Jarrod Watts
0ba98d3e37 docs: add GitHub issue templates
- Bug report template with environment details
- Feature request template
- Issue config with links

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:19:41 +11:00
Jarrod Watts
36b2a09210 docs: add project documentation and improve robustness
- Add ARCHITECTURE.md, FAQ.md, LLM.md documentation
- Add LICENSE (MIT), CODE_OF_CONDUCT.md, PR template
- Add .editorconfig for consistent formatting
- Add check.sh script for validation
- Fix ESLint errors in hud-config.ts and settings-reader.ts
- Various test and component improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 12:17:50 +11:00
Jarrod Watts
4b166e5e94 test: include schema version in reducer events 2026-01-03 10:27:54 +11:00
Jarrod Watts
ff55afa90b docs: add security policy details 2026-01-03 10:25:46 +11:00
Jarrod Watts
cfe153fbae ci: add release automation and matrix 2026-01-03 10:25:17 +11:00
Jarrod Watts
3257ffb456 refactor: add safe mode and render throttling 2026-01-03 10:24:45 +11:00
Jarrod Watts
e2ed327006 feat: add hud event schema v1 2026-01-03 10:23:30 +11:00
Jarrod Watts
cf80758302 docs: add hud config and replay tooling 2026-01-03 10:05:07 +11:00
Jarrod Watts
71f4a534db refactor: centralize hud state and rendering 2026-01-03 10:02:52 +11:00
Jarrod Watts
08becd1bfd feat: validate hud events 2026-01-03 09:58:02 +11:00
Jarrod Watts
e74d22d73c ci: Add GitHub Actions workflow for automated testing
- Runs lint, typecheck, test, and build on push/PR to main
- Validates plugin structure (plugin.json, hooks.json, scripts)
- Uses Bun for fast CI execution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:48:07 +11:00
Jarrod Watts
a8a4b829bf docs: Update CHANGELOG with accurate stats
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:44:45 +11:00
Jarrod Watts
da16d3e5cd refactor: Remove unused ContextState interface
ContextState was defined but never used - it was a redundant
subset of ContextHealth.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:43:13 +11:00
Jarrod Watts
9bb3aba7b5 chore: Bump version to 2.0.11
- Dead code cleanup removed 1,138 lines
- Test coverage improved to 94.43%

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:34:56 +11:00
Jarrod Watts
8d8a8bb174 refactor: Remove unused legacy reader files
Removed transcript-reader.ts, stats-reader.ts, and usage-reader.ts
along with their test files. These were superseded by
UnifiedContextTracker which handles transcript reading directly.

Removed 6 files, ~700 lines of dead code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:34:27 +11:00
Jarrod Watts
85d543de46 refactor: Remove unused legacy ContextTracker
The ContextTracker class in context-tracker.ts was superseded by
UnifiedContextTracker and was only used in its own test file.
This removes dead code and duplicate interface definitions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:33:13 +11:00
Jarrod Watts
8e58ac0830 docs: Update CHANGELOG with version sync fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:25:27 +11:00
Jarrod Watts
2cb4c153a5 fix: Sync plugin.json version with package.json
Updates plugin.json version from 0.1.0 to 2.0.10 to match TUI package.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:24:33 +11:00
Jarrod Watts
ff4a4da6e5 chore: Bump version to 2.0.10, update changelog
- Remove accidental gitignore entry for CI workflow
- Update CHANGELOG with CI addition note
- Bump version to 2.0.10

Note: GitHub Actions workflow created but requires workflow scope to push.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 08:24:00 +11:00