/**
 * RegistryService - Core database registry management
 *
 * Singleton service that manages a SQLite registry of all known OCR databases.
 * Provides CRUD, search (FTS5), tagging, metadata, archival, and reconciliation.
 */
import Database from 'better-sqlite3';
import type { RegistryEntry, RegistryEntryWithTags, SearchFilters, SearchResult, SyncStats } from './types.js';
export declare class RegistryService {
    private db;
    private constructor();
    private initialize;
    static getInstance(registryDir?: string): RegistryService;
    static close(): void;
    static resetForTesting(registryDir: string): RegistryService;
    getConnection(): Database.Database;
    getDatabaseCount(): number;
    private _attachTagsAndMetadata;
    private _assertExists;
    private _safeFileSize;
    registerDatabase(name: string, filePath: string, description?: string, tags?: string[], metadata?: Record<string, string>): RegistryEntryWithTags;
    unregisterDatabase(name: string): void;
    getDatabase(name: string): RegistryEntryWithTags | null;
    updateDatabase(name: string, updates: Partial<Pick<RegistryEntry, 'description' | 'file_path' | 'profile_json' | 'status'>>): void;
    recordAccess(name: string, action: string, details?: string): void;
    search(query: string, filters?: SearchFilters): SearchResult[];
    getRecent(limit: number): RegistryEntryWithTags[];
    getRecentActivity(limit: number): Array<{
        database_name: string;
        action: string;
        accessed_at: string;
        details: string | null;
    }>;
    addTags(name: string, tags: string[]): void;
    removeTags(name: string, tags: string[]): void;
    setTags(name: string, tags: string[]): void;
    getTags(name: string): string[];
    setMetadata(name: string, metadata: Record<string, string>): void;
    getMetadata(name: string): Record<string, string>;
    archive(name: string, reason?: string): void;
    unarchive(name: string): void;
    rename(oldName: string, newName: string): void;
    syncStats(name: string, stats: SyncStats): void;
    reconcile(databasesDir: string): {
        added: number;
        removed: number;
        updated: number;
    };
    createWorkspace(name: string, description?: string): void;
    addToWorkspace(workspaceName: string, databaseName: string): void;
    removeFromWorkspace(workspaceName: string, databaseName: string): void;
    deleteWorkspace(name: string): void;
    listWorkspaces(): Array<{
        name: string;
        description: string | null;
        created_at: string;
    }>;
    getWorkspace(name: string): {
        name: string;
        description: string | null;
        created_at: string;
    } | null;
    getWorkspaceMembers(workspaceName: string): string[] | null;
    getWorkspacesForDatabase(name: string): string[];
}
//# sourceMappingURL=index.d.ts.map