ISLAMABAD, PAKISTAN, FEB. 17 -- Afghan resistance leaders are expected to announce their formula for a new government for Afghanistan within a week, setting in motion a major new component of the rapidly developing talks on the future of that wartorn country, a senior Pakistani official said today.

"The new structure is likely to provide places not only for members of the seven-party resistance alliance, but also for commanders within Afghanistan, Afghans living in Europe and elsewhere and some people within the Kabul regime," the official said.

Pakistan has insisted that the formation of a new government in Kabul is necessary before an accord can be implemented on the withdrawal of Soviet forces. The Soviet Union has insisted that this is a matter separate from the talks on its forces and on guarantees for Afghanistan's future independence.

So far, Pakistani diplomats and U.N. special negotiator Diego Cordovez have been hampered in pursuing the issue of an interim government in Kabul by the resistance leaders' disunity and inability to develop a proposed new governmental structure.

"Once the initiative is taken, it opens up the possibility of negotiations," the Pakistani official said today. "What margin for flexibility there will be on each side remains to be seen."

Cordovez said at the end of his recent shuttle diplomacy mission to Islamabad and Kabul that all parties to the Afghan conflict are agreed that a broad-based government is necessary for a future Afghanistan.

While Soviet leader Mikhail Gorbachev said in a policy statement on Feb. 8 that the future government is "none of our business," resistance leader Yunis Khalis recently sent a message to him urging contacts. Khalis' move seemed to indicate an open mind on the part of the resistance on dealing with the Soviet Union.

Afghan resistance leaders involved in intensive discussions in Peshawar and Islamabad have said over the past several days that they are nearing an agreement and expect an announcement "within weeks if not days."

Resistance leaders in Peshawar said earlier this week in interviews that there was almost total agreement on a new government structure, and Gulbuddin Hekmatyar, leader of the fundamentalist Hezb-i-Islami, told a press conference in Islamabad today that he expected an announcement very soon.

The government of President Najibullah in Kabul has been pursuing what it calls its program of national reconciliation since January 1987 and has said it is ready to include representatives of noncommunist politicians in positions within a broad-based government.

While the outlines of the resistance proposal remain secret, one formula believed to be under serious discussion calls for a supreme council similar to the current council of the seven-party alliance that would name a government of as many as 25 ministers from among the resistance parties, prominent commanders in Afghanistan and emigres as well as acceptable noncommunists who might have had a role under the current Kabul government. This government would be answerable to the supreme council.

Two key issues reportedly under discussion include the size of the supreme council and whether its leader would be from among the seven parties or someone independent of the current resistance leadership. This last point is understood to have caused intense discussion among the resistance leaders, according to one party official in Peshawar, but it is viewed as being a key to the acceptability of the entire proposal.

Diplomats say there is discussion about whether the supreme council, too, might include representatives from Afghans outside the seven-party alliance. One proposal calls for a 40-man council, made up of five representatives from each party plus five independents.

Under all the formulas, the government would be in charge only until conditions in the country stabilize and a permanent government is chosen.

The issue of an interim government has stirred intense emotions among the resistance leaders and Pakistani officials worried that refugees might not return when Soviet troops withdraw unless there is an acceptable government in Kabul that could bring about a degree of domestic calm.

"Without a new government in Kabul, strife will not cease. Without peace, the refugees will not return. A comprehensive solution must insure peace in Afghanistan. It must relieve Pakistan of the burdens, otherwise a settlement could be illusory," a Pakistani Foreign Office official said yesterday.

Spokesmen for resistance parties argued earlier this week that they will continue to fight if the current People's Democratic Party has any role in a new government.

"We cannot allow Pakistan to let the Soviets win at the conference table what they have not been able to win on the battlefield," said one party official, reflecting the uncompromising public stance being taken by resistance leaders. Religious-oriented political parties in Pakistan have warned the government in similar terms about the interim government, but there has been considerable counterpressure from other parts of the political spectrum.

The national newspaper The Nation warned in an editorial today that the issue could backfire on Pakistan. It said:

"After dealing with the Kabul regime . . . for all these years, we are suddenly beset with doubts about the propriety of signing an accord with a government we do not recognize. We have always held that it is up to the Afghans to decide their own form of government and yet now we want to be certain of the share that the freedom fighters and the refugees would get in it. . . . We should certainly help create a climate in which the refugees could go back in dignity but why should we get into a game which we are hardly in a position to play on our own? In any case, we should not overestimate our position to dictate terms nor underestimate the Soviet Union's capacity to make things hot for us."