While I don't have any details about this, I am confident that the deal between Zelaya and the putchistas included a blanket immunity from prosecution for all those involved in the coup - from Micheletti himself down to the thugs in uniform who assaulted demonstrators. At this phase, such a concession on Zelaya's side was probably inevitable, but it also shows that nothing has been solved. Furthermore, AP describes the deal as a "power sharing agreement" - which probably means that all the key positions (military, police, etc) will remain in the hands of the coup leaders.
There will now be an election and we can be sure that the US-backed putchistas will do everything in their power, whether legal or illegal, to get rid of Zelaya.
Still, this agreement is, I believe, a rather substantial setback for the US Empire. If anything, the standoff between the coup regime and the entire Latin American continent - with the notable exception of the US-backed regime in Colombia - has shown that the entire continent can close ranks an oppose Fascist takeovers.
The standoff around the Brazilian embassy in Tegucigalpa has also served to further alienate "moderate" countries such as Brazil, of course, but also Argentina and Chile. As for the core countries of the resistance against the US Empire (Venezuela, Cuba, Bolivia, Nicaragua, Ecuador), they appear fully vindicated in their stance against the coup regime and the opening of new US military bases in Colombia.
Whatever the outcome in Honduras, the US Empire is clearly loosing the battle for South America. The coup in Honduras is a mess, if only because of the length of the standoff and the rhetorical zig-zags of Hillary Clinton on who is to blame for the situation. The only thing the Obama Administration has "achieved" since it came to power is to further alienate Latin Americans and Uncle Sam's last and only ally on the continent - Colombia - will find itself even more isolated than before.
As for Zelaya, one would hope that he will not be deceived by his tactical victory: his situation is still dire. The USA as a long history of subverting far more stable government than the one which will temporarily stay in power this Fall. There is no way Zelaya can tackle this threat on his own and his best, if not only, chance is now to get substantial political and security assistance from abroad. This will be very hard to do right under the collective noses of the CIA & Co., but it is nonetheless essential.

US imperialism in Latin America has always relied only wealthy landowners, international corporations, death squads, assassins and terrorists. The resistance to Uncle Sam must therefore rely on the one powerful force it has on its side: the people. If Zelaya is not deceived by all sorts of promises and threats which will now come his way and if he succeeds in playing the "peoples card" correctly - he will probably prevail. But time is running out and he must take action very rapidly.
The Saker