It was a perfect night for a garden party, with stars twinkling overhead and a balmy breeze causing the candles to flicker. The buzz of convention was barely interrupted by the occasional burst of automatic rifle fire.

"The trouble is the uncertainty," said the Indian. "Kabul looks calm but you never know where or when it will blow up. That means you never can relax."

He was right. A few months before, the garden we were standing in -- the Bangladesh ambassador's residence -- and the Libyan ambassador's house next door had been shelled for some unexplained reason. The incident brought the Libyan ambassador, the dean of the diplomatic corps here, storming into the Foreign Ministry to protest. But now the shelling has been relegated to the status of folklore to illustrate the capriciousness of life in Kabul since the Soviets invaded Afghanistan Dec. 27.

Life goes on in Kabul. The Soviet troops in the past week maintained a low profile in the city after having been highly visible in late July, when there were reports of a planned coup by Afghan Army units.

Residents here regard the nightly gunfire as part of the normal sounds of the city, a sort of bland background noise that generally is ignored until some visitor calls attention to it.

But the mood of Afghans in Kabul has changed markedly since October. the last time I made an extended visit here. Then, they appeared quietly resigned to the Soviet-dominated Afghan government and afraid to speak out because of the frequent raids carried out by the secret police of then-president Hafizullah Amin, who was killed when the Soviets invaded and installed Babrak Karmal as head of the government.

Babrak, for all his faults as a Soviet stooge, is considered more humane than Amin. The midnight police raids have stopped, and as a result, Kabul residents feel free now to criticize openly Babrak's rule and the Soviet occupiers.

"The people walk the streets smiling, but they are not happy in here," said an Afghan merchant pointing to his heart. "We have no freedom anymore." s

It has become part of the sales technique of the wily Afghan merchants to tell Westerners how much they hate the Soviets and how they will sell at far lower prices to Americans.

"We wouldn't even show this to a Russian," said one antique dealer as he pulled a choice item from underneath his counter.

It is hard to tell whether Americans are getting bargains now. But it is clear that the merchants on Chicken Street, the famous carpet and antique section of Kabul, are hurting for lack of business. Last Saturday, they begged two Americans to buy anything so they could get some money to celebrate the end of the month of Ramadan fasting.

Kabul residents are generally considered to be passive, more concerned with their paychecks than their more volatile tribesmen cousins who inhabit the rugged hills and valleys of Afhanistan.

But Kabul residents have come forth with hidden reserves of defiance since the Soviet invasion.

After appearing sullenly resigned to their fate in the first weeks following the massive invasion by 80,000 Soviet troops, for three straight nights in late January they shouted from the rooftops, "Allah o Akbar.Allan o Akbar. [God is great]," to show their opposition to what they considered the godless communists running their country.

In February, shopkeepers struck all over the city. In May, young students led by high school girls staged anti-Soviet demonstrations that ended with hundreds of students being killed, wounded or jailed and left a vast residue of bitterness against both the Babrak regime and the Soviet occupiers that keep it in power.

The schools were unexpectedly closed for a 20-day vacation last month, a move widely believed here to be an attempt to prevent further anti-Soviet demonstrations during the Moscow Olympics. The schools are due to reopen soon, but rumors are circulating here that they will remain closed to curb student demonstrations.

While there is a strong ant-Soviet feeling among residents here, it could just as well be anti-American or anti-British.It's not that the Afghans especially hate the Russians, it's just that they hate all foreigners who invade their country.

What will come next No one is sure. But The first night time propaganda leaflets written in Russian-- aimed squarely at the Soviet troops and the hordes of Soviet civilian advisers who work in every ministry -- appeared this month.

"Get out, or we'll kill you" is the simple message of the leaflets.

Many Kabul residents are also trying to escape the country to an uncertain future as part of what has become a large worldwide Afghan emigre community. They are selling family treasure to raise cash for their getaways, but Chicken Street merchants say they cannot buy everything offered because they have no customers for all the merchandise.

One woman told friends she had sold everything she owned -- her house, her silver, furniture, and family heirlooms -- and is just waiting to get her passport. If the Afghan government refuses to give her a passport, she is likely to try to walk out through the mountain passes to Pakistan.

One merchant took his best carpets to Paris last week because there are no tourists here to buy them. He said he would return this time, but he was not sure about the next trip if things did not change in Kabul. A jeweler with a shop nearby is sure. He is selling his stock as fast as he can and plans to leave the country.

Although the indiscriminate mid-night raids have stopped, the Afghan secret police, with their Soviet KGB advisers, have not been idle. I learned soon after arriving here that a friend from a past visit now is under great pressure by the secret police to turn informer.

I spotted him across a street but did not dare go over to talk to him: he might have turned me in as a journalist, which would have gotten me thrown out of the country.

Above the undercurrents of the Soviet occupation, life in Kabul has a veneer of normalcy. It is impossible, though, to know firsthand what really is going on in the rest of this Texas-sized country, where neither the authorities nor prudent behavior would allow foreigners to go.

Westerners stick out these days in Kabul, which once was a hub of attraction for the off-beat tourist. One of the better small, downtown hotels which used to be filled with budget-minded travelers, had just one guest last week.

Restricted to Afghanistan's capital city, the dwindling number of Westerners have drawn closer together. It is not exactly a life of privation, though it is lonely, with most diplomats here without families.

One night last week, a West German diplomat gave a dinner party featuring a film of the Stuttgart Ballet dancing "The Tanning of the Shrew." There were exactly four women present.

On Friday, the Moslem sabbath, many Westeners go to the Kabul golf club, surely one of the most unusual courses in the world. The first tee is on top of a Cliff, and the drive is out and straight down.

To keep the club in operation, Afghan authorities have offered to supply six armed guards taken the authorities up on their offer, and there have been no rebel attacks against anyone playing the course, which meanders up and down the hillsides on both sides of a main road.

But some of Western golfers are concerned that this might change if Soviets and Eastern Europeans decide to take up the game.

Often the surface appearance of normality of cities in the midst of a major crisis belies their newspaper image. Kabul is like that.

It is easy, if one tries, to feel removed from the international confrontation between the United States and the Soviet Union that has turned this little country into a cockpit of super-power rivalry. Easy, that is, if you ignore the nightly sound of gunfire in the city and stay away from major intersections, which are guarded each night by Soviet troops and armored vehicles.