import { MorphAPIClient } from '../../core/client.js'; import { APIResource } from '../../core/resource.js'; import { CodebaseSearchResult, CodebaseSearchInput, CodebaseSearchConfig } from './types.js'; import '../utils/resilience.js'; /** * Core implementation for codebase search. * Calls the Morph rerank service for two-stage semantic search over the * code-storage host, through the shared `MorphAPIClient` transport. */ /** * CodebaseSearch client for programmatic semantic search * * @deprecated Prefer the unified `MorphClient` (`new MorphClient({ apiKey }).codebaseSearch`). * Standalone clients remain only for backwards compatibility and may be removed in a future * major version — do not use them in new code. */ declare class CodebaseSearchClient extends APIResource { private readonly timeout; constructor(clientOrConfig?: MorphAPIClient | { apiKey?: string; debug?: boolean; timeout?: number; retryConfig?: any; }); /** * Execute a semantic code search * * @param input - Search parameters including query, repoId, and target directories * @param overrides - Optional config overrides for this operation * @returns Search results with ranked code matches */ search(input: { query: string; repoId: string; target_directories?: string[]; explanation?: string; limit?: number; }, overrides?: { searchUrl?: string; timeout?: number; }): Promise; } /** * Execute semantic code search (standalone — builds its own transport). * Throws on a missing API key; returns `{ success: false, error }` on HTTP failure. */ declare function executeCodebaseSearch(input: CodebaseSearchInput, config: CodebaseSearchConfig): Promise; export { CodebaseSearchClient, executeCodebaseSearch };