U.N. Secretary General Kurt Waldheim has received general assurances from Iranian authorities that American hostages in Tehran would be released after an international commission begins an inquiry into Iranian grievances against the deposed shah, according to diplomatic sources.

The process of untangling the complicated 14-week crisis would begin with the formation of a fact-finding commission, the sources said.

Amid reports that the names of commission members might be unveiled as early as Friday, a U.N. spokesman said today that the panel's composition would be announced "soon."

Exact timing and mechanics of a release are yet to be determined, sources said, but one plan would have the hostages stay in Tehran under the supervision of a third party while the commission is gathering facts there. Some of the Americans could be called as witnesses in the proceedings, sources added.

In Washington, Carter administration officials spoke of a "rough working target" of two weeks for release of the hostages and indicated that the timing of the hostages' release and physical transport out of Iran will occur sometime between when the commission is appointed and the completion of its work.

[One administration official said that several points in the developing solution need "more definition." One such point apparently involves U.S. response to Iranian demands that it in some way admit guilt for its past involvement in Iran, and whether that demand can be met in a way that is acceptable to the United States.]

Although the precise mandate of the commission has not been worked out, U.N. sources expect that it would narrow its function to acquiring facts without forming conclusions or making recommendations. A report would be submitted to Waldheim and then sent to the U.N. Security Council for approval.

These sources expressed general optimism that Waldheim is nearing an agreement with Iran and the United States, but cautioned that he must first overcome several stumbling blocks, including the Iranian demand for public U.S. acknowledgement of past "crimes" in Iran.

President Carter's expression of support last night for an international commission with a "carefully defined purpose" to hear Iranian grievances is believed to lend further momentum to Waldheim's mission and help separate his plan from the other options.

Latest proposals call for a seven-member inquiry commission, weighted heavily with representatives of Third World nations, possibly including Pakistan, Algeria and Mexico. In addition, well-known international figures would serve including such candidates as former U.S. attorney general Ramsey Clark, former Irish foreign minister Sean MacBride and French jurist Louis Pettiti.

A commission limited to fact-finding, sources noted, would avoid the more far-reaching "Third World Nuremburg trial" concept first proposed by MacBride and cited by Iranian President Abol Hassan Bani-Sadr in an interview earlier this week with the Paris newspaper Le Monde.

Knowledgeable diplomats here warn that a key element in the success of current efforts will be the ability of the Iranian president to extricate the hostages from the militant youths occupying the U.S. Embassy in Tehran. The militants have called for the ex-shah's return as a condition for releasing the Americans.

In his round-the-clock mediation bid, Waldheim is said to have warned against moving faster than Bani-Sadr's ability to prepare Iranian public opinion for a settlement and to guarantee public support for his efforts from Ayatollah Ruhollah Khomeini, who holds the only real control over the militants.

Bani-Sadr has said repeatedly that the hostages could be released within a matter of days, but diplomatic sources believe he means transferring jurisdiction over the Americans from the militants to Iranian authorities or a third party, such as the International Red Cross or the United Nations.

In a press briefing today, U.N. spokesman Rudolf Stajduhar said Waldheim feels "we have a good sign [that] we are making progress," although the U.N. chief is still negotiating "some details" on the timing of a release and composition of the panel of inquiry.

As mediator in the prolonged crisis, Waldheim is said to be balancing Iranian and U.S. demands by long-distance telephone. He is believed to be in regular contact with U.S. Secretary of State Cyrus R. Vance and Iranian Foreign Minister Sadegh Ghotbzadeh, who is now traveling in Europe.

Although alternative plans have been proposed by French lawyers and MacBride, Waldheim has continued to press his own "package deal" that calls for an international inquiry while hostages are placed in a kind of diplomatic escrow.

Sources said Waldheim is confident that he has a "constituency" for his plan in Iran among members of the ruling Revolutionary Council, headed by Bani-Sadr and including Ghotbzadeh. He first proposed his concept at a meeting with the council during his visit to Iran in early January.