Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/memory / / SessionMemoryStoreExt
Interface: SessionMemoryStoreExt
Defined in: packages/memory/src/internal/storage-adapter.ts:103
Extension of the typed SessionMemoryStore with optional token-cache + vector-search + cursor-aware reader helpers that storage adapters may expose.
Stable
Extends
Methods
list()
list(scope, opts?): Promise<readonly Message[]>;Defined in: packages/core/dist/contracts/memory-store.d.ts:51
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
opts? | SessionListOptions |
Returns
Promise<readonly Message[]>
Inherited from
listMessagesSince()?
optional listMessagesSince(
scope,
lastMessageId,
limit): Promise<readonly SessionMessageRecord[]>;Defined in: packages/memory/src/internal/storage-adapter.ts:122
List messages for the supplied scope past the optional lastMessageId cursor, oldest-first, capped at limit. Used by the consolidator's standard phase to advance the per-scope idempotency cursor without rereading already-processed turns.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
lastMessageId | string | null |
limit | number |
Returns
Promise<readonly SessionMessageRecord[]>
push()
push(scope, message): Promise<MessageRef>;Defined in: packages/core/dist/contracts/memory-store.d.ts:50
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
message | Message |
Returns
Promise<MessageRef>
Inherited from
search()
search(
scope,
query,
opts?): Promise<readonly MemoryHit<MemoryRecord>[]>;Defined in: packages/core/dist/contracts/memory-store.d.ts:52
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
query | string |
opts? | MemorySearchOptions |
Returns
Promise<readonly MemoryHit<MemoryRecord>[]>
Inherited from
searchVector()?
optional searchVector(
scope,
embedding,
embedderId,
topK): Promise<readonly MemoryHit<MemoryRecord>[]>;Defined in: packages/memory/src/internal/storage-adapter.ts:104
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
embedding | Float32Array |
embedderId | string |
topK | number |
Returns
Promise<readonly MemoryHit<MemoryRecord>[]>
totalCachedTokens()?
optional totalCachedTokens(scope): Promise<number | null>;Defined in: packages/memory/src/internal/storage-adapter.ts:115
Sum of session_messages.token_count for the supplied scope. Returns null when the cache is empty / partially populated so callers can fall back to a heuristic. Surfaced per DEC-131.
Parameters
| Parameter | Type |
|---|---|
scope | SessionScope |
Returns
Promise<number | null>