/** * Hook API — 供 OpenClaw hook (kivo-intent-injection) 调用的高层 API。 * 封装向量搜索、bootstrap 条目加载、注入格式化,hook 只需调用这些函数。 */ export interface SearchResult { id: string; type: string; title: string; summary: string | null; content: string; confidence: number; domain: string | null; similarity: number; } export interface SearchOptions { limit?: number; threshold?: number; dbPath?: string; } export interface BootstrapOptions { limit?: number; agentId?: string; dbPath?: string; } export interface FormatOptions { maxChars?: number; } /** * Vector search: embed query via Ollama bge-m3, compute cosine similarity * against entries with compatible embeddings. * Returns top entries above similarity threshold. */ export declare function searchRelevantKnowledge(query: string, options?: SearchOptions): Promise; /** * Get high-value knowledge entries for bootstrap injection. * Filters by agent role/domain when possible. */ export declare function getBootstrapEntries(options?: BootstrapOptions): SearchResult[]; /** * Format search results into a markdown context block, respecting token budget. */ export declare function formatInjectionContext(entries: SearchResult[], options?: FormatOptions): string; //# sourceMappingURL=index.d.ts.map