Upon application of a defendant who on the basis of a felony complaint has been held by a local criminal court for the action of a grand jury, and who, at the time of such order or subsequent thereto, has been committed to the custody of the sheriff pending such grand jury action, and who has been confined in such custody for a period of more than forty-five days, or, in the case of a juvenile offender or adolescent offender, thirty days, without the occurrence of any grand jury action or disposition pursuant to subdivision one, two or three of section 190.60, the superior court by which such grand jury was or is to be impaneled must release him on his own recognizance unless:
N.Y. Crim. Proc. Law § 190.80