export type SearchCorpus = "entities" | "docs" | "knowledge"; /** Per-corpus default TTL in milliseconds. undefined = never expires. */ export declare const CORPUS_DEFAULT_TTL_MS: Record; export interface SearchResult { id: string; content: string; score: number; corpus: SearchCorpus; metadata: Record; } export interface SearchOptions { corpus?: SearchCorpus | "all"; accountId?: string; filters?: Record; k?: number; } export interface IndexableItem { id: string; content: string; corpus: SearchCorpus; accountId?: string; metadata: Record; /** * How long this item remains valid in milliseconds. * undefined = use the corpus default from CORPUS_DEFAULT_TTL_MS. * 0 = never expires (permanent), regardless of corpus default. */ ttlMs?: number; } export type SearchProviderName = "none" | "local" | "remote"; export type SearchReadiness = { state: "disabled"; configured: "none"; } | { state: "initializing"; configured: SearchProviderName; } | { state: "ready"; configured: SearchProviderName; provider: string; } | { state: "failed"; configured: SearchProviderName; error: string; }; export interface SearchProvider { /** Called once at server startup. Must not throw — log and degrade gracefully. */ initialize(): Promise; /** Returns true if this provider can serve queries. */ isAvailable(): boolean; /** Semantic search. Returns [] if unavailable. Must not throw. */ search(query: string, options?: SearchOptions): Promise; /** Index a single item. Must not throw. */ index(item: IndexableItem): Promise; /** Remove expired items across all corpora and keys. */ evictExpired(): void; } //# sourceMappingURL=types.d.ts.map