Democratic and Republican congressional leaders have announced a tentative agreement to fund the federal government.