import { useMutation } from "@tanstack/react-query"; import { motion } from "motion/react"; import { startPairing } from "../../api"; import { useReducedMotion } from "../../hooks/useReducedMotion"; import { ambientPulse } from "../../lib/motion"; import { Button } from "../ui/Button"; import { Hint } from "../ui/EmptyState"; import { TelemetryPanel } from "../ui/Telemetry"; export function WormholeView({ pairing, onPaired, }: { pairing: { code: string; expires_at: string } | null; onPaired: (p: { code: string; expires_at: string }) => void; }) { const gen = useMutation({ mutationFn: startPairing, onSuccess: onPaired, }); const reducedMotion = useReducedMotion(); const expires = pairing ? new Date(pairing.expires_at).toLocaleTimeString() : ""; return (

Outposts & wormholes

Link a remote machine once — it beams snapshots through an encrypted wormhole.

{!pairing ? ( gen.mutate()} loading={gen.isPending} /> ) : (

Pairing code

{pairing.code}

Burns at {expires}

On the outpost:{" "} tessera-agent pair {pairing.code} {JSON.stringify(pairing, null, 2)}
)}

Outpost health

No outposts paired yet

Grey dot means offline or waiting.

); } function EmptyWormhole({ onGenerate, loading, }: { onGenerate: () => void; loading: boolean; }) { const reducedMotion = useReducedMotion(); return (

Open a wormhole when you're ready to claim an outpost.

); }