UNDER a heavy cloak of secrecy, Israeli Prime Minister Yitzhak Shamir and senior Cabinet ministers discussed on Aug. 13 how far they are ready to go to help win the release of Western hostages in Lebanon by freeing detainees in Israeli jails.But Israeli officials seemed to rule out any early gesture of goodwill in the wake of last week's release of one British and one American hostage by Muslim fundamentalist groups in Beirut. Despite a personal plea to Shamir from British premier John Major to take such a step, Israeli Defense Minister Moshe Arens told Israel Radio Aug. 13 he thought it would be premature. "It should be well understood," Mr. Arens said, "that the terrorists we are holding are one of the few important cards, perhaps the most important card, that the Western world has in order to bring about the release of the hostages." But Israel's most notable captive, Sheikh Abdel Karim Obeid, a pro-Iranian spiritual leader to Muslim fundamentalists, may be freed Aug. 17, according to an Iranian news agency report cited by Reuters. The agency quoted an "informed Muslim source" in Beirut as saying the sheikh would "possibly be reunited with his family" on Aug. 17. United Nations Secretary-General Javier Perez de Cuellar, invited by the Islamic Jihad group to broker a solution to the crisis, said Aug. 13 that the two sides were not far apart. He plans to meet with Israelis Aug. 14. Despite Israel's hard line on the question of a goodwill release, there is a mood of cautious optimism in Jerusalem about the possibility of a deal to free the 11 remaining Western hostages and those among seven missing Israeli soldiers who remain alive, in return for some 375 Lebanese and Palestinian prisoners held in Israeli-occupied south Lebanon. "There is ground for optimism because this time the initiative has come from organizations and states ... who were involved in terrorism ... and who it seems want to get over the problem of hostages," said top Israeli diplomat Yohanan Bein on Aug. 13. Mr. Bein and the Israeli government's coordinator for Lebanese affairs, Uri Lubrani, met Mr. Perez de Cuellar Aug. 11 in Geneva. The secretary-general has said he might travel to the Middle East to bring about a large-scale hostage deal, and Israeli officials have gone out of their way to welcome his involvement in the issue. "What is changing the situation is the deep and intense personal involvement of the secretary-general," an Israeli Foreign Ministry official said Aug. 13. "This is why we are hopeful." Details of the discussion within the Israeli government are scarce, and both sides at the Geneva talks on Aug. 11 agreed to keep the contents of their conversations secret. Keeping a low profile "could prove the only way to get our people back," the Foreign Ministry official says. "One word out of place could kill the whole process." With Iran and Syria now apparently cooperating in securing the release of the Western hostages, Israel is anxious not to appear the only obstacle to such an outcome, especially because world leaders such as President Bush have urged the government here to release its Lebanese detainees. "We are concerned a great deal" by the prospect of being blamed for any failure to win the hostages' freedom, says the Foreign Ministry official. "But our first concern is to get our missing-in-action back" from Lebanon. Those seven MIAs, some of whom are thought to be dead, include three members of a tank crew last seen during a battle with Syrian forces during Israel's 1982 invasion of Lebanon, a Druze soldier captured by a radical Palestian militia in 1983, two soldiers captured when guerrillas of the radical Hizbullah (Party of God) group ambushed their convoy in 1986, and Ron Arad, a navigator who bailed out of his plane over southern Lebanon in 1986. Before any moves on a comprehensive hostage swap can begin, Israeli officials are insisting, they must have news on the fate of these seven men. Although Israel is asking for "signs of life," the government is understood to be prepared to accept proof of death in cases where the MIA did not survive. But "any answer about our missing will have to be verified independently," the Foreign Ministry official warns. One possible approach under discussion here is that in return for evidence of the fate of its MIAs, Israel would make a preliminary in-principle commitment to release the Lebanese detainees. In a second stage, Israel would release those prisoners in return for the MIAs themselves and the 11 Western hostages. The Israeli-organized South Lebanon Army (SLA), the militia that controls a strip of south Lebanese territory along Israel's border, holds approximately 375 prisoners in a former army camp at Khiam. Some prisoners were captured trying to infiltrate into Israel or the SLA area, others are reportedly merely youths from the district who refused to join the SLA.