The BBC's analysis editor looks at what has been agreed in the much-anticipated agreement.