VaultMemoryOperationsContext
Defined in: src/lib/db/memoryVault/operations.ts:129
Properties
canWrite()?
optionalcanWrite: () =>Promise<boolean>
Defined in: src/lib/db/memoryVault/operations.ts:139
Optional extraction source eligibility check, executed inside the writer. Must only read the database (must not start another writer).
Returns
Promise<boolean>
database
database:
Database
Defined in: src/lib/db/memoryVault/operations.ts:130
embeddedWalletSigner?
optionalembeddedWalletSigner:EmbeddedWalletSignerFn
Defined in: src/lib/db/memoryVault/operations.ts:134
entityCtx?
optionalentityCtx:EntityOperationsContext
Defined in: src/lib/db/memoryVault/operations.ts:157
When set, vault delete ops cascade to memory_entity rows pointing at the deleted memories. Without this the W5 graph lane keeps returning IDs of soft-deleted memories and the join table grows unbounded.
signMessage?
optionalsignMessage:SignMessageFn
Defined in: src/lib/db/memoryVault/operations.ts:133
singleTenant?
optionalsingleTenant:boolean
Defined in: src/lib/db/memoryVault/operations.ts:151
Asserts this context runs against a physically single-tenant database — one
where every row belongs to the same owner (the per-wallet client DBs, which
hold exactly one wallet’s rows written with user_id = null). This is the
ONLY thing that makes the decay sweep’s unscoped scan/archive/delete safe
without a userId: see assertVaultScopeForSweep. A shared /
multi-tenant DB must NOT set this — it must scope by userId instead.
walletAddress presence alone is NOT a substitute (the sweep query filters
by user_id only, so a bare walletAddress on a shared DB would sweep
every tenant).
userId?
optionaluserId:string
Defined in: src/lib/db/memoryVault/operations.ts:136
When set, operations scope to this user (server-side multi-user).
vaultMemoryCollection
vaultMemoryCollection:
Collection<StoredVaultMemoryModel>
Defined in: src/lib/db/memoryVault/operations.ts:131
walletAddress?
optionalwalletAddress:string
Defined in: src/lib/db/memoryVault/operations.ts:132