Modules§
Enums§
- Hook
Mode - Controls how hooks instruct agents to access lean-ctx functionality.
Constants§
Functions§
- generate_
compact_ rewrite_ script - generate_
rewrite_ script - install_
agent_ hook - install_
agent_ hook_ with_ mode - install_
agent_ project_ hooks - install_
project_ rules - install_
project_ rules_ for_ agents - Install project rules, optionally scoped to specific agents.
If
agentsis empty, installs for all agents (legacy behavior). - normalize_
tool_ path - Normalize paths from any client format to a consistent OS-native form.
Delegates to
core::pathutilsocorecrates do not depend onhooks. - recommend_
hook_ mode - Auto-detect the best hook mode for a given agent key based on its shell capabilities.
- refresh_
installed_ hooks - Silently refresh all hook scripts for agents that are already configured. Called after updates and on MCP server start to ensure hooks match the current binary version.
- to_
bash_ compatible_ path