import { type EventType } from "./archive-db.js"; /** * v0.6 — FTS5 search over the cold archive. * * Per docs/plan/v0.6-default-workflow-tuning.md §4.3 + §4.7. Used by: * - agent-router.ts fallback (when keyword resolve returns null) * - CLI `solosquad memory search` * * The function is read-only; safe to call from message handlers. */ export interface SearchOpts { workspace: string; orgSlug: string; query: string; limit?: number; /** Restrict to a single event_type. */ eventType?: EventType; } export interface SearchResult { snippet: string; agent: string; timestamp: string; source_routine: string; event_type: string; rank: number; } export declare function searchArchive(opts: SearchOpts): SearchResult[]; /** Statistics over the cold archive — used by `memory stats` CLI + dashboards. */ export interface ArchiveStats { totalRows: number; oldestIso: string | null; newestIso: string | null; diskBytes: number; perEventType: Record; } export declare function getStats(args: { workspace: string; orgSlug: string; }): ArchiveStats; /** * Strip characters that break FTS5 query parsing while preserving Unicode * tokens (Korean / Chinese / etc). The router fallback gets free-form * messages — letting raw quotes through trips MATCH syntax errors. */ export declare function sanitizeFts5Query(input: string): string;