Fixed-context budget accounting (#964). The per-session footprint lean-ctx
adds — tool schemas + MCP instructions + auto-loaded rules files + the wakeup
briefing — is warned about once it crosses budget_tokens. The
LEAN_CTX_CONTEXT_BUDGET_TOKENS env var overrides it; lean-ctx doctor overhead --gate turns a breach into a non-zero exit for CI.
Configuration for external context providers (GitHub, GitLab, Jira, etc.).
Each provider can be enabled/disabled and configured with auth tokens.
Override individual tokens via env vars (GITHUB_TOKEN, GITLAB_TOKEN, etc.).
Controls what lean-ctx injects during setup and update --rewire.
Fresh installs default to non-invasive (rules/skills off, MCP on).
Users who ran setup interactively get explicit true/false.
None = undecided (legacy: check if rules already exist and preserve behavior).
AI session summaries (#292): periodically distil the working session into a
compact, semantically recallable summary so a future session can answer
“what did I do last time on X?”. Deterministic and local-first — recall uses
embeddings when the embeddings feature is on, else a lexical fallback.
The three resolved provider upstreams a running proxy forwards to. Published
to request handlers via a tokio::sync::watch channel so a config change is
picked up live, without a proxy restart (#449).
Unified reasoning-effort level for the cache-safe, cross-provider effort
control (#834). “Off” is represented by Option::None, not a variant — the
feature is strictly opt-in.
Legacy: Controls how dense/compact MCP tool output is formatted.
Superseded by CompressionLevel. Kept for backward compatibility with old config.toml files.
New setups use compression_level instead. See CompressionLevel::effective().
Outcome of CompressionLevel::degrade_action: what to do with the session
degrade given the current re-fetch pressure. Split from the dispatch so the
threshold logic is a pure, testable function.
Legacy: Controls agent output verbosity level injected into MCP instructions.
Superseded by CompressionLevel. Kept for backward compatibility with old config.toml files.
New setups use compression_level instead. See CompressionLevel::effective().
lean-ctx tools whose sole purpose is editing the user’s source files. When
prefer_native_editor is set (#454) these are hidden from list_tools and
refused at dispatch so the host’s native editor handles edits instead.
Diagnose upstream drift for one provider from the CLI-visible env override
(env), the config.toml value (disk) and the proxy’s live value (live).
None means in sync.
The LEAN_CTX_*_UPSTREAM override visible to this process for a provider,
normalized (None if unset/blank). Lets status/doctor explain why an env var
a user exported in their shell never reaches an MCP/service-spawned proxy.
Names of the SECURITY-sensitive overrides a project-local .lean-ctx.toml
carries — the keys strip_sensitive_overrides would withhold for an
untrusted workspace. Read-only (parses a throwaway Config); used by
lean-ctx trust to tell the user exactly what trusting will enable.