Skip to Content
Anuma SDKReactInternalFunctionsrelinkMemoryTopicsOp()

relinkMemoryTopicsOp()

relinkMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[]): Promise<string[]>

Defined in: src/lib/db/memoryVault/operations.ts:2000 

Rebuild the memory_entity index for the sweep’s topicsToRelink rows from each row’s topics record — the restored-device repair. No LLM call: every name already lives on the row.

Writes NOTHING to memory_vault, deliberately. Restored rows are written _status: 'synced', so touching them would mark the whole vault dirty and re-upload it (embeddings included) after every migration — the index is device-local state and rebuilding it is not a change to the memory. topics_user_managed in particular is left exactly as it arrived, so the autotagger stays off a curated memory whose links this just restored.

Skips deleted rows, foreign-user rows, and rows with null topics. Empty topics remove stale links. Returns the relinked IDs.

Parameters

ParameterType

ctx

VaultMemoryOperationsContext

memoryIds

readonly string[]

Returns

Promise<string[]>

Deprecated

App code: use MemoryStore.maintenance.relinkTopics (createLocalMemoryStore).

Last updated on