My question involves criminal law for the state of: California

I don't think it is wise to put too many details here, but I am being charged with grand theft for items in a box (which I did not know the contents of) worth $1000+ . I was convinced by a friend to take this box and hide it. Though there was apparent intent to steal, I returned the box of my own free will within the hour to an officer who then arrested me after taking my statement (in which I admitted to my original intent). Had I not returned the box, they would have almost certainly would not have been found or linked to me. I returned them after feeling extremely guilty. The officer promised to me that no action would be taken as long as the items were returned, but an arrest was made anyways and I spent over 15 hours in jail. I hope this is enough info to get a feeling of what I am facing here. I would like to know my best course of action and what my chances of reducing the count to a misdemeanor or (if possible) dismissing the case altogether/being found innocent. Also, this is my first criminal offense.