import type { ProjectKnowledgeDocument, ProjectKnowledgeDiagnosticReporter, ProjectKnowledgeQuery, ProjectKnowledgeResult } from './types.js'; declare const INDEX_SCHEMA = "comet.project-knowledge.index.v3"; declare const MAX_SOURCE_BYTES: number; export interface ProjectKnowledgeIndexOptions { readonly projectRoot: string; readonly cacheRoot?: string; readonly storageRoot?: string; readonly reportDiagnostic?: ProjectKnowledgeDiagnosticReporter; } export interface ProjectKnowledgeIndexStatus { readonly schema: typeof INDEX_SCHEMA; readonly available: boolean; readonly databasePath: string; readonly repositoryId: string; readonly workspaceId: string; readonly sourceCount: number; readonly sources: readonly ProjectKnowledgeIndexSource[]; readonly sectionCount: number; readonly updatedAt?: string; readonly lastQueryMs?: number; readonly lastCandidateCount?: number; readonly channels: readonly string[]; readonly diagnostic?: string; } export interface ProjectKnowledgeIndexSource { readonly source: string; readonly kind: ProjectKnowledgeDocument['kind']; readonly archivedAt?: string; readonly updatedAt: string; } export interface ProjectKnowledgeIndexSyncResult { readonly changedSources: readonly ProjectKnowledgeDocument[]; /** Sources successfully refreshed during this sync; used to bound the rg fallback. */ readonly refreshedSources: readonly ProjectKnowledgeDocument[]; readonly status: ProjectKnowledgeIndexStatus; } interface ParsedSection { readonly anchor: string; readonly title: string; readonly headingPath: string; readonly body: string; readonly lexicalTerms: string; } export declare function parseProjectKnowledgeSections(source: string, markdown: string): readonly ParsedSection[]; export declare class ProjectKnowledgeIndexStore { readonly databasePath: string; readonly repositoryId: string; readonly workspaceId: string; lastSyncReadBytes: number; private readonly projectRoot; private readonly reportDiagnostic; private database; constructor(options: ProjectKnowledgeIndexOptions); open(): Promise; close(): void; syncCorpus(corpus: readonly ProjectKnowledgeDocument[]): Promise; search(query: ProjectKnowledgeQuery): readonly ProjectKnowledgeResult[]; status(): ProjectKnowledgeIndexStatus; rebuild(corpus: readonly ProjectKnowledgeDocument[]): Promise; private applySourceDelta; private removeSource; private removeWorkspace; private searchChannel; private requireDatabase; } export declare function readProjectKnowledgeIndexStatus(options: ProjectKnowledgeIndexOptions): Promise; export { INDEX_SCHEMA, MAX_SOURCE_BYTES }; //# sourceMappingURL=index-store.d.ts.map