Couldn’t the auto function be inherited from your base class? Or however that works in Rust/entity-component-system.
I imagine the client backend has a list of auto actions currently enabled, then every X milliseconds it goes through that list and attempts to perform each action. So the generic auto function for any given action simply adds or removes that action from the list. Each action would have to specify a cooldown, for example the whack action might grab its cooldown by doing simple math on the held item’s encumbrance. When the client backend goes through the list of auto actions it checks if each action is on cooldown, and if not, performs the action.
That’s just one way to do it, I guess. But at least this way puts no further burden on modders.