Expand description
Role-based access control for agent governance.
Roles define what tools an agent can use, shell policy, and resource limits.
Resolution order: Env (LEAN_CTX_ROLE) -> Project .lean-ctx/roles/ -> Global ~/.lean-ctx/roles/ -> Built-in.
Structs§
Enums§
Functions§
- active_
role - active_
role_ name - is_
privileged_ role - Returns true if the named role has elevated privileges that require explicit configuration (env/config) rather than runtime activation. Case-insensitive comparison to prevent “Admin” bypass.
- list_
roles - load_
role - set_
active_ role - set_
active_ role_ with_ source - Set active role.
from_config= true allows privileged roles (env/config startup).