If you agree to have a child with her, and then she leaves, your child will go with her. You will have no rights to this child either, because most states do not allow second parent adoption. THe mother who carries is the one with the legal rights. Period. All the court documents in the world will not stop her. All the court documents in the world will not help you, no will, no agreement, nothing. You will lose your wife and your child and that would have to be the most painful pain in the world, to lose your child.
I think back to that one lesbian mother whom had and raised a child for 4 years or so with her wife and the wife changed, found God, and left, hiding her child and not allowing visitation. The child is now much older and I doubt that she sees her other mom, much less remembers her. You would have no legal recourse. This other mother spent alot of money to see her child and she still does not.
Please make sure you think this through carefully before you bring another life into your relationship. Work throguh your problems and make sure your relationship is strong before adding a child. A child will cause untold stresses and a relationship that is not strong will crumble in the wake of having a child. We all want you to be happy, we are your friends and just want you to be careful. I personally don't want you to be hurt again. Please be very carefull.
Don't be afraid, it's only love!