import { TreeSitterService } from './tree-sitter/service.js';
import type { Tree, Language } from 'web-tree-sitter';
/** Result of parsing a file with tree-sitter. */
export interface ParseResult {
    tree: Tree;
    language: Language;
    lang: string;
}
import { LspService } from './lsp/service.js';
import type { SymbolInfo, OutlineEntry } from './tree-sitter/queries.js';
import type { Location, DocumentSymbol, Diagnostic, Hover } from './lsp/protocol.js';
import type { ShellPathService } from '../runtime/shell-paths.js';
/**
 * Convert a filesystem path to a file:// URI.
 * Correctly handles paths with spaces and special characters.
 */
export declare function pathToUri(filePath: string): string;
/**
 * Convert a file:// URI back to a filesystem path.
 * Correctly handles percent-encoded URIs.
 */
export declare function uriToPath(uri: string): string;
export declare class CodeIntelligence {
    private treeSitter;
    private lsp;
    private readonly shellPaths;
    constructor(options?: {
        shellPaths?: Pick<ShellPathService, 'workingDirectory' | 'homeDirectory' | 'resolveProjectPath'>;
        treeSitter?: TreeSitterService;
        lsp?: LspService;
    });
    /**
     * Initialize all services. Call once at startup.
     * Loads language configs and registers LSP server commands with LspService
     * so that user/project overrides in .goodvibes/goodvibes/languages/ are respected.
     */
    initialize(): Promise<void>;
    /** Shutdown all owned services for this facade instance. */
    dispose(): Promise<void>;
    /**
     * Parse a file and load its tree-sitter language in one step.
     * Returns null if the language is unknown or grammar unavailable.
     */
    private _parseFile;
    /** Detect the language of a file by its extension. */
    detectLanguage(filePath: string): string | null;
    /** Check if a tree-sitter grammar is loaded for a file's language. */
    hasTreeSitter(filePath: string): boolean;
    /**
     * Parse a file and extract symbols.
     * Returns empty array if no grammar is loaded for the language.
     */
    getSymbols(filePath: string, content: string): Promise<SymbolInfo[]>;
    /**
     * Parse a file and extract an outline (signatures only).
     * Returns empty array if no grammar is loaded for the language.
     */
    getOutline(filePath: string, content: string): Promise<OutlineEntry[]>;
    /**
     * Find the scope (function/class) enclosing a line.
     * Returns null if unavailable.
     */
    getEnclosingScope(filePath: string, content: string, line: number): Promise<{
        kind: string;
        name: string;
        startLine: number;
        endLine: number;
    } | null>;
    /** Check if an LSP server is available for a file's language. */
    hasLsp(filePath: string): Promise<boolean>;
    /**
     * Get definition location.
     * Returns null if LSP not available for the file's language.
     */
    getDefinition(filePath: string, line: number, column: number): Promise<Location | null>;
    /**
     * Get all references to a symbol.
     * Returns empty array if LSP not available.
     */
    getReferences(filePath: string, line: number, column: number): Promise<Location[]>;
    /**
     * Get document symbols.
     * Tries LSP first; falls back to tree-sitter if LSP is unavailable.
     */
    getDocumentSymbols(filePath: string, content: string): Promise<DocumentSymbol[] | SymbolInfo[]>;
    /**
     * Get hover information.
     * Returns null if LSP not available.
     */
    getHover(filePath: string, line: number, column: number): Promise<Hover | null>;
    /**
     * Get diagnostics for a file.
     * Returns empty array if LSP not available.
     * Note: LSP pushes diagnostics via textDocument/publishDiagnostics notifications;
     * this method is a best-effort pull (not all servers support textDocument/diagnostic).
     */
    getDiagnostics(filePath: string): Promise<Diagnostic[]>;
}
//# sourceMappingURL=facade.d.ts.map