/** * Local File Storage — Free Tier Backend * * Stores scars, sessions, decisions, and scar usage as JSON files * in the .gitmem/ directory (defaults to ~/.gitmem, overridable via GITMEM_DIR). * * Provides keyword-based search (no embeddings needed). */ import type { RelevantScar } from "../types/index.js"; export declare class LocalFileStorage { private basePath; constructor(basePath?: string); private ensureDir; private getFilePath; private readCollection; private writeCollection; /** * List records with optional filters */ list>(collection: string, options?: { filters?: Record; order?: string; limit?: number; }): Promise; /** * Get a single record by ID */ get>(collection: string, id: string): Promise; /** * Upsert a record (insert or update by ID) */ upsert>(collection: string, data: T & { id: string; }): Promise; /** * Delete a record by ID */ delete(collection: string, id: string): Promise; /** * BM25-ranked search for scars (free tier alternative to semantic search) * * Field boosts: title (3x), keywords (2x), description (1x) * Uses stemming, IDF weighting, and document length normalization. */ keywordSearch(query: string, k?: number): Promise; /** * Get the count of learnings stored locally */ getLearningCount(): number; /** * Load starter scars from a JSON file into local storage */ loadStarterScars(scarsPath: string): Promise; } export declare function getLocalFileStorage(): LocalFileStorage; export declare function resetLocalFileStorage(): void; //# sourceMappingURL=local-file-storage.d.ts.map