If there's a power struggle, Harbaugh needs to be kept and Baalke shown the door. Baalke seems to be a very good GM and evaluator of talent (Jenkins notwithstanding) but it's Harbaugh who's made the team come together and perform.
That said, not sure I believe Mangini is an heir apparent to Harbaugh. Great Xs and Os mind, and hopefully he learns how to be a HC from Harbaugh. What did Mangini in was his schooling under Belichick and taking that to another level on a young, bad team in Cleveland. It's always a fine line between being disciplined and being an unbearable taskmaster.