/** * Index Directory Use Case * * Orchestrates the indexing of a codebase directory. * This is an application-level use case that coordinates domain entities * and infrastructure services. */ import type { Config } from '../entities'; import type { FileSystem } from '../ports'; import type { IndexModule } from '../../types'; /** * Result of indexing with a single module */ export interface IndexResult { moduleId: string; indexed: number; skipped: number; errors: number; } /** * Options for the index directory use case */ export interface IndexDirectoryOptions { /** Override configuration */ config?: Partial; /** Show verbose output */ verbose?: boolean; /** Callback for progress updates */ onProgress?: (message: string) => void; } /** * Dependencies required by this use case */ export interface IndexDirectoryDependencies { /** Filesystem abstraction */ fileSystem: FileSystem; /** Load configuration */ loadConfig: (rootDir: string) => Promise; /** Get enabled modules */ getEnabledModules: (config: Config) => IndexModule[]; /** Initialize a module */ initializeModule: (module: IndexModule, config: Config) => Promise; } /** * Index a directory using all enabled modules. * * This use case: * 1. Loads configuration * 2. Finds all files matching extensions * 3. Indexes files with each enabled module * 4. Builds secondary indexes (Tier 1) * 5. Updates manifests */ export declare function indexDirectory(rootDir: string, deps: IndexDirectoryDependencies, options?: IndexDirectoryOptions): Promise;