Judicial Powers of the Mass Legislature?

I was just reading the Ma Constitution, and I think I found something bizarre. From what I understand, the text of the following excerpt says the state house of representatives in Mass can act as judge and jury for anyone who disrupts their procedures who isn't a legislator and sentence them to jail time! I've never heard anyone discuss this before. It feels at odds with the separation of powers doctrine to give the legislature any judicial powers! Am I completely misunderstanding the passage, or is this really a power state reps have?

"They shall have authority to punish by imprisonment, every person, not a member, who shall be guilty of disrespect to the house, by any disorderly, or contemptuous behavior, in its presence; or who, in the town where the general court is sitting, and during the time of its sitting, shall threaten harm to the body or estate of any of its members, for any thing said or done in the house; or who shall assault any of them therefor; or who shall assault, or arrest, any witness, or other person, ordered to attend the house, in his way in going or returning; or who shall rescue any person arrested by the order of the house."

—Chapter 1, Section 3, Article X of the Massachusetts Constitution