Skip to main content

Module hooks

Module hooks 

Source

Modules§

agents

Enums§

HookMode
Controls how hooks instruct agents to access lean-ctx functionality.

Constants§

KIRO_STEERING_TEMPLATE

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 agents is 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::pathutil so core crates do not depend on hooks.
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