Poland's new party chief, Stanislaw Kania, pledged today to honor commitments made by his predecessor to militant workers while strengthening ties to Moscow.

In remarks to the Communist Party Central Committee pulblicized this evening, Kania promised that independent trade unions would become "a full self-governing and effective defender of worker interests and rights" in Poland. At the same time, he said the new unions would have to "stand on the ground of socialism."

It is this balance that will be one of the key tests of the agreements that were signed with striking shipyard workers and miners this week and ended a summer of labor strife in this Soviet Bloc country.

Kania, 53, is regarded as a firm, pragmatic politician, having overseen institutions here as deverse as the Roman Catholic Church and the secret police. Early today, the Central Committee chose him to take charge of the Polish state following the sudden ouster of Edward Gierek.

Kania's remarks, his first public comment since assuming the leadership, were read by an announcer over the state television. His message sounded conciliatory and seemed to support the general assessment by analysts here that he will pursue a line of pragmatic reform.

"Our most important task is to restore confidence in people's authority and the confidence of the working class and all workers in the party," Kania declared. "We must ensure the strong link between the authorities and the public. This link was missing and this is what caused the explosion of dissatisfaction on such a wide scale."

Kania described Poland's recent strike wave as a "symptom of workers' protest, workers' dissatisfaction, not directed against the principles of socialism nor against our alliances."

In a reference to Gierek, Kania reiterated that he is "gravely ill." The 67-year-old former party chief was stripped of his office and Politburo membership after reports yesterday that he had suffered heart trouble.

Public, and presumably Soviet, confidence in Gierek's leadership had seriously eroded in recent months and there had been intense speculation that he would be removed.

"This is not the time, in view of his illness, to assess his activity," Kania said. Terming Gierek's services for the Communist Party over 50 years "unshakable," Kania wished Gierek "a speedy return to health."

[The Polish news agency PAP reported that six specialists confirmed the earlier diagnosis of Gierek's cardiac obstruction and said his condition was "satisfactory," according to the Associated Press.]

Kania mentioned Poland's severe economic problems only in broad outline. On international relations, he reaffirmed interest in detente while underscoring Poland's firm alliance with the Soviet Union.

His concluding word was a call to the Polish Communist Party to strengthen itself. The party has been demoralized by difficulties in dealing with the battered economy. This will be Kania's central task.

"Let us tighten our ranks," he said.

The Polish people by and large woke up surprised to learn that they had a new party chief. Many seemed indifferent, or skeptical that the sudden switch at the top would mean much for Poland's future course.

Many got their first look at Kania from a blown-up passport-style photo splashed on the front of the nation's dailies. His square jaw and thick-set face, created the impression of a former football tackle turned career government administrator.

Although a powerful figure in the party for some time, Kania had stayed behind the scenes, making only rare public appearances. Consequently, his face and voice are largely unfamiliar to the nation he now has to lead through uncertain recovery and reform.

In Kania's remarks quoted today, he said: "I am not so sure that our party needs what is usually termed a leader. I am deeply convinced that my obligation should above all consist in ensuring that the collective wisdom of people should function."

Asked about the new chief, a Warsaw shop assistant shrugged, "We don't know him -- and anyway, what can he do?"

Officials from Poland's powerful Catholic Church, who know him from dealings when he had charge of church-state relations, described him as tough but fair. Members of dissident and worker groups sounded unmoved by the appointment.

"We do not want to discuss political change," a spokesman of the dissident Workers' Defense Committee said. "So far as we are concerned, nothing has changed."

Long lines formed at kiosks this morning as people sought the limited copies of Warsaw's two major newspapers to read about the change. The news was given banner treatment, but with few details about Kania's personal career or personality -- a standard practice in communist countries.

The son of a farmer in southeastern village of Waronka, Kania worked as a blacksmith when a boy. In 1945, at age 18, he joined the Communist Party and rose through the ranks.

Polish officials said the 140-man Central Committee elected Kania "unanimously." But it was widely believed that he had a rival in the person of Stefan Olszowski, 49, who was often viewed as Gierek's likely successor.

Western diplomats believed that Olszowski, who was brought back into the Politburo only two weeks ago after being exiled as ambassador to East Berlin because of his criticisms of Gierek, may have overplayed his hand. In the atmosphere of high drama attributed to gierek's sudden illness, the leadership opted for the safer figure of Kania.

Kania is regarded by his subordinates as a decent man who did much to ensure that the security services did not exceed their authority during the last two months of labor unrest. He reportedly ordered the police not to suppress the strikes by force and argued in favor of negotiations with the workers.

But in contrast to Olszowski, who is both a trained economist and a gifted linquist, Kania has never concerned himself with either economic policy or foreign affairs. It is likely that Olszowski will retain overall responsibility for implementing the new economic reforms.

Kania's appointment also suggests that for the foreseeable future, Poland will be absorbed in its own problems and will refrain from the personal foreign policy initiatives favored by Gierek.

While Western observers had expected Gierek's fall, many were stunned by its timing. It had been thought the party would allow some time to elapse before dropping the party boss in order to avoid giving the appearance that workers could topple a party chief whenever they chose.

Because the circumstances surrounding Gierek's ouster so closely resemble those of his predecessor, Wladyslaw Gomulka, suspicion lingers that it was arranged to happen yesterday.