Skip to content

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()

ts
list(scope, opts?): Promise<readonly Message[]>;

Defined in: packages/core/src/contracts/memory-store.ts:111

Parameters

ParameterType
scopeSessionScope
opts?SessionListOptions

Returns

Promise&lt;readonly Message[]&gt;


listWithMetadata()?

ts
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

ParameterType
scopeSessionScope
opts?SessionListOptions

Returns

Promise&lt;readonly SessionMessageWithMetadata[]&gt;


push()

ts
push(scope, message): Promise<MessageRef>;

Defined in: packages/core/src/contracts/memory-store.ts:110

Parameters

ParameterType
scopeSessionScope
messageMessage

Returns

Promise&lt;MessageRef&gt;


ts
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

ParameterType
scopeSessionScope
querystring
opts?MemorySearchOptions

Returns

Promise<readonly MemoryHit&lt;MemoryRecord&gt;[]>