Brock Purdy threw for 189 yards and two touchdowns, while Christian McCaffrey added a touchdown, leading the San Francisco 49ers to a 32-29 win over the Seattle Seahawks.