First of all, talk to your wife. This isn't ok if you never talked about the possibility before and she clearly planned to cheat. That's no basis for an open and honest relationship where you are able to feel comfortable. Set boundaries and limits that are ok for you in the process and make clear what you are not comfortable with. If you decide to stay and open the relationship, of course.
Facts: 30, female, bi, v-type relationship with Sward (husband, straight, mono) and Lin (boyfriend, straight, mono), poly-fi and co-primary.