It shall be competent for any public agency to provide in the specifications for any public works contract detailed provisions as to the conditions under which the contractor shall be entitled, as a matter of right, to termination of the contract on account of conditions such as are described in Section 4410 and as to the terms of such termination.