Pitcher Nick Pivetta and the San Diego Padres have agreed to a four-year, $55 million contract that includes several opt-outs, ESPN reports.