THE BOMBS that blasted Pearl Harbor on that unforgettable December Sunday 40 years ago permanently changed the American republic. For the disaster of Dec. 7, 1941, left Americans with more than simply an urge to zap the Jap. We were determined to win the war, of course, but beyond that we were determined to make sure that the United States would never again be vulnerable to devastating surprise attack. As the traumatic experience of the Great Depression led to the resolution to make economy depression-proof, so the traumatic experience of Pearl Harbor led to the resolution to make the nation war-proof.

And, as making the economy depression-proof required fundamental transformations in traditional values and procedures, so too the effort to make the nation war-proof brought in its wake basic changes in American life. A laissez-faire domestic policy had manifestly failed to protect the American people against the ravages of unemployment; so the Depression meant, among many other things, the end of laissez-faire. An isolationist foreign policy had manifestly failed to protect the American people against the perils of war; so Pearl Harbor meant, among many other things, the end of isolationism.

The essence of isolationism was not total American abstimence from world affairs. We were never isolationist as a nation in matters of trade or finance or culture or travel or humanitarian concern. Isolationism meant essentially unilateral diplomatic action -- that is, going it alone, pursuing an independent course in world affairs, without allies or systems of wider international security.It meant specifically, in Jefferson's words, no entangling alliances.

For some time before Pearl Harbor Franklin Roosevelt had warned the nation that isolationism could no longer guarantee national safety in a world threatened by aggressive dictatorship. In October 1937, four years before the Japanese planes swarmed out of the sky, he had said, "Without a declaration of war and without warning or justification . . . civilians including vast numbers of women and children, are being ruthlessly murdered with bombs from the air . . . If those things come to pass in other parts of the world, let no one imagine that America will escape, that America may expect mercy."

America did not escape. America was not granted mercy. The generation that fought the bitter war read the lesson with great clarity. Lt. John F. Kennedy, a war hero, watched the founding of the United Nations at San Francisco in 1945. It as a beginning, he felt, but not enough. "You have seen battlefields where sacrifice was the order of the day," he wrote a PT-boat comrade, "and to compare that sacrifice to the timidity and selfishness of the nations gathered at San Francisco must inevitably be disillusioning."

Still, even if nations were not prepared to yield sovereignty in the interest of peace, they had at least formed a world organization dedicated to peace, and the United States was in it. In 1949 the United States ratified the North Atlantic Treaty and entered the NATO alliance. This was only the start. Entangling alliances, so long rejected, soon became standard operating procedure. John Foster Dulles, critics used to say in the 1950s, suffered from a bad case of pactomania. The republic has never quite thrown off the infection.

The failure of unilateral action to protect the country was the first lesson drawn from Pearl Harbor. A second lesson was the failure of the American intelligence system. The Japanese had achieved total surprise, and the project of making the country war-proof therefore required a new approach to intelligence.

The United States had not before taken intelligence all that seriously. In wartime the government had improvised a system of agents and operatives; in peacetime it had relied on reports from diplomats and military and naval attaches. The Hoover administration had even disbanded the State Department's code-breaking section, the secretary of state famously remarking that gentlemen did not read each other's mail.

Here again Roosevelt had begun well before Pearl Harbor to improve American intelligence resources. He was troubled by the activities of Nazi and Soviet agents in the United States, and in the mid-'30s he intructed J. Edgar Hoover to develop the counterespionage capability of the Federal Bureau of Investigation. In June 1939, two months before war broke out in Europe, he directed the FBI, the Military Intelligence Division of the Army (G2) and the Office of Naval Intelligence to "coordinate their activities." In 1940 he authorized wire-tapping as a weapon against spies and saboteurs. When the three intelligence agencies kept on squabbling, Roosevelt appointed Col. William J. Donovan as a new coordinator of information (COI) in the summer of 1941. Pearl Harbor found Donovan watching a football game in New York at the Polo Grounds. He rushed back to Washington, and late that night FDR said to him, referring to the intelligence problem, "It's a good thing that you got me started on this."

