Angela Hanna has agreed to testify against Eric Foster as part of a plea agreement in the murder of her daughter.
She has also accepted a 10-year state prison sentence.
With credit for time served since her arrest on May 8, she could be free in less than five years after her Nov. 14 sentencing, a prosecutor said.
Hanna, 30, accepted a plea agreement Monday in Kern County Superior Court and pleaded no contest to four felony counts of willful cruelty to a child.
In return, second-degree murder and assault causing great bodily injury or death to a child aged 8 or under were dismissed.
Kern County Assistant District Attorney Scott Spielman said Hanna accepted the maximum term for the child cruelty charges for her role in the death of her three-year-old daughter.
She will be required to be a witness against her former boyfriend for the death of her daughter.
"She has to testify truthfully against Eric Foster," Spielman said.
If she doesn't, Speilman said, the plea agreement would be voided and the charges, including secpond-degree murder, would be reinstated
She has already been interviewed extensively by investigators
Foster, 27, is charged with first-degree murder and several other felonies in connection with Trinity's death. He could face the death penalty because of special circumstances alleged by prosecutors, including torture and sexual penetration.
Speilman said no final decision has been made yet on whether or not prosecutors will seek the death penalty against Foster.
No plea offer has been made to Foster, Speilman said.
Foster is due back in court on Sept. 18 for a preliminary hearing.
He has pleaded not guilty to the charges.
The little girl died on Jan. 25, 2012 in the emergency room at San Joaquin Hospital.
Trinity had been injured earlier in the day but only in the evening did her mother take her to the hospital, according to investigative reports.