import { type ToolKernel, type ToolDefinition } from './shared.js'; export interface RecallResult { id: string; content: string; date: number; type: string; importance_score: number; flags: string[]; compression_tier: string; } /** * Unified search parameters for the v4 `search` tool. * * scope: * - 'observations' → BM25/fusion over the observations table (prior behaviour of `search`) * - 'knowledge' → knowledge-base search (prior behaviour of `search_knowledge`) * - 'content' → content-store chunk search (prior behaviour of `search_content`) * - 'topics' → topic-name match + associated observations (prior behaviour of `browse`) * - 'all' → all four in parallel, interleaved by score (default) * * mode: * - 'hybrid' → current fusion behaviour (default) * - 'semantic' → bias toward vector + LLM judge when enabled * - 'verbatim' → BM25 AND-mode + phrase matching (FTS content index) * - 'temporal' → activate temporal resolver hint, date-sorted fallback * * cursor: accepted but returns null in v4.0 — full pagination in v4.1. */ export interface UnifiedSearchParams { query: string; scope?: 'observations' | 'knowledge' | 'content' | 'topics' | 'all'; mode?: 'semantic' | 'verbatim' | 'temporal' | 'hybrid'; filters?: { since?: number; until?: number; types?: string[]; category?: string[]; importance_min?: number; pinned?: boolean; entity?: string; }; limit?: number; cursor?: string; /** When set to 'knowledge', synthesize top-3 results and file as a knowledge entry + vault page. */ file_as?: 'knowledge'; } export declare const searchToolDefinitions: ToolDefinition[]; type UnifiedSearchResult = { id: string; title: string; snippet: string; relevance_score: number; timestamp: number; _source?: string; [key: string]: unknown; }; /** * Core implementation for the unified `search` tool. * All legacy tool handlers delegate here and tag their response with _meta.deprecated. * * cursor is accepted but always returns null in v4.0. * Full cursor-based pagination will be implemented in v4.1. */ export declare function handleSearchUnified(params: UnifiedSearchParams, kernel: ToolKernel): Promise<{ results: UnifiedSearchResult[]; cursor: string | null; _meta: Record; }>; export declare function handleSearch(params: { query: string; type?: string; limit?: number; verbatim?: boolean; }, kernel: ToolKernel): Promise & { _meta?: Record; }>; export declare function handleIndexContent(params: { content: string; source: string; }, kernel: ToolKernel): Promise<{ source_id: number; source: string; } | { error: string; }>; export declare function handleSearchContent(params: { query: string; source?: string; limit?: number; }, kernel: ToolKernel): Promise & { _meta?: Record; }>; export declare function handleSearchKnowledge(params: { query: string; category?: string; limit?: number; include_global?: boolean; include_superseded?: boolean; }, kernel: ToolKernel): Promise | { error: string; }>; export declare function handleRecall(params: { query: string; filters?: { type?: string; time_range?: { from?: number; to?: number; }; importance_min?: number; flags?: string[]; }; limit?: number; }, kernel: ToolKernel): Promise<(RecallResult[] & { _meta?: Record; }) | { error: string; }>; export declare function handleAsk(params: { question: string; limit?: number; save_as_page?: boolean; }, kernel: ToolKernel): Promise; export declare function handleBrowse(params: { dimension: string; value: string; verbatim?: boolean; limit?: number; }, kernel: ToolKernel): Promise & { _meta?: Record; }>; export {}; //# sourceMappingURL=search.d.ts.map