Once started, the intelligence community was hard to stop. COI became the Office of Strategic Services; and OSS, after an interlude, was reborn in the Central Intelligence Agency. Hoover and the FBI went on after the war to become sacronsanct national icons, beyond secular criticism. A new system of government secrecy arose, concealing official decisions and actions from public and even congressional knowledge. Wiretaps, bugging and even breaking-and-entering became routine intelligence weapons. For a moment after Vietnam and Watergate, Congress experience a revulsion against the abuses of secrecy and of intelligence operations. That mood did not endure.

A third lesson drawn from Pearl Harbor was the need to unify the armed forces. An investigating commission headed by Justice Owen J. Roberts of the Supreme Court concluded that the Army and Navy commanders in Hawaii had not cooperated adequately in response to warnings received from Washington. This failure on the scene pointed to the larger institutional failure of coordination at the top. The Pearl Harbor hearings persuaded Harry Truman that "the tragedy was as much the result of the inadequate military system which provided for no unified command, either in the field or in Washington, as it was any personal failure of Army or Navy commanders."

In 1947 President Truman secured the passage of the National Security Act, establishing a single Department of Defense, a National Security Council and a Central Intelligence Agency. Instead of a secretary of war and secretary of the Navy, a chief of staff and a chief of naval operations, checking and balancing each other, we had at last the unified military establishment of everyone's dreams.

"When the gods wish to punish us," said Oscar Wilde, "they answer our prayers." The great projects of the Roosevelt years were to make the nation depression-proof and war-proof. Both projects had ironic consequences.

The pre-New Deal economy had a propensity toward depression. The New Deal tried to counter this by equipping the economy with a set of built-in stabilizers designed to protect individuals from unemployment, business from bankruptcy and society from the wanton hazards and cruelties of the unregulated economy. We thereby set up a system that, among other things, made it hard for prices to fall and easy for prices to rise. In ending the old bias in the economy toward depression, we replaced it by a new and almost as damaging a bias toward inflation.

Similarly, in foreign policy the national determination to make the republic war-proof had unforeseen results. The unification of the armed forces gave us the Pentagon and the military-industrial complex and promoted the militarization of American thought and life. Our defense budge these days rises to unprecedented heights, while spending to help our poor and needy is sharply cut. Even the State Department, the presumed headquarters of diplomacy, is today headed by a general and concentrates more on military than on political remedies.

In the same way, the rejection of isolation has encouraged the addiction to entangling alliances that has carelessly scattered American troops, bases and military commitments around the planet. Just recently, an American president, without sanction of a treaty or reference to Congress, casually committed the United States to the defense of a feudal regime in Saudi Arabia.

And the creation of an intelligence community has released covert and sinister forces in American life. Moreover, despite Vietnam and Watergate, the mood in Washington today is to turn the CIA and FBI loose, rogue elephants once again, and to withdraw as much of government as possible behind the curtain of secrecy.

This is not to say that the projects of 40 years ago were mistaken.We were right to seek a war-proof and depression-proof nation. No one wishes to return America to a condition of military vulnerability nor to the miserable old economic cycle of boom-and-bust. The republic requires security against war through alliances, intelligence agencies and a national defense establishment, as it requires security against depression through built-in stabilizers. But let's not get carried away.

One doubts whether Franklin Roosevelt himself would have taken the Pearl Harbor legacy quite so far. He had too acute a geopolitical sense to favor the spread of American commitments beyond our zones of direct national interest. He had too acute a sense of the general welfare to permit the sacrifice of the poor and powerless so that defense contractors could grow rich.

And he had too acute a sense of the Constitution -- yes, even FDR -- to believe, as too many of his successors have believed, that the president has inherent constitutional power to take the country into war on his own. When the prime minister of the French republic pleaded for American aid during the fall of France in the spring of 1940, Roosevelt, while promising that American supplies would continue so long as the French continued resistance, added carefully, "I know that you will understand that these statements carry with them no implication of military commitments. Only the Congress can make such commitments." One would wish that President Reagan might say as much to the Saudi Arabians.

Maybe we have applied the lessons of Pearl Harbor too indiscriminately and absolutely. Nihil nimis, the old Romans used to say: nothing in excess; in all things moderation. "There are two tragedies in life," Shaw wrote in "Man and Suprman." "One is not get to your heart's desire. The other is to get it."