github yvgude/lean-ctx v3.2.0

latest releases: v3.7.3, vscode-v0.1.0, v3.7.1...
one month ago

Breaking

  • License changed from MIT to Apache-2.0. All code from this release onwards is Apache-2.0. Previous releases remain MIT-licensed. See LICENSE-MIT for the original license and NOTICE for attribution.

Added

  • Context Engine + HTTP server mode: lean-ctx serve exposes all 46 MCP tools via REST endpoints with rate limiting, timeouts, and graceful shutdown — enables embedding lean-ctx as a library.
  • Memory Runtime (autopilot): Adaptive forgetting, salience tagging, consolidation engine, prospective memory triggers, and dual-process retrieval router — all token-budgeted and zero-config.
  • Reciprocal Rank Fusion (RRF) cache eviction: Replaces the Boltzmann-weighted eviction scoring. RRF handles signal incomparability (recency vs frequency vs size) without tuned weights (K=60).
  • Claude Code 2048-char truncation fix: Auto-detects Claude Code and delivers ultra-compact instructions (<2048 chars). Full instructions installed as ~/.claude/rules/lean-ctx.md.
  • Claude Agent Skills auto-install: lean-ctx init --agent claude installs SKILL.md + scripts/install.sh under ~/.claude/skills/lean-ctx/.
  • ARM64 Linux support: aarch64-unknown-linux-musl binary in release pipeline. Docker instructions updated for Graviton/ARM64.
  • IDE extensions: JetBrains (Kotlin/Gradle), Neovim (Lua), Sublime Text (Python), Emacs (Elisp) — all thin-client architecture.
  • Security layer: PathJail (FD-based, single choke point for 42 tools), bounded shell capture, size caps, TOCTOU prevention in ctx_edit, symlink leak fix in ctx_search, prompt-injection fencing.
  • Unified Gain Engine: GainScore (0–100), ModelPricing (embedded cost table), TaskClassifier (13 categories), ctx_gain MCP tool, TUI/Dashboard/CLI integration.
  • Docker/Claude Code MCP self-healing: env.sh re-injects MCP config when Claude overwrites ~/.claude.json. Doctor detects and hints fix.
  • Compression deep optimization: Thompson Sampling bandits for adaptive thresholds, Tree-sitter AST pruning, IDF-weighted deduplication, Information-Bottleneck task filtering, Verbatim Compaction.
  • lean-ctx -c now compresses on TTY (fixes #100): Previously skipped compression when stdout was a terminal, showing 0% savings.
  • Quality column in ctx_benchmark: Shows per-strategy preservation score (AST + identifier + line preservation).

Fixed

  • CLI -c TTY bypass (#100): lean-ctx -c 'git status' now compresses even in terminal (sets LEAN_CTX_COMPRESS=1).
  • Windows Instant overflow: RRF eviction test used now - Duration which underflows on Windows. Fixed with sleep-based offsets + checked_duration_since.
  • rustls-webpki CVE: Updated from 0.103.11 to 0.103.12 (wildcard/URI certificate name constraint fix).
  • MCP server hangs on large projects: Parallelized tool calls prevent blocking.
  • Dashboard ERR_EMPTY_RESPONSE in Docker: Bind host + panic recovery → HTTP 500 JSON instead of empty response.
  • Kotlin graph analysis: AST-span-based symbol ranges for accurate call-graph edges.

Refactored

  • Dead code elimination: Removed 598 lines (unused eval.rs, CEP benchmark, dead CLI helpers). Reduced #[allow(dead_code)] from 32 to 5.
  • Cache store zero-copy: Replaced CacheEntry clone with lightweight StoreResult struct (no content duplication).
  • Entropy dedup: Precomputed n-gram sets with size-ratio filter (exact Jaccard, no allocation storms).
  • Clippy clean: 0 warnings with -D warnings across all targets (1029 tests passing).

Community

Upgrade

cargo install lean-ctx          # or
npm update -g lean-ctx-bin      # or
brew upgrade lean-ctx

Full Changelog: v3.2.0...v3.2.0

Don't miss a new lean-ctx release

NewReleases is sending notifications on new releases.