/** * Adapter Loader * * Loads adapters from registry, detects tools, and provides API for init command. * Enables SpecWeave to work with ANY AI coding tool. */ import { IAdapter } from './adapter-interface.js'; export interface AdapterRegistry { version: number; last_updated: string; adapters: Array<{ name: string; description: string; automation_level: string; status: string; directory: string; market_share: string; priority: string; }>; } /** * Adapter Loader - Main API for working with adapters */ export declare class AdapterLoader { private adapters; private registry; constructor(); /** * Initialize all adapters * * NOTE: Claude Code is NOT an adapter - it's the native/default experience! * Adapters only exist for tools that need to APPROXIMATE Claude's native capabilities. */ private initializeAdapters; /** * Set by detectTool() when a `claude` command exists but failed its check, * so init does not report a clean Claude Code install. */ claudeCliIssue?: string; /** * Load registry.yaml */ loadRegistry(): Promise; /** * Get all available adapters */ getAllAdapters(): IAdapter[]; /** * Get adapter by name */ getAdapter(name: string): IAdapter | undefined; /** Every tool `--adapter` accepts besides `claude`, which needs no adapter. */ adapterNames(): string[]; /** * Auto-detect which tool is being used * * Detection priority (Claude-first! SpecWeave is built for Claude): * 1. Claude Code (FIRST! If claude CLI is available, use it - active indicator) * 2. Cursor (only if Claude unavailable AND cursor indicators exist) * 3. Gemini CLI (only if Claude unavailable) * 4. Codex (only if Claude unavailable) * 5. Generic (only if explicitly requested via --adapter generic) * * Rationale: Claude CLI being available is an ACTIVE indicator (user installed it). * `.cursor/` directory is a PASSIVE indicator (may exist from old usage). * If user has both, they almost certainly want Claude (since SpecWeave is native to it). * * @returns Promise Detected tool name (not adapter - Claude has no adapter!) */ /** Check the `claude` command only, so init can warn about a broken install without detecting a tool. */ checkClaudeCli(): void; detectTool(env?: NodeJS.ProcessEnv): Promise; /** * Check requirements for a specific adapter */ checkRequirements(adapterName: string): Promise; /** * List all available adapters with details */ listAdapters(): Promise; /** * Get icon for automation level */ private getAutomationIcon; /** * Get recommended adapter based on detection and user preference * * Returns null if Claude is detected (native experience, no adapter needed) */ getRecommendedAdapter(explicitChoice?: string): Promise; } //# sourceMappingURL=adapter-loader.d.ts.map