Shared Agency: A Planning Theory of Acting Together