import { Memory, MemoryCache } from './memory.ts'; export type MemoryNode = { name: string; missing: boolean; links: string[]; backlinks: string[]; }; export declare function extractLinks(content: string): string[]; /** * Incrementally patch the graph for a set of changed memories, instead of * re-scanning every document. Only the changed memories' own content is * re-parsed for links; affected targets have their backlinks patched. * Does NOT handle node deletion — full rebuildGraph() is still required * when a memory is removed, since that needs a backlink sweep across * everyone who might reference it. */ export declare function patchGraph(mems: Memory[], nodes: MemoryNode[], changed: Memory[]): MemoryNode[]; export declare function rebuildGraph(memories: Memory[] | MemoryCache): MemoryNode[]; export declare function renderMemoryGraph(nodes: MemoryNode[]): string;