/** * Memory Bridge — entry reads and deletes (list, count, get, delete), * embedding generation, backend stats, and HNSW status/build. Split out of * memory-bridge.ts, which re-exports the public symbols. */ export declare function bridgeListEntries(options: { namespace?: string; limit?: number; offset?: number; dbPath?: string; }): Promise<{ success: boolean; entries: { id: string; key: string; namespace: string; content: string; accessCount: number; createdAt: string; updatedAt: string; hasEmbedding: boolean; tags: string[]; metadata: Record; }[]; total: number; error?: string; } | null>; /** A real database count for one namespace — `SELECT COUNT(*) WHERE * namespace = ?` against the existing `idx_namespace` index — as opposed to * `bridgeListEntries.total`, which is only the returned page's length (K7: * "bridgeListEntries.total is the returned page length, not a database * count"). Every row in a KG namespace (`kg:nodes`, `kg:edges`, `rules`) is * exactly one node/edge/rule — the name/adjacency index namespaces are * separate — so this count needs no per-row filtering to be exact, and costs * one indexed query instead of paging the whole namespace. * * @returns null when the backend is unavailable, or when the loaded backend * predates `count()` — callers fall back to the paginated scan they already * had rather than fail. */ export declare function bridgeCountEntries(namespace: string, dbPath?: string): Promise; export declare function bridgeGetEntry(options: { key: string; namespace?: string; dbPath?: string; agentId?: string; }): Promise<{ success: boolean; found: boolean; entry?: { id: string; key: string; namespace: string; content: string; accessCount: number; createdAt: string; updatedAt: string; hasEmbedding: boolean; tags: string[]; metadata: Record; /** The row's own revision counter (bumped on every store()/upsert), * distinct from any KG-level metadata.version. A caller doing a * read-merge-write passes this straight back as `bridgeStoreEntry`'s * `ifVersion` to detect a concurrent writer instead of silently * overwriting it (K5). Absent only when the underlying entry predates * version tracking. */ version?: number; }; cacheHit?: boolean; error?: string; } | null>; export declare function bridgeDeleteEntry(options: { key?: string; id?: string; namespace?: string; dbPath?: string; }): Promise<{ success: boolean; deleted: boolean; error?: string; } | null>; export declare function bridgeGenerateEmbedding(text: string, dbPath?: string): Promise<{ embedding: number[]; dimensions: number; model: string; } | null>; export declare function bridgeLoadEmbeddingModel(dbPath?: string): Promise<{ success: boolean; dimensions: number; modelName: string; loadTime?: number; } | null>; export declare function bridgeGetBackendStats(dbPath?: string): Promise<{ totalEntries: number; entriesByNamespace: Record; memoryUsage: number; } | null>; export declare function bridgeAddToHNSW(options: { id: string; embedding: number[]; namespace?: string; dbPath?: string; }): Promise<{ success: boolean; indexSize?: number; error?: string; } | null>; /** * Real status for the ANN (HNSW) fast path inside SqlBackend.search() — * whether the corpus is big enough to use it, whether it's currently built, * and where its on-disk cache lives. Read-only; does not build anything. */ export declare function bridgeGetHNSWStatus(dbPath?: string): Promise<{ available: boolean; thresholdEntries: number; activeEmbeddedEntries: number; built: boolean; entryCount: number; dimensions: number; cachePath: string | null; } | null>; /** * Force-build (or reload from disk cache) the ANN index regardless of * MONOMIND_HNSW_THRESHOLD — the real implementation behind * `memory search --build-hnsw`. */ export declare function bridgeForceBuildHNSW(dbPath?: string): Promise<{ entryCount: number; dimensions: number; cachePath: string | null; } | null>; //# sourceMappingURL=memory-bridge-entries.d.ts.map