/**
 * CodexLens Tool - Bridge between CCW and CodexLens Python package
 * Provides code indexing and semantic search via spawned Python process
 *
 * Features:
 * - Automatic venv bootstrap at ~/.codexlens/venv
 * - JSON protocol communication
 * - Symbol extraction and semantic search
 * - FTS5 full-text search
 */
import type { ToolSchema, ToolResult } from '../types/tool.js';
interface ReadyStatus {
    ready: boolean;
    error?: string;
    version?: string;
}
interface SemanticStatus {
    available: boolean;
    backend?: string;
    accelerator?: string;
    providers?: string[];
    litellmAvailable?: boolean;
    error?: string;
}
interface BootstrapResult {
    success: boolean;
    error?: string;
    message?: string;
}
interface ExecuteResult {
    success: boolean;
    output?: string;
    error?: string;
    message?: string;
    results?: unknown;
    files?: unknown;
    symbols?: unknown;
    status?: unknown;
    config?: unknown;
    cleanResult?: unknown;
    ready?: boolean;
    version?: string;
}
interface ExecuteOptions {
    timeout?: number;
    cwd?: string;
    onProgress?: (progress: ProgressInfo) => void;
}
interface ProgressInfo {
    stage: string;
    message: string;
    percent: number;
    filesProcessed?: number;
    totalFiles?: number;
}
/**
 * Check if CodexLens venv exists and has required packages
 * @param force - Force refresh cache (default: false)
 * @returns Ready status
 */
declare function checkVenvStatus(force?: boolean): Promise<ReadyStatus>;
/**
 * Check if semantic search dependencies are installed
 * @param force - Force refresh cache (default: false)
 * @returns Semantic status
 */
declare function checkSemanticStatus(force?: boolean): Promise<SemanticStatus>;
/**
 * Ensure LiteLLM embedder dependencies are available in the CodexLens venv.
 * Installs ccw-litellm into the venv if needed.
 */
declare function ensureLiteLLMEmbedderReady(): Promise<BootstrapResult>;
/**
 * GPU acceleration mode for semantic search
 */
type GpuMode = 'cpu' | 'cuda' | 'directml';
/**
 * Python environment info for compatibility checks
 */
interface PythonEnvInfo {
    version: string;
    majorMinor: string;
    architecture: number;
    compatible: boolean;
    error?: string;
}
/**
 * Detect available GPU acceleration
 * @returns Detected GPU mode and info
 */
declare function detectGpuSupport(): Promise<{
    mode: GpuMode;
    available: GpuMode[];
    info: string;
    pythonEnv?: PythonEnvInfo;
}>;
/**
 * Bootstrap CodexLens venv using UV (fast package manager)
 * @param gpuMode - GPU acceleration mode for semantic search
 * @returns Bootstrap result
 */
declare function bootstrapWithUv(gpuMode?: GpuMode): Promise<BootstrapResult>;
/**
 * Install semantic search dependencies using UV (fast package manager)
 * UV automatically handles ONNX Runtime conflicts
 * @param gpuMode - GPU acceleration mode: 'cpu', 'cuda', or 'directml'
 * @returns Bootstrap result
 */
declare function installSemanticWithUv(gpuMode?: GpuMode): Promise<BootstrapResult>;
/**
 * Install semantic search dependencies with optional GPU acceleration
 * @param gpuMode - GPU acceleration mode: 'cpu', 'cuda', or 'directml'
 * @returns Bootstrap result
 */
declare function installSemantic(gpuMode?: GpuMode): Promise<BootstrapResult>;
/**
 * Bootstrap CodexLens venv with required packages
 * @returns Bootstrap result
 */
declare function bootstrapVenv(): Promise<BootstrapResult>;
/**
 * Ensure CodexLens is ready to use
 * @returns Ready status
 */
declare function ensureReady(): Promise<ReadyStatus>;
/**
 * Execute CodexLens CLI command with real-time progress updates
 * @param args - CLI arguments
 * @param options - Execution options
 * @returns Execution result
 */
declare function executeCodexLens(args: string[], options?: ExecuteOptions): Promise<ExecuteResult>;
export declare const schema: ToolSchema;
export declare function handler(params: Record<string, unknown>): Promise<ToolResult<ExecuteResult>>;
/**
 * Uninstall CodexLens by removing the venv directory
 * @returns Uninstall result
 */
declare function uninstallCodexLens(): Promise<BootstrapResult>;
/**
 * Cancel the currently running indexing process
 * @returns Result indicating if cancellation was successful
 */
declare function cancelIndexing(): {
    success: boolean;
    message?: string;
    error?: string;
};
/**
 * Check if an indexing process is currently running
 * @returns True if indexing is in progress
 */
declare function isIndexingInProgress(): boolean;
export type { ProgressInfo, ExecuteOptions };
export { ensureReady, executeCodexLens, checkVenvStatus, bootstrapVenv, checkSemanticStatus, ensureLiteLLMEmbedderReady, installSemantic, detectGpuSupport, uninstallCodexLens, cancelIndexing, isIndexingInProgress, bootstrapWithUv, installSemanticWithUv, };
export declare function getVenvPythonPath(): string;
export type { GpuMode, PythonEnvInfo };
export declare const codexLensTool: {
    name: string;
    description: string;
    parameters: {
        type: "object";
        properties: Record<string, unknown>;
        required?: string[];
    };
    execute: (params: Record<string, unknown>) => Promise<ExecuteResult | undefined>;
};
//# sourceMappingURL=codex-lens.d.ts.map