Not knowing the specifics, but going from my impressions:
Pakistan has been wink,wink,nod,nodding to a number of terrorist organizations that make incursions into India. They let it go too far or long and India hit the terrorist bases in retaliation.
Pakistan realizes it went too far, so it's more willing to try to tamp down tensions by giving back the Indian pilot. They aren't looking for a war that will likely end with no one winning, but wanted just low level attacks.
My (uninformed) take. I'd love to read a more local take, sumpnz.