import type { OpenLoreConfig } from '../../types/index.js'; import { type AnalysisOwnership } from '../runtime/analysis-ownership.js'; import { type AnalysisArtifacts } from './artifact-generator.js'; import { type DependencyGraphResult } from './dependency-graph.js'; import { type RepositoryMap } from './repository-mapper.js'; import { type WorkspaceShardReport } from './workspace-shards.js'; import { type ShardScopedAnalysisReceipt } from './workspace-shard-analysis.js'; export { isAnalysisCacheFresh } from '../services/mcp-handlers/utils.js'; export type AnalysisStage = 'mapping' | 'dependency-graph' | 'extractors' | 'artifacts' | 'complete'; export interface AnalysisReport { stage: AnalysisStage; status: 'start' | 'progress' | 'complete' | 'warning' | 'info'; detail?: string; percent?: number; } /** An injected boundary: the shared core never writes to stdout/stderr. */ export interface AnalysisReporter { report(event: AnalysisReport): void; } export interface AnalysisCoreResult { repoMap: RepositoryMap; depGraph: DependencyGraphResult; artifacts: AnalysisArtifacts; duration: number; generationId?: string; workspaceShards?: WorkspaceShardReport; shardReceipt?: ShardScopedAnalysisReceipt; } export interface AnalysisCoreOptions { maxFiles: number; include?: string[]; exclude?: string[]; reExtract?: boolean; ownership?: AnalysisOwnership & { state: 'owned'; }; reporter?: AnalysisReporter; config?: OpenLoreConfig | null; /** Explicit workspace shard names. Omit for the legacy full-analysis path. */ shards?: string[]; /** * Flush a partial index at phase boundaries so reads during an index-ABSENT first build * are answered from what exists instead of "no index found" * (change: refine-first-run-partial-serving). * * Opt-in, and honoured only when this really is a first build: a repository that already * has a published generation has something better to serve, so the lane stays off. CI and * embedded hosts leave it off and keep today's single-write behaviour. */ partialServing?: boolean; } export declare function mergeAnalysisPatterns(configured: { includePatterns?: string[]; excludePatterns?: string[]; } | undefined, include: string[], exclude: string[]): { includePatterns: string[]; excludePatterns: string[]; }; export declare function analysisConfigFingerprintInput(configured: { includePatterns?: string[]; excludePatterns?: string[]; } | undefined, include: string[], exclude: string[], maxFiles: number, protectedExcludePatterns?: string[]): { includePatterns: string[]; excludePatterns: string[]; maxFiles: number; protectedExcludePatterns: string[]; }; export declare function analysisGeneratedExcludes(rootPath: string, outputPath: string, openspecPath?: string): string[]; /** * Run and atomically publish the analysis artifact set shared by CLI and API. * UI, logging, and progress rendering are deliberately delegated to `reporter`. */ export declare function runAnalysisCore(rootPath: string, outputPath: string, options: AnalysisCoreOptions): Promise; //# sourceMappingURL=analysis-core.d.ts.map