AFTER MORE THAN three years of study, negotiation and compromise, a bill to bring under control the domestic wiretapping and eavesdropping operations of the nation's intelligence agencies will reach the floor of the House of Representatives today. The bill, as it now stands, has the support of both agencies and many of their most persistent critics. That kind of consensus seemed impossible to achieve a year ago. Now that it has been reached the House should have no reluctance to pass this bill, which is much like one already approved by the Senate.

The Foreign Intelligence Surveillance Act, as it is called, would require the government, in most instances, to obtain a warrant from one of a select group of 11 federal judges before it began wiretapping or eavesderooping on American citizens in national security cases. In some situations, the government could not get such a warrant unless it met the same standards it now must meet to get similar warrants in ordinary criminal cases. In others, most notably those in which employees or agents of foreign governments are involved, the standards it would have to meet to get a warrant would be lower. In a few situations, primarily those involving direct communications between offices of foreign governments, the warrant procedure would not apply at all.

Those classifications, which are spelled out in enormous detail in the legislation, are central to the consensus that had developed in support of the bill. The intelligence agenices believe that the bill would permit a sufficiently wide range of activities that it would not handicap the government's effort to obtain - secretly - the information it needs about the activities inside this country of foreign governments and their agents. Most critics of those agencies, like the ACLU, believe the classification provide the protection that American citizens deserve from unnecessary intrusions on their privacy by the government.

Unfortunately, an effort is under way in the House to gut this carefully worked out compromise because of a fear it limits too sharply the discretion of the intelligence agencies and because it gives federal judges a key role in some intelligence and counter-intelligence gathering operations. Both objections seem to us to be insubstantial, given the alternative, which is to leave the ultimate decision on what kind of surveillance can be used against any citizen in the hands of the intelligence agencies or their politically chosen superiors.

The disclosures in recent years of the activities of the FBI demonstrate the danger of leaving such unbridled discretion in the executive branch. While some of the wiretaps, mail covers and burglaries that were undertaken against American citizens and organizations in the name of national security had legitimate goals, many clearly did not. Some were undertaken solely because a high official wanted to know about the personal life of a particular individual or because he was upset by a particular news story.

The proposed legislation would put a stop to abuses of that kind without hampering legitimate national security investigations. It would simply put an impartial arbitrator - in the person of a judge - between every citizen's privacy and the desire of the government to penetrate it. That would not be a new role for federal judges, they served constantly as buffers between the government and the individual. But it would provide a new kind of protection that events of the recent past have shown is sorely needed.