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
| Parameter | Type |
|---|---|
args | { store: MemoryStoreAdapter; tracer: Tracer; } |
args.store | MemoryStoreAdapter |
args.tracer | Tracer |
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
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<Insight | null>
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
| Parameter | Type |
|---|---|
scope | SessionScope |
opts | InsightListOptions |
Returns
Promise<readonly Insight[]>
search()
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
| Parameter | Type |
|---|---|
scope | SessionScope |
query | string |
opts | InsightSearchOptions |