Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/memory / / InsightMemoryStoreExt

Interface: InsightMemoryStoreExt

Defined in: packages/memory/src/internal/storage-adapter.ts:537

Optional storage extension for the reflection insights table (P1-1). The consolidator's reflection pass inserts quarantined, cited insights here; the thin InsightMemory read surface lists / searches them; the ExpeL salience loop bumps + prunes them. Search is FTS-only by design — insights are a soft, rank-capped inspector surface, not primary recall.

Adapters that opt out leave the property undefined; reflection then degrades to a no-op (it never writes) and InsightMemory search/list return empty. The default @graphorin/store-sqlite adapter implements it.

Stable

Methods

bumpSalience()

ts
bumpSalience(
   id, 
   delta, 
reason?): Promise<void>;

Defined in: packages/memory/src/internal/storage-adapter.ts:554

Adjust an insight's ExpeL salience by delta, clamped at 0. The floor is the value at which prune removes it.

Parameters

ParameterType
idstring
deltanumber
reason?string

Returns

Promise&lt;void&gt;


get()?

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

Defined in: packages/memory/src/internal/storage-adapter.ts:549

Lookup a single insight by id (null when absent / pruned).

Parameters

ParameterType
idstring

Returns

Promise&lt;Insight | null&gt;


insert()

ts
insert(insight): Promise<void>;

Defined in: packages/memory/src/internal/storage-adapter.ts:539

Persist a synthesized insight (idempotent on id).

Parameters

ParameterType
insightInsight

Returns

Promise&lt;void&gt;


list()

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

Defined in: packages/memory/src/internal/storage-adapter.ts:541

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

Parameters

ParameterType
scopeSessionScope
opts?InsightStoreListOptions

Returns

Promise&lt;readonly Insight[]&gt;


prune()

ts
prune(scope): Promise<number>;

Defined in: packages/memory/src/internal/storage-adapter.ts:560

Soft-delete every salience-0 insight for the scope (the ExpeL forgetting step). Returns the number pruned. Tombstone only — pruned insights stay auditable.

Parameters

ParameterType
scopeSessionScope

Returns

Promise&lt;number&gt;


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

Defined in: packages/memory/src/internal/storage-adapter.ts:543

FTS keyword search over insight text.

Parameters

ParameterType
scopeSessionScope
querystring
opts?InsightSearchStoreOptions

Returns

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