import type { KnowledgeConsolidationCandidateRecord, KnowledgeConsolidationCandidateUpsertInput, KnowledgeConsolidationReportRecord, KnowledgeConsolidationReportUpsertInput, KnowledgeEdgeRecord, KnowledgeEdgeUpsertInput, KnowledgeExtractionRecord, KnowledgeExtractionUpsertInput, KnowledgeIssueRecord, KnowledgeIssueUpsertInput, KnowledgeItemView, KnowledgeJobRunRecord, KnowledgeJobRunUpsertInput, KnowledgeRefinementTaskFilter, KnowledgeRefinementTaskRecord, KnowledgeRefinementTaskUpsertInput, KnowledgeNodeRecord, KnowledgeNodeUpsertInput, KnowledgeScheduleRecord, KnowledgeScheduleUpsertInput, KnowledgeSourceRecord, KnowledgeSourceUpsertInput, KnowledgeStatus, KnowledgeUsageRecord, KnowledgeUsageUpsertInput } from './types.js';
import { type KnowledgeStoreConfig } from './store-config.js';
import { type KnowledgeSpaceDeleteResult } from './store-space-delete.js';
export declare class KnowledgeStore {
    private readonly sqlite;
    private readonly dbPath;
    private ready;
    private initPromise;
    private readonly sources;
    private readonly nodes;
    private readonly edges;
    private readonly issues;
    private readonly extractions;
    private readonly jobRuns;
    private readonly refinementTasks;
    private readonly usageRecords;
    private readonly consolidationCandidates;
    private readonly consolidationReports;
    private readonly schedules;
    constructor(config: KnowledgeStoreConfig);
    get isReady(): boolean;
    get storagePath(): string;
    private asReadView;
    init(): Promise<void>;
    status(): KnowledgeStatus;
    batch<T>(operation: () => Promise<T>): Promise<T>;
    listSources(limit?: number): KnowledgeSourceRecord[];
    listSourcesInSpace(spaceId: string): KnowledgeSourceRecord[];
    listNodes(limit?: number): KnowledgeNodeRecord[];
    listNodesInSpace(spaceId: string): KnowledgeNodeRecord[];
    listEdges(): KnowledgeEdgeRecord[];
    listIssues(limit?: number): KnowledgeIssueRecord[];
    listIssuesInSpace(spaceId: string): KnowledgeIssueRecord[];
    listExtractions(limit?: number): KnowledgeExtractionRecord[];
    listExtractionsInSpace(spaceId: string): KnowledgeExtractionRecord[];
    listExtractionsForSources(sourceIds: ReadonlySet<string>): KnowledgeExtractionRecord[];
    listJobRuns(limit?: number, jobId?: string): KnowledgeJobRunRecord[];
    listRefinementTasks(limit?: number, input?: KnowledgeRefinementTaskFilter): KnowledgeRefinementTaskRecord[];
    listUsageRecords(limit?: number, input?: {
        readonly targetKind?: KnowledgeUsageRecord['targetKind'] | undefined;
        readonly targetId?: string | undefined;
        readonly usageKind?: KnowledgeUsageRecord['usageKind'] | undefined;
    }): KnowledgeUsageRecord[];
    listConsolidationCandidates(limit?: number, input?: {
        readonly status?: KnowledgeConsolidationCandidateRecord['status'] | undefined;
        readonly subjectKind?: KnowledgeConsolidationCandidateRecord['subjectKind'] | undefined;
        readonly subjectId?: string | undefined;
    }): KnowledgeConsolidationCandidateRecord[];
    listConsolidationReports(limit?: number): KnowledgeConsolidationReportRecord[];
    listSchedules(limit?: number): KnowledgeScheduleRecord[];
    getSource(id: string): KnowledgeSourceRecord | null;
    getNode(id: string): KnowledgeNodeRecord | null;
    getIssue(id: string): KnowledgeIssueRecord | null;
    getExtraction(id: string): KnowledgeExtractionRecord | null;
    getExtractionBySourceId(sourceId: string): KnowledgeExtractionRecord | null;
    getJobRun(id: string): KnowledgeJobRunRecord | null;
    getRefinementTask(id: string): KnowledgeRefinementTaskRecord | null;
    getUsageRecord(id: string): KnowledgeUsageRecord | null;
    getConsolidationCandidate(id: string): KnowledgeConsolidationCandidateRecord | null;
    getConsolidationCandidateBySubject(subjectKind: KnowledgeConsolidationCandidateRecord['subjectKind'], subjectId: string, candidateType: KnowledgeConsolidationCandidateRecord['candidateType']): KnowledgeConsolidationCandidateRecord | null;
    getConsolidationReport(id: string): KnowledgeConsolidationReportRecord | null;
    getSchedule(id: string): KnowledgeScheduleRecord | null;
    getSourceByCanonicalUri(canonicalUri: string): KnowledgeSourceRecord | null;
    getNodeByKindAndSlug(kind: KnowledgeNodeRecord['kind'], slug: string): KnowledgeNodeRecord | null;
    edgesFor(kind: KnowledgeEdgeRecord['fromKind'] | KnowledgeEdgeRecord['toKind'], id: string): KnowledgeEdgeRecord[];
    getItem(id: string): KnowledgeItemView | null;
    upsertSource(input: KnowledgeSourceUpsertInput): Promise<KnowledgeSourceRecord>;
    deleteSource(id: string): Promise<boolean>;
    replaceSourceRecord(record: KnowledgeSourceRecord): Promise<void>;
    upsertNode(input: KnowledgeNodeUpsertInput): Promise<KnowledgeNodeRecord>;
    deleteNode(id: string): Promise<boolean>;
    replaceNodeRecord(record: KnowledgeNodeRecord): Promise<void>;
    upsertEdge(input: KnowledgeEdgeUpsertInput): Promise<KnowledgeEdgeRecord>;
    deleteEdge(id: string): Promise<boolean>;
    replaceEdgeRecord(record: KnowledgeEdgeRecord): Promise<void>;
    replaceIssues(inputs: readonly KnowledgeIssueUpsertInput[], namespace?: string): Promise<KnowledgeIssueRecord[]>;
    upsertIssue(input: KnowledgeIssueUpsertInput): Promise<KnowledgeIssueRecord>;
    replaceIssueRecord(record: KnowledgeIssueRecord): Promise<void>;
    upsertExtraction(input: KnowledgeExtractionUpsertInput): Promise<KnowledgeExtractionRecord>;
    upsertJobRun(input: KnowledgeJobRunUpsertInput): Promise<KnowledgeJobRunRecord>;
    upsertRefinementTask(input: KnowledgeRefinementTaskUpsertInput): Promise<KnowledgeRefinementTaskRecord>;
    upsertUsageRecord(input: KnowledgeUsageUpsertInput): Promise<KnowledgeUsageRecord>;
    upsertConsolidationCandidate(input: KnowledgeConsolidationCandidateUpsertInput): Promise<KnowledgeConsolidationCandidateRecord>;
    upsertConsolidationReport(input: KnowledgeConsolidationReportUpsertInput): Promise<KnowledgeConsolidationReportRecord>;
    upsertSchedule(input: KnowledgeScheduleUpsertInput): Promise<KnowledgeScheduleRecord>;
    deleteSchedule(id: string): Promise<boolean>;
    planKnowledgeSpaceDelete(spaceId: string): Promise<KnowledgeSpaceDeleteResult>;
    deleteKnowledgeSpace(spaceId: string, input?: {
        readonly dryRun?: boolean;
    }): Promise<KnowledgeSpaceDeleteResult>;
    private knowledgeSpaceRowStores;
    private initialize;
}
//# sourceMappingURL=store.d.ts.map