The Senate Judiciary Committee voted by a razor-thin margin yesterday to narrow the impact of a controversial new CIA secrecy bill that would make it a crime to disclose the names of U.S. intelligence operatives stationed abroad.

In a hurried afternoon session, the committee decided, 8 to 6, to exempt such disclosures if they are "an integral part" of constitutionally protected activities such as scholarly studies of government policies and programs of news stories about "intelligence failures or abuses."

Judiciary Committee Chairman Edward M. Kennedy (D-Mass.), who proposed the change, said the bill would still outlaw "the indiscriminate publication of agents' names" by anti-CIA periodicals such as the Covert Action Information Bulletin.

To prohibit such practices, the original bill would make it a felony to disclose any information, even from unclassified sources, that serves to identify a covert agent so long as the government could show this was done with reason to believe it would impair or impede U.S. intelligence activities.

The American Civil Liberties Union and other critics mounted a concentrated attack on the measure in the Senate committee after striking out elsewhere. The House and Senate Intelligence Committees and the House Judiciary Committee have all approved the undilluted bill, which the CIA has been seeking for years.

In approving the orginal bill, however, the Senate Intelligence Committee insisted in its report that it was not its aim to prohibit news reporting of intelligence failures or abuses, academic studies or other activities protected by the First Amendment.

Kennedy took the wording of the Intelligence Committee report and offered it as an amendment to the bill. Without such a change, a number of law professors have contended it would be unconstitutional. But advocates of a stiff measure, angered by attacks on CIA operatives abroad, are sure to press for the tougher wording on the House and Senate floors.

Also exempted under the Kennedy amendment would be disclosures made by private organizations, such as universities and religious institutions, that might have rules against members working secretly for the CIA.

ACLU spokesman Jerry Berman suggested last night that some negotiated settlement was now possible. "Until now," he said, "the Justice Department has been, in our view, unwilling to try to and resolve the constitutional problems that many of us have with the bill." But with the Kennedy amendment on the agenda, Berman said, the adminisstration may find it "difficult to explain why they want to knock out a section that protects the First Amendment."

Most Senate and House Republicans appear to favor a stronger bill in any case and have dismissed the charges of unconstitutionality as exaggerated and unwarranted. Declared Sen. Strom Thurmond (R-S.C.), ranking minority member on Judiciary: "We can't risk having our people killed."

Several other amendments Kennedy offered were also adopted at the meeting, which was sandwiched between a public and private session with White House National Security Affairs Adviser Zbigniew Brzezinski on the Billy Carter controversy.

One of the changes was aimed at a little-noticed section of the CIA bill requiring the president to adopt secret procedures that will afford U.S. intelligence operatives better "cover" assignments in American embassies and missions abroad.

The Judiciary Committee, again by a vote of 8 to 6, agreed that the Peace Corps and the Agency for International Development should be exempted by law from the list of government agencies and departments that might be ordered to provide the "cover." An effort was also made to exempt the International Communication Agency, formerly U.S. Information Agency, but that failed.