The agreement would raise spending caps on military and domestic spending, and it could help ensure passage of a temporary measure to keep the government open past Thursday.