import { Button } from "../../components/ui/Button"; import { Modal } from "../../components/ui/Modal"; import { CopyIcon } from "../../components/layout/icons"; import { useClipboard } from "../../lib/useClipboard"; interface KeyRevealModalProps { /** The plaintext `cak_...` key, or null when closed. */ plaintextKey: string | null; onClose: () => void; } /** * Copy-once key reveal. The server returns the plaintext key exactly once on * creation; this is the only place it is ever shown. The user is warned and * given a copy button. Closing dismisses it for good. */ export function KeyRevealModal({ plaintextKey, onClose }: KeyRevealModalProps) { const { copied, copy } = useClipboard(); const open = plaintextKey != null; return ( Done} >
Copy this key now. You will not see it again. The key is shown only at creation and cannot be recovered. If you lose it, revoke it and create a new one.
{plaintextKey}

Use this key to enroll the agent as a persistent, individually revocable identity.

); }