pub fn action_exposure(
required: &[CapabilityName],
granted: impl Fn(&CapabilityName) -> bool,
dangerous: bool,
mode: Mode,
) -> ExposureExpand description
Decide how to expose an action, given the capabilities it requires, the granted set, whether it is dangerous, and the active mode.
A missing capability makes the action absent (admin actions do not appear disabled). A dangerous action is confirmation-gated when capable, and absent in Household mode. Everything else is shown.