import type Database from 'better-sqlite3'; export interface AspectCoverage { aspect: string; covered: number; total: number; percentage: number; } export interface SymbolWithDomain { id: number; name: string; kind: string; filePath: string; line: number; domains: string[]; purpose: string | null; } export interface SymbolWithPurity { id: number; name: string; kind: string; filePath: string; line: number; purpose: string | null; } /** * Repository for definition metadata operations. * Handles CRUD operations for the definition_metadata table. */ export declare class MetadataRepository { private db; constructor(db: Database.Database); /** * Set metadata on a definition (insert or replace) */ set(definitionId: number, key: string, value: string): void; /** * Remove a metadata key from a definition */ remove(definitionId: number, key: string): boolean; /** * Get all metadata for a definition */ get(definitionId: number): Record; /** * Get a single metadata value for a definition */ getValue(definitionId: number, key: string): string | null; /** * Batch-fetch a metadata value for multiple definition IDs. * Returns a Map from definition_id to value for those that have the key set. */ getValuesByKey(definitionIds: number[], key: string): Map; /** * Get definition IDs that have a specific metadata key set */ getDefinitionsWith(key: string): number[]; /** * Get definition IDs that do NOT have a specific metadata key set */ getDefinitionsWithout(key: string): number[]; /** * Get all unique metadata keys (aspects) in use */ getKeys(): string[]; /** * Get count of definitions matching filters */ getFilteredCount(filters?: { kind?: string; filePattern?: string; }): number; /** * Get coverage stats for aspects (metadata keys). * Returns the number of definitions that have each aspect defined. */ getAspectCoverage(filters?: { kind?: string; filePattern?: string; }): AspectCoverage[]; /** * Get all unique domains used across all symbols. * Domain is stored as a JSON array in the 'domain' metadata key. */ getAllDomains(): string[]; /** * Get symbols that have a specific domain tag. * Domain is stored as a JSON array in the 'domain' metadata key. */ getSymbolsByDomain(domain: string): SymbolWithDomain[]; /** * Get definitions that have no metadata at all (not in definition_metadata table). */ getDefinitionsWithNoMetadata(options?: { kind?: string; limit?: number; }): Array<{ id: number; name: string; kind: string; filePath: string; line: number; }>; /** * Get count of definitions that have no metadata at all. */ getDefinitionsWithNoMetadataCount(options?: { kind?: string; }): number; /** * Bulk-remove metadata entries for given definitions and keys. * Chunked for SQLite parameter limits. */ removeForDefinitions(definitionIds: number[], keys: string[]): number; /** * Get symbols filtered by purity (pure = no side effects). * Returns symbols where 'pure' metadata matches the specified value. */ getSymbolsByPurity(isPure: boolean): SymbolWithPurity[]; } //# sourceMappingURL=metadata-repository.d.ts.map