Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/memory / / InsightMemory

Class: InsightMemory

Defined in: packages/memory/src/tiers/insight-memory.ts:47

InsightMemory — list / search reflection insights. A no-op (returns empty) when the storage adapter does not expose the optional insights surface.

Stable

Constructors

Constructor

ts
new InsightMemory(args): InsightMemory;

Defined in: packages/memory/src/tiers/insight-memory.ts:51

Parameters

ParameterType
args{ store: MemoryStoreAdapter; tracer: Tracer; }
args.storeMemoryStoreAdapter
args.tracerTracer

Returns

InsightMemory

Methods

get()

ts
get(id): Promise<Insight | null>;

Defined in: packages/memory/src/tiers/insight-memory.ts:105

Lookup a single insight by id.

Parameters

ParameterType
idstring

Returns

Promise&lt;Insight | null&gt;


list()

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

Defined in: packages/memory/src/tiers/insight-memory.ts:86

Most-recent insights for the scope (newest first).

Parameters

ParameterType
scopeSessionScope
optsInsightListOptions

Returns

Promise&lt;readonly Insight[]&gt;


ts
search(
   scope, 
   query, 
opts?): Promise<readonly MemoryHit<Insight>[]>;

Defined in: packages/memory/src/tiers/insight-memory.ts:57

FTS keyword search over insight text.

Parameters

ParameterType
scopeSessionScope
querystring
optsInsightSearchOptions

Returns

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