import type { DatabaseHandle } from './db.js'; import type { Community } from '../types.js'; export declare function upsertCommunity(db: DatabaseHandle, c: Community): void; export declare function clearCommunities(db: DatabaseHandle): void; /** * Remove `nodeId` from every community row's `node_ids` array AND regenerate * the cached `summary` string from the live remaining members so the two * fields don't drift apart. If a row becomes empty after pruning, delete the * row entirely. Cheap: O(communities). * * Called from `deleteNode` so the theme / community cache doesn't accumulate * ghost ids across sessions when vault files are removed. Before this * regenerated `summary`, `detect_themes` would return responses where the * `nodeIds` array was freshly pruned but the human-readable `summary` still * named the deleted note — classic half-invalidated cache. */ export declare function pruneNodeFromCommunities(db: DatabaseHandle, nodeId: string): void; export declare function getAllCommunities(db: DatabaseHandle): Community[]; /** * Look up a community by numeric id (passed as string or number) or by label * match. Returns the first hit. Labels are matched exactly. */ export declare function getCommunity(db: DatabaseHandle, idOrLabel: string | number): Community | null;