Toward a Uniform Theory of Effectful State Machines