Text this: In situ redox reactions facilitate the assembly of a mixed-valence metal-organic nanocapsule