import type { KnowledgeConsolidationCandidateRecord, KnowledgeConsolidationCandidateUpsertInput, KnowledgeConsolidationReportRecord, KnowledgeConsolidationReportUpsertInput, KnowledgeEdgeRecord, KnowledgeEdgeUpsertInput, KnowledgeExtractionRecord, KnowledgeExtractionUpsertInput, KnowledgeIssueRecord, KnowledgeIssueUpsertInput, KnowledgeItemView, KnowledgeJobRunRecord, KnowledgeJobRunUpsertInput, KnowledgeNodeRecord, KnowledgeNodeUpsertInput, KnowledgeScheduleRecord, KnowledgeScheduleUpsertInput, KnowledgeSourceRecord, KnowledgeSourceUpsertInput, KnowledgeStatus, KnowledgeUsageRecord, KnowledgeUsageUpsertInput } from './types.js';
export interface KnowledgeStoreConfig {
    readonly dbPath?: string;
    readonly configManager?: {
        getControlPlaneConfigDir?: () => string;
    };
}
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 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;
    listSources(limit?: number): KnowledgeSourceRecord[];
    listNodes(limit?: number): KnowledgeNodeRecord[];
    listEdges(): KnowledgeEdgeRecord[];
    listIssues(limit?: number): KnowledgeIssueRecord[];
    listExtractions(limit?: number): KnowledgeExtractionRecord[];
    listJobRuns(limit?: number, jobId?: string): KnowledgeJobRunRecord[];
    listUsageRecords(limit?: number, input?: {
        readonly targetKind?: KnowledgeUsageRecord['targetKind'];
        readonly targetId?: string;
        readonly usageKind?: KnowledgeUsageRecord['usageKind'];
    }): KnowledgeUsageRecord[];
    listConsolidationCandidates(limit?: number, input?: {
        readonly status?: KnowledgeConsolidationCandidateRecord['status'];
        readonly subjectKind?: KnowledgeConsolidationCandidateRecord['subjectKind'];
        readonly subjectId?: string;
    }): 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;
    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>;
    upsertNode(input: KnowledgeNodeUpsertInput): Promise<KnowledgeNodeRecord>;
    upsertEdge(input: KnowledgeEdgeUpsertInput): Promise<KnowledgeEdgeRecord>;
    replaceIssues(inputs: readonly KnowledgeIssueUpsertInput[], namespace?: string): Promise<KnowledgeIssueRecord[]>;
    upsertIssue(input: KnowledgeIssueUpsertInput): Promise<KnowledgeIssueRecord>;
    upsertExtraction(input: KnowledgeExtractionUpsertInput): Promise<KnowledgeExtractionRecord>;
    upsertJobRun(input: KnowledgeJobRunUpsertInput): Promise<KnowledgeJobRunRecord>;
    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>;
    private initialize;
}
//# sourceMappingURL=store.d.ts.map