  During the process of collapse of a massive star, a cavity is generated
between the central iron core and an outer stellar envelope. The dynamics of
this cavity, filled with plasma and magnetic field of the rapidly rotating
proto-magnetar's magnetosphere, is believed to be very relevant in
understanding supernovae and gamma-ray bursts. The interactions of the
pressurized conducting plasma and the magnetic fields are described by a set of
magnetohydrodynamic (MHD) equations with poloidal and toroidal plasma flows not
aligned with magnetic fields. A sequence of MHD equilibria in response to the
increasing plasma pressure in the cavity, by continuous filling from the
rotating magnetosphere, is solved to account for asymmetric supernovae, highly
collimated gamma-ray burst jets, and also active galactic nucleus plasma torus.
It is shown that the magnetosphere of the central compact star is likely the
central engine of supernova and gamma-ray burst by feeding them plasma,
magnetic energy, and rotational energy.
