Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/core / / SessionMemoryStore
Interface: SessionMemoryStore
Defined in: packages/core/src/contracts/memory-store.ts:109
Stable
Extended by
Methods
list()
list(scope, opts?): Promise<readonly Message[]>;Defined in: packages/core/src/contracts/memory-store.ts:111
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
opts? | SessionListOptions |
Returns
Promise<readonly Message[]>
listWithMetadata()?
optional listWithMetadata(scope, opts?): Promise<readonly SessionMessageWithMetadata[]>;Defined in: packages/core/src/contracts/memory-store.ts:116
List messages with their persisted identity (RP-5). Optional: stores that don't implement it fall back to list + fabricated ids on the export path.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
opts? | SessionListOptions |
Returns
Promise<readonly SessionMessageWithMetadata[]>
push()
push(scope, message): Promise<MessageRef>;Defined in: packages/core/src/contracts/memory-store.ts:110
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
message | Message |
Returns
Promise<MessageRef>
search()
search(
scope,
query,
opts?): Promise<readonly MemoryHit<MemoryRecord>[]>;Defined in: packages/core/src/contracts/memory-store.ts:131
Full-text search over the scoped session messages.
Query precedence (W-127): the POSITIONAL query parameter is authoritative; when the caller also sets opts.query (the field exists because MemorySearchOptions is shared with the option-object search surfaces), implementations MUST ignore it. The duplication is a known wart: narrowing opts to Omit<MemorySearchOptions, 'query'> is a candidate for the next major, not a change this line can make compatibly.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
query | string |
opts? | MemorySearchOptions |
Returns
Promise<readonly MemoryHit<MemoryRecord>[]>