import type { ProjectKnowledgeApplyResult, ProjectKnowledgeQuery, ProjectKnowledgeResult, ProjectKnowledgeStatus, ProjectKnowledgeMutation, ProjectKnowledgeRecordCounts } from './types.js'; import { type ProjectKnowledgeRecord } from './records.js'; import { type ProjectKnowledgeIndexStatus, type ProjectKnowledgeIndexSyncResult, type ProjectKnowledgeIndexOptions } from './index-store.js'; import type { ProjectKnowledgeDocument } from './types.js'; import type { AgentContextOutcomeStatus } from '../agent-learning/index.js'; export interface ProjectKnowledgeLocalStoreOptions extends Omit { readonly storageRoot?: string; readonly cacheRoot?: string; } export interface ProjectKnowledgeRecordListOptions { readonly projectId?: string; readonly type?: ProjectKnowledgeRecord['type']; readonly state?: ProjectKnowledgeRecord['state']; readonly authority?: ProjectKnowledgeRecord['authority']; readonly limit?: number; } export interface ProjectKnowledgeStoreSnapshot { readonly records: readonly ProjectKnowledgeRecord[]; readonly appliedMutations: readonly { readonly mutationKey: string; readonly appliedAt: string; }[]; readonly applicationOutcomes: readonly { readonly recordId: string; readonly applicationId: string; readonly status: AgentContextOutcomeStatus; readonly revision: number; }[]; readonly feedbackStates: readonly { readonly recordId: string; readonly baseState: ProjectKnowledgeRecord['state']; }[]; } export declare function projectKnowledgeRecordSemanticFingerprint(record: ProjectKnowledgeRecord): string; export declare class ProjectKnowledgeLocalStore { private static readonly sharedDatabases; readonly databasePath: string; readonly repositoryId: string; readonly workspaceId: string; private readonly projectRoot; private readonly reportDiagnostic; private database; private readonly indexStore; private closed; constructor(options: ProjectKnowledgeLocalStoreOptions); status(): ProjectKnowledgeStatus; list(options?: ProjectKnowledgeRecordListOptions): readonly ProjectKnowledgeRecord[]; projectCounts(projectId: string): ProjectKnowledgeRecordCounts; read(id: string): ProjectKnowledgeRecord | null; importNewerRecords(records: readonly ProjectKnowledgeRecord[]): number; importSnapshot(snapshot: ProjectKnowledgeStoreSnapshot, migrationKey?: string): boolean; searchRecords(query: ProjectKnowledgeQuery): readonly ProjectKnowledgeResult[]; apply(mutation: Exclude): Promise; syncCorpus(corpus: readonly ProjectKnowledgeDocument[]): Promise; mutationApplied(idempotencyKey: string): Promise; markMutationApplied(idempotencyKey: string, appliedAt: string): Promise; indexStatus(): Promise; searchSections(query: ProjectKnowledgeQuery): readonly ProjectKnowledgeResult[]; rebuildWorkspace(corpus: readonly ProjectKnowledgeDocument[]): Promise; close(): void; private write; private applyFeedback; private writeRecord; private initializeSchema; private maintainGeneratedRecords; private createRecordSchema; private acquireDatabase; private static releaseDatabase; private requireDatabase; } export declare function readProjectKnowledgeStoreSnapshot(databasePath: string): ProjectKnowledgeStoreSnapshot; //# sourceMappingURL=local-store.d.ts.map