I believe the common wisdom here is that no nation has remotely accurate targeting location on US carriers. This hypothetical attack would require intelligence and sensing capabilities that don't currently exist. I'm not saying this isn't possible, but right now you'd have to fly an enemy drone or plane near the carrier group to get any accurate targeting information and that plane would be shot down or jammed well before it could determine the exact locale, especially in wartime where such things would be not even be given a warning and all sorts of electric countermeasures would be on 24/7. Worse, unless the carrier is parked, its moving and hypersonic missile attacks against moving ships is an unsolved problem. You can't do last second course corrections at Mach 5.
The obvious solution would be to just have many megatons of kinectic energy hit near the carrier group via a decently sized kinetic, but the US would treat that exactly as a nuclear attack by a foreign power and respond in kind. It would probably look like one to central command as well, mushroom cloud and all.
I think the idea that these things will be stealthy, maneuverable, unstoppable, accurate, and undetectable is a little much. These weapons come with quite a bit of liability and might be impractical in any non-total war scenarios. The US is not going to let China and Russia blow up carrier groups with multi-megaton weapons and not respond in kind with its own megaton weapons, either nukes or large kinetics against military bases or capital cities. Once that hotpoint is reached, nuclear war is assumed. A kinetic strike against USS Ronald Reagan will mean a kinetic or nuke strike against Beijing or Moscow. The Chinese and Russians would know our escalation policies and would act accordingly if they don't plan to start WWIII with these weapons. Whether these policies have been officially written yet is the only real question here. Its safe to assume multi-megaton attacks against the US will absolutely not be tolerated and will not be treated with a conventional response.