Yep, rats! They love PVC plastic and will chew clean through copper wire.
That's repairable if you can get the wire connectors out of the socket. There's a release tool for that. It's a thin blade you insert from the socket side while pushing in on the wire. Then just pull the wire and connector out of the rear of the socket. Keep track of which wire went to each port on the socket.
You can also get new connectors and just attach them to the old wire. It looks like you have enough wire to trim them back. The crimp tool and connectors will be far cheaper than new harness or part.
Get some cats or put out traps along the walls if you store your tractor in a barn.