The Carter administration unveiled proposed legislation yesterday that would require a federal judge's permission to use wiretapping or bugging in investigations of foreign intelligence activities within the United States.

The bill marks the administration's first attempt at revising the rules for intelligence investigations.

In requiring a judicial warrant for electronic surveillance, the legislation, if enacted, would end the long debate about whether the President has the right under his "inherent constitutional powers" to authorize wiretapping in foreign intelligence cases.

The administration's proposal states that the new law would take supremacy over assertions of this disputed presidential prerogative and that the executive branch cannot reserve to itself any right to conduct warrantless electronic surveilllance.

The new proposal was drafted by the Justice Department after lengthy consultations with congressional leaders, and the White House reportedly is hopeful that it will be introduced in the Senate by either Sen. Edward M. Kennedy (D-Mass.) or Sen. Birch Bayh (D-Ind.), both prominent civil liberties advocates.

Aides to Kennedy and Bayh said yesterday that the senators had questions and reservations about certain provisions and would probably ask for changes in the bill before committing themselves to its support.

The bill's main thrust would be to substitute the judicial warrant requirement for the controversial present system under which the President, asserting the "inherent powers" claim, delgates to the Attorney General the decisions on when the FBI and other federal police agencies can use electronic surveillance.

In 1972, the Supreme Court ruled that a warrant is required for wire-taps in security cases where a purely domestic threat is involved. But it has left unanswered the question of whether the President's "inherent powers" permit the uss of warrantless wiretaps against foreign agents.

The proposed ligislation would require the Attorney General or a designated high-level deputy to review all requests by federal policey agencies for electronic surveillance in foreign intelligence cases and then direct the agancies to apply for a warrant.

That request would have to be made to one of seven U.S. District Court judges to be designeated by the Chief Justice. In cases where the warrant application is rejected, the government could attempt to appeal to a specially designated, three-jusge panel and ultimately to the Supreme Court.

In applying for a warrant, the government would have to demonstrate "probable cause" for the surveillance under one of two standards; a criminal standard alleging that the target is engaging in espionage, sabotage or terrorism that is a violation of U.S. law, or a lesser standard alleing that the target is involved in clandestine activities likely to harm the security of the United States.

The second of these standards is likely to draw fire from civil liberties forces on the grounds that it would not prevent eavesdropping on the conversations of persons who have comitted no crimes.

In addition, the bill would require the government to supplement its warrant application with an affidavit by the President's adviser for national security affairs that the information being sought was related only to foreign intelligence mattes and could not reasonably be obtained by other investigative techniques.

In cases involving a U.S. citizen or a legally resident alien, the judge would be empowered to inquire into the basis for the national security adviser's certification.

However, that power would be greatly circumscribed in instances where the target of a proposed surveillance is a so-called "foreign power" such as a diplomatic accredited to the U.S. government. Administration sources said this limitation was put in the bill primarily to avoid embarrassing disclosures that could affect U.S. relations with other governments.

On another point that seems certain to provoke controversy, the bill's scope is limited to surveillance activities within the borders of the United States. Critics have noted that some major past abuses of wiretapping have involved surveillance agencies of Americans overseas, and many people including Bayh have said and the warrant requirement should apply worldwide.