Adds AUTOCOMPACT_BUFFER (45k tokens) to match /context output.
This accounts for the reserved space Claude Code uses for autocompact.
Changes:
- Add src/constants.ts with AUTOCOMPACT_BUFFER export
- Update getContextPercent to include buffer in calculation
- Add edge case guard for invalid context window sizes
- Update tests to use realistic 200k context sizes
Closes#4🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: melon-hub <melon-hub@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: add package-lock.json for CI caching
- Remove package-lock.json from .gitignore
- Delete bun.lock (project uses npm, not bun)
- Fixes: "Dependencies lock file is not found" error in CI
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: address review feedback
- Regenerate package-lock.json to fix version mismatch (was 2.0.0, now 0.0.1)
- Remove redundant yarn.lock from .gitignore (project uses npm only)
- Update comment for clarity
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: keep yarn.lock and bun.lock in .gitignore
Prevents accidental commits if someone uses yarn or bun locally.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>