MPs have struck an eleventh-hour deal over the contentious Afghan detainee documents, averting a constitutional crisis and a possible snap election. More...