export interface SearchHit { session_id: string; source: string; title: string | null; project_name: string | null; project_path: string | null; started_at: string | null; snippet: string; rank: number; } export interface SearchOptions { limit?: number; source?: string; project_path?: string; machine?: string; } /** * Convert a free-text query into a safe FTS5 MATCH expression. Each whitespace * token is wrapped in double quotes (escaping embedded quotes) and combined with * implicit AND, which avoids FTS5 syntax errors on punctuation in user input. */ export declare function toFtsQuery(query: string): string; /** * Build safe FTS5 query variants. The first variant preserves the user's * whitespace tokens; the second splits identifiers on punctuation so domains, * repo names, paths, and dashed project IDs still match unicode61-tokenized * content (for example example.com -> "example" "com"). */ export declare function toFtsQueries(query: string): string[]; /** * Full-text search over message content. Returns one hit per matching session * (the best-ranked message snippet), ordered by BM25 relevance then recency. */ export declare function searchMessages(query: string, opts?: SearchOptions): SearchHit[]; /** Full-text search over session titles / project names. */ export declare function searchSessions(query: string, opts?: SearchOptions): SearchHit[]; export interface ToolCallHit { session_id: string; source: string; title: string | null; project_name: string | null; project_path: string | null; started_at: string | null; tool_name: string; snippet: string; rank: number; } /** Full-text search over tool calls (name / input / output). */ export declare function searchToolCalls(query: string, opts?: SearchOptions): ToolCallHit[]; /** Primary search entry point across messages, session metadata, and tool calls. */ export declare function search(query: string, opts?: SearchOptions): SearchHit[]; //# sourceMappingURL=search.d.ts.map