Merged
Conversation
…ures Add a visual hero section to the README with CI, coverage, Python, license, and savings badges. Include a before/after compression table with real numbers derived from audit_compression.py. Add generate_demo.py script and example fixtures for git diff, pytest, terraform, npm install, and kubectl.
Create docs/comparison.md with a factual comparison of Token-Saver against cc_token_saver_mcp, token-optimizer-mcp, and Claude Context Mode. Add a "How It Compares" section in README linking to it.
Add support for user-defined processors loaded from ~/.token-saver/processors/. User processors inherit from Processor base class and are auto-discovered alongside built-in ones. Broken processors are skipped gracefully. Add user_processors_dir config key, example ansible processor, and 7 tests.
Add push trigger on main, Python 3.11 to matrix, pytest-cov for coverage reporting, codecov upload on 3.12, mypy type checking step. Add dev optional dependencies group to pyproject.toml.
Add py.typed marker for PEP 561 compliance. Create mypy.ini with permissive settings. Add type annotations to engine.py and config.py public method signatures. mypy step is included in CI workflow.
Add 'token-saver benchmark <command>' to measure compression on real commands. Supports --format json for scripting and --dry-run to show processor match without executing. Add 4 tests for the new subcommand.
Support project-level config files that override global settings. Token-Saver walks up parent directories to find .token-saver.json (like .gitignore). Track config sources for debug mode. Add 5 tests for project config.
Create demo.py that processes all fixtures through the compression engine and displays before/after stats. Add examples/README.md documenting the fixtures and how to run the demo.
Fix ruff warnings: unused imports, noqa directives, dict.fromkeys, TYPE_CHECKING import, and apply ruff formatter to all new files.
Feat/open source quality upgrade
Replace three near-identical JSON summarization implementations (network._summarize_json, file_content._summarize_json_value, cloud_cli._compress_json_value) with calls to the shared utils.compress_json_value() function.
Unify the head+tail+error-extraction-with-context pattern from file_content._compress_log, docker._process_logs, and kubectl._process_logs into a single compress_log_lines() utility.
Pre-scan git diff output for lockfile paths (package-lock.json, yarn.lock, etc.) and replace their entire diff section with a one-line summary, preventing hundreds of useless hunks from being sent through compress_diff.
When git diff --stat has more than 20 files, group them by directory with aggregate change counts instead of listing each file individually.
Detect coverage tables in pytest output and compress them to show only the TOTAL line and files below 80% coverage.
Track parameterized test names during pytest output processing and report them grouped with failed parameter names when failures occur.
Add minified file detection before source code pass-through check. Files like .min.js, .bundle.js and files with very long average line length are summarized instead of passed through unchanged.
Add .env variant detection that redacts sensitive values in deployed env files while preserving .env and .env.example pass-through behavior.
Route tsc --noEmit through a dedicated type-check handler that groups errors by TS error code with occurrence counts and examples.
Detect compose log format (service | message) and group output by service, showing error lines with context and per-service summaries.
When search results span more than 30 files, group them by directory with top files per directory and match counts.
Short API responses (500-1500 chars) are often more useful uncompressed for the model to read.
Three new specialized processors for DevOps/infrastructure output: - AnsibleProcessor (priority 40): compresses ok/skipped tasks, preserves errors and PLAY RECAP - HelmProcessor (priority 41): summarizes template manifests, omits NOTES, truncates lists - SyslogProcessor (priority 42): head/tail compression for journalctl and dmesg output Updates test suite with 43 new tests (565 total).
Split rsync from the ssh/scp exclusion — local rsync (no host:path) is now compressible via the file_listing processor, while remote rsync (with host:path like user@server:/path/) remains excluded.
Update test_expected_priority_order with ansible/helm/syslog entries. Add ansible, helm, journalctl, dmesg commands to hook pattern coverage test.
Update processor count from 18 to 21 throughout README. Add ansible, helm, syslog to processor table and project structure. Add rsync to file_listing commands. Create per-processor docs (ansible.md, helm.md, syslog.md). Update test counts (567 tests). Fix ruff lint issues (SIM103, SIM102, PIE810, RUF005). Add PLR0913 to global ignores for shared utility signatures.
Bump version across all manifests (src/__init__.py, pyproject.toml, plugin.json, marketplace.json). README improvements: - Stronger value proposition in header - Added docker compose and helm template to Before & After table - Precision guarantees: source code passthrough, .env redaction - Updated processor descriptions in plugin manifests Fix helm NOTES omission bug: NOTES section is now fully stripped instead of leaking non-indented content lines.
Feat/processor improvements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Why
How
Checklist
ruff check .passesruff format --check .passespython3 -m pytest tests/ -vpasses (all 207+ tests)