/** * adapters/detect — Auto-detect which platform is running. * * Detection priority: * 1. Environment variables (high confidence) * 2. Config directory existence (medium confidence) * 3. Fallback to Claude Code (low confidence — most common) * * Verified env vars per platform (from source code audit): * - Claude Code: CLAUDE_PROJECT_DIR, CLAUDE_SESSION_ID | ~/.claude/ * - Gemini CLI: GEMINI_PROJECT_DIR (hooks), GEMINI_CLI (MCP) | ~/.gemini/ * - KiloCode: KILO, KILO_PID | ~/.config/kilo/ * - OpenCode: OPENCODE, OPENCODE_PID | ~/.config/opencode/ * - OpenClaw: OPENCLAW_HOME, OPENCLAW_CLI | ~/.openclaw/ * - Codex CLI: CODEX_CI, CODEX_THREAD_ID | ~/.codex/ * - Cursor: CURSOR_TRACE_ID (MCP), CURSOR_CLI (terminal) | ~/.cursor/ * - VS Code Copilot: VSCODE_PID, VSCODE_CWD | ~/.vscode/ */ import type { PlatformId, DetectionSignal, HookAdapter } from "./types.js"; /** * Detect the current platform by checking env vars and config dirs. * * @param clientInfo - Optional MCP clientInfo from initialize handshake. * When provided, takes highest priority (zero-config detection). */ export declare function detectPlatform(clientInfo?: { name: string; version?: string; }): DetectionSignal; /** * Get the adapter instance for a given platform. * Lazily imports platform-specific adapter modules. */ export declare function getAdapter(platform?: PlatformId): Promise;