export type GraphRecordKind = 'entity' | 'edge' | 'fact';
export interface GraphEntity {
    kind: 'entity';
    id: string;
    type: string;
    name: string;
    attributes?: Record<string, unknown>;
    source: string;
    observedAt: string;
}
export interface GraphEdge {
    kind: 'edge';
    id: string;
    from: string;
    to: string;
    relation: string;
    weight?: number;
    source: string;
    observedAt: string;
}
export interface GraphFact {
    kind: 'fact';
    id: string;
    subject: string;
    predicate: string;
    object: string;
    confidence: number;
    source: string;
    observedAt: string;
}
export type GraphRecord = GraphEntity | GraphEdge | GraphFact;
export interface RecallResult {
    entities: GraphEntity[];
    edges: GraphEdge[];
    facts: GraphFact[];
    query: string;
}
export type AppendableEntity = Omit<GraphEntity, 'id' | 'observedAt'> & {
    id?: string;
    observedAt?: string;
};
export type AppendableEdge = Omit<GraphEdge, 'id' | 'observedAt'> & {
    id?: string;
    observedAt?: string;
};
export type AppendableFact = Omit<GraphFact, 'id' | 'observedAt'> & {
    id?: string;
    observedAt?: string;
};
export type AppendableRecord = AppendableEntity | AppendableEdge | AppendableFact;
export declare function appendRecord(projectDir: string, record: AppendableRecord): Promise<GraphRecord>;
export declare function readAll(projectDir: string): Promise<GraphRecord[]>;
/** Lightweight token-overlap recall. Replace with embeddings when volume warrants. */
export declare function recall(projectDir: string, query: string, limit?: number): Promise<RecallResult>;
/** Resolve an entity by name (case-insensitive exact match), most recent wins. */
export declare function findEntityByName(projectDir: string, name: string, type?: string): Promise<GraphEntity | undefined>;
/** Merge an entity by name+type, returning the existing id if found, else creating. */
export declare function upsertEntity(projectDir: string, type: string, name: string, attributes: Record<string, unknown>, source: string): Promise<GraphEntity>;
export interface KnowledgeGraphStatus {
    records: number;
    entities: number;
    edges: number;
    facts: number;
    lastObservedAt?: string;
}
export declare function getKnowledgeGraphStatus(projectDir: string): Promise<KnowledgeGraphStatus>;
//# sourceMappingURL=knowledgeGraph.d.ts.map