The Nicaraguan military Monday night repelled an armed attack launched from neighboring Costa Rica, presumably by Sandinista guerrillas, according to a National Guard communique issued yesterday.

Meanwhile, a number of bombs exploded and sporadic machine-gun fire was heard throughout Managua early yesterday. In the city of Jinotepe, 20 miles south of the capital, soldiers reportedly fired shots into the air to scatter a group of youths who were burning tires on the streets and throwing rocks at passing military convoys.

The confrontations marked renewed violence in the Nicaraguan crisis following a month of relative calm during which the United States and other countries have attempted to mediate between President Anastasio Somoza and his political opposition.

The Somoza government has indicated it intends to reject a proposal by the Broad Opposition Front political coalition that includes a demand that Somoza resign his office and leave the country.

As the talks moved into their fifth week, the mediators, including representatives of the Dominican Republic and Guatemala in addition to the United States, reportedly were increasingly pessimistic over chances for resolving the conflict peaceably. On Monday, the mediation group hastily checked out of the Intercontinental Hotel and moved into their respective embassies after receiving what one source close to the group said was "sufficient information" that the area may not be safe.

The hotel is located across the street from Somoza's office, known as "the bunker," which housed inside a National Guard compound. It is generally believed that the Sandinista guerrillas, who are fighting their own war against Somoza in addition to the politicians' battle, may launch their next major offensive with an attack on the bunker.

A National Guard communique on the Monday night battle said at least one guardsman was wounded in a clash near the village of El Carmen, 10 miles north of the Costa Rican border. The communique said the attackers were driven back across the border into Costa Rica, where the Sandinistas are believed to have training bases.

In Washington, the Organization of American States Human Rights Commission prepared to meet Thursday to discuss the draft of a report documenting their investigation in Nicaragua several weeks ago of alleged atrocities committed during last month's civil war.

According to informed sources, the document is an "explosive" condemnation of the National Guard, which reportedly conducted summary executions and widespread human rights violations during the fighting. Following the commission's approval of a final draft of the report, it must still pass through several stages, including private presentation to the Nicaraguan government, that may delay its release for as much as several months.