createMessageSourceResolver
createMessageSourceResolver(
ctx:StorageOperationsContext):VerificationSources
Defined in: src/lib/memory/verifySupport.ts:455
Default VerificationSources over the chat store: resolves a source id
to its message text, role-prefixed per LINE so the verifier can apply the same
“the USER must have said it” rule the extractor does without the message body
being able to forge a speaker. Decryption is the ops layer’s job — pass the
same StorageOperationsContext the rest of the chat reads go through.
Returns null for an id that no longer resolves, which is the common case
rather than an error: messages are hard-deleted, and the ids on a memory are
whatever the client handed processTurn, which the SDK never required to be
chat rows.
Storage failures are deliberately NOT swallowed here. getMessageOp already
separates the two — null for “not found”, a throw for a locked DB or adapter
failure — and flattening that would report a broken read as permanently
missing evidence. The throw propagates into verification, which catches it
per id and returns unchecked/sources-unavailable; nothing reaches the
caller as an exception.
Parameters
| Parameter | Type |
|---|---|
|
|