Get a big strong bedroom door and frame, such that it would take a sincere effort to kick it in. I should do that as I preach.
Surefire or other tactical light the door
as it opens.
Have an accessible alarm activation in the
master bedroom to sound the sirens.
(yes, they cut the alarm - but there are solutions for that. Call cops on cell phone.
Yell the warning.
Tactics depend on whether you sleep with a qualified combatant. Do you have a drill for this? Or are they (or you) losing it?
If non-combatant, can they do the phone?
If the door does now crash in - hope you have
planned your position.
Shooting through door is a bummer though.