setMemoryVisibilityOp()
setMemoryVisibilityOp(
ctx:VaultMemoryOperationsContext,id:string,opts:object):Promise<StoredVaultMemory|null>
Defined in: src/lib/db/memoryVault/operations.ts:1437
Set a memory’s People Nearby visibility (and optionally its twin opt-in).
This is the ONLY sanctioned write path for visibility — it keeps the
published_at bookkeeping consistent: transitioning to public
stamps published_at (kept if already set); transitioning to private
clears it (revoke). The server index remains the authority for what IS
published — this records the user’s intent for the reconciler to act on.
Preserves updated_at: a visibility change is metadata, not a
re-observation, so it must not inflate the recency multiplier (mirrors
setMemoryEntitiesOp).
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
‐ | |
|
|
|
‐ |
|
|
|
‐ |
|
|
|
If provided, sets the twin opt-in flag alongside the visibility. |
|
|
‐ |
Returns
Promise<StoredVaultMemory | null>
Deprecated
App code: use MemoryStore.setVisibility (createLocalMemoryStore).