The Northern Ireland secretary knew for “some months” ahead of a hugely controversial police raid at Sinn Fein’s offices, according to newly unsealed records.