/** * Memory Bridge — the write path: bridgeStoreEntry (upsert identity, dedup * gate, compare-and-swap) and the usage-recording helper it shares with the * feedback loop. Split out of memory-bridge.ts, which re-exports the public * symbols. */ export declare function bridgeStoreEntry(options: { key: string; value: string; namespace?: string; generateEmbeddingFlag?: boolean; tags?: string[]; ttl?: number; dbPath?: string; upsert?: boolean; /** Structured metadata persisted on the entry (KG nodes/edges, weights, provenance). */ metadata?: Record; /** Compare-and-swap guard for a read-merge-write caller (memory-kg.ts's * claim-ledger merge, K5). `'absent'` requires no row to exist yet at this * key; a number requires the row's CURRENT stored version to still equal * it. Either way, the check and the write are one atomic SQL statement * (see SqlBackend.storeIfVersion/storeIfAbsent) — a caller that read this * row (or found it absent) moments ago finds out here, via `conflict`, * whether a concurrent writer beat it, instead of silently overwriting (or * being overwritten by) that writer's update. Omit for the plain * last-write-wins upsert every other caller already relies on. */ ifVersion?: number | 'absent'; }): Promise<{ success: boolean; id: string; embedding?: { dimensions: number; model: string; }; guarded?: boolean; cached?: boolean; attested?: boolean; duplicate?: boolean; /** True when `ifVersion` did not match the row's current state — the row * changed (or was created) concurrently. `success` is false alongside this; * nothing was written. The caller must re-read and retry, not treat this * as a transient error. */ conflict?: boolean; error?: string; } | null>; /** Ids a usage/feedback pass could not train, with why — so `updated: 0` and * `applied: 0` are never a silent success. `not_found` means the id resolved * to no entry (deleted, or orphaned by an older re-ingest); `error` means the * entry existed but could not be updated. */ export type SkippedEntry = { id: string; reason: 'not_found' | 'error'; }; export declare function recordUsageOnBackend(backend: any, entryIds: string[]): Promise<{ updated: number; skipped: SkippedEntry[]; }>; //# sourceMappingURL=memory-bridge-store.d.ts.map