/** * Runtime detection — terminal type and user identity. * * Replicates Claude Code's logic for detecting terminal emulators * and generating a persistent anonymous user ID. */ /** * Detect the terminal emulator or IDE from environment variables. * Returns undefined if no terminal can be identified. * * Priority mirrors Claude Code: IDE-specific env vars first, * then TERM/TERM_PROGRAM, then terminal-specific env vars. */ export declare function detectTerminal(): string | undefined; /** * Get or create a persistent anonymous user ID. * * Claude Code generates `randomBytes(32).toString("hex")` (64-char hex string) * and stores it as `userID` in `~/.claude.json`. We read from the same file * to share the identity. If the file doesn't exist, we generate a new ID * but only persist it if we can. */ export declare function getUserId(): string;