Legislative leaders announced a compromise Monday to tame soaring healthcare costs that would make Massachusetts the first state to try to limit how much providers and insurers could spend on medical care. The plan—likely to be voted on by the House and Senate on Tuesday, the final scheduled day for passing legislation—would allow healthcare spending to grow no faster than the state economy overall through 2017. For the following five years, spending would slow further, to half a percentage point below the growth of the state's economy, although officials would have the power under certain circumstances to soften the target. If the House and Senate approve the legislation on Tuesday, Governor Deval Patrick would have 10 days to act on the bill.