github yvgude/lean-ctx v3.4.5

latest releases: v3.8.8, v3.8.7, v3.8.6...
one month ago

Added

  • Agent Harness: Roles & Permissions — 5 built-in roles (coder, reviewer, debugger, ops, admin) with configurable tool policies and shell access. Custom roles via .lean-ctx/roles/*.toml with inheritance. Server-side middleware blocks unauthorized tools with clear feedback. ctx_session action=role to list/switch roles at runtime.
  • Agent Harness: Budget Tracking — per-session budget enforcement against role limits (context tokens, shell invocations, cost USD). Warning at 80%, blocking at 100%. ctx_session action=budget to check status. Budgets reset on role switch or session reset.
  • Agent Harness: Events — new EventKind variants: RoleChanged, PolicyViolation, BudgetWarning, BudgetExhausted. All rendered in TUI Observatory with appropriate icons and colors.
  • Agent Harness: Cost Attribution — real-time per-tool-call cost estimation using ModelPricing, recorded into the budget tracker for accurate USD tracking.
  • Agent Harness documentation — new docs page with full i18n (53 keys × 11 languages), accessible at /docs/agent-harness.
  • LEAN_CTX_DATA_DIR for cloud config — cloud client now respects the LEAN_CTX_DATA_DIR environment variable for its config directory. PR #168 by @glemsom.

Fixed

  • MCP server crash recovery — tool handler panics no longer kill the server (panic = "unwind" + catch_unwind). Server returns error message and stays alive for the next call. PR #167 by @DustinReynoldsPE.
  • lean-ctx setup ignoring config changes — running setup a second time no longer silently ignores the user's new choices for terse_agent and output_density. Values are now upserted instead of skipped when keys already exist in config.toml.
  • Dashboard cost mismatch with lean-ctx gain — dashboard computed cost savings with hardcoded pricing ($2.50/M input) while gain used dynamic model-specific rates. Dashboard now syncs pricing from the gain API for consistent numbers.
  • ctx_session tool description missing actionsrole and budget actions were implemented but not listed in the MCP tool descriptor, so LLMs couldn't discover them. Now documented in granular tool defs and templates.

Credits

Upgrade

lean-ctx update                 # recommended (auto-downloads + refreshes shell hooks)
cargo install lean-ctx          # or
npm update -g lean-ctx-bin      # or
brew upgrade lean-ctx

Note: After upgrading via cargo/npm/brew, run lean-ctx setup to refresh shell aliases. lean-ctx update does this automatically.

Full Changelog: v3.4.5...v3.4.5

Don't miss a new lean-ctx release

NewReleases is sending notifications on new releases.