Releases: alicoding/claude-parser
Releases · alicoding/claude-parser
v2.1.1 - Token Counting Fix
🐛 Bug Fixes
Token Counting Accuracy
- Fixed token counting to match Claude Code UI's
/contextcommand - Now correctly counts: compact summary content + user message content + assistant usage tokens
- Achieves 96% accuracy compared to UI (6,341 vs 6,600 tokens)
API Improvements
- Added
count_session_tokens()function for consistent API interface - Fixed
isCompactSummaryfield name mismatch (was incorrectlyis_compact_summary) - Improved SQL queries to include
cache_read_input_tokensfor accurate counts
One-liner Usage
from claude_parser import load_latest_session, count_session_tokens
# Get current session tokens
tokens = count_session_tokens(load_latest_session())🤖 Generated with Claude Code
v2.0.1 - Discord Stop Hook Fix
🐛 Bug Fixes
- Fixed Discord stop hook returning JSON structure instead of plain text
get_latest_claude_message()now returns clean text messages
✅ Improvements
- Added black box testing with real JSONL data
- Set up towncrier for changelog management
- Documented Claude Code SDK message handling patterns
📦 Installation
pip install claude-parser==2.0.1v2.0.0 - Complete Architecture Rewrite
Major release with complete LNCA-compliant architecture, hooks system, and CG git-like interface