/** Backend interface (previously in factory.ts, inlined after dead code removal) */
export type ShortTermMemoryType = 'action' | 'observation' | 'thought' | 'goal' | 'lesson' | 'decision';
export interface ShortTermMemoryBackend {
    store(type: ShortTermMemoryType, content: string, importance?: number): Promise<void>;
    storeBatch?(entries: Array<{
        type: ShortTermMemoryType;
        content: string;
        timestamp?: string;
        importance?: number;
    }>): Promise<void>;
    getRecent(limit?: number): Promise<Array<{
        timestamp: string;
        type: string;
        content: string;
        importance?: number;
    }>>;
    query(searchTerm: string, limit?: number): Promise<Array<{
        timestamp: string;
        type: string;
        content: string;
        importance?: number;
    }>>;
    clear(): Promise<void>;
    close?(): Promise<void>;
}
interface ShortTermMemory {
    id?: number;
    timestamp: string;
    type: ShortTermMemoryType;
    content: string;
    projectId?: string;
    importance?: number;
}
export declare class SQLiteShortTermMemory implements ShortTermMemoryBackend {
    private db;
    private projectId;
    private maxEntries;
    private cache;
    constructor(config: {
        dbPath: string;
        projectId?: string;
        maxEntries?: number;
    });
    private initSchema;
    store(type: ShortTermMemory['type'], content: string, importance?: number): Promise<void>;
    storeBatch(entries: Array<{
        type: ShortTermMemory['type'];
        content: string;
        timestamp?: string;
        importance?: number;
    }>): Promise<void>;
    getRecent(limit?: number): Promise<ShortTermMemory[]>;
    query(searchTerm: string, limit?: number): Promise<ShortTermMemory[]>;
    /**
     * Sanitize search term for FTS5 query syntax
     * Wraps each word in double quotes to prevent FTS5 syntax errors from
     * special characters like AND, OR, NOT, *, -, parentheses, etc.
     */
    private sanitizeFTS5Query;
    private queryWithoutCache;
    getByType(type: ShortTermMemory['type'], limit?: number): Promise<ShortTermMemory[]>;
    count(): Promise<number>;
    private prune;
    clear(): Promise<void>;
    close(): Promise<void>;
    exportAll(): Promise<ShortTermMemory[]>;
    importAll(memories: Array<{
        type: ShortTermMemory['type'];
        content: string;
        timestamp?: string;
    }>): Promise<number>;
    /**
     * Auto-score importance of content on a 1-10 scale based on keyword analysis.
     * - 9-10: security, critical, breaking, vulnerability, production
     * - 7-8: error, fix, bug, lesson, learned, important
     * - 5-6: implement, feature, refactor, update
     * - 3-4: comment, format, style, typo
     * - 1-2: default for everything else
     */
    static autoScoreImportance(content: string): number;
    /**
     * Summarize content by truncating at the nearest sentence boundary.
     * Falls back to word boundary if no sentence boundary is found.
     */
    static summarize(content: string, maxLength?: number): string;
}
export {};
//# sourceMappingURL=sqlite.d.ts.map