Skip to Content
Anuma SDKReactInternalFunctionsgetVaultRankingProjectionsOp

getVaultRankingProjectionsOp

getVaultRankingProjectionsOp(ctx: VaultMemoryOperationsContext, options?: object): Promise<RankableVaultMemory[]>

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

Return content-free RankableVaultMemory projections for recall ranking — the “rank first, decrypt last” half of on-demand recall (#5017).

Mirrors getAllVaultMemoriesOp’s query EXACTLY (same baseVaultConditions — is_deleted=false + user_id scoping — plus the same scope/folder filters and ordering) so the candidate SET is identical to the whole-vault read; the ONLY difference is that content is never decrypted (and never returned). Callers rank on embedding, then decrypt the top-N winners on demand via getVaultMemoryOp.

Because it reuses baseVaultConditions, deleted and cross-user rows are excluded here just as they are from every other read path — a no-decrypt op that skipped these would leak embeddings for rows the caller can’t see.

Parameters

ParameterType

ctx

VaultMemoryOperationsContext

options?

object

options.folderId?

string | null

options.limit?

number

options.memoryIds?

string[]

options.scopes?

string[]

options.since?

Date

Returns

Promise<RankableVaultMemory[]>

Last updated on